:root {
  --brand-navy: #1a3a5c;
  --brand-green: #3db54a;
  --brand-orange: #ff8c1a;
  --sidebar-width: 250px;
  --topbar-height: 60px;
  --card-radius: 10px;
}

body {
  font-family: 'Noto Sans Gujarati', 'Inter', sans-serif;
  background: #f4f6f9;
  color: #222;
}

body.dark-mode {
  background: #12181f;
  color: #e6e6e6;
}
body.dark-mode .card,
body.dark-mode .topbar,
body.dark-mode .sidebar,
body.dark-mode table {
  background: #1c2530 !important;
  color: #e6e6e6 !important;
}
body.dark-mode .table {
  color: #e6e6e6;
}

.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--brand-navy);
  color: #fff;
  flex-shrink: 0;
  transition: margin-left .2s ease;
  min-height: 100vh;
}
.sidebar.collapsed { margin-left: calc(var(--sidebar-width) * -1); }

.sidebar-brand {
  padding: 18px 16px;
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; gap: 8px;
}

.sidebar-nav { display: flex; flex-direction: column; padding: 10px 0; }
.sidebar-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 10px 18px;
  display: flex; align-items: center; gap: 10px;
  font-size: .92rem;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-right: 3px solid var(--brand-green);
}
.nav-section-title {
  color: rgba(255,255,255,.5);
  font-size: .72rem;
  text-transform: uppercase;
  padding: 12px 18px 4px;
  letter-spacing: .05em;
}

.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-height);
  background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  position: sticky; top: 0; z-index: 10;
}

.content-body { padding: 20px; flex: 1; }

.app-footer { padding: 12px 20px; color: #888; border-top: 1px solid #e5e5e5; }

.stat-card {
  border-radius: var(--card-radius);
  border: none;
  color: #fff;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.stat-card.navy { background: linear-gradient(135deg, var(--brand-navy), #2a5580); }
.stat-card.green { background: linear-gradient(135deg, var(--brand-green), #2a8a35); }
.stat-card.orange { background: linear-gradient(135deg, var(--brand-orange), #d96e00); }
.stat-card.gray { background: linear-gradient(135deg, #556, #334); }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; }
.stat-card .stat-label { font-size: .82rem; opacity: .9; }

.card { border-radius: var(--card-radius); border: 1px solid #e9edf2; }

/* Mould life indicator badges */
.life-indicator { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.life-green  { background: #e6f7e9; color: #1e7c34; }
.life-yellow { background: #fff6e0; color: #a86c00; }
.life-red    { background: #fde8e8; color: #b3261e; }

.mould-status-Available { color: #1e7c34; font-weight: 600; }
.mould-status-InProduction { color: #0d6efd; font-weight: 600; }
.mould-status-UnderMaintenance { color: #a86c00; font-weight: 600; }
.mould-status-Damaged { color: #b3261e; font-weight: 600; }
.mould-status-Scrap { color: #6c757d; font-weight: 600; text-decoration: line-through; }

.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-navy), #12203a);
}
.auth-card {
  background: #fff; border-radius: 14px; padding: 36px;
  width: 380px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
}

@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 100; margin-left: calc(var(--sidebar-width) * -1); }
  .sidebar.show { margin-left: 0; }
}
