/* ═══════════════════════════════════════════════════════════
   SYSTEM DATABASE YTWR — main.css
   Bootstrap 5 base · no AdminLTE · v2.2.0
═══════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────
   DESIGN TOKENS
─────────────────────────────────────── */
:root {
  /* Brand */
  --ytwr-primary:       #1d6fa4;
  --ytwr-primary-dark:  #155580;
  --ytwr-primary-light: #3498db;
  --ytwr-accent:        #00c9a7;

  /* Sidebar */
  --sidebar-width:      240px;
  --sidebar-bg:         #111827;
  --sidebar-border:     rgba(255,255,255,.06);
  --sidebar-text:       #9ca3af;
  --sidebar-text-hover: #f9fafb;
  --sidebar-active-bg:  rgba(52,152,219,.15);
  --sidebar-active-color: #60c3f5;

  /* Topbar */
  --topbar-height:      54px;
  --topbar-bg:          linear-gradient(90deg, #0f1f35 0%, #1a3a5c 100%);

  /* Content */
  --content-bg:         #f1f5f9;
  --card-bg:            #ffffff;
  --card-radius:        14px;
  --card-shadow:        0 2px 12px rgba(0,0,0,.07);

  /* Typography */
  --font-sans:          'Inter', system-ui, -apple-system, sans-serif;
  --font-display:       'Plus Jakarta Sans', sans-serif;

  /* Transitions */
  --t-fast:  0.18s ease;
  --t-base:  0.28s ease;
  --t-slow:  0.42s ease;
}


/* ───────────────────────────────────────
   RESET / BASE
─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--content-bg);
  color: #1e293b;
  overflow-x: hidden;
}

a { text-decoration: none; }


/* ───────────────────────────────────────
   TOPBAR
─────────────────────────────────────── */
.ytwr-topbar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  box-shadow: 0 1px 8px rgba(0,0,0,.25);
  z-index: 1040;
  padding: 0 1rem;
}

.ytwr-topbar .navbar-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .3px;
}

.sidebar-toggle-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background var(--t-fast);
  background: transparent !important;
}
.sidebar-toggle-btn:hover { background: rgba(255,255,255,.1) !important; }

/* User dropdown trigger */
.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.25);
  transition: border-color var(--t-fast);
}
.topbar-avatar:hover { border-color: rgba(255,255,255,.6); }

.badge-dept {
  background: rgba(52,152,219,.25);
  color: #90d4f7;
  font-size: .65rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 20px;
  letter-spacing: .3px;
}

/* User dropdown menu */
.user-dropdown-menu {
  min-width: 220px;
  border: none;
  border-radius: 12px;
  padding: .5rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.14);
}
.user-dropdown-menu .dropdown-item {
  border-radius: 8px;
  padding: .5rem .75rem;
  font-size: .875rem;
  transition: background var(--t-fast);
}
.user-dropdown-menu .dropdown-item:hover { background: #f1f5f9; }
.user-dropdown-menu .dropdown-header { padding: .75rem; background: #f8fafc; border-radius: 8px; }
.user-dd-avatar {
  width: 40px; height: 40px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid #e2e8f0;
}


/* ───────────────────────────────────────
   SIDEBAR
─────────────────────────────────────── */
.ytwr-sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  z-index: 1035;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--t-base), width var(--t-base);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
.ytwr-sidebar::-webkit-scrollbar { width: 4px; }
.ytwr-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

/* Sidebar user panel */
.sidebar-user-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-avatar {
  width: 38px; height: 38px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.2);
}
.sidebar-user-name {
  font-size: .82rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.2;
}
.sidebar-user-status {
  font-size: .72rem;
  color: var(--ytwr-accent);
  display: flex;
  align-items: center;
  gap: 4px;
}
.status-dot {
  width: 6px; height: 6px;
  background: var(--ytwr-accent);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* Nav section label */
.nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #4b5563;
  padding: 14px 16px 6px;
  text-transform: uppercase;
}

/* Nav item (single) */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--sidebar-text);
  font-size: .83rem;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--t-fast);
  border-left: 3px solid transparent;
  cursor: pointer;
}
.nav-item:hover {
  color: var(--sidebar-text-hover);
  background: rgba(255,255,255,.05);
  border-left-color: rgba(52,152,219,.4);
}
.nav-item.active {
  color: var(--sidebar-active-color);
  background: var(--sidebar-active-bg);
  border-left-color: var(--ytwr-primary-light);
}
.nav-item i { font-size: 1rem; min-width: 18px; text-align: center; }

/* Nav group (dropdown) */
.nav-group { }

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 16px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--sidebar-text);
  font-size: .83rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
}
.nav-group-toggle:hover {
  color: var(--sidebar-text-hover);
  background: rgba(255,255,255,.05);
  border-left-color: rgba(52,152,219,.3);
}
.nav-group-toggle.active {
  color: #e2e8f0;
  background: rgba(255,255,255,.04);
  border-left-color: rgba(52,152,219,.5);
}
.nav-group-toggle i.bi-chevron-down { font-size: .75rem; }

.nav-chevron {
  transition: transform var(--t-base);
}
.nav-group.open .nav-chevron { transform: rotate(-180deg); }

/* Sub items */
.nav-group-body { display: none; background: rgba(0,0,0,.15); }

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 32px;
  color: #6b7280;
  font-size: .8rem;
  transition: all var(--t-fast);
  border-left: 3px solid transparent;
}
.nav-sub-item:hover {
  color: var(--sidebar-text-hover);
  background: rgba(255,255,255,.04);
  border-left-color: rgba(52,152,219,.3);
  padding-left: 36px;
}
.nav-sub-item.active {
  color: var(--sidebar-active-color);
  background: var(--sidebar-active-bg);
  border-left-color: var(--ytwr-primary-light);
}
.nav-sub-item i { font-size: .85rem; min-width: 16px; }

/* AI chat button */
.sidebar-ai-btn-wrap {
  padding: 20px 14px 24px;
  margin-top: auto;
}
.sidebar-ai-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #a855f7 100%);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  transition: all var(--t-base);
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
  animation: ai-glow 2.5s infinite;
}
.sidebar-ai-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124,58,237,.5);
  animation: none;
}
.ai-star-icon {
  font-size: 1.1rem;
  animation: spin-star 3s linear infinite;
}
@keyframes spin-star {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ai-glow {
  0%, 100% { box-shadow: 0 4px 14px rgba(124,58,237,.35); }
  50%       { box-shadow: 0 4px 22px rgba(124,58,237,.6); }
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1030;
}
.sidebar-overlay.active { display: block; }


/* ───────────────────────────────────────
   MAIN CONTENT WRAPPER
─────────────────────────────────────── */
.ytwr-main-wrapper {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  min-height: calc(100vh - var(--topbar-height));
  transition: margin-left var(--t-base);
}

/* Sidebar collapsed */
.sidebar-collapsed .ytwr-sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); }
.sidebar-collapsed .ytwr-main-wrapper { margin-left: 0; }
.sidebar-collapsed .ytwr-footer { margin-left: 0; }


/* ───────────────────────────────────────
   FOOTER
─────────────────────────────────────── */
.ytwr-footer {
  background: #0f172a;
  color: #64748b;
  margin-left: var(--sidebar-width);
  padding: 10px 20px;
  font-size: .78rem;
  border-top: 1px solid rgba(255,255,255,.05);
  transition: margin-left var(--t-base);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: #94a3b8;
}
.footer-meta, .footer-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-divider { color: #334155; }
.footer-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #22c55e;
}
.status-dot-sm {
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}


/* ───────────────────────────────────────
   ALERTS (toast-style)
─────────────────────────────────────── */
.ytwr-alerts-wrap {
  position: fixed;
  top: calc(var(--topbar-height) + 12px);
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.ytwr-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 440px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: .85rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  pointer-events: all;
  animation: slide-in-right .3s ease;
  transition: opacity .3s, transform .3s;
}
.ytwr-alert.hiding { opacity: 0; transform: translateX(20px); }

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.ytwr-alert i:first-child { font-size: 1.1rem; margin-top: 1px; flex-shrink: 0; }
.ytwr-alert > div { flex: 1; }
.ytwr-alert-close {
  background: none;
  border: none;
  color: inherit;
  opacity: .6;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.ytwr-alert-close:hover { opacity: 1; }

.ytwr-alert-danger  { background: #7f1d1d; color: #fecaca; border-left: 4px solid #ef4444; }
.ytwr-alert-success { background: #14532d; color: #bbf7d0; border-left: 4px solid #22c55e; }
.ytwr-alert-warning { background: #78350f; color: #fde68a; border-left: 4px solid #f59e0b; }


/* ───────────────────────────────────────
   PAGE HEADER (breadcrumb area)
─────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, #0f1f35 0%, #1a3a5c 60%, #1d6fa4 100%);
  color: #fff;
  padding: 22px 0 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.07) 0%, transparent 55%);
  pointer-events: none;
}
.page-header h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 4px; font-size: 1.35rem; }
.page-header .breadcrumb { background: transparent; padding: 0; margin: 0; font-size: .8rem; }
.page-header .breadcrumb-item a { color: rgba(255,255,255,.7); }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,.95); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }


/* ───────────────────────────────────────
   STATS CARDS
─────────────────────────────────────── */
.stats-card {
  border-radius: var(--card-radius);
  border: none;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  transition: transform var(--t-base), box-shadow var(--t-base);
  min-height: 155px;
  position: relative;
}
.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.stats-card .card-body {
  padding: 22px 18px;
  position: relative;
  z-index: 2;
}
.stats-icon {
  font-size: 3.8rem;
  opacity: .18;
  position: absolute;
  right: 16px;
  top: 14px;
  z-index: 1;
  transition: all var(--t-base);
}
.stats-card:hover .stats-icon { opacity: .3; transform: scale(1.1) translateY(-4px); }
.stats-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  font-family: var(--font-display);
  letter-spacing: -.5px;
}
.stats-label {
  font-size: 1.1rem;
  color: rgba(255,255,255,.88);
  font-weight: 600;
  margin: 4px 0 8px;
}
.stats-trend {
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,.18);
  padding: 4px 10px;
  border-radius: 20px;
  color: rgba(255,255,255,.9);
}
.trend-up   { color: #6ee7b7 !important; }
.trend-down { color: #fca5a5 !important; }


/* ───────────────────────────────────────
   CHART / DATA CONTAINERS
─────────────────────────────────────── */
.chart-container {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 24px 20px;
  margin-bottom: 22px;
  box-shadow: var(--card-shadow);
  border: 1px solid #e8edf2;
  transition: box-shadow var(--t-base);
}
.chart-container:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); }

.data-table {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  margin-bottom: 22px;
  box-shadow: var(--card-shadow);
  border: 1px solid #e8edf2;
  overflow: hidden;
}

/* Section titles */
.section-title {
  color: #0f172a;
  border-bottom: 3px solid var(--ytwr-primary-light);
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title i { color: var(--ytwr-primary-light); }


/* ───────────────────────────────────────
   MAP
─────────────────────────────────────── */
.map-container {
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}


/* ───────────────────────────────────────
   PROGRESS BARS
─────────────────────────────────────── */
.progress { height: 12px; border-radius: 8px; }
.progress-bar { border-radius: 8px; transition: width 1s ease; }


/* ───────────────────────────────────────
   TABLES (modern override)
─────────────────────────────────────── */
.modern-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.modern-table thead th {
  background: linear-gradient(135deg, #0f1f35 0%, #1a3a5c 100%);
  color: #fff;
  font-weight: 600;
  padding: 12px 10px;
  text-align: center;
  border: none;
  font-size: .78rem;
  letter-spacing: .3px;
}
.modern-table tbody td {
  padding: 10px;
  border: 1px solid #f1f5f9;
  vertical-align: middle;
}
.modern-table tbody tr:nth-child(even) { background: #f8fafc; }
.modern-table tbody tr:hover           { background: #eff6ff; }

/* Bootstrap table override */
.table th { font-size: .82rem; }
.table td { font-size: .84rem; vertical-align: middle; }


/* ───────────────────────────────────────
   BADGES
─────────────────────────────────────── */
.badge { font-weight: 600; }
.badge-pill { border-radius: 20px; padding: 4px 10px; }


/* ───────────────────────────────────────
   BUTTONS (action group)
─────────────────────────────────────── */
.action-btn {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff;
  font-weight: 500;
  padding: 8px 14px;
  font-size: .82rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--t-fast);
}
.action-btn:hover {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.5);
  color: #fff;
  transform: translateY(-1px);
}
.action-btn:active { transform: scale(.97); }

.ai-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.ai-btn:hover {
  box-shadow: 0 8px 22px rgba(124,58,237,.5);
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 50%, #7e22ce 100%);
}

.header-action-group {
  position: absolute;
  top: 12px;
  right: 18px;
  z-index: 10;
  display: flex;
  gap: 8px;
}


/* ───────────────────────────────────────
   AI REPORT CARD
─────────────────────────────────────── */
.ai-dashboard-card {
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
  border-radius: 16px;
  border: 1px solid rgba(66,133,244,.15);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
  margin-bottom: 22px;
  transition: box-shadow var(--t-base);
}
.ai-dashboard-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.ai-dashboard-header {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(66,133,244,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.ai-dashboard-title { display: flex; align-items: center; gap: 12px; }
.ai-dashboard-title h4 { margin: 0; font-size: 1rem; font-weight: 700; color: #1f2937; }
.ai-dashboard-title small { display: block; margin-top: 2px; font-size: .73rem; color: #6b7280; }
.ai-gemini-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4285F4 0%, #7B61FF 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; font-weight: bold;
  box-shadow: 0 3px 10px rgba(66,133,244,.25);
}
.ai-dashboard-badge {
  background: rgba(66,133,244,.1);
  color: #2563eb;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.ai-dashboard-body {
  padding: 20px 22px;
  font-size: .875rem;
  line-height: 1.85;
  color: #374151;
}
.ai-loading { text-align: center; padding: 28px; }
.ai-loading i { font-size: 2rem; color: #4285F4; }
.ai-loading p { margin-top: 10px; color: #6b7280; font-size: .85rem; }


/* ───────────────────────────────────────
   LOGIN PAGE
─────────────────────────────────────── */
.ytwr-login-body {
  background: linear-gradient(135deg, #0f1f35 0%, #1a3a5c 50%, var(--ytwr-primary) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
}
.login-wrap { width: 100%; max-width: 420px; padding: 20px; }
.login-logo-area { text-align: center; margin-bottom: 28px; color: #fff; }
.login-logo-area h1 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; margin-bottom: 4px; }
.login-logo-area p  { font-size: .95rem; opacity: .8; margin: 0; }

.login-card {
  background: #fff;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,.22);
}
.login-card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  color: #0f172a;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e2e8f0;
}
.login-card .form-control {
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  height: 46px;
  font-size: .9rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.login-card .form-control:focus {
  border-color: var(--ytwr-primary-light);
  box-shadow: 0 0 0 3px rgba(52,152,219,.15);
}
.btn-login-submit {
  height: 46px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  background: linear-gradient(135deg, var(--ytwr-primary) 0%, var(--ytwr-primary-light) 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(29,111,164,.35);
  transition: all var(--t-fast);
}
.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29,111,164,.4);
}


/* ───────────────────────────────────────
   HELPERS / UTILITIES
─────────────────────────────────────── */
.hr-dashed  { border-top: 2px dashed #cbd5e1; }
.hr-dotted  { border-top: 2px dotted #cbd5e1; }

/* Smooth count animation */
.count-up { animation: fade-up .7s ease both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Gradient color utilities (for stats cards) */
.bg-gradient-teal    { background: linear-gradient(135deg, #0d9488 0%, #10b981 100%) !important; }
.bg-gradient-blue    { background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%) !important; }
.bg-gradient-purple  { background: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%) !important; }
.bg-gradient-orange  { background: linear-gradient(135deg, #c2410c 0%, #f97316 100%) !important; }
.bg-gradient-red     { background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%) !important; }
.bg-gradient-slate   { background: linear-gradient(135deg, #334155 0%, #64748b 100%) !important; }
.bg-gradient-sky     { background: linear-gradient(135deg, #0369a1 0%, #38bdf8 100%) !important; }
.bg-gradient-emerald { background: linear-gradient(135deg, #065f46 0%, #34d399 100%) !important; }

/* Keep old classes working (backward compat with index.php) */
.bg-secondary { background: linear-gradient(135deg, #334155 0%, #64748b 100%) !important; }
.bg-teal      { background: linear-gradient(135deg, #0d9488 0%, #10b981 100%) !important; }
.bg-purple    { background: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%) !important; }
.bg-orange    { background: linear-gradient(135deg, #c2410c 0%, #f97316 100%) !important; }
.bg-info      { background: linear-gradient(135deg, #0369a1 0%, #38bdf8 100%) !important; }


/* ───────────────────────────────────────
   RESPONSIVE
─────────────────────────────────────── */
@media (max-width: 991.98px) {
  .ytwr-sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
  }
  .ytwr-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  .ytwr-main-wrapper { margin-left: 0; }
  .ytwr-footer       { margin-left: 0; }
}

@media (max-width: 575.98px) {
  .stats-value { font-size: 1.8rem; }
  .page-header h3 { font-size: 1.1rem; }
  .chart-container { padding: 16px 12px; }
  .header-action-group { position: static; margin-top: 10px; flex-wrap: wrap; }
}

/* Print */
@media print {
  .ytwr-topbar, .ytwr-sidebar, .sidebar-overlay,
  .ytwr-footer, .ytwr-alerts-wrap, .header-action-group { display: none !important; }
  .ytwr-main-wrapper { margin: 0 !important; }
  .stats-card, .chart-container, .data-table { box-shadow: none !important; border: 1px solid #ddd; }
}
