/* ── Agent Board – Dark Theme ── */

:root {
  --surface: #131313;
  --surface-container-lowest: #0e0e0e;
  --surface-container-low: #18191c;
  --surface-container: #201f1f;
  --surface-container-high: #2a2a2a;
  --surface-container-highest: #333333;
  --surface-variant: rgba(255, 255, 255, 0.08); /* Secondary glass */
  --surface-bright: rgba(45, 45, 45, 0.6); /* Modals, Dropdowns */

  --on-surface: #e5e2e1;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-bright: #ffffff;

  --primary: #6cdab1;
  --primary-container: #2ca37d;
  --primary-fixed: rgba(108, 218, 177, 0.15); /* 15% glow */
  --tertiary: #b388ff; /* violet */

  --accent-blue: #3b82f6;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --accent-yellow: #f59e0b;
  --accent-orange: #f97316;
  --accent-purple: #8b5cf6;
  --accent-gray: #6b7280;

  --outline: #87948c;
  --outline-variant: #3d4943;
  --border-ghost: rgba(61, 73, 67, 0.15); /* 15% opacity of outline-variant */

  --ambient-shadow: 0 32px 48px rgba(0, 0, 0, 0.06);

  --radius: 1rem; /* lg */
  --radius-md: 0.75rem; 
  --radius-sm: 0.5rem;
  --sidebar-width: 260px;
  --header-height: 56px;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
  background: var(--surface);
  color: var(--on-surface);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Login Screen ── */

.login-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
}

.login-card {
  background: var(--surface-container);
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: 16px;
  padding: 48px 40px;
  width: 420px;
  max-width: 90vw;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo svg {
  margin-bottom: 16px;
}

.login-logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.5px;
  margin: 0;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-form select {
  padding: 10px 14px;
  background: var(--surface-container-low);
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.login-form select:focus {
  border-bottom-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 218, 177, 0.1);
}

.login-form select option {
  background: var(--surface-container);
  color: var(--on-surface);
}

.login-form button {
  margin-top: 8px;
  padding: 10px 20px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.login-form button:hover:not(:disabled) {
  background: var(--accent-blue-hover);
}

.login-form button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Dashboard Layout ── */

.dashboard {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 1fr;
  height: 100dvh;
  overflow: hidden;
}

/* ── Sidebar ── */

.sidebar {
  grid-row: 1 / -1;
  background: var(--surface-container-lowest);
  /* removed border-right */
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.sidebar-header {
  padding: 20px 20px 16px;
  
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-title {
  padding: 12px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.nav-section ul {
  list-style: none;
}

.nav-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
  opacity: 0.6;
}

.nav-link.active .nav-icon {
  opacity: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 7px 20px 7px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.1s, background 0.1s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  color: var(--on-surface);
  background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
  color: var(--on-surface);
  background: transparent;
  border-left-color: transparent;
  font-weight: 500;
  position: relative;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 2px;
  background-color: var(--primary);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  border-top: 1px solid var(--border-ghost);
  padding: 16px 20px;
}

.sidebar-agent-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.agent-details {
  min-width: 0;
}

.agent-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.switch-agent-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.switch-agent-btn:hover {
  color: var(--accent-blue);
}

/* ── Agent Switcher Dropdown ── */

.sidebar-footer {
  position: relative;
}

.agent-switcher-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 12px;
  right: 12px;
  margin-bottom: 8px;
  background: var(--surface-container-high);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
}

.agent-switcher-dropdown.open {
  display: block;
}

.agent-switcher-list {
  padding: 6px;
}

.agent-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.agent-switcher-item:hover {
  background: var(--surface-variant);
}

.agent-switcher-item.active {
  background: var(--primary-fixed);
  color: var(--primary);
  font-weight: 500;
}

.agent-switcher-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.agent-switcher-item.active .agent-switcher-avatar {
  background: var(--primary-container);
  color: #fff;
}

.agent-switcher-divider {
  height: 1px;
  background: var(--outline-variant);
  margin: 4px 8px;
}

.agent-switcher-logout {
  color: var(--accent-red) !important;
}

.agent-switcher-logout .agent-switcher-avatar {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

/* ── Main Wrapper ── */

.main-wrapper {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header ── */

.top-header {
  height: var(--header-height);
  background: rgba(14, 14, 14, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
}

.header-left h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-bright);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sync-status {
  font-size: 12px;
  color: var(--text-muted);
}

.refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.refresh-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.refresh-btn .refresh-icon {
  width: 16px;
  height: 16px;
}

.refresh-btn.spinning .refresh-icon {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Main Content ── */

.main-content {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 28px;
}

.main-content::-webkit-scrollbar {
  width: 6px;
}

.main-content::-webkit-scrollbar-track {
  background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.main-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── Footer ── */

.main-footer {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border-ghost);
  flex-shrink: 0;
}

.main-footer a {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
}

.main-footer a:hover {
  color: var(--text-secondary);
}

/* ── KPI Cards ── */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface-container);
  border: none;
  box-shadow: var(--ambient-shadow);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, var(--primary-fixed), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 48px 64px rgba(0, 0, 0, 0.12);
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-value {
  font-family: 'Inter', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  line-height: 1.1;
  margin-bottom: 8px;
  text-shadow: 0 0 16px rgba(108, 218, 177, 0.25);
}

.kpi-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: var(--text-muted);
}

.kpi-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* KPI color accents (top border) */
.kpi-blue {
  border-top: 3px solid var(--accent-blue);
}

.kpi-green {
  border-top: 3px solid var(--accent-green);
}

.kpi-red {
  border-top: 3px solid var(--accent-red);
}

.kpi-yellow {
  border-top: 3px solid var(--accent-yellow);
}

.kpi-orange {
  border-top: 3px solid var(--accent-orange);
}

.kpi-purple {
  border-top: 3px solid var(--accent-purple);
}

.kpi-gray {
  border-top: 3px solid var(--accent-gray);
}

/* ── Data Tables ── */

.table-container {
  background: var(--surface-container);
  box-shadow: var(--ambient-shadow); border: none;
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table th {
  background: #161b28;
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--outline-variant);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.1s;
}

.data-table th:hover {
  color: var(--on-surface);
}

.data-table th.text-right {
  text-align: right;
}

.data-table th .sort-icon {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.3;
}

.data-table th.sort-asc .sort-icon::after,
.data-table th.sort-desc .sort-icon::after {
  opacity: 1;
}

.data-table th.sort-asc .sort-icon {
  opacity: 1;
}

.data-table th.sort-asc .sort-icon::after {
  content: ' ↑';
}

.data-table th.sort-desc .sort-icon {
  opacity: 1;
}

.data-table th.sort-desc .sort-icon::after {
  content: ' ↓';
}

.data-table td {
  padding: 9px 14px;
  color: var(--on-surface);
  white-space: normal;
  word-wrap: break-word;
}

.data-table td.text-right {
  text-align: right;
}

.data-table td.text-wrap {
  white-space: normal;
  word-wrap: break-word;
}

.row-even {
  background: var(--bg-row-even);
}

.row-odd {
  background: var(--bg-row-odd);
}

.data-table tbody tr {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

/* Also apply to inv-table rows */
.inv-table tbody tr {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.inv-table tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

/* ── Badges ── */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
  line-height: 1.6;
}

.badge-green {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.badge-orange {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
}

.badge-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

.badge-gray {
  background: rgba(107, 114, 128, 0.12);
  color: #9ca3af;
}

/* ── Links ── */

.aboss-link {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.1s;
}

.aboss-link:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* ── Color utilities ── */

.text-red {
  color: var(--accent-red);
  font-weight: 600;
}

.text-yellow {
  color: var(--accent-yellow);
  font-weight: 600;
}

.text-green {
  color: var(--accent-green);
  font-weight: 600;
}

.text-blue {
  color: var(--accent-blue);
}

/* ── Empty state ── */

.empty-state {
  background: var(--surface-container);
  box-shadow: var(--ambient-shadow); border: none;
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Skeleton loaders ── */

.skeleton-card {
  background: var(--surface-container) !important;
  border: 1px solid var(--border-ghost) !important;
}

.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-value {
  height: 32px;
  width: 80px;
  margin-bottom: 8px;
}

.skeleton-label {
  height: 12px;
  width: 100px;
}

.skeleton-table {
  padding: 16px;
}

.skeleton-row {
  height: 16px;
  margin-bottom: 14px;
  width: 100%;
}

.skeleton-row:nth-child(odd) {
  width: 85%;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* ── Scrollbar for table container ── */

.table-container {
  overflow-x: auto;
}

.table-container::-webkit-scrollbar {
  height: 4px;
}

.table-container::-webkit-scrollbar-track {
  background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── Logistic View: Status Dots ── */

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}

.dot-green {
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}

.dot-yellow {
  background: #eab308;
  box-shadow: 0 0 4px rgba(234, 179, 8, 0.3);
}

.dot-orange {
  background: #f97316;
  box-shadow: 0 0 4px rgba(249, 115, 22, 0.3);
}

.dot-red {
  background: #ef4444;
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

.dot-gray {
  background: #6b7280;
}

.cell-label {
  font-size: 0.75rem;
  vertical-align: middle;
  margin-left: 2px;
}

.cell-muted {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ── Logistic: Status Badge ── */

.st-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.st-con {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.st-opt {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

/* ── Logistic: Travel Count Badges ── */

.trv-count {
  display: inline-block;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}

.trv-green {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.trv-orange {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.trv-red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ── Logistic Table: Compact Cells ── */

#logistic-table th,
#logistic-table td {
  padding: 6px 8px;
  font-size: 0.78rem;
  white-space: nowrap;
}

#logistic-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Invoice Category & Division Badges ── */

.inv-cat-badge,
.inv-div-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

.inv-cat-bf {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.inv-cat-af {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
}

.inv-cat-exp {
  background: rgba(249, 115, 22, 0.18);
  color: #fb923c;
}

.inv-cat-credit {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.inv-cat-other {
  background: rgba(107, 114, 128, 0.18);
  color: #9ca3af;
}

.inv-div-eu {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.inv-div-asia {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.inv-div-us {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
}

.inv-div-sa {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
}

.inv-div-global {
  background: rgba(6, 182, 212, 0.18);
  color: #22d3ee;
}

/* ── Section Headings ── */

.section-heading {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Config Page ── */

.config-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.config-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 600px;
}

.config-notice {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.config-notice code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.8rem;
}

.config-notice-warn {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.2);
}

.prefix-code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--text-bright);
  letter-spacing: 0.02em;
}

.unmatched-list {
  margin: 12px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.unmatched-list ul {
  columns: 2;
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.unmatched-list li {
  padding: 3px 0;
}

.unmatched-list code {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.78rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: #000; /* on-primary */
  border: none;
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 16px rgba(108, 218, 177, 0.2);
}

.btn-secondary {
  background: var(--surface-variant);
  box-shadow: var(--ambient-shadow); border: none;
  color: var(--on-surface);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}

/* Premium Table Action Buttons (Prestige Redesign) */
.data-table .btn-sm.btn-secondary {
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.data-table tbody tr:hover .btn-sm.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-bright);
}

.data-table .btn-sm.btn-secondary:hover {
  background: rgba(108, 218, 177, 0.12) !important;
  border-color: rgba(108, 218, 177, 0.3) !important;
  color: var(--primary) !important;
  box-shadow: 0 0 16px rgba(108, 218, 177, 0.15) !important;
  transform: translateY(-1px) !important;
}

/* ── Premium Document Action Groups ── */

.doc-action-group {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.doc-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
}

.data-table tbody tr:hover .doc-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-bright);
}

.doc-action-btn.action-contract:hover {
  background: rgba(249, 115, 22, 0.15) !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
  color: #fb923c !important;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.15) !important;
  transform: translateY(-1px) !important;
}

.doc-action-btn.action-bf:hover {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  color: #60a5fa !important;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.15) !important;
  transform: translateY(-1px) !important;
}

.doc-action-btn.action-af:hover {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
  color: #c084fc !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.15) !important;
  transform: translateY(-1px) !important;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  font-size: 0.9rem;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.btn-icon:hover {
  opacity: 1;
}

/* Modal */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: var(--surface-container);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 28px;
  width: 440px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-card h3 {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
}

/* ── Action Popup ── */

.action-popup-header {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-popup-message {
  margin: 0 0 24px 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.action-popup-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.action-popup-actions .btn-whatsapp {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #22c55e;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-decoration: none;
  font-size: 13px;
  transition: background 0.2s, transform 0.15s;
}

.action-popup-actions .btn-whatsapp:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

.action-popup-actions .spacer {
  flex: 1;
}

.action-popup-actions .btn {
  padding: 8px 16px;
  font-size: 13px;
  text-decoration: none;
}

.form-row {
  margin-bottom: 14px;
}

.form-row label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-row input,
.form-row select {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-container-low);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}

.form-row input:focus,
.form-row select:focus {
  border-bottom-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 218, 177, 0.1);
}

.form-row input:disabled {
  opacity: 0.5;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ── Division Switcher ── */

.division-switcher {
  display: flex;
  align-items: center;
}

.div-pills {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 3px;
}

.div-pill {
  padding: 4px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  color: var(--text-muted);
}

.div-pill:hover {
  color: var(--on-surface);
  background: rgba(255, 255, 255, 0.06);
}

.div-pill-active {
  color: #fff !important;
}

.div-pill-blue.div-pill-active {
  background: var(--accent-blue);
}

.div-pill-green.div-pill-active {
  background: var(--accent-green);
}

.div-pill-purple.div-pill-active {
  background: var(--accent-purple);
}

.div-pill-orange.div-pill-active {
  background: var(--accent-orange);
}

/* ── Division indicator in sidebar ── */

.sidebar-division-info {
  padding: 8px 20px;
  
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.div-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.div-indicator-blue {
  background: var(--accent-blue);
}

.div-indicator-green {
  background: var(--accent-green);
}

.div-indicator-purple {
  background: var(--accent-purple);
}

.div-indicator-orange {
  background: var(--accent-orange);
}

/* ── Range Config Filter Tabs ── */

.range-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.range-tab {
  padding: 6px 14px;
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.range-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--on-surface);
}

.range-tab-active {
  background: var(--accent-blue);
  border-bottom-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 218, 177, 0.1);
  color: #fff;
}

.range-tab-active:hover {
  background: var(--accent-blue-hover);
  color: #fff;
}

/* ── Status Counters Row ── */

.status-counters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.status-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-container);
  box-shadow: var(--ambient-shadow); border: none;
  border-left: 3px solid;
  border-radius: var(--radius-sm);
  min-width: 80px;
}

.status-counter-count {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.status-counter-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Invoice Status Badges (colored blocks like Looker) ── */

.inv-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
}

.inv-status-paid {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.inv-status-overdue {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.inv-status-wait {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.inv-status-ready {
  background: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
}

.inv-status-inspect {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}

.inv-status-cell {
  white-space: nowrap;
}

/* ── INV Cat inline ── */

.inv-cat-inline {
  font-size: 12px;
  white-space: nowrap;
}

/* ── OD Days cell (yellow/orange background like Looker) ── */

.od-days-cell {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-weight: 600;
  font-size: 12px;
}

/* ── Row number column ── */

.col-row-num {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  width: 36px;
  text-align: right;
  padding-right: 8px !important;
}

/* ── Invoices Overview Table: Compact ── */

.inv-table th,
.inv-table td {
  padding: 7px 10px;
  font-size: 12px;
}

.inv-table th {
  font-size: 10px;
}

/* ── Search & Filter bar ── */

.inv-filters {
  margin-bottom: 16px;
}

.inv-filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.inv-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inv-filter-group label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.inv-filter-input,
.inv-filter-select {
  padding: 7px 12px;
  background: var(--surface-container-low);
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  font-size: 13px;
  outline: none;
  min-width: 140px;
  transition: border-color 0.15s;
}

.inv-filter-input:focus,
.inv-filter-select:focus {
  border-bottom-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 218, 177, 0.1);
}

.inv-filter-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.inv-filter-select option {
  background: var(--surface-container);
  color: var(--on-surface);
}

/* ── Footer bar (timestamp + pagination) ── */

.inv-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.inv-footer-left a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── KPI grid forced 4 columns ── */

.kpi-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ── Overview 2026: Attention Panel ── */

.attention-panel {
  background: var(--surface-container);
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.attention-title {
  padding: 12px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.attention-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--on-surface);
  transition: background 0.12s;
  border-top: 1px solid var(--border-ghost);
  cursor: pointer;
}

.attention-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.attention-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.attention-icon-red {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.attention-icon-orange {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}

.attention-icon-yellow {
  background: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
}

.attention-icon-purple {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.attention-text {
  flex: 1;
  font-size: 13px;
}

.attention-arrow {
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Overview 2026: Filter Bar ── */

.ov-filters {
  margin-bottom: 16px;
}

.ov-filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.ov-search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 14px;
  background: var(--surface-container-low);
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.ov-search-input:focus {
  border-bottom-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 218, 177, 0.1);
}

.ov-search-input::placeholder {
  color: var(--text-muted);
}

.table-filter-count {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 12px;
}

.ov-status-pills {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.ov-pill {
  padding: 6px 14px;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.12s;
}

.ov-pill:hover {
  color: var(--on-surface);
  background: rgba(255, 255, 255, 0.06);
}

.ov-pill.ov-pill-active {
  background: var(--accent-blue);
  color: #fff;
}

.ov-select {
  padding: 8px 32px 8px 12px;
  background: var(--surface-container-low);
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  font-size: 13px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: border-color 0.15s;
}

.ov-select:focus {
  border-bottom-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 218, 177, 0.1);
}

.ov-select option {
  background: var(--surface-container);
  color: var(--on-surface);
}

/* ── Overview 2026: Table Enhancements ── */

.ov-table .col-dot {
  text-align: center;
  width: 48px;
}

.ov-table th.col-dot {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cell-bold {
  font-weight: 600;
  color: var(--text-bright);
}

.ov-row {
  transition: background 0.1s;
}

.ov-row:hover {
  background: rgba(59, 130, 246, 0.06) !important;
}

.ov-row-expanded {
  background: rgba(59, 130, 246, 0.04) !important;
}

/* ── Overview 2026: Expandable Detail Row ── */

.ov-detail-row td {
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.02);
  border-top: none;
}

.ov-detail-content {
  padding: 14px 20px 14px 40px;
  border-left: 3px solid var(--accent-blue);
}

.ov-detail-section {
  margin-bottom: 10px;
}

.ov-detail-section:last-child {
  margin-bottom: 0;
}

.ov-detail-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-right: 8px;
}

.ov-detail-inv-table {
  width: 100%;
  margin-top: 6px;
  border-collapse: collapse;
  font-size: 12px;
}

.ov-detail-inv-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 4px 10px;
  
}

.ov-detail-inv-table td {
  padding: 6px 10px;
  
}

.ov-detail-inv-table tr:last-child td {
  border-bottom: none;
}

/* ── Availability 2026: Controls ── */

.avail-controls {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.avail-ctrl-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.avail-ctrl-row-secondary {
  align-items: center;
  justify-content: space-between;
}

.avail-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.avail-ctrl-group label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.avail-date-input {
  padding: 7px 12px;
  background: var(--surface-container-low);
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  color-scheme: dark;
}

.avail-date-input:focus {
  border-bottom-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 218, 177, 0.1);
}

.avail-presets {
  display: flex;
  gap: 4px;
  align-self: flex-end;
}

.avail-preset {
  padding: 7px 14px;
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.avail-preset:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--on-surface);
}

.avail-blocking-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avail-blocking-label {
  font-size: 12px;
  color: var(--text-muted);
}

.avail-toggle {
  padding: 5px 12px;
  border: none;
  border-bottom: 1px solid rgba(135, 148, 140, 0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.avail-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.avail-toggle-active.avail-toggle-red {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.avail-toggle-active.avail-toggle-orange {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.4);
  color: #fb923c;
}

.avail-toggle-active.avail-toggle-blue {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.avail-actions {
  display: flex;
  gap: 8px;
}

/* ── Availability 2026: Grid ── */

.avail-grid-wrap {
  overflow-x: auto;
  box-shadow: var(--ambient-shadow); border: none;
  border-radius: var(--radius);
}

.avail-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

.avail-table th,
.avail-table td {
  padding: 6px 10px;
  box-shadow: var(--ambient-shadow); border: none;
  text-align: center;
  white-space: nowrap;
}

.avail-artist-th {
  text-align: left !important;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface-container);
  min-width: 140px;
}

.avail-date-th {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  background: var(--surface-container);
  min-width: 64px;
  line-height: 1.3;
}

.avail-artist-cell {
  text-align: left !important;
  font-weight: 600;
  color: var(--text-bright);
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

tr:nth-child(even) .avail-artist-cell {
  background: var(--surface);
}

.avail-cell {
  min-width: 64px;
  font-weight: 600;
  font-size: 11px;
  transition: background 0.1s;
}

.avail-cell-free {
  background: rgba(34, 197, 94, 0.08);
}

.avail-cell-con {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.avail-cell-con-info {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.avail-cell-opt {
  background: rgba(249, 115, 22, 0.1);
  color: #fdba74;
}

.avail-cell-opt-blocked {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}

.avail-cell-int {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
}

.avail-cell-int-blocked {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.avail-cell-radius-conflict {
  box-shadow: inset 0 0 0 2px #ef4444 !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.05);
}

.avail-weekend {
  background-color: rgba(255, 255, 255, 0.025);
}

.avail-cell-con.avail-weekend {
  background: rgba(239, 68, 68, 0.22);
}

.avail-cell-opt.avail-weekend,
.avail-cell-opt-blocked.avail-weekend {
  background: rgba(249, 115, 22, 0.17);
}

.avail-table tbody tr:hover td {
  filter: brightness(1.1);
}

/* ── Contracts Priority Badges ── */
.priority-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.priority-badge-urgent {
  white-space: normal;
  line-height: 1.3;
  padding: 6px 10px;
  max-width: 180px;
  text-align: left;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171 !important;
  border-left: 3px solid #f87171;
}

/* ── Contracts KPI Mini Dashboard ── */
.contracts-kpi-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.contracts-kpi-bar::-webkit-scrollbar {
  height: 4px;
}

.contracts-kpi-item {
  flex: 1;
  min-width: 100px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contracts-kpi-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.contracts-kpi-value {
  font-size: 22px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  color: var(--text-bright);
  line-height: 1;
  margin-bottom: 6px;
}

.contracts-kpi-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

.contracts-kpi-item.is-clickable {
  cursor: pointer;
}

.contracts-kpi-item.is-clickable:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contracts-kpi-item.is-active {
  background: rgba(108, 218, 177, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 4px 12px rgba(108, 218, 177, 0.15);
}

.contracts-kpi-item.is-red .contracts-kpi-value { color: #f87171; text-shadow: 0 0 12px rgba(248, 113, 113, 0.3); }
.contracts-kpi-item.is-green .contracts-kpi-value { color: #4ade80; text-shadow: 0 0 12px rgba(74, 222, 128, 0.3); }
.contracts-kpi-item.is-yellow .contracts-kpi-value { color: #facc15; text-shadow: 0 0 12px rgba(250, 204, 21, 0.3); }
.contracts-kpi-item.is-blue .contracts-kpi-value { color: #60a5fa; text-shadow: 0 0 12px rgba(96, 165, 250, 0.3); }
.contracts-kpi-item.is-orange .contracts-kpi-value { color: #fb923c; text-shadow: 0 0 12px rgba(251, 146, 60, 0.3); }

/* ── Contracts Overview Status Blocks ── */
.status-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 6px;
  white-space: nowrap;
  width: 100%;
  max-width: 160px;
}

.status-block-green {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
  box-shadow: inset 0 0 12px rgba(34, 197, 94, 0.05);
}

.status-block-red {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: inset 0 0 12px rgba(239, 68, 68, 0.05);
}

.status-block-yellow {
  background: rgba(234, 179, 8, 0.1);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.2);
  box-shadow: inset 0 0 12px rgba(234, 179, 8, 0.05);
}

.status-block-gray {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}


.avail-table tbody tr:hover .avail-artist-cell {
  color: var(--accent-blue);
}
/* ── The Midnight Curator: Typography ── */
.display-lg {
  font-family: 'Inter', sans-serif;
  font-size: 2.5rem; /* Adjust based on exact KPI size needed */
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}

.label-sm {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: var(--text-muted);
}

.headline-sm {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
}

.body-md {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Base resets */
body {
  color: var(--on-surface);
}


/* ── The Midnight Curator: Micro-Interactions & Animations ── */

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.kpi-card, .table-container, .attention-panel, .empty-state {
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.1s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.2s; }
.kpi-card:nth-child(5) { animation-delay: 0.25s; }
.kpi-card:nth-child(6) { animation-delay: 0.3s; }

.attention-panel { animation-delay: 0.1s; }
.table-container { animation-delay: 0.2s; }

/* ── Chasing Integration ── */

/* Escalation badges */
.chasing-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.chasing-none {
  background: var(--surface-variant);
  color: var(--text-muted);
}

.chasing-level-1 {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.chasing-level-2 {
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.chasing-level-3 {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.chasing-excluded {
  background: rgba(107, 114, 128, 0.15);
  color: var(--accent-gray);
  border: 1px solid rgba(107, 114, 128, 0.3);
  text-decoration: line-through;
}

/* Pending status badges */
.chasing-pending-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
}

.chasing-pending-status {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-yellow);
}

.chasing-approved-status {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-green);
}

.chasing-sending-status {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Chasing recipient text */
.chasing-recipient {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Chasing action buttons */
.chasing-actions {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  align-items: center;
}

.chasing-btn-approve {
  background: rgba(34, 197, 94, 0.15) !important;
  color: var(--accent-green) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}
.chasing-btn-approve:hover {
  background: rgba(34, 197, 94, 0.3) !important;
}

.chasing-btn-reject {
  background: rgba(239, 68, 68, 0.15) !important;
  color: var(--accent-red) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}
.chasing-btn-reject:hover {
  background: rgba(239, 68, 68, 0.3) !important;
}

.chasing-btn-history {
  background: rgba(59, 130, 246, 0.15) !important;
  color: var(--accent-blue) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
}
.chasing-btn-history:hover {
  background: rgba(59, 130, 246, 0.3) !important;
}

.chasing-btn-exclude {
  background: rgba(107, 114, 128, 0.1) !important;
  color: var(--text-muted) !important;
  border: 1px solid rgba(107, 114, 128, 0.2) !important;
}
.chasing-btn-exclude:hover {
  background: rgba(107, 114, 128, 0.25) !important;
  color: var(--accent-red) !important;
}

.chasing-btn-unexclude {
  background: rgba(34, 197, 94, 0.1) !important;
  color: var(--accent-green) !important;
  border: 1px solid rgba(34, 197, 94, 0.2) !important;
}
.chasing-btn-unexclude:hover {
  background: rgba(34, 197, 94, 0.25) !important;
}

/* Excluded row styling */
.chasing-row-excluded {
  opacity: 0.5;
}
.chasing-row-excluded:hover {
  opacity: 0.8;
}

/* Chasing history modal */
.chasing-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.chasing-modal {
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  width: min(900px, 90vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--ambient-shadow);
}

.chasing-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--outline-variant);
}

.chasing-modal-header h3 {
  color: var(--on-surface);
  font-size: 1rem;
  font-weight: 600;
}

.chasing-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.chasing-modal-close:hover {
  background: var(--surface-variant);
  color: var(--on-surface);
}

.chasing-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
}

.chasing-history-table {
  width: 100%;
  font-size: 0.8rem;
}

.text-green {
  color: var(--accent-green);
}
