/* ================================
   GLOBAL THEME (LIGHT & DARK MODE)
================================ */
:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #2c3e50;
  --muted: #6b7280;
  --accent: #007bff;
  --border: #d0d7e0;
}

:root.dark {
  --bg: #0b1220;
  --card: #0f1724;
  --text: #e6eef8;
  --muted: #9aa7b7;
  --accent: #4f46e5;
  --border: #1f2a3a;
}

/* Reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ================================
   LAYOUT WRAPPER
================================ */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 25px auto;
  padding: 0 10px;
}

/* ================================
   CARD COMPONENT
================================ */
.card {
  padding: 20px;
  background: var(--card);
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  border: 1px solid var(--border);
}

/* ================================
   INPUTS & BUTTONS
================================ */
input[type="text"],
input,
textarea {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  width: 100%;
}

textarea {
  resize: vertical;
}

button,
.btn {
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-weight: 500;
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* Flex row */
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* ================================
   TABLE STYLE
================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
}

tr:hover {
  background: rgba(0,0,0,0.05);
}

:root.dark tr:hover {
  background: rgba(255,255,255,0.05);
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ================================
   CHART AREA
================================ */
.charts {
  display: flex;
  gap: 14px;
}

.chart-card {
  flex: 1;
  padding: 14px;
}

@media (max-width: 900px) {
  .charts {
    flex-direction: column;
  }
}

/* ================================
   TOPBAR + DARK MODE SWITCH
================================ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 5px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle input {
  transform: scale(1.2);
}
