/* ═══════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #eff6ff;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════ */
.header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--gray-900);
  white-space: nowrap;
}
.logo-icon { font-size: 22px; }

/* ─── User info (header phải) ─── */
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
}
.user-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.user-badge.role-admin  { background: #fef3c7; color: #92400e; }
.user-badge.role-ketoan { background: #dcfce7; color: #166534; }
.user-badge.role-quanly { background: #eff6ff; color: #1e40af; }

.tab-nav { display: flex; gap: 4px; }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: none;
  background: transparent;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all .15s;
  white-space: nowrap;
}
.tab-btn:hover { background: var(--gray-100); color: var(--gray-800); }
.tab-btn.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════ */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.page-header {
  margin-bottom: 20px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
}
.page-header p {
  color: var(--gray-500);
  margin-top: 2px;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════
   INFO BANNER
═══════════════════════════════════════════════════ */
.info-banner {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--primary-dark);
  line-height: 1.6;
}
.banner-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ═══════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════ */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray-50);
}
.card-header h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}
.card-body { padding: 20px; }
.card-body.no-pad { padding: 0; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  display: flex;
  justify-content: flex-end;
}

.card-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.card-grid.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .card-grid.two-col { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--gray-600); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input[type="text"], input[type="number"], input[type="email"],
select, textarea {
  padding: 8px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--gray-800);
  background: #fff;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.req { color: var(--danger); }

/* ═══════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover:not(:disabled) { background: #15803d; }
.btn-outline { background: #fff; color: var(--gray-700); border-color: var(--gray-300); }
.btn-outline:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-400); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-large { padding: 11px 24px; font-size: 15px; font-weight: 600; }
.full-width { width: 100%; }
.link-btn {
  background: none; border: none; color: var(--primary); cursor: pointer;
  font-size: inherit; text-decoration: underline; padding: 0;
}
.link-btn:hover { color: var(--primary-dark); }

/* ═══════════════════════════════════════════════════
   UPLOAD AREA
═══════════════════════════════════════════════════ */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 14px;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.upload-area p { color: var(--gray-500); font-size: 13px; margin: 2px 0; }
.upload-hint { font-size: 11px; color: var(--gray-400); }
.upload-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--success);
  font-size: 13px;
}
.hidden { display: none !important; }
.divider {
  text-align: center;
  color: var(--gray-400);
  font-size: 12px;
  margin: 12px 0;
  position: relative;
}
.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: var(--gray-200);
}
.divider::before { left: 0; }
.divider::after { right: 0; }

/* ═══════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--gray-400);
}
.empty-icon { font-size: 32px; display: block; margin-bottom: 10px; }
.empty-state p { font-size: 13px; }

/* ═══════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  padding: 10px 12px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-600);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }
.num { text-align: right; }

/* Trạng thái badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }
.badge-blue { background: var(--primary-light); color: var(--primary-dark); }

/* Summary stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}
.stat-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
}
.stat-value { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.stat-label { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* ═══════════════════════════════════════════════════
   SCHEDULE LAYOUT
═══════════════════════════════════════════════════ */
.schedule-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1024px) {
  .schedule-layout { grid-template-columns: 1fr; }
}

/* Item list (branches, employees) */
.item-list { min-height: 40px; }
.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--gray-100);
  transition: background .1s;
}
.item-row:last-child { border-bottom: none; }
.item-row:hover { background: var(--gray-50); }
.item-row.selected { background: var(--primary-light); }
.item-name { font-size: 13px; color: var(--gray-800); font-weight: 500; }
.item-sub { font-size: 11px; color: var(--gray-400); }
.item-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .1s; }
.item-row:hover .item-actions { opacity: 1; }
.icon-btn {
  background: none; border: none; cursor: pointer; padding: 3px;
  color: var(--gray-400); border-radius: 3px; font-size: 13px;
  transition: color .1s, background .1s;
}
.icon-btn:hover { color: var(--gray-700); background: var(--gray-200); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-light); }
.empty-list {
  padding: 14px;
  color: var(--gray-400);
  font-size: 12px;
  text-align: center;
}

/* Input table cells */
.data-table input[type="text"],
.data-table input[type="number"],
.data-table select {
  padding: 5px 7px;
  font-size: 12px;
  border-radius: 3px;
  margin: 0;
}
.data-table .emp-select { min-width: 140px; }

/* ═══════════════════════════════════════════════════
   SCHEDULE CALENDAR
═══════════════════════════════════════════════════ */
.schedule-calendar { overflow-x: auto; }
.calendar-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.calendar-table th {
  padding: 7px 4px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  font-weight: 600;
  text-align: center;
  min-width: 32px;
  white-space: nowrap;
}
.calendar-table th.emp-col { text-align: left; padding-left: 12px; min-width: 140px; position: sticky; left: 0; background: var(--gray-50); z-index: 2; }
.calendar-table td {
  padding: 6px 4px;
  border: 1px solid var(--gray-100);
  text-align: center;
  color: var(--gray-700);
  min-width: 32px;
}
.calendar-table td.emp-name-cell {
  text-align: left;
  padding-left: 12px;
  font-weight: 500;
  background: #fff;
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 2px solid var(--gray-200);
  white-space: nowrap;
}
.cal-work { background: #dbeafe; color: #1d4ed8; font-weight: 600; border-radius: 2px; }
.cal-sick { background: #fee2e2; color: #b91c1c; font-size: 10px; }
.cal-urlaub { background: #fef9c3; color: #92400e; font-size: 10px; }
.cal-sun { background: var(--gray-50); color: var(--gray-300); }
.cal-total { background: var(--gray-50); font-weight: 700; color: var(--gray-800); border-left: 2px solid var(--gray-300); }
.calendar-legend {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--gray-500); }
.legend-dot { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 15px; font-weight: 600; color: var(--gray-900); }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 16px; padding: 2px 6px;
  border-radius: 4px; transition: background .1s;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--gray-50);
}

/* ═══════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gray-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 2000;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

/* ═══════════════════════════════════════════════════
   LOADING
═══════════════════════════════════════════════════ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 9999;
}
.loading-overlay.hidden { display: none; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading-msg { font-size: 14px; color: var(--gray-600); font-weight: 500; }

/* ═══════════════════════════════════════════════════
   DAY CHECKBOXES (branch closed days)
═══════════════════════════════════════════════════ */
.day-checkboxes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.day-check {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  transition: all .15s;
  user-select: none;
}
.day-check:has(input:checked) {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}
.day-check input { display: none; }

/* ═══════════════════════════════════════════════════
   WOCHE VIEW — schedule result
═══════════════════════════════════════════════════ */
.woche-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 20px 0;
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
}
.woche-tab-btn {
  padding: 6px 14px;
  border: 1px solid var(--gray-200);
  border-bottom: none;
  background: var(--gray-100);
  border-radius: 6px 6px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all .15s;
  margin-bottom: -1px;
}
.woche-tab-btn.active {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 600;
  border-color: var(--gray-200);
}
.woche-content { display: none; padding: 0; }
.woche-content.active { display: block; }

/* Woche daily table */
.woche-day-group { border-bottom: 2px solid var(--gray-200); }
.woche-day-group:last-child { border-bottom: none; }
.woche-day-header {
  padding: 7px 16px;
  background: var(--gray-50);
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--gray-100);
}
.woche-day-header .date-label { color: var(--gray-400); font-weight: 400; }

.woche-emp-row {
  display: grid;
  grid-template-columns: 180px 80px 70px 70px 60px 70px 90px;
  align-items: center;
  padding: 5px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 12px;
  transition: background .1s;
}
.woche-emp-row:last-child { border-bottom: none; }
.woche-emp-row:hover { background: var(--gray-50); }
.woche-emp-row.work { }
.woche-emp-row.off { color: var(--gray-400); }
.woche-emp-row .emp-col { font-weight: 500; color: var(--gray-800); }
.shift-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.shift-vollzeit   { background: #dbeafe; color: #1e40af; }
.shift-frueh      { background: #fef9c3; color: #92400e; }
.shift-frueh_lang { background: #fed7aa; color: #c2410c; }
.shift-frueh_extra{ background: #fde68a; color: #b45309; }
.shift-abend      { background: #d1fae5; color: #065f46; }
.shift-lang       { background: #ede9fe; color: #5b21b6; }
.shift-off        { background: var(--gray-100); color: var(--gray-400); }
.shift-urlaub     { background: #cffafe; color: #155e75; }
.shift-krank      { background: #fee2e2; color: #991b1b; }

/* Summary bar dưới calendar */
.woche-summary-bar {
  padding: 10px 16px;
  border-top: 2px solid var(--gray-100);
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--gray-50);
}
.woche-summary-bar strong { color: var(--gray-800); }

/* Status badge */
.status-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}
.status-vollzeit { background: #dbeafe; color: #1e40af; }
.status-teilzeit { background: #dcfce7; color: #166534; }
.status-minijob  { background: #ede9fe; color: #5b21b6; }
#loading-msg { font-size: 14px; color: var(--gray-600); font-weight: 500; }

/* ═══════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════ */
#print-area {
  display: none;
}

@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area {
    display: block !important;
    position: fixed;
    inset: 0;
    background: #fff;
    padding: 12mm 10mm;
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: #000;
  }
  .print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8mm;
    border-bottom: 2px solid #000;
    padding-bottom: 4mm;
  }
  .print-header h2 { font-size: 16px; margin: 0 0 3px; }
  .print-header p  { font-size: 11px; margin: 0; color: #555; }
  .print-week { margin-bottom: 8mm; page-break-inside: avoid; }
  .print-week-title {
    font-size: 13px;
    font-weight: 700;
    background: #f0f0f0;
    padding: 3px 6px;
    margin-bottom: 2mm;
    border-left: 4px solid #333;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
  }
  .print-table th {
    background: #e8e8e8;
    border: 1px solid #bbb;
    padding: 3px 5px;
    text-align: left;
    font-weight: 700;
  }
  .print-table td {
    border: 1px solid #ccc;
    padding: 3px 5px;
    vertical-align: middle;
  }
  .print-table tr.day-sep td {
    background: #f7f7f7;
    font-weight: 700;
    font-size: 10px;
    color: #333;
    padding: 2px 5px;
    border-top: 1.5px solid #999;
  }
  .print-table .work-row { background: #fff; }
  .print-table .off-row  { color: #888; }
  .print-footer {
    margin-top: 6mm;
    font-size: 9px;
    color: #888;
    text-align: right;
    border-top: 1px solid #ccc;
    padding-top: 2mm;
  }
  @page { margin: 0; size: A4 portrait; }
}

/* ═══════════════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════════════ */
.dash-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .dash-kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .dash-kpi-row { grid-template-columns: 1fr; } }
.kpi-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 4px;
}
.kpi-label { font-size: 12px; color: var(--gray-500); }
.dash-charts-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cat-color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   HOURS STAT TABLE
═══════════════════════════════════════════════════ */
.lang-btn.active-lang, .diff-btn.active-diff {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* ═══════════════════════════════════════════════════
   HOURS STAT TABLE
═══════════════════════════════════════════════════ */
.hours-stat-table {
  font-size: 12px;
  min-width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.hours-stat-table th,
.hours-stat-table td {
  padding: 7px 10px;
  white-space: nowrap;
}
.hours-stat-table th:first-child,
.hours-stat-table td:first-child {
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 1;
  min-width: 130px;
}
.hours-stat-table thead th:first-child { background: var(--gray-50); }
.hours-stat-table tfoot td:first-child  { background: var(--gray-50); }
.hours-stat-table tbody tr:hover td:first-child { background: var(--gray-50); }
