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

:root {
  /* Core palette */
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-card-hover: rgba(23, 33, 54, 0.9);
  --bg-input: #1a2332;
  --bg-sidebar: #0d1321;
  --border: rgba(55, 75, 110, 0.3);
  --border-hover: rgba(55, 75, 110, 0.6);

  /* Accent */
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.15);
  --accent-soft: rgba(6, 182, 212, 0.1);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Status Colors */
  --status-working: #22c55e;
  --status-working-bg: rgba(34, 197, 94, 0.12);
  --status-off: #f59e0b;
  --status-off-bg: rgba(245, 158, 11, 0.12);
  --status-cancel: #ef4444;
  --status-cancel-bg: rgba(239, 68, 68, 0.12);
  --status-changed: #6366f1;
  --status-changed-bg: rgba(99, 102, 241, 0.12);

  /* Expiry colors */
  --expired: #ef4444;
  --expired-bg: rgba(239, 68, 68, 0.12);
  --exp-30: #f59e0b;
  --exp-30-bg: rgba(245, 158, 11, 0.12);
  --exp-60: #f97316;
  --exp-60-bg: rgba(249, 115, 22, 0.12);
  --exp-90: #22c55e;
  --exp-90-bg: rgba(34, 197, 94, 0.12);

  /* Dimensions */
  --sidebar-w: 250px;
  --header-h: 60px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --bg-sidebar: #0f172a;
  --border: #cbd5e1;
  --border-hover: #94a3b8;

  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.15);
  --accent-soft: rgba(2, 132, 199, 0.1);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
}

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

html, body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  scroll-behavior: smooth;
}

/* ─── LAYOUT ─── */
.app-container {
  display: flex;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-subtitle { font-size: 11px; color: var(--text-muted); font-weight: 400; }

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 400;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--accent-soft);
}

.nav-item.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 500;
}

.nav-item i { width: 20px; text-align: center; font-size: 15px; }

.nav-item .badge {
  margin-left: auto;
  background: var(--expired);
  color: white;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-info { flex: 1; }
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--text-muted); }
.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 14px;
  transition: var(--transition);
}
.btn-logout:hover { color: var(--expired); }

/* ─── MAIN CONTENT ─── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.top-bar {
  height: var(--header-h);
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.company-toggle {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.company-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}

.company-btn:hover { color: var(--text-primary); }
.company-btn.active {
  background: var(--accent);
  color: #0a0f1a;
}

.global-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.global-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  transition: var(--transition);
}

.global-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.global-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.sync-dot {
  width: 8px;
  height: 8px;
  background: var(--status-working);
  border-radius: 50%;
}

/* ─── PAGE CONTAINER ─── */
.page-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  scroll-behavior: smooth;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page { display: none; }
.page.active { display: block; }

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.card:hover { border-color: var(--border-hover); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

/* ─── STAT CARDS ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  cursor: default;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.total { background: var(--accent-soft); color: var(--accent); }
.stat-icon.working { background: var(--status-working-bg); color: var(--status-working); }
.stat-icon.off { background: var(--status-off-bg); color: var(--status-off); }
.stat-icon.alert { background: var(--expired-bg); color: var(--expired); }

.stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ─── DATA TABLE ─── */
.table-container {
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.data-table thead th {
  background: var(--bg-input);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.data-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.data-table tbody tr {
  transition: var(--transition);
  cursor: pointer;
}

.data-table tbody tr:hover { background: var(--accent-soft); }

.data-table tbody td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  gap: 5px;
  white-space: nowrap;
}

.badge-working { background: var(--status-working-bg); color: var(--status-working); }
.badge-off { background: var(--status-off-bg); color: var(--status-off); }
.badge-cancel { background: var(--status-cancel-bg); color: var(--status-cancel); }
.badge-changed { background: var(--status-changed-bg); color: var(--status-changed); }
.badge-expired { background: var(--expired-bg); color: var(--expired); }
.badge-exp30 { background: var(--exp-30-bg); color: var(--exp-30); }
.badge-exp60 { background: var(--exp-60-bg); color: var(--exp-60); }
.badge-exp90 { background: var(--exp-90-bg); color: var(--exp-90); }
.badge-valid { background: var(--exp-90-bg); color: var(--exp-90); }
.badge-work { background: var(--accent-soft); color: var(--accent); }
.badge-vacation { background: var(--status-off-bg); color: var(--status-off); }
.badge-renewal-submitted { background: rgba(59, 130, 246, 0.18); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.4); }

.doc-section-header {
  background: var(--bg-input);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-color);
  border-left: 4px solid var(--accent);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0a0f1a;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger { background: var(--expired-bg); color: var(--expired); }
.btn-danger:hover { background: var(--expired); color: white; }

.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger:hover { border-color: var(--expired); color: var(--expired); }

/* ─── FILTERS BAR ─── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

select, .input-field {
  padding: 7px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  transition: var(--transition);
}

select:focus, .input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select option { background: var(--bg-secondary); }

.search-input {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  transition: var(--transition);
}

.search-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-input i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 12px; }

/* ─── PAGINATION ─── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination-info { font-size: 12px; }

.pagination-controls {
  display: flex;
  gap: 4px;
}

.page-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  transition: var(--transition);
}

.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #0a0f1a; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ─── EMPLOYEE SEARCHABLE COMBOBOX ─── */
.emp-combobox-container {
  position: relative;
  min-width: 320px;
  max-width: 450px;
  flex: 1;
}
.emp-combobox-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.emp-combobox-input-wrap i.combobox-search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  pointer-events: none;
}
.emp-combobox-input-wrap input.emp-combobox-input {
  padding-left: 36px;
  padding-right: 32px;
  width: 100%;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 8px;
  height: 38px;
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.emp-combobox-input-wrap input.emp-combobox-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
  outline: none;
}
.emp-combobox-input-wrap .combobox-clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
}
.emp-combobox-input-wrap .combobox-clear-btn:hover {
  color: var(--expired);
}

.emp-combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 9999;
}
.emp-combobox-item {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.emp-combobox-item:hover, .emp-combobox-item.active {
  background: rgba(30, 58, 138, 0.2);
}
.emp-combobox-item:last-child {
  border-bottom: none;
}
.emp-combobox-item .emp-meta {
  display: flex;
  flex-direction: column;
}
.emp-combobox-item .emp-code-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.emp-combobox-item .emp-pos {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.emp-combobox-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
}

/* Interactive Document Tracker Widgets */
.widget-click-box {
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
}
.widget-click-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  filter: brightness(1.15);
}
.widget-click-box:active {
  transform: translateY(-1px);
}
.widget-click-btn {
  transition: transform 0.15s ease, filter 0.15s ease;
  user-select: none;
}
.widget-click-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: var(--transition);
  overflow-y: auto;
  padding: 20px;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: var(--transition);
  overflow: hidden;
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 17px; font-weight: 600; }

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  border-radius: 6px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--expired-bg); color: var(--expired); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ─── FORM ─── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-section-title {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Outfit', sans-serif;
}

.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── PROFILE PAGE ─── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-info { flex: 1; }
.profile-name { font-size: 20px; font-weight: 700; }
.profile-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.profile-meta .badge { font-size: 11px; }

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.info-item {}
.info-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.info-value { font-size: 14px; font-weight: 500; }

/* ─── DASHBOARD GRID & VERTICAL QUICK ACTIONS ─── */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-grid .card.full { grid-column: 1 / -1; }

/* ─── QUICK ACTIONS (VERTICAL & HORIZONTAL) ─── */
.quick-actions-vertical {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
}

.quick-action-row i {
  font-size: 16px;
  color: var(--accent);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.12);
  border-radius: 6px;
  flex-shrink: 0;
}

.quick-action-row:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
  color: var(--accent);
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(6, 182, 212, 0.12);
}

.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 24px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 500;
  min-width: 120px;
}

.quick-action-btn i { font-size: 22px; color: var(--accent); }
.quick-action-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.1);
}

/* ─── DRAG DROP ZONE ─── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone i { font-size: 36px; color: var(--accent); margin-bottom: 12px; }
.drop-zone p { color: var(--text-secondary); font-size: 14px; }
.drop-zone .small { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ─── TOAST ─── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.toast.success { border-color: var(--status-working); }
.toast.success i { color: var(--status-working); }
.toast.error { border-color: var(--expired); }
.toast.error i { color: var(--expired); }
.toast.warning { border-color: var(--status-off); }
.toast.warning i { color: var(--status-off); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .separator { font-size: 11px; }

/* ─── LOGIN ─── */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg-primary);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 380px;
  backdrop-filter: blur(12px);
}

.login-card h1 {
  font-size: 22px;
  margin-bottom: 6px;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-card p {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
}

.login-card .form-group { margin-bottom: 16px; }

.login-card .btn-primary {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  margin-top: 8px;
}

/* ─── SALARY GRID ─── */
.salary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

.salary-item { display: flex; justify-content: space-between; font-size: 13px; }
.salary-item .label { color: var(--text-secondary); }
.salary-item .value { font-weight: 600; }
.salary-item.total {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 15px;
}
.salary-item.total .value { color: var(--accent); }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state i { font-size: 48px; margin-bottom: 16px; color: var(--border-hover); }
.empty-state p { font-size: 14px; margin-bottom: 8px; }
.empty-state .small { font-size: 12px; }

/* ─── PRINT STYLES ─── */
@media print {
  :root {
    --card-bg: #ffffff !important;
    --text-color: #000000 !important;
    --border-color: #e2e8f0 !important;
    --bg-color: #ffffff !important;
    --bg-input: #f1f5f9 !important;
    --text-muted: #334155 !important;
  }

  th, thead, thead th, .data-table thead th, table th, tr th, .printable-table th {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border-bottom: 2px solid #cbd5e1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  tr, td {
    background: #ffffff !important;
    color: #000000 !important;
  }

  @page {
    margin: 12mm;
    size: auto;
  }
  
  body {
    background: white !important;
    color: black !important;
    font-family: Arial, sans-serif !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .signature-block, .signature-grid, .form-signatures, .signature-section, .signature-box {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body * {
    visibility: hidden;
  }

  #printable-receipt, #printable-receipt *,
  #printable-report-card, #printable-report-card *,
  .printable-form, .printable-form * {
    visibility: visible;
  }

  #printable-receipt, #printable-report-card, .printable-form {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: white !important;
    color: black !important;
  }

  table {
    page-break-inside: auto;
    width: 100% !important;
    border-collapse: collapse !important;
  }

  tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  thead {
    display: table-header-group;
  }

  th, td {
    color: black !important;
    border-color: #ccc !important;
  }

  .print-signatures, .sig-section {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-top: 30px !important;
  }

  .no-print, .no-print *, .sidebar, .top-bar, .modal-overlay, .btn, .filters-bar {
    display: none !important;
    visibility: hidden !important;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar .nav-item span, .sidebar-title, .sidebar-subtitle, .user-info { display: none; }
  .sidebar-header { justify-content: center; padding: 16px; }
  .nav-item { justify-content: center; padding: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── ACCESSIBILITY & KEYBOARD NAVIGATION ─── */
:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}

tr.keyboard-focused-row {
  background-color: rgba(30, 58, 138, 0.15) !important;
  outline: 2px solid var(--accent) !important;
  outline-offset: -2px;
}
[data-theme="dark"] tr.keyboard-focused-row {
  background-color: rgba(59, 130, 246, 0.25) !important;
}

.kbd-badge {
  display: inline-block;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-left: 4px;
}

.kbd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.kbd-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}
