/* ===== OshaSmart UI polish ===== */
:root {
  --bg: #0a0a0a;
  --card: #141414;
  --card-border: #2a2a2a;
  --gold: #d4af37;
  --gold-dim: rgba(212, 175, 55, 0.15);
  --text: #f0f0f0;
  --muted: #888;
  --danger: #f44336;
  --ok: #4caf50;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.main-content, .content, .page-content {
  padding: 20px 24px 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.card h2, .card h3 {
  color: var(--gold);
  margin-top: 0;
  font-weight: 600;
}

/* KPI row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card, .stat-box {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.15s ease;
}

.stat-card:hover, .stat-box:hover {
  border-color: var(--gold);
}

.stat-label, .stat-box .label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.stat-value, .stat-box .number {
  color: var(--gold);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Tables */
.table-responsive { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  text-align: left;
  color: var(--gold);
  font-size: 0.85rem;
  padding: 12px 10px;
  border-bottom: 1px solid var(--card-border);
  background: #111;
}

table td {
  padding: 12px 10px;
  border-bottom: 1px solid #1f1f1f;
  color: #ddd;
}

table tr:hover td {
  background: rgba(212, 175, 55, 0.04);
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--gold);
  color: #111 !important;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }

.btn-secondary, .btn[style*="background:#333"] {
  background: #333 !important;
  color: #eee !important;
}

/* Forms */
input, select, textarea {
  background: #0d0d0d !important;
  color: #fff !important;
  border: 1px solid #333 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold) !important;
}

/* Sidebar polish */
.sidebar, .side-panel, nav.sidebar {
  background: #0d0d0d;
  border-right: 1px solid var(--card-border);
}

.nav-item, .sidebar a {
  border-radius: 8px;
  margin: 2px 8px;
  padding: 10px 12px;
}

.nav-item:hover, .sidebar a:hover {
  background: var(--gold-dim);
  color: var(--gold);
}

.chart-card canvas {
  max-height: 280px;
  width: 100% !important;
}

@media (max-width: 768px) {
  .main-content, .content { padding: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}



/* ===== OshaSmart UI polish ===== */
:root {
  --bg: #0a0a0a;
  --card: #141414;
  --card-border: #2a2a2a;
  --gold: #d4af37;
  --gold-dim: rgba(212, 175, 55, 0.15);
  --text: #f0f0f0;
  --muted: #888;
  --danger: #f44336;
  --ok: #4caf50;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.main-content, .content, .page-content {
  padding: 20px 24px 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.card h2, .card h3 {
  color: var(--gold);
  margin-top: 0;
  font-weight: 600;
}

/* KPI row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card, .stat-box {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.15s ease;
}

.stat-card:hover, .stat-box:hover {
  border-color: var(--gold);
}

.stat-label, .stat-box .label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.stat-value, .stat-box .number {
  color: var(--gold);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Tables */
.table-responsive { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  text-align: left;
  color: var(--gold);
  font-size: 0.85rem;
  padding: 12px 10px;
  border-bottom: 1px solid var(--card-border);
  background: #111;
}

table td {
  padding: 12px 10px;
  border-bottom: 1px solid #1f1f1f;
  color: #ddd;
}

table tr:hover td {
  background: rgba(212, 175, 55, 0.04);
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--gold);
  color: #111 !important;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }

.btn-secondary, .btn[style*="background:#333"] {
  background: #333 !important;
  color: #eee !important;
}

/* Forms */
input, select, textarea {
  background: #0d0d0d !important;
  color: #fff !important;
  border: 1px solid #333 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold) !important;
}

/* ===== Sidebar nav: always vertical, never blue browser links ===== */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: #0d0d0d;
  border-right: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
}

.nav-section {
  color: #666;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 14px 16px 6px;
  text-transform: uppercase;
}

.sidebar a.nav-item,
.sidebar-nav a.nav-item,
a.nav-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: auto;
  margin: 2px 10px;
  padding: 11px 14px;
  color: #ddd !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.3;
  white-space: nowrap;
}

.sidebar a.nav-item:hover,
.sidebar a.nav-item:visited,
.sidebar a.nav-item:active {
  color: #d4af37 !important;
  text-decoration: none !important;
  background: rgba(212, 175, 55, 0.12);
}

.sidebar a.nav-item i {
  width: 20px;
  text-align: center;
  color: #d4af37;
}

.sidebar-footer {
  border-top: 1px solid #2a2a2a;
  padding: 12px;
}

.sidebar-footer .user-name {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 8px;
  padding: 0 8px;
}

.sidebar-footer a {
  color: #ddd !important;
  text-decoration: none !important;
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  min-width: 0;
  background: #0a0a0a;
}

.menu-toggle {
  display: none;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #d4af37;
  font-size: 1.4rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* ===== MOBILE: drawer sidebar ===== */
@media (max-width: 900px) {
  .menu-toggle {
    display: inline-block;
  }

  .layout {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    max-width: 85vw;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
  }

  .sidebar-nav {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }

  .sidebar a.nav-item {
    display: flex !important;
    width: calc(100% - 20px);
  }

  .main-content {
    width: 100%;
    margin-left: 0;
  }

  /* Dim page when menu open (optional overlay via body class) */
  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
  }
}

.chart-card canvas {
  max-height: 280px;
  width: 100% !important;
}


@media (max-width: 768px) {
  .main-content, .content { padding: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
