/* ─────────────────────────────────────────────────────────────────
   Xeronix IT — HR Portal Theme
   Brand-aligned with https://xeronixit.com/
   Palette: Xeronix Green (#6dcc69) · Deep Ink (#0a0b0f) · Cloud White
   Style:   Modern corporate-tech · Neo-minimal SaaS · Glassmorphism
   ───────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Manrope:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ── Xeronix brand tokens ───────────────────────────── */
  --brand:            #6dcc69;
  --brand-hover:      #58bf54;
  --brand-dark:       #3f8a3c;
  --brand-soft:       #e9f8e8;
  --brand-glow:       rgba(109,204,105,.18);
  --brand-glow-lg:    rgba(109,204,105,.32);
  --ink:              #0a0b0f;
  --ink-soft:         #14161c;
  --ink-2:            #1d2029;

  /* ── Legacy variable names — remapped to new palette so every
     existing page (inline-styled with var(--cyan), var(--gray-100),
     var(--mint), etc.) automatically picks up the new theme.        */

  /* dark/black tokens — now used only for sidebar / auth left panel */
  --black:            #0a0b0f;
  --black-rich:       #0a0b0f;
  --black-soft:       #14161c;

  /* surface tokens — flipped to a LIGHT theme */
  --surface:          #f6f8fb;
  --surface-1:        #ffffff;        /* cards */
  --surface-2:        #f4f6fa;        /* subtle bg / hover */
  --surface-3:        #e5e8ee;        /* borders */
  --surface-4:        #cfd4dd;        /* strong border */

  --white:            #ffffff;
  --white-off:        #f6f8fb;
  --white-dim:        #eef1f5;
  --cloud:            #f6f8fb;
  --border:           #e5e8ee;

  /* the old "cyan" accent now resolves to Xeronix green */
  --cyan:             #6dcc69;
  --cyan-bright:      #5cb958;
  --cyan-dim:         #3f8a3c;
  --cyan-glow:        rgba(109,204,105,.15);
  --cyan-glow-lg:     rgba(109,204,105,.28);

  /* text — light theme */
  --text-1:           #0a0b0f;        /* headings / strong */
  --text-2:           #3d4148;        /* body */
  --text-3:           #6b7280;        /* muted / labels */
  --text-inv:         #ffffff;

  /* status palette — modern flat */
  --green:            #10b981;
  --green-dim:        rgba(16,185,129,.12);
  --amber:            #f59e0b;
  --amber-dim:        rgba(245,158,11,.12);
  --rose:             #ef4444;
  --rose-dim:         rgba(239,68,68,.10);
  --red:              #ef4444;
  --blue:             #3b82f6;
  --blue-dim:         rgba(59,130,246,.10);
  --sky:              #0ea5e9;
  --mint:             #10b981;
  --navy:             #0a0b0f;
  --yellow:           #f59e0b;

  /* legacy gray scale used by inline styles in many pages */
  --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;

  /* shadows — neo-minimal */
  --shadow-xs:        0 1px 2px rgba(13,16,23,.04);
  --shadow-sm:        0 1px 3px rgba(13,16,23,.06), 0 1px 2px rgba(13,16,23,.04);
  --shadow:           0 4px 14px rgba(13,16,23,.06), 0 2px 4px rgba(13,16,23,.04);
  --shadow-lg:        0 18px 48px rgba(13,16,23,.10), 0 6px 18px rgba(13,16,23,.06);
  --shadow-cyan:      0 8px 24px rgba(109,204,105,.18);
  --shadow-ring:      0 0 0 1px rgba(13,16,23,.05);

  /* gradients */
  --grad-brand:       linear-gradient(135deg, #7fd97c 0%, #6dcc69 55%, #58bf54 100%);
  --grad-brand-soft:  linear-gradient(135deg, rgba(109,204,105,.16) 0%, rgba(109,204,105,.04) 100%);
  --grad-ink:         linear-gradient(180deg, #0a0b0f 0%, #14161c 100%);
  --grad-glass:       linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.65) 100%);

  --radius-xs:        6px;
  --radius:           10px;
  --radius-lg:        14px;
  --radius-xl:        20px;
  --radius-pill:      999px;

  --sidebar-w:        256px;
  --topbar-h:         64px;

  --font:             'Inter', 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display:     'Manrope', 'Inter', system-ui, sans-serif;
  --font-mono:        'JetBrains Mono', 'SF Mono', 'Courier New', monospace;
}

/* ─── reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--surface);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(109,204,105,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(109,204,105,.04), transparent 60%);
  color: var(--text-2);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); color: var(--text-1); font-weight: 700; letter-spacing: -.01em; }
a { color: var(--brand-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-hover); }
::selection { background: var(--brand-glow-lg); color: var(--ink); }

/* ─── animations ─────────────────────────────────────── */
@keyframes fadeIn        { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeInDown    { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideInRight  { from{opacity:0;transform:translateX(40px)} to{opacity:1;transform:translateX(0)} }
@keyframes slideOutRight { from{opacity:1;transform:translateX(0)} to{opacity:0;transform:translateX(40px)} }
@keyframes spin          { to{transform:rotate(360deg)} }
@keyframes pulse         { 0%,100%{opacity:1} 50%{opacity:.5} }
@keyframes shimmer       { from{background-position:-200% 0} to{background-position:200% 0} }
@keyframes bounceIn      { 0%{transform:scale(.9);opacity:0} 60%{transform:scale(1.03)} 100%{transform:scale(1);opacity:1} }
@keyframes badgePop      { 0%{transform:scale(0)} 70%{transform:scale(1.2)} 100%{transform:scale(1)} }
@keyframes shake         { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
@keyframes indeterminate { from{left:-50%} to{left:150%} }
@keyframes notifPing     { 0%{transform:scale(1);opacity:1} 75%,100%{transform:scale(2.4);opacity:0} }

.page-body { animation: fadeIn .35s ease both; }

/* ─── AUTH SHELL ─────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
}
.auth-panel {
  background: #ffffff;
  color: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px;
  position: relative; overflow: hidden;
  border-right: 1px solid var(--surface-3);
}
.auth-panel::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(109,204,105,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109,204,105,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at bottom right, #000 30%, transparent 80%);
}
.auth-panel::after {
  content: ''; position: absolute;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,204,105,.12) 0%, transparent 70%);
  bottom: -120px; right: -140px;
  pointer-events: none;
  filter: blur(8px);
}
.auth-panel-logo { position: relative; margin-bottom: 48px; animation: fadeInDown .5s ease; }
.auth-panel-logo img { height: 80px; width: auto; display: block; opacity: 1; }
.auth-panel h2 {
  font-family: var(--font-display); font-size: 2.3rem; font-weight: 800;
  color: var(--ink); line-height: 1.15;
  position: relative; margin-bottom: 18px;
  animation: fadeInDown .6s ease;
  letter-spacing: -.02em;
}
.auth-panel h2 span {
  color: var(--brand-dark);
  background: linear-gradient(120deg, #3f8a3c 0%, #6dcc69 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-panel p {
  color: var(--text-2); font-size: .98rem;
  position: relative; max-width: 380px; line-height: 1.7;
  animation: fadeInDown .7s ease;
}
.auth-features {
  margin-top: 44px; display: flex; flex-direction: column; gap: 14px;
  position: relative; animation: fadeInDown .8s ease;
}
.auth-feature-item {
  display: flex; align-items: center; gap: 12px;
  font-size: .9rem; color: var(--text-2);
}
.auth-feature-item .feat-dot {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-soft);
  border: 1px solid rgba(109,204,105,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
  backdrop-filter: blur(6px);
}

.auth-form-wrap {
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px 80px; background: var(--white);
  animation: fadeIn .4s ease;
}
.auth-form-wrap h1 {
  font-family: var(--font-display); font-size: 1.85rem; font-weight: 800;
  color: var(--ink); margin-bottom: 8px; letter-spacing: -.02em;
}
.auth-form-wrap p { color: var(--text-2); }
.auth-form-wrap .sub { color: var(--text-3); margin-bottom: 34px; font-size: .92rem; }
.auth-form-wrap .sub a { color: var(--brand-dark); font-weight: 600; }
.auth-form-wrap .form-control { background: var(--white); border-color: var(--surface-3); color: var(--ink); }
.auth-form-wrap .form-control::placeholder { color: #a3a8b3; }
.auth-form-wrap .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-glow); background: var(--white); }
.auth-form-wrap .form-group label { color: var(--text-2); }

/* ─── FORMS ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-weight: 600; font-size: .78rem;
  color: var(--text-2); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .06em;
}
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--surface-3); border-radius: var(--radius);
  font-size: .94rem; font-family: var(--font);
  color: var(--ink); background: var(--white);
  transition: border-color .18s, box-shadow .18s, background .18s;
  box-shadow: var(--shadow-xs);
}
.form-control::placeholder { color: #a3a8b3; }
.form-control:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow), var(--shadow-xs);
  background: var(--white);
}
.form-control.error { border-color: var(--rose); animation: shake .3s ease; }
select.form-control { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
select.form-control option { background: var(--white); color: var(--ink); }
textarea.form-control { resize: vertical; min-height: 90px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-family: var(--font); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: all .18s cubic-bezier(.4,0,.2,1);
  text-decoration: none; position: relative; white-space: nowrap;
  letter-spacing: -.01em;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  background: var(--grad-brand); color: #fff;
  border-color: var(--brand-hover);
  box-shadow: 0 4px 14px rgba(109,204,105,.30), inset 0 1px 0 rgba(255,255,255,.18);
  font-weight: 600;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(109,204,105,.40), inset 0 1px 0 rgba(255,255,255,.22); color: #fff; filter: brightness(1.03); }
.btn-primary:active { transform: translateY(0); }

.btn-navy {
  background: var(--ink); color: #fff; border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn-navy:hover { background: var(--ink-2); border-color: var(--ink-2); transform: translateY(-1px); box-shadow: var(--shadow); color: #fff; }

.btn-success { background: var(--green); color: #fff; border-color: var(--green); box-shadow: 0 2px 8px rgba(16,185,129,.25); }
.btn-success:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-danger  { background: var(--rose); color: #fff; border-color: var(--rose); box-shadow: 0 2px 8px rgba(239,68,68,.22); }
.btn-danger:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-warn    { background: var(--amber); color: #fff; border-color: var(--amber); }
.btn-warn:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-outline {
  background: var(--white); border-color: var(--surface-3);
  color: var(--text-2); box-shadow: var(--shadow-xs);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); box-shadow: 0 2px 8px rgba(109,204,105,.12); }

.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-sm   { padding: 7px 13px; font-size: .81rem; border-radius: 8px; }
.btn-lg   { padding: 13px 26px; font-size: 1rem; }
.btn-block{ width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; flex-shrink: 0; }
.btn-pill { border-radius: var(--radius-pill); padding-left: 22px; padding-right: 22px; }

.btn-loading { pointer-events: none; color: transparent !important; }
.btn-loading .btn-text { opacity: 0; }
.btn-loading::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .6s linear infinite;
  top: 50%; left: 50%; margin: -8px 0 0 -8px;
}
.btn-outline.btn-loading::after { border-color: rgba(13,16,23,.15); border-top-color: var(--brand-dark); }

/* ─── APP SHELL ──────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

/* ─── SIDEBAR (dark ink + green accents) ─────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: #ffffff;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  border-right: 1px solid var(--surface-3);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 24px rgba(13,16,23,.06);
}
.sidebar::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(109,204,105,.25) 30%, rgba(109,204,105,.25) 70%, transparent 100%);
  pointer-events: none;
}
.sidebar-logo {
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--surface-3);
  background: transparent;
}
.sidebar-logo img { height: 65px; width: auto; display: block; opacity: 1; }
.sidebar-logo .tagline {
  font-size: .65rem; color: var(--text-3);
  margin-top: 6px; letter-spacing: .14em; text-transform: uppercase;
  font-family: var(--font-mono);
}
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
.nav-section {
  padding: 18px 22px 6px;
  font-size: .66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-3);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; margin: 1px 10px;
  color: var(--text-2);
  text-decoration: none; font-weight: 500; font-size: .885rem;
  border-radius: 9px;
  transition: background .14s, color .14s, padding-left .16s;
  position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); padding-left: 20px; }
.nav-item.active {
  background: rgba(109,204,105,.14);
  color: var(--brand-dark);
  border: 1px solid rgba(109,204,105,.28);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(109,204,105,.05), 0 2px 8px rgba(109,204,105,.10);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -10px; top: 50%;
  transform: translateY(-50%); width: 3px; height: 20px;
  background: var(--brand); border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(109,204,105,.6);
}
.nav-item .nav-icon { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; background: var(--rose); color: #fff;
  font-size: .66rem; font-weight: 700; padding: 2px 7px;
  border-radius: 99px; animation: badgePop .4s ease;
}
.sa-nav-item { margin-left: 14px; }
.nav-sub-item { display: flex; align-items: center; gap: 10px; padding: 9px 18px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .86rem; transition: background .14s, color .14s, padding-left .16s; position: relative; margin: 1px 10px; border-radius: 8px; }
.nav-sub-item:hover { background: var(--surface-2); color: var(--ink); padding-left: 20px; }
.nav-sub-item.active { background: rgba(109,204,105,.12); color: var(--brand-dark); border: 1px solid rgba(109,204,105,.25); }
.nav-sub-item.active::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; background: var(--brand); border-radius: 0 2px 2px 0; }

.sidebar-footer {
  padding: 16px; border-top: 1px solid var(--surface-3);
  background: var(--surface-2);
}
.sidebar-user { display: flex; align-items: center; gap: 11px; }
.sidebar-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad-brand); color: #fff;
  border: 1px solid rgba(109,204,105,.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(109,204,105,.30);
}
.sidebar-user-info .name { font-size: .87rem; font-weight: 600; color: var(--ink); }
.sidebar-user-info .role-label { font-size: .7rem; color: var(--text-3); margin-top: 1px; }

.sidebar-footer .btn-outline {
  background: var(--white);
  border-color: var(--surface-3);
  color: var(--text-2);
}
.sidebar-footer .btn-outline:hover { background: rgba(109,204,105,.08); border-color: rgba(109,204,105,.35); color: var(--brand-dark); }

/* ─── TOPBAR ─────────────────────────────────────────── */
.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--surface-3);
  padding: 0 28px; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  animation: fadeInDown .3s ease;
}
.topbar-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.notif-bell { position: relative; }
.notif-bell .count {
  position: absolute; top: -5px; right: -5px;
  background: var(--rose); color: #fff;
  font-size: .62rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--white);
  animation: badgePop .4s ease;
}

/* ─── PAGE BODY ──────────────────────────────────────── */
.page-body { padding: 28px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.55rem; font-weight: 800;
  color: var(--ink); letter-spacing: -.02em;
}
.page-header p { color: var(--text-3); margin-top: 5px; font-size: .9rem; }

/* ─── CARDS ──────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--surface-3);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  animation: fadeIn .4s ease both;
  overflow: hidden;
}
.card:hover { border-color: var(--surface-4); box-shadow: var(--shadow); }
.card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--surface-3);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(246,248,251,.5) 0%, transparent 100%);
}
.card-header h3 { font-family: var(--font-display); font-size: .98rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.card-body { padding: 20px 22px; }

/* glass card variant */
.card-glass {
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 8px 32px rgba(13,16,23,.05);
}

/* ─── STAT CARDS ─────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(204px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg); padding: 20px;
  border: 1px solid var(--surface-3);
  display: flex; align-items: center; gap: 14px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  animation: fadeIn .4s ease both;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-card::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 120px; height: 120px;
  background: radial-gradient(circle at top right, var(--brand-glow), transparent 70%);
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.stat-card:hover { border-color: var(--surface-4); box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card:hover::after { opacity: 1; }

.stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0; transition: transform .2s;
}
.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); }
.stat-icon.blue   { background: var(--brand-soft); border: 1px solid rgba(109,204,105,.25); color: var(--brand-dark); }
.stat-icon.mint   { background: var(--green-dim);   border: 1px solid rgba(16,185,129,.22);  color: var(--green); }
.stat-icon.amber  { background: var(--amber-dim);   border: 1px solid rgba(245,158,11,.22);  color: var(--amber); }
.stat-icon.rose   { background: var(--rose-dim);    border: 1px solid rgba(239,68,68,.22);   color: var(--rose); }
.stat-icon.sky    { background: var(--blue-dim);    border: 1px solid rgba(59,130,246,.22);  color: var(--blue); }

.stat-value {
  font-size: 1.9rem; font-weight: 800; color: var(--ink);
  line-height: 1; font-family: var(--font-display); letter-spacing: -.02em;
}
.stat-label { font-size: .78rem; color: var(--text-3); margin-top: 4px; font-weight: 500; }

/* ─── PROGRESS ───────────────────────────────────────── */
.progress-wrap { margin: 12px 0; }
.progress-label { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.progress-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--surface-3); }
.progress-bar-fill {
  height: 100%; background: var(--grad-brand);
  border-radius: 99px;
  transition: width .7s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 8px var(--brand-glow);
}
.upload-progress-wrap { margin-top: 12px; display: none; animation: fadeIn .25s ease; }
.upload-progress-wrap.visible { display: block; }
.upload-progress-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--surface-3); }
.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-hover), var(--brand));
  background-size: 200% 100%; border-radius: 99px;
  animation: shimmer 1.5s infinite linear;
  transition: width .3s ease;
}
.upload-progress-fill.complete { animation: none; background: var(--green); }
.upload-progress-label { display: flex; justify-content: space-between; font-size: .74rem; color: var(--text-3); margin-top: 5px; font-weight: 600; }
.upload-bar-indeterminate { height: 3px; background: var(--surface-2); border-radius: 99px; overflow: hidden; position: relative; }
.upload-bar-indeterminate::after { content:''; position:absolute; left:-50%; width:50%; height:100%; background:linear-gradient(90deg,transparent,var(--brand),transparent); animation:indeterminate 1.2s linear infinite; }

/* ─── BADGES ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: .73rem; font-weight: 700; letter-spacing: .02em;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-approved { background: var(--green-dim); color: #047857; border: 1px solid rgba(16,185,129,.25); }
.badge-approved::before { background: var(--green); }
.badge-pending  { background: var(--amber-dim); color: #b45309; border: 1px solid rgba(245,158,11,.25); }
.badge-pending::before  { background: var(--amber); animation: pulse 1.5s infinite; }
.badge-rejected { background: var(--rose-dim); color: #b91c1c; border: 1px solid rgba(239,68,68,.22); }
.badge-rejected::before { background: var(--rose); }
.badge-draft    { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--surface-3); }
.badge-draft::before    { background: var(--text-3); }
.badge-missing  { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--surface-3); }
.badge-missing::before  { background: var(--text-3); }
.badge-info     { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid rgba(109,204,105,.28); }
.badge-info::before     { background: var(--brand); }

/* ─── UPLOAD ZONE ────────────────────────────────────── */
.upload-zone {
  border: 1.5px dashed var(--surface-4);
  border-radius: var(--radius-lg);
  padding: 36px 22px; text-align: center;
  cursor: pointer; transition: all .2s;
  background: var(--surface-2);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: inset 0 0 24px rgba(109,204,105,.08);
  transform: scale(1.005);
}
.upload-zone.uploading { border-color: var(--brand); pointer-events: none; opacity: .8; }
.upload-zone.upload-success { border-color: var(--green); background: var(--green-dim); }
.upload-zone .upload-icon { font-size: 2.3rem; margin-bottom: 10px; transition: transform .3s; color: var(--brand-dark); }
.upload-zone:hover .upload-icon { transform: translateY(-4px) scale(1.08); }
.upload-zone h4 { font-size: .95rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.upload-zone p  { font-size: .82rem; color: var(--text-3); }
.upload-zone input[type=file] { display: none; }

/* ─── DOC ITEMS ──────────────────────────────────────── */
.doc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--surface-3);
  transition: all .15s; animation: fadeIn .3s ease;
}
.doc-item:last-child { border-bottom: none; }
.doc-item:hover { background: var(--surface-2); border-radius: var(--radius); padding-left: 10px; padding-right: 10px; }
.doc-item-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand-soft); border: 1px solid rgba(109,204,105,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0; color: var(--brand-dark);
}
.doc-item-info { flex: 1; min-width: 0; }
.doc-item-name { font-weight: 600; font-size: .88rem; color: var(--ink); }
.doc-item-meta { font-size: .76rem; color: var(--text-3); margin-top: 2px; }
.doc-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ─── TIMESHEET ──────────────────────────────────────── */
.ts-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 8px; margin: 18px 0; }
.ts-day { display: flex; flex-direction: column; gap: 5px; }
.ts-day-label { font-size: .7rem; font-weight: 700; text-align: center; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.ts-day input {
  width: 100%; text-align: center; padding: 10px 5px;
  border: 1px solid var(--surface-3); border-radius: var(--radius);
  font-size: .94rem; font-weight: 700;
  color: var(--ink); background: var(--white);
  font-family: var(--font-mono);
  transition: border-color .2s, transform .15s, box-shadow .2s;
  box-shadow: var(--shadow-xs);
}
.ts-day input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-glow); transform: translateY(-2px); }
.ts-day input:disabled { opacity: .65; cursor: not-allowed; transform: none; background: var(--surface-2); }
.ts-day input.error { border-color: var(--rose); }
.ts-total { text-align: center; margin-top: 14px; }
.ts-total-num { font-size: 2rem; font-weight: 800; color: var(--ink); font-family: var(--font-display); transition: color .3s; letter-spacing: -.02em; }
.ts-total-label { font-size: .82rem; color: var(--text-3); }
.ts-overtime { color: var(--amber); }

.ts-entry-row {
  display: grid; grid-template-columns: 1fr 1fr auto;
  gap: 10px; align-items: end;
  margin-bottom: 10px; padding: 14px;
  background: var(--surface-2); border-radius: var(--radius);
  border: 1px solid var(--surface-3);
  animation: fadeIn .25s ease;
}
.ts-entry-row .remove-entry {
  cursor: pointer; color: var(--rose); font-size: 1.1rem;
  padding: 6px; border-radius: 6px; transition: background .15s;
  background: none; border: none;
}
.ts-entry-row .remove-entry:hover { background: var(--rose-dim); }

.ts-workflow { display: flex; align-items: center; margin: 16px 0; }
.ts-workflow-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.ts-workflow-step:not(:last-child)::after { content: ''; position: absolute; top: 14px; left: 50%; width: 100%; height: 2px; background: var(--surface-3); z-index: 0; }
.ts-workflow-step.done::after { background: var(--green); }
.ts-workflow-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; position: relative; z-index: 1;
  transition: all .3s; color: var(--text-3);
  font-weight: 700;
}
.ts-workflow-step.done     .ts-workflow-dot { background: var(--green); border-color: var(--green); color: #fff; }
.ts-workflow-step.active   .ts-workflow-dot { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-glow); }
.ts-workflow-step.rejected .ts-workflow-dot { background: var(--rose-dim); border-color: var(--rose); color: var(--rose); }
.ts-workflow-label { font-size: .72rem; color: var(--text-3); margin-top: 7px; font-weight: 600; text-align: center; }

/* ─── TABLE ──────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--surface-3); background: var(--white);
  box-shadow: var(--shadow-xs);
}
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--surface-2); }
th {
  padding: 12px 16px; text-align: left;
  font-size: .72rem; font-weight: 700;
  color: var(--text-3); text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--surface-3); white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-3);
  font-size: .88rem; color: var(--text-2);
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:hover td { color: var(--ink); }

/* ─── ALERTS ─────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: .88rem; margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 10px;
  animation: fadeIn .3s ease;
  border: 1px solid transparent;
}
.alert-success { background: var(--green-dim); color: #065f46; border-color: rgba(16,185,129,.25); }
.alert-error   { background: var(--rose-dim);  color: #991b1b; border-color: rgba(239,68,68,.25); }
.alert-warn    { background: var(--amber-dim); color: #92400e; border-color: rgba(245,158,11,.25); }
.alert-info    { background: var(--brand-soft); color: var(--brand-dark); border-color: rgba(109,204,105,.28); }

/* ─── MODALS ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,16,23,.42);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--white);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  animation: bounceIn .35s ease;
}
.modal-header {
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--surface-3);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; color: var(--ink); }
.modal-body { padding: 24px 26px; }
.modal-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--surface-3);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--surface-2);
}

/* ─── TOAST ──────────────────────────────────────────── */
#toast-container {
  position: fixed; top: 78px; right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--surface-3);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 280px; max-width: 360px;
  pointer-events: all;
  animation: slideInRight .32s cubic-bezier(.34,1.56,.64,1) both;
  cursor: pointer; position: relative; overflow: hidden;
}
.toast:hover { transform: translateX(-3px); transition: transform .15s; }
.toast.toast-exit { animation: slideOutRight .26s ease forwards; }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 700; font-size: .88rem; color: var(--ink); }
.toast-msg   { font-size: .8rem; color: var(--text-3); margin-top: 2px; line-height: 1.45; }
.toast-close { font-size: .82rem; color: var(--text-3); cursor: pointer; flex-shrink: 0; }
.toast-close:hover { color: var(--ink); }
.toast-progress { position: absolute; bottom: 0; left: 0; height: 2px; }
.toast.toast-success { border-left-color: var(--green); }
.toast.toast-success .toast-progress { background: var(--green); }
.toast.toast-error   { border-left-color: var(--rose); }
.toast.toast-error   .toast-progress { background: var(--rose); }
.toast.toast-warn    { border-left-color: var(--amber); }
.toast.toast-warn    .toast-progress { background: var(--amber); }
.toast.toast-info    { border-left-color: var(--brand); }
.toast.toast-info    .toast-progress { background: var(--brand); }

.notif-ping { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.notif-ping::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--rose); animation: notifPing 1.5s ease infinite; }

/* ─── EXPIRY / BANNERS ───────────────────────────────── */
.expiry-banner {
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,.25);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: 14px 18px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
  animation: fadeIn .4s ease;
}
.expiry-banner.urgent { background: var(--rose-dim); border-color: rgba(239,68,68,.25); border-left-color: var(--rose); }
.expiry-banner-icon { font-size: 1.35rem; flex-shrink: 0; }
.expiry-banner-text h4 { font-weight: 700; color: var(--ink); font-size: .9rem; }
.expiry-banner-text p  { font-size: .82rem; color: var(--text-2); margin-top: 2px; }

/* ─── STATUS INDICATOR ───────────────────────────────── */
.status-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 700;
  padding: 5px 12px; border-radius: 99px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.si-pending  { background: var(--amber-dim); color: #b45309; }
.si-pending  .status-dot { background: var(--amber); animation: pulse 1.2s infinite; }
.si-approved { background: var(--green-dim); color: #047857; }
.si-approved .status-dot { background: var(--green); }
.si-rejected { background: var(--rose-dim); color: #b91c1c; }
.si-rejected .status-dot { background: var(--rose); }

/* ─── SKELETON ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
.skeleton-line { height: 12px; margin-bottom: 10px; }
.skeleton-line.short { width: 54%; }
.skeleton-line.med   { width: 77%; }

/* ─── REGISTRATION DISABLED / SUCCESS ────────────────── */
.reg-disabled-box {
  background: var(--white);
  border: 1px solid var(--surface-3);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius-xl);
  padding: 52px 36px; text-align: center;
  animation: bounceIn .4s ease;
  box-shadow: var(--shadow);
}
.reg-disabled-box .lock-icon { font-size: 3rem; margin-bottom: 16px; display: block; color: var(--brand); }
.reg-disabled-box h2 { color: var(--ink); font-size: 1.4rem; font-family: var(--font-display); margin-bottom: 10px; font-weight: 800; }
.reg-disabled-box p { color: var(--text-2); max-width: 360px; margin: 0 auto; line-height: 1.7; font-size: .92rem; }
.reset-success-icon { font-size: 3.4rem; animation: bounceIn .5s ease; margin-bottom: 14px; display: block; }
.rejection-notice {
  background: var(--rose-dim);
  border: 1px solid rgba(239,68,68,.22);
  border-radius: var(--radius);
  padding: 12px 14px; margin-top: 10px;
  animation: fadeIn .3s ease;
}
.rejection-notice .reason { font-size: .83rem; color: #b91c1c; margin-top: 3px; font-style: italic; }

.client-ts-zone {
  background: var(--brand-soft);
  border: 1.5px dashed rgba(109,204,105,.4);
  border-radius: var(--radius-lg);
  padding: 32px; text-align: center;
  transition: all .2s;
}
.client-ts-zone:hover { border-color: var(--brand); background: rgba(109,204,105,.12); }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .auth-panel { display: none; }
  .auth-shell { grid-template-columns: 1fr; background: var(--white); }
  .auth-form-wrap { padding: 44px 28px; background: var(--white); }
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0; }
  #menu-toggle { display: flex !important; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 600px) {
  .ts-grid { grid-template-columns: repeat(4,1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-body { padding: 16px; }
  #toast-container { right: 10px; left: 10px; top: 72px; }
  .toast { max-width: 100%; min-width: 0; }
  .ts-entry-row { grid-template-columns: 1fr; }
  .auth-form-wrap h1 { font-size: 1.55rem; }
}

/* ─── UTILITIES ──────────────────────────────────────── */
.hidden        { display: none !important; }
.flex          { display: flex; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.gap-2         { gap: 8px; }
.gap-3         { gap: 12px; }
.mt-4          { margin-top: 16px; }
.mt-6          { margin-top: 24px; }
.mb-4          { margin-bottom: 16px; }
.text-sm       { font-size: .82rem; }
.text-muted    { color: var(--text-3); }
.text-right    { text-align: right; }
.grid-2        { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3        { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
@media(max-width:700px) { .grid-2,.grid-3 { grid-template-columns: 1fr; } }
.lift          { transition: transform .2s, box-shadow .2s; }
.lift:hover    { transform: translateY(-3px); box-shadow: var(--shadow); }
.cyan-text     { color: var(--brand-dark); }
.brand-text    { color: var(--brand-dark); }
.divider       { border: none; border-top: 1px solid var(--surface-3); margin: 18px 0; }

#session-warn {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--white);
  border: 1px solid var(--surface-3);
  border-left: 3px solid var(--amber);
  color: var(--ink);
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 300; font-size: .88rem;
  display: flex; align-items: center; gap: 12px;
  animation: slideInRight .4s ease;
}
#session-warn a { color: var(--brand-dark) !important; font-weight: 700; }

/* ─── PROJECT-BASED TIMESHEET TABLE ──────────────────── */
.ts-project-table {
  width: 100%; border-collapse: collapse; font-size: .86rem;
}
.ts-project-table thead th {
  background: var(--surface-2); color: var(--text-2);
  font-weight: 700; font-size: .76rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 11px 9px; border-bottom: 1px solid var(--surface-3);
  white-space: nowrap;
}
.ts-project-table thead th.weekend-col { background: var(--surface-2); color: var(--text-3); }
.ts-project-table tbody tr.project-row td {
  padding: 7px 7px; border-bottom: 1px solid var(--surface-3);
  vertical-align: middle; background: var(--white);
}
.ts-project-table tbody tr.project-row:hover td { background: var(--surface-2); }
.ts-project-table .project-day-cell { text-align: center; padding: 6px 4px !important; }
.ts-project-table .project-day-cell.weekend-col { background: rgba(13,16,23,.02); }
.ts-project-table tfoot .kronos-total-row td {
  padding: 11px 9px; font-size: .86rem;
  border-top: 2px solid var(--surface-3); background: var(--surface-2); color: var(--ink); font-weight: 700;
}
.ts-project-table .project-day-total-cell { text-align: center; }
.ts-project-table .project-day-total-cell.weekend-col { color: var(--text-3) !important; }
.project-hrs-input {
  width: 52px !important; text-align: center; padding: 6px 4px !important;
  border: 1px solid var(--surface-3); border-radius: 6px;
  background: var(--white); color: var(--ink); font-family: var(--font-mono); font-weight: 600;
}
.project-hrs-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.project-hrs-input::placeholder { color: #c5cad3; }
.project-hrs-input.weekend-hrs { background: rgba(13,16,23,.025) !important; color: var(--text-3) !important; }
.project-client-input  { width: 120px !important; }
.project-project-input { width: 130px !important; }
.project-task-input    { width: 108px !important; }

/* ─── MISC HARMONIZERS for legacy inline styles ──────── */

/* Pages use inline backgrounds like rgba(31,160,192,..) (the old cyan).
   Most of those resolve correctly via the remapped var(--cyan). The few
   hardcoded rgba(31,160,192,...) inline values fall back gracefully on
   light surfaces. */
[style*="rgba(31,160,192"] { /* legacy cyan splashes ─ keep readable */ }

/* Improve readability where pages emit gray-only inline text on white */
[style*="color:var(--text-3)"] { color: var(--text-3); }
[style*="color:var(--gray-600)"] { color: var(--gray-600); }