@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap');

/* ==========================================================================
   Material Dashboard - replica of Creative Tim Material Dashboard React
   https://demos.creative-tim.com/material-dashboard-react/
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  /* Gradients dari Material Dashboard React */
  --grad-primary:  linear-gradient(195deg, #EC407A, #D81B60);
  --grad-info:     linear-gradient(195deg, #49a3f1, #1A73E8);
  --grad-success:  linear-gradient(195deg, #66BB6A, #43A047);
  --grad-warning:  linear-gradient(195deg, #FFA726, #FB8C00);
  --grad-error:    linear-gradient(195deg, #EF5350, #E53935);
  --grad-dark:     linear-gradient(195deg, #42424a, #191919);
  --grad-light:    linear-gradient(195deg, #EBEFF4, #CED4DA);

  /* Colored shadows — kunci look Material Dashboard */
  --shadow-primary: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(233, 30, 99, .4);
  --shadow-info:    0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(26, 115, 232, .4);
  --shadow-success: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(76, 175, 80, .4);
  --shadow-warning: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(251, 140, 0, .4);
  --shadow-error:   0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(244, 67, 54, .4);
  --shadow-dark:    0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(66, 66, 74, .4);
  --shadow-card:    0 2px 5px 0 rgba(0,0,0,.07), 0 4px 10px 0 rgba(0,0,0,.05);
  --shadow-sidebar: 0 20px 27px 0 rgba(0,0,0,.05);

  --radius-sm: 0.5rem;
  --radius:    0.75rem;
  --radius-lg: 1rem;

  --text-dark: #344767;
  --text-muted: #7b809a;
  --text-light: #f0f2f5;

  --sidebar-w: 250px;
  --sidebar-grad: linear-gradient(195deg, #2f74d0, #173f7a);
}

body {
  font-family: 'Quicksand', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-dark);
  background: #f0f2f5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.25s ease;
}

a { text-decoration: none; color: inherit; }
h1,h2,h3,h4,h5,h6 { margin: 0; color: var(--text-dark); font-weight: 700; }
p  { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }

/* ==========================================================================
   SIDEBAR - floating, rounded corners, dark gradient
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 1rem;
  left: 1rem;
  bottom: 1rem;
  width: var(--sidebar-w);
  background: var(--sidebar-grad);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sidebar);
  padding: 0;
  overflow: hidden;
  z-index: 1030;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

body.theme-dark {
  --sidebar-grad: linear-gradient(195deg, #2f3137, #111318);
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
}

body.theme-dark .navbar .breadcrumb-links,
body.theme-dark .navbar .breadcrumb-links a,
body.theme-dark .navbar .breadcrumb-links .separator {
  color: #aebdd9;
}

body.theme-dark .navbar .page-title {
  color: #e6edf9;
}

body.theme-dark .nav-icon-btn {
  color: #b8c5de;
}

body.theme-dark .nav-icon-btn:hover {
  background: rgba(148, 163, 184, 0.18);
  color: #f8fbff;
}

/* Dark mode readability for analytic page headings/subtitles */
body.theme-dark .ga-title h2,
body.theme-dark .gdm-title h2,
body.theme-dark .tat-title h2,
body.theme-dark .lab-title h2,
body.theme-dark .rad-title h2,
body.theme-dark .op-title h2,
body.theme-dark .cmx-title h2,
body.theme-dark .dm-head h2,
body.theme-dark .antrol-title,
body.theme-dark .jkn-title-wrap h2,
body.theme-dark .js-title h2,
body.theme-dark .juc-title h2,
body.theme-dark .sc-title h2,
body.theme-dark .ub-title h2,
body.theme-dark .dead-title h2,
body.theme-dark .idrg-head h2,
body.theme-dark .prb-head h2,
body.theme-dark .audit-page-title h2,
body.theme-dark .bor-page-title,
body.theme-dark .finance-page-title,
body.theme-dark .farmasi-title,
body.theme-dark .opname-title,
body.theme-dark .profit-title,
body.theme-dark .bridging-title {
  color: #eaf2ff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

body.theme-dark .ga-title p,
body.theme-dark .gdm-title p,
body.theme-dark .tat-title p,
body.theme-dark .lab-title p,
body.theme-dark .rad-title p,
body.theme-dark .op-title p,
body.theme-dark .cmx-title p,
body.theme-dark .dm-head p,
body.theme-dark .jkn-title-wrap p,
body.theme-dark .js-title p,
body.theme-dark .juc-title p,
body.theme-dark .sc-title p,
body.theme-dark .ub-title p,
body.theme-dark .dead-title p,
body.theme-dark .prb-head p,
body.theme-dark .audit-page-title p,
body.theme-dark .bor-page-subtitle {
  color: #b6c6df;
}

.sidebar-nav .nav-link.active {
  background: linear-gradient(195deg, #60a5fa, #2563eb);
  box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(37, 99, 235, .5);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1020;
}

.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 5px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.95rem 0.9rem;
  color: #fff;
}

.sidebar-brand .brand-logo-image {
  display: block;
  width: min(100%, 210px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.22));
}

.sidebar-brand .brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #e91e63;
  font-size: 14px;
}

.sidebar-brand .brand-text {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,.4), rgba(255,255,255,0));
  margin: 0 1rem;
}

.sidebar-nav {
  padding: 1rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 5px; }

.sidebar-nav .nav-item { margin-bottom: 0.25rem; }

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.675rem 1rem;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 400;
  transition: all 0.25s ease-in-out;
  letter-spacing: 0.2px;
}

.sidebar-nav .nav-link:hover {
  background: rgba(255,255,255,0.1);
}

.sidebar-nav .nav-link.active {
  background: var(--grad-info);
  box-shadow: var(--shadow-info);
  color: #fff;
}

.sidebar-nav .nav-link .nav-icon {
  width: 32px;
  height: 32px;
  background: rgba(199,199,199,.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-nav .nav-link.active .nav-icon {
  background: #fff;
  color: #344767;
}

.sidebar-dropdown {
  width: 100%;
}

.sidebar-dropdown > summary {
  list-style: none;
  cursor: pointer;
}

.sidebar-dropdown > summary::-webkit-details-marker {
  display: none;
}

.sidebar-dropdown .dropdown-caret {
  margin-left: auto;
  font-size: 0.7rem;
  opacity: 0.85;
  transition: transform 0.2s ease;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-dropdown[open] .dropdown-caret {
  transform: rotate(180deg);
}

.sidebar-submenu {
  list-style: none;
  margin: 0.25rem 0 0.5rem;
  padding: 0 0.25rem 0 1.15rem;
}

.sidebar-submenu .sub-link {
  --sub-accent: #60a5fa;
  --sub-accent-soft: rgba(96,165,250,0.24);
  --sub-accent-ring: rgba(96,165,250,0.52);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.95);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 0.48rem 0.68rem;
  border-radius: 0.72rem;
  background: linear-gradient(135deg, var(--sub-accent-soft), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 3px 0 0 var(--sub-accent), 0 6px 14px rgba(15,23,42,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.sidebar-submenu .sub-link:hover {
  transform: translateX(2px);
  border-color: var(--sub-accent-ring);
  box-shadow: inset 3px 0 0 var(--sub-accent), 0 10px 18px rgba(15,23,42,0.32);
  filter: brightness(1.03);
}

.sidebar-submenu li:nth-child(6n+1) .sub-link {
  --sub-accent: #60a5fa;
  --sub-accent-soft: rgba(96,165,250,0.24);
  --sub-accent-ring: rgba(96,165,250,0.52);
}

.sidebar-submenu li:nth-child(6n+2) .sub-link {
  --sub-accent: #34d399;
  --sub-accent-soft: rgba(52,211,153,0.24);
  --sub-accent-ring: rgba(52,211,153,0.52);
}

.sidebar-submenu li:nth-child(6n+3) .sub-link {
  --sub-accent: #fbbf24;
  --sub-accent-soft: rgba(251,191,36,0.26);
  --sub-accent-ring: rgba(251,191,36,0.52);
}

.sidebar-submenu li:nth-child(6n+4) .sub-link {
  --sub-accent: #f472b6;
  --sub-accent-soft: rgba(244,114,182,0.24);
  --sub-accent-ring: rgba(244,114,182,0.52);
}

.sidebar-submenu li:nth-child(6n+5) .sub-link {
  --sub-accent: #a78bfa;
  --sub-accent-soft: rgba(167,139,250,0.24);
  --sub-accent-ring: rgba(167,139,250,0.52);
}

.sidebar-submenu li:nth-child(6n+6) .sub-link {
  --sub-accent: #22d3ee;
  --sub-accent-soft: rgba(34,211,238,0.24);
  --sub-accent-ring: rgba(34,211,238,0.52);
}

.sidebar-submenu .sub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sub-accent);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
  flex-shrink: 0;
}

.sidebar-submenu .sub-link.active {
  background: linear-gradient(135deg, rgba(255,255,255,0.2), var(--sub-accent-soft));
  color: #fff;
  border-color: var(--sub-accent-ring);
  box-shadow: inset 3px 0 0 #ffffff, 0 12px 20px rgba(15,23,42,0.35);
}

.sidebar-submenu .sub-link.active .sub-dot {
  background: #fff;
  box-shadow: 0 0 0 3px var(--sub-accent);
}

.sidebar-heading {
  padding: 1rem 1rem 0.5rem;
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.7);
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.main-content {
  margin-left: calc(var(--sidebar-w) + 2rem);
  padding: 1rem 1.5rem 1.5rem 0.5rem;
  min-height: 100vh;
  transition: margin-left 0.3s ease, padding 0.3s ease;
}

@media (min-width: 993px){
  body.sidebar-closed .sidebar {
    transform: translateX(calc(-100% - 1rem));
  }
  body.sidebar-closed .main-content {
    margin-left: 0;
    padding-left: 1rem;
  }
}

/* ==========================================================================
   NAVBAR (top)
   ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: transparent;
  margin-bottom: 1.5rem;
}

.navbar .breadcrumb {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1;
}

.navbar .breadcrumb-links {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.navbar .breadcrumb-links a { color: var(--text-muted); }
.navbar .breadcrumb-links .separator { margin: 0 0.4rem; }

.navbar .page-title {
  font-family: 'Poppins', 'Quicksand', Helvetica, Arial, sans-serif;
  font-size: clamp(1.02rem, 0.84rem + 0.78vw, 1.42rem);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.15px;
  text-transform: none;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.search-input {
  position: relative;
}
.search-input input {
  width: 200px;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border: 1px solid #d2d6da;
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.75rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input input:focus { border-color: #35d1f5; box-shadow: 0 0 0 2px rgba(53,209,245,.25); }
.search-input i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.nav-user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 200px;
  max-width: 260px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d2d6da;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-dark);
  font-size: 0.8rem;
  font-weight: 600;
}
.nav-user-chip i {
  color: var(--text-muted);
  font-size: 1rem;
}
.nav-user-chip span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.year-filter-form select {
  height: 36px;
  padding: 0 0.7rem;
  border: 1px solid #d2d6da;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-dark);
  font-size: 0.75rem;
  outline: none;
  cursor: pointer;
}
.year-filter-form select:focus {
  border-color: #35d1f5;
  box-shadow: 0 0 0 2px rgba(53,209,245,.25);
}

.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  transition: background 0.2s;
  position: relative;
}
.nav-icon-btn:hover { background: rgba(0,0,0,0.04); color: var(--text-dark); }

.nav-icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #f44335;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  line-height: 1;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 768px){
  .detail-tabs { flex-direction: column; }
}

/* ==========================================================================
   GRID
   ========================================================================== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}
.col-3  { flex: 0 0 25%;      max-width: 25%;      padding: 0.75rem; }
.col-4  { flex: 0 0 33.3333%; max-width: 33.3333%; padding: 0.75rem; }
.col-6  { flex: 0 0 50%;      max-width: 50%;      padding: 0.75rem; }
.col-8  { flex: 0 0 66.6666%; max-width: 66.6666%; padding: 0.75rem; }
.col-12 { flex: 0 0 100%;     max-width: 100%;     padding: 0.75rem; }

@media (max-width: 1200px){
  .col-3 { flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 992px){
  .navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.35rem 0.45rem 0.6rem;
    margin-bottom: 1rem;
  }
  .navbar .breadcrumb {
    width: 100%;
  }
  .navbar .page-title {
    font-size: clamp(0.98rem, 0.88rem + 1vw, 1.24rem);
    line-height: 1.28;
  }
  .navbar-right {
    width: 100%;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .nav-user-chip {
    flex: 1 1 230px;
    min-width: 170px;
    max-width: 100%;
    padding: 0.45rem 0.65rem;
    font-size: 0.76rem;
  }
  .year-filter-form select {
    height: 34px;
    min-width: 128px;
    font-size: 0.72rem;
  }
  .nav-icon-btn,
  .sidebar-toggle {
    width: 34px;
    height: 34px;
    font-size: 0.92rem;
  }
  .sidebar { transform: translateX(calc(-100% - 1rem)); transition: 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 1rem; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  body.sidebar-mobile-open { overflow: hidden; }
  .col-3, .col-4, .col-6, .col-8 { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 768px){
  .navbar {
    padding: 0.25rem 0.3rem 0.55rem;
  }
  .navbar .page-title {
    font-size: clamp(0.92rem, 0.82rem + 1.1vw, 1.08rem);
  }
  .nav-user-chip {
    flex-basis: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px){
  .navbar .page-title {
    font-size: 0.96rem;
    letter-spacing: 0.08px;
  }
  .nav-user-chip {
    display: none;
  }
}

/* ==========================================================================
   CARD
   ========================================================================== */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: visible;
  margin-top: 1.5rem;
  word-wrap: break-word;
}

/* Floating colored header (khas Material Dashboard) */
.card-header-floating {
  position: absolute;
  top: -20px;
  left: 1rem;
  right: auto;
  border-radius: var(--radius);
  padding: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-header-floating.primary { background: var(--grad-primary); box-shadow: var(--shadow-primary); }
.card-header-floating.info    { background: var(--grad-info);    box-shadow: var(--shadow-info); }
.card-header-floating.success { background: var(--grad-success); box-shadow: var(--shadow-success); }
.card-header-floating.warning { background: var(--grad-warning); box-shadow: var(--shadow-warning); }
.card-header-floating.error   { background: var(--grad-error);   box-shadow: var(--shadow-error); }
.card-header-floating.dark    { background: var(--grad-dark);    box-shadow: var(--shadow-dark); }

/* ==========================================================================
   STAT CARD - 4 kartu teratas
   ========================================================================== */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1rem;
  margin-top: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.stat-card .stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-card .stat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  margin-top: -1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}

.stat-card .stat-icon.primary { background: var(--grad-primary); box-shadow: var(--shadow-primary); }
.stat-card .stat-icon.info    { background: var(--grad-info);    box-shadow: var(--shadow-info); }
.stat-card .stat-icon.success { background: var(--grad-success); box-shadow: var(--shadow-success); }
.stat-card .stat-icon.warning { background: var(--grad-warning); box-shadow: var(--shadow-warning); }
.stat-card .stat-icon.error   { background: var(--grad-error);   box-shadow: var(--shadow-error); }
.stat-card .stat-icon.dark    { background: var(--grad-dark);    box-shadow: var(--shadow-dark); }
.stat-card .stat-icon.teal    { background: linear-gradient(195deg, #6b7f82, #455a5e); box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(69, 90, 94, .5); }

.stat-card .stat-text {
  text-align: right;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.2px;
  margin-bottom: 0;
}

.stat-card .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0;
  line-height: 1.2;
  margin-top: 0.25rem;
}

.stat-card .stat-divider {
  height: 1px;
  background: #e9ecef;
  margin: 1rem 0 0.75rem;
}

.stat-card .stat-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.stat-card .stat-footer .trend-up   { color: #4CAF50; font-weight: 700; }
.stat-card .stat-footer .trend-down { color: #F44335; font-weight: 700; }
.stat-card .stat-footer i { font-size: 0.875rem; }

/* ==========================================================================
   CHART CARD
   ========================================================================== */
.chart-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1rem;
  margin-top: 3rem;
  position: relative;
}

.chart-card .chart-header {
  margin-top: -2.5rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: #fff;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-card .chart-header.primary { background: var(--grad-primary); box-shadow: var(--shadow-primary); }
.chart-card .chart-header.info    { background: var(--grad-info);    box-shadow: var(--shadow-info); }
.chart-card .chart-header.success { background: var(--grad-success); box-shadow: var(--shadow-success); }
.chart-card .chart-header.warning { background: var(--grad-warning); box-shadow: var(--shadow-warning); }
.chart-card .chart-header.dark    { background: var(--grad-dark);    box-shadow: var(--shadow-dark); }

.chart-card canvas { width: 100% !important; height: 100% !important; }

.chart-card .chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0;
  margin-bottom: 0.25rem;
}

.chart-card .chart-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.chart-card .chart-footer {
  border-top: 1px solid #e9ecef;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ==========================================================================
   CONTENT CARD (dgn colored header floating)
   ========================================================================== */
.content-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-top: 2rem;
  position: relative;
  padding-top: 1rem;
}

.content-card .content-header {
  margin: -2rem 1rem 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  color: #fff;
}

.content-card .content-header.primary { background: var(--grad-primary); box-shadow: var(--shadow-primary); }
.content-card .content-header.info    { background: var(--grad-info);    box-shadow: var(--shadow-info); }
.content-card .content-header.success { background: var(--grad-success); box-shadow: var(--shadow-success); }
.content-card .content-header.warning { background: var(--grad-warning); box-shadow: var(--shadow-warning); }
.content-card .content-header.dark    { background: var(--grad-dark);    box-shadow: var(--shadow-dark); }

.content-card .content-header h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 0.25rem;
}

.content-card .content-header p {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0;
}

.content-card .content-body { padding: 0.5rem 1rem 1rem; }

/* ==========================================================================
   TABLE
   ========================================================================== */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e9ecef;
}

.table tbody td {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  color: var(--text-dark);
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }

.table .cell-thin { font-weight: 400; color: var(--text-muted); }
.table .cell-strong { font-weight: 600; }

/* ==========================================================================
   DETAIL KUNJUNGAN
   ========================================================================== */
.detail-page-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1rem 0 1.25rem;
  color: #0f172a;
}

body.theme-dark .detail-page-title {
  color: #eaf2ff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.detail-tabs {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0 1.25rem;
}

.detail-tab.tab-monthly {
  --tab-accent-1: #1d4ed8;
  --tab-accent-2: #2563eb;
  --tab-bg: rgba(37, 99, 235, 0.12);
}
.detail-tab.tab-weekly {
  --tab-accent-1: #0f766e;
  --tab-accent-2: #14b8a6;
  --tab-bg: rgba(20, 184, 166, 0.14);
}
.detail-tab.tab-last-week {
  --tab-accent-1: #7c3aed;
  --tab-accent-2: #a855f7;
  --tab-bg: rgba(168, 85, 247, 0.14);
}

.detail-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  background: var(--tab-bg, #fff);
  color: var(--tab-accent-1, #475569);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
}
.detail-tab:hover {
  color: var(--tab-accent-1, #1e293b);
  border-color: var(--tab-accent-2, #64748b);
  transform: translateY(-1px);
}
.detail-tab.active {
  background: linear-gradient(135deg, var(--tab-accent-1, #334155), var(--tab-accent-2, #475569));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.24);
}

body.theme-dark .detail-tab {
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 3px 8px rgba(2, 6, 23, 0.35);
}

body.theme-dark .detail-tab:not(.active) {
  color: #dbeafe;
}

body.theme-dark .detail-tab.tab-monthly { background: rgba(37, 99, 235, 0.18); }
body.theme-dark .detail-tab.tab-weekly { background: rgba(20, 184, 166, 0.2); }
body.theme-dark .detail-tab.tab-last-week { background: rgba(168, 85, 247, 0.2); }

body.theme-dark .detail-tab.active {
  color: #fff;
}

.detail-card { margin-top: 1.35rem; }

.detail-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

.detail-kunjungan-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.detail-kunjungan-table thead th {
  white-space: nowrap;
  padding: 0.6rem 0.45rem;
  font-size: 0.6rem;
}

.detail-kunjungan-table thead th small {
  display: block;
  font-size: 0.58rem;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.detail-kunjungan-table tbody td {
  padding: 0.7rem 0.45rem;
}

.detail-kunjungan-table .detail-poli {
  font-weight: 700;
  width: 28%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
  word-break: break-word;
}

.detail-kunjungan-table thead th:first-child,
.detail-kunjungan-table tbody td:first-child {
  width: 28%;
}

.detail-kunjungan-table .detail-cell-value {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.74rem;
}

.detail-kunjungan-table .detail-cell {
  min-width: 0;
  white-space: nowrap;
}

.detail-kunjungan-table .detail-cell-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  white-space: nowrap;
}

.detail-kunjungan-table .detail-total {
  font-weight: 700;
  white-space: nowrap;
}

.detail-kunjungan-table .detail-delta {
  margin-left: 0;
  font-size: 0.54rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.detail-kunjungan-table .detail-delta.up { color: #4CAF50; }
.detail-kunjungan-table .detail-delta.down { color: #F44335; }
.detail-kunjungan-table .detail-delta.flat { color: var(--text-muted); }

.detail-kunjungan-table .detail-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.25rem 1rem;
}

.detail-batal-box {
  padding: 1rem 0.5rem;
  text-align: center;
}

.detail-batal-number {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text-dark);
}

.detail-batal-text {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.detail-batal-section-title {
  margin: 0.9rem 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
}

.detail-batal-table thead th {
  font-size: 0.62rem;
  padding: 0.6rem 0.8rem;
}

.detail-batal-table tbody td {
  padding: 0.55rem 0.8rem;
  font-size: 0.8rem;
}

.detail-batal-table .text-right {
  text-align: right;
}

@media (max-width: 1300px){
  .detail-kunjungan-table .detail-poli {
    width: 30%;
  }
  .detail-kunjungan-table thead th:first-child,
  .detail-kunjungan-table tbody td:first-child {
    width: 30%;
  }
  .detail-kunjungan-table thead th {
    font-size: 0.56rem;
    padding: 0.55rem 0.35rem;
  }
  .detail-kunjungan-table tbody td {
    padding: 0.6rem 0.35rem;
  }
  .detail-kunjungan-table .detail-cell-value {
    font-size: 0.7rem;
  }
  .detail-kunjungan-table .detail-delta {
    font-size: 0.5rem;
  }
}

@media (max-width: 992px){
  .detail-page-title {
    font-size: 1.32rem;
    margin: 0.75rem 0 1rem;
  }

  .detail-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
  }

  .detail-kunjungan-table {
    width: max-content;
    min-width: 1240px;
    table-layout: auto;
  }

  .detail-kunjungan-table thead th,
  .detail-kunjungan-table tbody td {
    white-space: nowrap;
  }

  .detail-kunjungan-table .detail-poli,
  .detail-kunjungan-table thead th:first-child,
  .detail-kunjungan-table tbody td:first-child {
    width: 260px;
    min-width: 260px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  .detail-kunjungan-table .detail-cell {
    min-width: 72px;
  }
}

/* ==========================================================================
   PENDAPATAN RUMAH SAKIT
   ========================================================================== */
.finance-page-title {
  text-align: center;
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0.95rem 0 0.85rem;
}

.finance-card-grid .stat-card {
  margin-top: 1rem;
}

.finance-currency-number {
  font-size: 1.15rem !important;
  line-height: 1.25;
  word-break: break-word;
}

.finance-chart-card {
  margin-top: 2.4rem;
}

.finance-chart-lg {
  height: 220px !important;
}

.finance-detail-card {
  margin-top: 1.55rem;
}

.finance-table-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0.1rem 0 0.45rem;
}

.revenue-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.finance-detail-table {
  width: max-content;
  min-width: 1850px;
  table-layout: auto;
}

.finance-detail-table thead th {
  padding: 0.58rem 0.42rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.finance-detail-table tbody td {
  padding: 0.58rem 0.42rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.finance-detail-table th:first-child,
.finance-detail-table td:first-child {
  width: 320px;
  min-width: 320px;
}

.finance-detail-table th:last-child,
.finance-detail-table td:last-child {
  width: 170px;
  min-width: 170px;
}

.finance-detail-table th:not(:first-child):not(:last-child),
.finance-detail-table td:not(:first-child):not(:last-child) {
  min-width: 112px;
}

.finance-method-name {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.finance-cell-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
}

.finance-cell-value {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dark);
}

.finance-total-value {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dark);
}

.finance-grand-row td {
  background: #f8f9fb;
  font-weight: 700;
}

@media (max-width: 1400px){
  .finance-detail-table th:first-child,
  .finance-detail-table td:first-child {
    width: 280px;
    min-width: 280px;
  }

  .finance-detail-table th:last-child,
  .finance-detail-table td:last-child {
    width: 150px;
    min-width: 150px;
  }
}

@media (max-width: 992px){
  .finance-chart-lg {
    height: 200px !important;
  }

  .finance-detail-table {
    width: max-content;
    min-width: 1600px;
    table-layout: auto;
  }

  .finance-detail-table th:first-child,
  .finance-detail-table td:first-child {
    width: 250px;
    min-width: 250px;
    white-space: nowrap;
  }
}

/* ==========================================================================
   FARMASI PERFORMANCE
   ========================================================================== */
.farmasi-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.9rem 0 0.95rem;
}

.farmasi-summary-row {
  margin-top: 0.3rem;
}

.farmasi-summary-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.1rem;
}

.farmasi-summary-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.farmasi-summary-label.info { color: #1A73E8; }
.farmasi-summary-label.success { color: #2e7d32; }
.farmasi-summary-label.danger { color: #E53935; }

.farmasi-summary-value-row {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.farmasi-summary-value {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 700;
  color: #1f2937;
  word-break: break-word;
}

.farmasi-summary-icon {
  font-size: 1.7rem;
  color: #1f2937;
  opacity: 0.95;
}

.farmasi-filter-card {
  margin-top: 0.75rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}

.farmasi-filter-form {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.farmasi-filter-group {
  flex: 1;
}

.farmasi-select,
.farmasi-input {
  width: 100%;
  height: 50px;
  border: 1px solid #d2d6da;
  border-radius: 0.6rem;
  background: #fff;
  color: var(--text-dark);
  font-size: 0.98rem;
  padding: 0 1rem;
  outline: none;
}

.farmasi-select:focus,
.farmasi-input:focus {
  border-color: #35d1f5;
  box-shadow: 0 0 0 2px rgba(53,209,245,.25);
}

.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  height: 50px;
  border: 1px solid #d2d6da;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: normal;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 8px;
}

.select2-dropdown {
  border: 1px solid #d2d6da;
  border-radius: 0.6rem;
}

.farmasi-filter-btn {
  height: 50px;
  min-width: 145px;
  border-radius: 0.6rem;
  text-transform: none;
  font-size: 1rem;
  font-weight: 700;
}

.farmasi-table-card {
  margin-top: 1.35rem;
  padding-top: 0;
  overflow: hidden;
}

.farmasi-table-head {
  padding: 1.05rem 1.1rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.farmasi-table-head h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1A73E8;
}

.farmasi-table-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.farmasi-table-tools {
  padding: 0.9rem 1.1rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.farmasi-tool-btn {
  height: 38px;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 0.45rem;
  text-transform: none;
  font-size: 0.95rem;
}

.farmasi-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.farmasi-stock-pagination-wrap {
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.farmasi-stock-page-meta {
  font-size: 0.98rem;
  color: #111827;
  font-weight: 500;
  white-space: nowrap;
}

.farmasi-stock-pager {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #d3d9e5;
  border-radius: 0.6rem;
  overflow: hidden;
  background: #fff;
  max-width: 100%;
}

.farmasi-stock-pager-btn {
  height: 44px;
  min-width: 56px;
  padding: 0 0.95rem;
  border: 0;
  border-right: 1px solid #dbe2ee;
  background: #fff;
  color: #1f5fc8;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.farmasi-stock-pager-btn.is-edge {
  min-width: 94px;
}

.farmasi-stock-pager-btn.is-number {
  min-width: 52px;
  padding: 0 0.7rem;
}

.farmasi-stock-pager-btn.is-active {
  background: #1f74ec;
  color: #fff;
}

.farmasi-stock-pager-btn.is-disabled {
  color: #98a6bf;
  background: #f8fafc;
  cursor: not-allowed;
}

.farmasi-stock-pager-ellipsis {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 700;
  border-right: 1px solid #dbe2ee;
  background: #fff;
}

.farmasi-stock-pager > :last-child {
  border-right: 0;
}

.farmasi-table {
  width: 100%;
  min-width: 1100px;
  table-layout: auto;
}

.farmasi-table thead th {
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(195deg, #262f3a, #131820);
  color: #fff;
  border-bottom: 0;
  padding: 0.78rem 0.85rem;
}

.farmasi-table tbody td {
  font-size: 0.95rem;
  padding: 0.78rem 0.85rem;
}

.farmasi-obat-name {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
}

.farmasi-obat-code {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.farmasi-stock-value {
  font-weight: 700;
}

.farmasi-stock-value.is-ok {
  color: #1b8a5a;
}

.farmasi-stock-value.is-low {
  color: #E53935;
}

.farmasi-riwayat-btn {
  border: 0;
  border-radius: 0.45rem;
  background: #f7c600;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.45rem 0.8rem;
  opacity: 0.75;
  cursor: pointer;
}

.farmasi-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.farmasi-modal.open {
  display: flex;
}

.farmasi-modal-dialog {
  width: min(1240px, 100%);
  max-height: calc(100vh - 2rem);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 16px 50px rgba(0,0,0,.26);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.farmasi-modal-header {
  padding: 0.85rem 1rem;
  background: var(--grad-info);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.farmasi-modal-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.farmasi-modal-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
}

.farmasi-modal-body {
  padding: 0.95rem 1rem 1rem;
  overflow-y: auto;
}

.farmasi-history-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.farmasi-history-group {
  flex: 1;
  min-width: 180px;
}

.farmasi-history-group label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.farmasi-history-depo {
  min-width: 260px;
}

.farmasi-history-btn-wrap {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.45rem;
}

.farmasi-history-btn {
  width: 100%;
  height: 48px;
  text-transform: none;
  font-size: 0.86rem;
}

.farmasi-history-table {
  width: 100%;
  min-width: 980px;
}

.farmasi-history-table thead th {
  background: #f8fafc;
  color: var(--text-dark);
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.72rem;
}

.farmasi-history-table tbody td {
  font-size: 0.82rem;
  padding: 0.58rem 0.65rem;
}

.farmasi-history-posisi {
  font-weight: 700;
  color: var(--text-dark);
}

.farmasi-history-ket {
  margin-top: 0.1rem;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.farmasi-history-saldo {
  font-weight: 700;
  background: #f8fafc;
}

.farmasi-history-footer {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.farmasi-history-page-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.farmasi-history-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.farmasi-history-nav-btn {
  height: 34px;
  min-width: 78px;
  padding: 0 0.75rem;
  text-transform: none;
  font-size: 0.82rem;
  border-radius: 0.45rem;
}

.farmasi-history-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1300px){
  .farmasi-summary-value {
    font-size: 1.65rem;
  }
}

@media (max-width: 992px){
  .farmasi-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .farmasi-filter-btn {
    width: 100%;
  }

  .farmasi-table-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .farmasi-table {
    min-width: 980px;
  }

  .farmasi-stock-pagination-wrap {
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    gap: 0.6rem;
  }

  .farmasi-stock-pager {
    min-width: max-content;
  }

  .farmasi-stock-page-meta {
    font-size: 0.85rem;
  }

  .farmasi-modal {
    padding: 0.5rem;
  }

  .farmasi-modal-dialog {
    max-height: calc(100vh - 1rem);
  }

  .farmasi-history-filters {
    flex-direction: column;
  }

  .farmasi-history-btn-wrap {
    min-width: 100%;
  }

  .farmasi-history-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   LAPORAN OPNAME FARMASI
   ========================================================================== */
.opname-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.95rem 0 0.85rem;
}

.opname-filter-card {
  margin-top: 0.65rem;
}

.opname-filter-form {
  align-items: flex-end;
}

.opname-filter-label {
  display: block;
  margin: 0 0 0.3rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dark);
}

.opname-summary-row {
  margin-top: 0.25rem;
}

.opname-stat-card {
  margin-top: 0.8rem;
}

.opname-money {
  font-size: 1.15rem !important;
  line-height: 1.25;
  word-break: break-word;
}

.opname-money.is-loss {
  color: #e53935;
}

.opname-money.is-gain {
  color: #2e7d32;
}

.opname-item-selisih {
  display: inline-block;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.opname-chart-card {
  margin-top: 1.95rem;
}

.opname-chart-header {
  height: 340px !important;
}

.opname-detail-card {
  margin-top: 1.55rem;
}

.opname-table-tools {
  padding: 0.65rem 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.opname-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.opname-detail-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.opname-detail-table thead th {
  font-size: 0.67rem;
  white-space: normal;
  line-height: 1.2;
  padding: 0.52rem 0.36rem;
  word-break: break-word;
}

.opname-detail-table tbody td {
  font-size: 0.69rem;
  white-space: normal;
  line-height: 1.2;
  padding: 0.52rem 0.36rem;
  word-break: break-word;
  vertical-align: top;
}

.opname-detail-table th:nth-child(1),
.opname-detail-table td:nth-child(1) {
  width: 9%;
  white-space: nowrap;
}

.opname-detail-table th:nth-child(2),
.opname-detail-table td:nth-child(2) {
  width: 11%;
  white-space: nowrap;
}

.opname-detail-table th:nth-child(3),
.opname-detail-table td:nth-child(3) {
  width: 23%;
}

.opname-detail-table th:nth-child(10),
.opname-detail-table td:nth-child(10) {
  width: 12%;
  white-space: normal;
}

.opname-detail-table th:nth-child(4),
.opname-detail-table td:nth-child(4),
.opname-detail-table th:nth-child(5),
.opname-detail-table td:nth-child(5),
.opname-detail-table th:nth-child(6),
.opname-detail-table td:nth-child(6) {
  width: 6%;
  white-space: nowrap;
}

.opname-detail-table th:nth-child(7),
.opname-detail-table td:nth-child(7) {
  width: 8%;
  white-space: nowrap;
}

.opname-detail-table th:nth-child(8),
.opname-detail-table td:nth-child(8),
.opname-detail-table th:nth-child(9),
.opname-detail-table td:nth-child(9) {
  width: 9.5%;
  white-space: nowrap;
}

.opname-item-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.opname-item-code {
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-top: 0.08rem;
}

.opname-real-value {
  font-weight: 700;
  color: var(--text-dark);
}

.opname-selisih {
  font-weight: 700;
}

.opname-selisih.is-loss {
  color: #e53935;
}

.opname-selisih.is-gain {
  color: #2e7d32;
}

.opname-selisih.is-flat {
  color: var(--text-muted);
}

.opname-loss-val {
  color: #e53935;
  font-weight: 700;
}

.opname-gain-val {
  color: #2e7d32;
  font-weight: 700;
}

@media (max-width: 1200px){
  .opname-chart-header {
    height: 300px !important;
  }
}

@media (max-width: 992px){
  .opname-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .opname-chart-header {
    height: 260px !important;
  }

  .opname-detail-table {
    width: max-content;
    min-width: 1500px;
    table-layout: auto;
  }

  .opname-detail-table thead th,
  .opname-detail-table tbody td {
    white-space: nowrap;
  }

  .opname-detail-table th:nth-child(3),
  .opname-detail-table td:nth-child(3),
  .opname-detail-table th:nth-child(10),
  .opname-detail-table td:nth-child(10) {
    width: auto;
    min-width: 250px;
    white-space: normal;
  }
}

/* ==========================================================================
   PROFIT FARMASI
   ========================================================================== */
.profit-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.95rem 0 0.85rem;
}

.profit-filter-card {
  margin-top: 0.65rem;
}

.profit-filter-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profit-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.profit-col-date {
  flex: 0 0 170px;
}

.profit-col-status {
  flex: 0 0 220px;
}

.profit-col-penjamin {
  flex: 1 1 260px;
  min-width: 220px;
}

.profit-filter-label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dark);
}

.profit-filter-btn {
  min-width: 150px;
}

.profit-summary-row {
  margin-top: 0.25rem;
}

.profit-stat-card {
  margin-top: 0.8rem;
}

.profit-money {
  font-size: 1.1rem !important;
  line-height: 1.25;
  word-break: break-word;
}

.profit-money.profit-negative {
  color: #e53935;
}

.profit-chart-card {
  margin-top: 2rem;
}

.profit-chart-header {
  height: 330px !important;
}

.profit-detail-card {
  margin-top: 1.5rem;
}

.profit-table-wrap {
  overflow-x: hidden;
}

.profit-detail-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.profit-detail-table thead th {
  background: linear-gradient(195deg, #262f3a, #131820);
  color: #fff;
  border-bottom: 0;
  font-size: 0.68rem;
  padding: 0.72rem 0.72rem;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
}

.profit-detail-table tbody td {
  font-size: 0.8rem;
  padding: 0.7rem 0.72rem;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
}

.profit-detail-table th:nth-child(1),
.profit-detail-table td:nth-child(1) {
  width: 12%;
}

.profit-detail-table th:nth-child(2),
.profit-detail-table td:nth-child(2) {
  width: 24%;
}

.profit-detail-table th:nth-child(3),
.profit-detail-table td:nth-child(3) {
  width: 30%;
}

.profit-detail-table th:nth-child(4),
.profit-detail-table td:nth-child(4) {
  width: 8%;
  white-space: nowrap;
}

.profit-detail-table th:nth-child(5),
.profit-detail-table td:nth-child(5),
.profit-detail-table th:nth-child(6),
.profit-detail-table td:nth-child(6) {
  width: 13%;
  white-space: nowrap;
}

.profit-ref-main {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.profit-ref-sub {
  margin-top: 0.08rem;
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.profit-col-profit {
  font-weight: 700;
  color: #2e7d32;
}

.profit-pagination-wrap {
  margin-top: 0.8rem;
}

@media (max-width: 1200px){
  .profit-chart-header {
    height: 290px !important;
  }
}

@media (max-width: 992px){
  .profit-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .profit-col-date,
  .profit-col-status,
  .profit-col-penjamin {
    flex: 1 1 auto;
    min-width: 100%;
  }

  .profit-filter-btn {
    width: 100%;
  }

  .profit-chart-header {
    height: 250px !important;
  }

  .profit-detail-table {
    table-layout: fixed;
  }

  .profit-detail-table thead th {
    font-size: 0.64rem;
    padding: 0.62rem 0.5rem;
  }

  .profit-detail-table tbody td {
    font-size: 0.75rem;
    padding: 0.6rem 0.5rem;
  }
}

/* ==========================================================================
   MONITORING BRIDGING SATU SEHAT
   ========================================================================== */
.bridging-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.95rem 0 0.85rem;
}

.bridging-filter-card {
  margin-top: 0.65rem;
}

.bridging-filter-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bridging-filter-group {
  min-width: 170px;
  flex: 1 1 220px;
}

.bridging-filter-label {
  display: block;
  margin: 0 0 0.3rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dark);
}

.bridging-filter-btn {
  min-width: 155px;
}

.bridging-score-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
}

.bridging-score-card {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid #e6ebf2;
  box-shadow: var(--shadow-card);
  padding: 0.8rem 0.75rem;
  text-align: center;
}

.bridging-score-card h5 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.bridging-score-card h3 {
  margin: 0.3rem 0 0.2rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.bridging-score-card h3.is-danger {
  color: #e53935;
}

.bridging-score-card h3.is-success {
  color: #2e7d32;
}

.bridging-score-card p {
  margin: 0;
  font-size: 0.77rem;
  color: var(--text-muted);
  font-weight: 700;
}

.bridging-chart-card {
  margin-top: 2rem;
}

.bridging-chart-header {
  height: 310px !important;
}

.bridging-donut-header {
  height: 310px !important;
}

.bridging-table-card {
  margin-top: 1.6rem;
}

.bridging-note-box {
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  background: #e7f3ff;
  border: 1px solid #c8e0fb;
  color: #2e4c77;
  font-size: 0.78rem;
  font-weight: 600;
}

.bridging-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bridging-table {
  width: 100%;
  min-width: 1220px;
  table-layout: auto;
}

.bridging-table thead th {
  background: linear-gradient(195deg, #262f3a, #131820);
  color: #fff;
  border-bottom: 0;
  font-size: 0.7rem;
  padding: 0.72rem 0.7rem;
  white-space: nowrap;
}

.bridging-table tbody td {
  font-size: 0.79rem;
  line-height: 1.35;
  padding: 0.68rem 0.7rem;
  vertical-align: top;
}

.bridging-table tbody td small {
  display: block;
  margin-top: 0.08rem;
  color: var(--text-muted);
  font-size: 0.71rem;
  font-weight: 600;
}

.bridging-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  margin: 0.1rem 0.15rem 0.1rem 0;
}

.bridging-badge.success {
  background: #2e7d32;
  color: #fff;
}

.bridging-badge.warning {
  background: #ffd166;
  color: #3d2f00;
  cursor: pointer;
}

.bridging-badge.danger {
  background: #e53935;
  color: #fff;
  cursor: pointer;
}

.bridging-nik-invalid {
  color: #e53935;
  font-weight: 700;
}

.bridging-pagination-wrap {
  margin-top: 0.8rem;
}

.bridging-modal-dialog {
  width: min(1200px, 100%);
}

.bridging-modal-header {
  background: linear-gradient(195deg, #1f252d, #151a21);
  padding: 1rem 1.15rem;
}

.bridging-modal-header h5 {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 2rem;
  letter-spacing: -0.25px;
}

.bridging-modal-header .farmasi-modal-close {
  font-size: 3rem;
  opacity: 0.65;
}

.bridging-inspect-block {
  padding-bottom: 0.25rem;
}

.bridging-inspect-intro {
  border-bottom: 1px solid #dbe3ee;
  margin-bottom: 0.7rem;
  padding-bottom: 0.55rem;
}

.bridging-inspect-intro h4 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

.bridging-inspect-intro h4 span {
  color: #1a73e8;
}

.bridging-inspect-intro p {
  margin: 0.38rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.bridging-inspect-note {
  margin-top: 0.7rem;
  padding: 0.65rem 0.72rem;
  border-radius: 0.52rem;
  background: #f2f4f7;
  border: 1px solid #e0e4ea;
  color: #4b5563;
  font-size: 0.79rem;
  font-weight: 600;
}

.bridging-inspect-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.56rem;
  font-size: 0.71rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.bridging-inspect-chip.success {
  background: #1b8a5a;
  color: #fff;
}

.bridging-inspect-chip.warning {
  background: #ffd166;
  color: #4c3900;
}

.bridging-inspect-chip.danger {
  background: #e53935;
  color: #fff;
}

.bridging-erm-meta {
  margin-bottom: 0.6rem;
  padding: 0.58rem 0.68rem;
  border-radius: 0.45rem;
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  color: var(--text-dark);
  font-size: 0.78rem;
}

.bridging-erm-section {
  margin-top: 0.75rem;
}

.bridging-erm-section h6 {
  margin: 0 0 0.4rem;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-dark);
}

.bridging-erm-count {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
}

.bridging-erm-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bridging-erm-table,
.bridging-inspect-table {
  width: 100%;
  min-width: 760px;
}

.bridging-erm-table thead th,
.bridging-inspect-table thead th {
  background: #f8fafc;
  color: var(--text-dark);
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.58rem 0.6rem;
  white-space: normal;
  line-height: 1.25;
}

.bridging-erm-table tbody td,
.bridging-inspect-table tbody td {
  font-size: 0.98rem;
  padding: 0.58rem 0.62rem;
  white-space: normal;
  line-height: 1.35;
  vertical-align: top;
}

.bridging-inspect-table tbody td small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.bridging-erm-alert {
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.bridging-erm-alert.danger {
  background: #fdecec;
  border: 1px solid #f7c7c7;
  color: #9f2d2d;
}

@media (max-width: 1400px){
  .bridging-score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px){
  .bridging-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .bridging-filter-btn {
    width: 100%;
  }

  .bridging-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bridging-chart-header,
  .bridging-donut-header {
    height: 240px !important;
  }

  .bridging-modal-header h5 {
    font-size: 1.2rem;
  }

  .bridging-modal-header .farmasi-modal-close {
    font-size: 2.2rem;
  }
}

@media (max-width: 640px){
  .bridging-score-grid {
    grid-template-columns: 1fr;
  }
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  margin-right: 0.75rem;
}
.avatar-sm.primary { background: var(--grad-primary); }
.avatar-sm.info    { background: var(--grad-info); }
.avatar-sm.success { background: var(--grad-success); }
.avatar-sm.warning { background: var(--grad-warning); }
.avatar-sm.error   { background: var(--grad-error); }
.avatar-sm.dark    { background: var(--grad-dark); }

.user-cell { display: flex; align-items: center; }

.badge-soft {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-soft.success { background: #4CAF50; color: #fff; }
.badge-soft.warning { background: #fb8c00; color: #fff; }
.badge-soft.error   { background: #F44335; color: #fff; }
.badge-soft.info    { background: #1A73E8; color: #fff; }

.progress {
  position: relative;
  height: 3px;
  background: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
  min-width: 80px;
}
.progress-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.progress-bar.success { background: #4CAF50; }
.progress-bar.info    { background: #1A73E8; }
.progress-bar.warning { background: #fb8c00; }
.progress-bar.error   { background: #F44335; }
.progress-bar.primary { background: #e91e63; }

.progress-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  display: inline-block;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s ease-in;
  color: #fff;
  background: #7b809a;
  box-shadow: 0 3px 3px 0 rgba(123,128,154,.15), 0 3px 1px -2px rgba(123,128,154,.2), 0 1px 5px 0 rgba(123,128,154,.15);
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--grad-primary); box-shadow: var(--shadow-primary); }
.btn.info    { background: var(--grad-info);    box-shadow: var(--shadow-info); }
.btn.success { background: var(--grad-success); box-shadow: var(--shadow-success); }
.btn.dark    { background: var(--grad-dark);    box-shadow: var(--shadow-dark); }
.btn-block { width: 100%; }

.btn-link-icon {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s;
}
.btn-link-icon:hover { color: var(--text-dark); }
.btn-link-icon.danger:hover { color: #F44335; }

/* ==========================================================================
   FORM (Material style underline)
   ========================================================================== */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group .form-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #d2d6da;
  padding: 0.5rem 0;
  background: transparent;
  color: var(--text-dark);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
  border-bottom-color: #e91e63;
  box-shadow: 0 1px 0 0 #e91e63;
}

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
              url('https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  width: 360px;
  max-width: 100%;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 27px 0 rgba(0,0,0,.05), 0 50px 100px -20px rgba(50,50,93,.25);
  padding: 2rem 2rem 1.5rem;
  margin-top: 2rem;
}

.login-card .login-header {
  margin: -3.5rem -1rem 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--grad-info);
  box-shadow: var(--shadow-info);
  color: #fff;
  text-align: center;
}

.login-card .login-header h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0;
}

.login-card .login-header .social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.login-card .login-header .social-icons a {
  color: #fff;
  font-size: 1rem;
  opacity: 0.9;
  transition: transform 0.2s;
}
.login-card .login-header .social-icons a:hover { transform: scale(1.15); }

.login-card .caption {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.login-card .login-error {
  background: #FFEBEE;
  color: #C62828;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  margin-bottom: 1rem;
  text-align: center;
}

.login-card .login-footer {
  text-align: center;
  padding-top: 0.5rem;
}

.login-card .login-copyright {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Switch for remember me */
.switch-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: #d2d6da;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch input { display: none; }
.switch input:checked ~ .switch-track {
  background: #1A73E8;
}
.switch.active { background: #1A73E8; }
.switch.active::after { left: 18px; }

/* ==========================================================================
   MISC
   ========================================================================== */
.text-muted { color: var(--text-muted) !important; }
.text-success { color: #4CAF50 !important; }
.text-danger  { color: #F44335 !important; }
.text-warning { color: #fb8c00 !important; }
.text-info    { color: #1A73E8 !important; }

.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

.d-flex { display: flex !important; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 0.75rem; }

.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

/* Mobile sidebar toggle */
.sidebar-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sidebar-toggle:hover { background: rgba(0,0,0,0.04); color: var(--text-dark); }

/* Footer */
.footer {
  padding: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer a { color: var(--text-dark); font-weight: 600; }
.footer .footer-nav { display: flex; gap: 1.5rem; list-style: none; }
