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

:root {
  --brand-primary: #007A33;
  --brand-secondary: #4B5563;
  --brand-accent: #65A30D;
  --brand-sidebar: #14261C;
  --brand-surface: #F2F7F4;
  --brand-color: var(--brand-primary);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--brand-surface);
  color: #0f172a;
}

/* Corporate Sidebar Theming */
.corp-sidebar {
  background: linear-gradient(180deg, var(--brand-sidebar) 0%, color-mix(in srgb, var(--brand-sidebar) 88%, #000000) 100%);
  color: rgba(255, 255, 255, 0.92);
}

.corp-sidebar .sidebar-divider {
  border-color: rgba(255, 255, 255, 0.11);
}

.corp-sidebar .sidebar-label {
  color: rgba(255, 255, 255, 0.52);
}

.corp-sidebar .sidebar-link {
  color: rgba(255, 255, 255, 0.78);
  transition: all 0.15s ease;
}

.corp-sidebar .sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.corp-sidebar .nav-item-active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-primary) 42%, transparent) 0%, color-mix(in srgb, var(--brand-primary) 14%, transparent) 100%);
  color: #ffffff;
  border-left: 3px solid var(--brand-accent);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.corp-sidebar .sidebar-select {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.corp-sidebar .sidebar-select option {
  color: #0f172a;
  background-color: #ffffff;
}

/* Corporate accents in main content */
.brand-top-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-accent) 55%, var(--brand-secondary) 100%);
}

.brand-badge {
  background-color: color-mix(in srgb, var(--brand-primary) 11%, white);
  color: var(--brand-primary);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 26%, white);
}

.brand-btn-primary {
  background-color: var(--brand-primary);
  color: #ffffff;
  transition: filter 0.15s ease, transform 0.12s ease;
}
.brand-btn-primary:hover {
  filter: brightness(1.08);
}

.brand-text {
  color: var(--brand-primary);
}

/* Smooth custom scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--brand-surface) 80%, #e2e8f0);
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand-secondary) 45%, #cbd5e1);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-secondary);
}

.kpi-card {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  border-top: 3px solid color-mix(in srgb, var(--brand-primary) 55%, transparent);
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -6px rgba(15, 23, 42, 0.1);
  border-top-color: var(--brand-primary);
}

/* Enhanced scrollable tables: sticky header, sticky first column, visible scrollbars */
.data-table-scroll {
  max-height: 520px;
  overflow: auto;
  position: relative;
}

.data-table-scroll-fs {
  flex: 1 1 auto;
  overflow: auto;
  position: relative;
}

.table-top-scrollbar {
  overflow-x: auto;
  overflow-y: hidden;
  height: 14px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.table-top-scrollbar::-webkit-scrollbar {
  height: 10px;
}

.table-top-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.table-top-scrollbar::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 9999px;
  border: 2px solid #f1f5f9;
}

.table-top-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.data-table {
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #f8fafc;
  box-shadow: inset 0 -1px 0 #e2e8f0;
}

.data-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 30;
  background-color: #f1f5f9;
  box-shadow: inset 0 -1px 0 #e2e8f0, 3px 0 6px -3px rgba(15, 23, 42, 0.14);
}

.data-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
  background-color: #ffffff;
  font-weight: 600;
  box-shadow: 3px 0 6px -3px rgba(15, 23, 42, 0.12);
}

.data-table tbody tr:hover td:first-child {
  background-color: #f8fafc;
}

@media print {
  .no-print {
    display: none !important;
  }
  main {
    margin: 0 !important;
    padding: 0 !important;
  }
}
