/* ═══════════════════════════════════════════════════════════════
   GPG HR Admin — Design System (Light Theme)
   Mirrors: giant-panda-group.pages.dev
   Palette:
     --bg       #fafaf8   page background
     --card     #ffffff   card surfaces
     --section  #f2f2f0   secondary bg / sidebar
     --border   #e4e4e0   card borders
     --divider  #c8c8c4   subtle dividers
     --text     #0a0a0a   primary text
     --sub      #3c3c38   secondary text
     --muted    #787874   muted labels
     --faint    #a0a09c   placeholder / faint
     --accent   #c8a96e   gold accent
   Fonts:
     --font-sans:  Inter
     --font-serif: Cormorant Garamond
════════════════════════════════════════════════════════════════ */

:root {
  --bg:      #fafaf8;
  --card:    #ffffff;
  --section: #f2f2f0;
  --border:  #e4e4e0;
  --divider: #c8c8c4;
  --text:    #0a0a0a;
  --sub:     #3c3c38;
  --muted:   #787874;
  --faint:   #a0a09c;
  --accent:  #c8a96e;
  --accent-dk: #a8843e;
  --font-sans:  'Inter', system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography ──────────────────────────────────────────────────────────── */
.font-serif { font-family: var(--font-serif) !important; }

/* Section / page headings use serif */
.page-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}

/* Label eyebrow (uppercase + line) */
.label-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.label-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--divider);
  flex-shrink: 0;
}

/* Accent underline */
.accent-line {
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
  margin-top: 8px;
}

/* ─── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--section); }
::-webkit-scrollbar-thumb { background: var(--divider); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

/* ─── Selection ───────────────────────────────────────────────────────────── */
::selection { background: #c8a96e33; color: var(--text); }

/* ─── Links & buttons ─────────────────────────────────────────────────────── */
a { text-decoration: none; color: inherit; }
a, button, input, select, textarea { transition: all 0.15s ease; }
input:focus, select:focus, textarea:focus { outline: none; }

/* ─── Input autofill ─────────────────────────────────────────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0px 1000px #f2f2f0 inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* ─── GPG Button variants ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 9px 20px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-dark  { background: var(--text);  color: #f8f8f6; border-color: var(--text); }
.btn-dark:hover  { background: #3c3c38; border-color: #3c3c38; }
.btn-light { background: var(--card);  color: var(--text); border-color: var(--border); }
.btn-light:hover { background: var(--section); }
.btn-accent { background: var(--accent); color: var(--text); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn-ghost-dk { background: transparent; color: var(--text); border: 1px solid var(--divider); }
.btn-ghost-dk:hover { border-color: var(--text); }

/* ─── Card ────────────────────────────────────────────────────────────────── */
.gpg-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0;
}
.gpg-card:hover {
  border-color: var(--divider);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

/* ─── Table ───────────────────────────────────────────────────────────────── */
tbody tr { cursor: default; }
th { font-weight: 500; }

/* ─── Custom select arrow ─────────────────────────────────────────────────── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23787874' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px !important;
  appearance: none;
}

/* ─── Checkbox ────────────────────────────────────────────────────────────── */
input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

/* ─── Sidebar active indicator ────────────────────────────────────────────── */
.sidebar-active-dot { animation: pulse 2s infinite; }

/* ─── Animations ──────────────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: scale(0.98) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

.animate-fade-in  { animation: fadeIn  0.22s ease forwards; }
.animate-slide-in { animation: slideIn 0.22s ease forwards; }

[id$="-modal"]:not(.hidden) > div:last-child {
  animation: slideIn 0.2s ease forwards;
}

/* ─── Score bar ───────────────────────────────────────────────────────────── */
.score-bar-fill {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Card hover lift ─────────────────────────────────────────────────────── */
.card-hover { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

/* ─── Sortable th ─────────────────────────────────────────────────────────── */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--sub); }

/* ─── Toast notification ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  animation: slideIn 0.22s ease;
  max-width: 320px;
}
.toast.success { border-left: 3px solid #10b981; }
.toast.error   { border-left: 3px solid #ef4444; }
.toast.info    { border-left: 3px solid var(--accent); }

/* ─── Loading spinner ─────────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── Badge pulse ─────────────────────────────────────────────────────────── */
.badge-pulse { animation: pulse 2s ease-in-out infinite; }

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}
.sidebar-link:hover {
  color: var(--text);
  background: var(--section);
}
.sidebar-link.active {
  color: var(--text);
  background: var(--section);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* ─── Navbar ──────────────────────────────────────────────────────────────── */
.nav-border-accent {
  border-bottom: 2px solid var(--accent);
}

/* ─── Table row hover ─────────────────────────────────────────────────────── */
.table-row-hover:hover { background: var(--section) !important; }

/* ─── Stat cards ──────────────────────────────────────────────────────────── */
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.kpi-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
  transform: translateY(-1px);
}
.kpi-card-accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}

/* ─── Progress bar track ──────────────────────────────────────────────────── */
.progress-track {
  height: 4px;
  background: var(--section);
  border-radius: 0;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  transition: width 0.6s ease;
}

/* ─── Pill badges ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 0;
}

/* ─── Print styles ────────────────────────────────────────────────────────── */
@media print {
  nav, aside, button { display: none !important; }
  main { margin: 0 !important; padding: 0 !important; }
}
