/* ============================================
   WORKDESK PORTAL — STYLES.CSS
   Alpine Frost Palette + Geist + Source Serif 4
   ============================================ */

:root {
  --bg: #323f2f;
  --bg-2: #ffd700;
  --bg-3: #2a3527;
  --surface: #3a4d35;
  --border: #b89a00;
  --border-dark: #a08800;
  --text: #ffffff;
  --text-muted: #d0d0d0;
  --text-dim: #a0a0a0;
  --accent: #1a3a1a;
  --accent-light: #2a5a2a;
  --accent-bg: #fff3b0;
  /* gold-surface text tokens */
  --gold-text: #1a1200;
  --gold-text-muted: #3a2800;
  --gold-text-dim: #7a5a00;
  --green: #16A34A;
  --green-bg: #DCFCE7;
  --red: #DC2626;
  --red-bg: #FEE2E2;
  --orange: #D97706;
  --orange-bg: #FEF3C7;
  --purple: #7C3AED;
  --purple-bg: #EDE9FE;
  --blue: #2563EB;
  --blue-bg: #DBEAFE;
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 4px rgba(10,25,41,0.08), 0 4px 16px rgba(10,25,41,0.06);
  --shadow-lg: 0 8px 32px rgba(10,25,41,0.12);
  --font: 'Geist', sans-serif;
  --font-serif: 'Source Serif 4', serif;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ── GOLD SURFACE: everything on --bg-2 (#ffd700) gets dark text ─────── */
/* Single universal rule: any element whose nearest bg is gold */
.login-right { color: #1a1200; }
.login-right * { color: #1a1200; }
.login-right .text-muted,
.login-right .login-footer-note,
.login-right .demo-header,
.login-right .demo-item,
.login-right .role-btn,
.login-right .checkbox-label,
.login-right .forgot-link { color: #3a2800; }
.login-right .input-icon,
.login-right .toggle-password { color: #7a5a00; }

.sidebar { color: #1a1200; }
.sidebar * { color: #1a1200; }
.sidebar .nav-item { color: #3a2800; }
.sidebar .nav-item.active { color: #1a1200; }
.sidebar .nav-item:hover { color: #1a1200; }
.sidebar .logout-btn { color: var(--red) !important; }

.topbar { color: #1a1200; }
.topbar * { color: #1a1200; }
.topbar .topbar-date { color: #3a2800; }
.topbar .menu-toggle { color: #3a2800; }

.card { color: #1a1200; }
.card * { color: #1a1200; }
.card .text-muted, .card .card-link,
.card .kpi-label, .card .att-stat-label,
.card .lb-type, .card .lb-remaining,
.card .wbb-label, .card .wc-bar-val,
.card .leave-type-name, .card .timeline-time,
.card .data-table th { color: #3a2800; }

.kpi-card { color: #1a1200; }
.kpi-card * { color: #1a1200; }
.kpi-card .kpi-label { color: #3a2800; }

.att-stat-card { color: #1a1200; }
.att-stat-card .att-stat-label { color: #3a2800; }

.lb-card { color: #1a1200; }
.lb-card * { color: #1a1200; }
.lb-card .lb-type, .lb-card .lb-remaining { color: #3a2800; }

.profile-card { color: #1a1200; }
.profile-card * { color: #1a1200; }
.profile-card .profile-id,
.profile-card .profile-stats span { color: #3a2800; }

.modal { color: #1a1200; }
.modal * { color: #1a1200; }

/* Inputs on gold background */
.input-wrap input {
  color: #1a1200 !important;
  background: #fffbe6 !important;
  border-color: #c8a800 !important;
}
.input-wrap input::placeholder { color: #8a7000 !important; }
.filter-select, .form-select, .form-input, .form-textarea {
  color: #1a1200 !important;
  background: #fffbe6 !important;
  border-color: #c8a800 !important;
}

/* att-row sits on --surface (dark green) → keep white */
.att-row { color: #ffffff; }
.att-date, .att-hours { color: #ffffff; }
.att-time { color: #d0d0d0; }

/* ============ LOGIN PAGE ============ */
.login-page { background: var(--bg); min-height: 100vh; }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

.login-left {
  background: linear-gradient(135deg, #0A1929 0%, #1B3A5C 50%, #2E5090 100%);
  padding: 48px; display: flex; align-items: center; position: relative; overflow: hidden;
}
.login-left::before {
  content: ''; position: absolute; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(74,123,196,0.2) 0%, transparent 70%);
  top: -200px; right: -200px; pointer-events: none;
}
.login-left::after {
  content: ''; position: absolute; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(46,80,144,0.3) 0%, transparent 70%);
  bottom: -100px; left: -100px; pointer-events: none;
}
.login-left-inner { position: relative; z-index: 1; max-width: 440px; }

.portal-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 48px; }
.brand-icon {
  width: 38px; height: 38px; background: rgba(255,255,255,0.15); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: white;
}
.brand-name { font-size: 1.2rem; font-weight: 700; color: white; letter-spacing: -0.02em; }

.login-hero-text h1 {
  font-family: var(--font-serif); font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 600; color: white; line-height: 1.2; margin-bottom: 16px;
}
.login-hero-text h1 em { font-style: italic; color: #A8C4E0; }
.login-hero-text p { font-size: 0.95rem; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 40px; }

.login-features { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.login-feature { display: flex; align-items: flex-start; gap: 12px; }
.lf-icon {
  width: 32px; height: 32px; background: rgba(255,255,255,0.1); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: #A8C4E0; flex-shrink: 0;
}
.login-feature strong { display: block; font-size: 0.88rem; font-weight: 600; color: white; }
.login-feature span { font-size: 0.8rem; color: rgba(255,255,255,0.55); }

.login-stats {
  display: flex; align-items: center; gap: 24px; padding: 20px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius);
}
.ls-stat { text-align: center; }
.ls-stat strong { display: block; font-size: 1.3rem; font-weight: 700; color: white; }
.ls-stat span { font-size: 0.75rem; color: rgba(255,255,255,0.55); }
.ls-divider { width: 1px; height: 32px; background: rgba(255,255,255,0.15); }

.login-right { display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--bg-2); }
.login-form-wrap { width: 100%; max-width: 420px; }

.login-form-header { margin-bottom: 28px; }
.login-form-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: -0.02em; }
.login-form-header p { font-size: 0.88rem; color: var(--text-muted); }

.role-selector {
  display: flex; gap: 8px; margin-bottom: 24px;
  background: var(--bg-3); padding: 4px; border-radius: var(--radius);
}
.role-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px; border-radius: 7px; border: none; background: transparent;
  font-size: 0.82rem; font-weight: 500; color: var(--text-muted); transition: var(--transition);
}
.role-btn.active { background: var(--bg-2); color: var(--accent); box-shadow: var(--shadow); }
.role-btn:hover:not(.active) { color: var(--text); }

.login-form { display: flex; flex-direction: column; gap: 18px; margin-bottom: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.82rem; font-weight: 600; color: var(--text);
  display: flex; justify-content: space-between; align-items: center;
}
.forgot-link { font-size: 0.78rem; color: var(--accent); font-weight: 400; }
.forgot-link:hover { text-decoration: underline; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 12px; color: var(--text-dim); pointer-events: none; }
.input-wrap input {
  width: 100%; padding: 11px 40px 11px 38px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 0.9rem; color: var(--text);
  background: var(--bg-2); transition: var(--transition); outline: none;
}
.input-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,80,144,0.1); }
.input-wrap input::placeholder { color: var(--text-dim); }
.toggle-password {
  position: absolute; right: 12px; background: none; border: none;
  color: var(--text-dim); padding: 4px; transition: color var(--transition);
}
.toggle-password:hover { color: var(--text-muted); }
.field-error { font-size: 0.75rem; color: var(--red); min-height: 16px; }

.form-options { display: flex; align-items: center; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; color: var(--text-muted); cursor: pointer; }
.checkbox-label input { display: none; }
.checkbox-custom {
  width: 16px; height: 16px; border: 1.5px solid var(--border-dark); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0;
}
.checkbox-label input:checked + .checkbox-custom { background: var(--accent); border-color: var(--accent); }
.checkbox-label input:checked + .checkbox-custom::after { content: '\2713'; color: white; font-size: 0.65rem; font-weight: 700; }

.form-error {
  background: var(--red-bg); border: 1px solid rgba(220,38,38,0.2);
  color: var(--red); padding: 10px 14px; border-radius: var(--radius); font-size: 0.83rem;
}

.btn-login {
  width: 100%; padding: 13px; background: var(--accent); color: white; border: none;
  border-radius: var(--radius); font-size: 0.95rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--transition);
}
.btn-login:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(46,80,144,0.3); }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.demo-creds { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.demo-header {
  display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px;
}
.demo-list { display: flex; flex-direction: column; gap: 6px; }
.demo-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 7px;
  font-size: 0.82rem; color: var(--text-muted); text-align: left; transition: var(--transition); width: 100%;
}
.demo-item:hover { border-color: var(--accent); color: var(--text); background: var(--accent-bg); }
.demo-badge { font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; flex-shrink: 0; }
.demo-badge.employee { background: var(--blue-bg); color: var(--blue); }
.demo-badge.intern { background: var(--green-bg); color: var(--green); }
.demo-badge.volunteer { background: var(--purple-bg); color: var(--purple); }
.login-footer-note { font-size: 0.75rem; color: var(--text-dim); text-align: center; line-height: 1.5; }

/* ============ DASHBOARD PAGE ============ */
.dashboard-page { display: flex; min-height: 100vh; background: var(--bg); }

.sidebar {
  width: var(--sidebar-w); background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200; transition: transform var(--transition);
}
.sidebar-header {
  padding: 20px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-close { display: none; background: none; border: none; color: var(--text-muted); padding: 4px; }
.sidebar-user { padding: 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.user-info strong { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); }
.role-tag { font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; }
.role-tag.employee { background: var(--blue-bg); color: var(--blue); }
.role-tag.intern { background: var(--green-bg); color: var(--green); }
.role-tag.volunteer { background: var(--purple-bg); color: var(--purple); }

.sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  font-size: 0.875rem; font-weight: 500; color: var(--text-muted); transition: var(--transition);
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.sidebar-footer { padding: 12px 8px; border-top: 1px solid var(--border); }
.logout-btn { color: var(--red) !important; }
.logout-btn:hover { background: var(--red-bg) !important; }

.main-wrap { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: var(--topbar-h); background: var(--bg-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 16px; position: sticky; top: 0; z-index: 100;
}
.menu-toggle { display: none; background: none; border: none; color: var(--text-muted); padding: 6px; border-radius: 6px; }
.menu-toggle:hover { background: var(--bg-3); }
.topbar-title { font-size: 1rem; font-weight: 600; color: var(--text); flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date, .topbar-clock { font-size: 0.8rem; color: var(--text-muted); }
.topbar-clock { font-weight: 600; color: var(--text); }
.topbar-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700;
}

.content { flex: 1; padding: 28px; overflow-y: auto; }
.section { display: none; }
.section.active { display: block; }

.section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.section-head h2 { font-size: 1.4rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.section-sub-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); transition: var(--transition);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi-icon.blue { background: var(--blue-bg); color: var(--blue); }
.kpi-icon.green { background: var(--green-bg); color: var(--green); }
.kpi-icon.orange { background: var(--orange-bg); color: var(--orange); }
.kpi-icon.purple { background: var(--purple-bg); color: var(--purple); }
.kpi-label { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }
.kpi-value { font-size: 1.15rem; font-weight: 700; color: var(--text); }

.card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-header h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.card-badge { font-size: 0.72rem; font-weight: 600; background: var(--accent-bg); color: var(--accent); padding: 3px 10px; border-radius: 100px; }
.card-link { font-size: 0.78rem; color: var(--accent); font-weight: 500; }
.card-link:hover { text-decoration: underline; }

.weekly-chart { padding: 8px 0; }
.wc-bars { display: flex; align-items: flex-end; gap: 8px; height: 100px; margin-bottom: 8px; }
.wc-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.wc-bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--accent-bg); transition: height 0.8s cubic-bezier(0.4,0,0.2,1); min-height: 4px; }
.wc-bar.today { background: var(--accent); }
.wc-bar.over { background: var(--orange); }
.wc-bar-val { font-size: 0.65rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.wc-labels { display: flex; gap: 8px; }
.wc-label { flex: 1; text-align: center; font-size: 0.7rem; color: var(--text-dim); font-weight: 500; }
.wc-label.today { color: var(--accent); font-weight: 700; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.attendance-list { display: flex; flex-direction: column; gap: 8px; }
.att-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--surface); border-radius: 8px; font-size: 0.83rem;
}
.att-date { font-weight: 600; color: var(--text); }
.att-time { color: var(--text-muted); }
.att-hours { font-weight: 600; color: var(--text); }

.badge { font-size: 0.68rem; font-weight: 600; padding: 3px 10px; border-radius: 100px; }
.badge-present { background: var(--green-bg); color: var(--green); }
.badge-absent { background: var(--red-bg); color: var(--red); }
.badge-late { background: var(--orange-bg); color: var(--orange); }
.badge-leave { background: var(--blue-bg); color: var(--blue); }
.badge-pending { background: var(--orange-bg); color: var(--orange); }
.badge-approved { background: var(--green-bg); color: var(--green); }
.badge-rejected { background: var(--red-bg); color: var(--red); }
.badge-holiday { background: var(--purple-bg); color: var(--purple); }

.leave-summary { display: flex; flex-direction: column; gap: 10px; }
.leave-type-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.leave-type-name { font-size: 0.83rem; color: var(--text-muted); min-width: 100px; }
.leave-bar-wrap { flex: 1; height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.leave-bar { height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.8s ease; }
.leave-count { font-size: 0.8rem; font-weight: 600; color: var(--text); min-width: 50px; text-align: right; }

.today-status {
  display: flex; align-items: center; gap: 8px; background: var(--green-bg);
  border: 1px solid rgba(22,163,74,0.2); color: var(--green);
  padding: 8px 16px; border-radius: 100px; font-size: 0.83rem; font-weight: 600;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.present { background: var(--green); animation: pulse-dot 2s ease-in-out infinite; }
.status-dot.absent { background: var(--red); }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.attendance-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.att-stat-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; box-shadow: var(--shadow); }
.att-stat-num { display: block; font-size: 2rem; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.att-stat-label { font-size: 0.78rem; font-weight: 500; color: var(--text-muted); }
.present-card .att-stat-num { color: var(--green); }
.absent-card .att-stat-num { color: var(--red); }
.late-card .att-stat-num { color: var(--orange); }
.leave-card .att-stat-num { color: var(--blue); }

.filter-row { display: flex; gap: 8px; }
.filter-select {
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 0.83rem; color: var(--text); background: var(--bg-2); outline: none; cursor: pointer;
}
.filter-select:focus { border-color: var(--accent); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.data-table th {
  text-align: left; padding: 10px 12px; font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface); }

.hours-tabs {
  display: flex; gap: 4px; background: var(--bg-3); padding: 4px;
  border-radius: var(--radius); width: fit-content; margin-bottom: 20px;
}
.hours-tab {
  padding: 8px 20px; border-radius: 7px; border: none; background: transparent;
  font-size: 0.85rem; font-weight: 500; color: var(--text-muted); transition: var(--transition);
}
.hours-tab.active { background: var(--bg-2); color: var(--accent); font-weight: 600; box-shadow: var(--shadow); }
.hours-tab-content { display: none; }
.hours-tab-content.active { display: block; }

.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.timeline-item:last-child { border-bottom: none; }
.timeline-time { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); min-width: 60px; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.timeline-dot.in { background: var(--green); }
.timeline-dot.out { background: var(--red); }
.timeline-dot.break { background: var(--orange); }
.timeline-label { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.timeline-sub { font-size: 0.75rem; color: var(--text-muted); }

.weekly-bars-big { padding: 8px 0; }
.wbb-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.wbb-label { font-size: 0.78rem; color: var(--text-muted); min-width: 80px; font-weight: 500; }
.wbb-bar-wrap { flex: 1; height: 28px; background: var(--bg-3); border-radius: 6px; overflow: hidden; }
.wbb-bar { height: 100%; border-radius: 6px; background: var(--accent); transition: width 0.8s ease; display: flex; align-items: center; padding-left: 10px; }
.wbb-bar.over { background: var(--orange); }
.wbb-bar-text { font-size: 0.72rem; font-weight: 600; color: white; white-space: nowrap; }
.wbb-hours { font-size: 0.8rem; font-weight: 600; color: var(--text); min-width: 50px; text-align: right; }

.leave-balance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.lb-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow); }
.lb-type { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.lb-numbers { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.lb-used { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.lb-total { font-size: 0.85rem; color: var(--text-dim); }
.lb-bar-wrap { height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.lb-bar { height: 100%; border-radius: 2px; background: var(--accent); }
.lb-remaining { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; }

.profile-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.profile-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 20px; text-align: center; box-shadow: var(--shadow); height: fit-content;
}
.profile-avatar-big {
  width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; margin: 0 auto 12px;
}
.profile-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.profile-id { font-size: 0.78rem; color: var(--text-dim); margin-top: 6px; margin-bottom: 20px; font-family: monospace; }
.profile-stats { display: flex; justify-content: space-around; padding-top: 16px; border-top: 1px solid var(--border); }
.profile-stats div { text-align: center; }
.profile-stats strong { display: block; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.profile-stats span { font-size: 0.72rem; color: var(--text-muted); }
.profile-details { display: flex; flex-direction: column; gap: 20px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.detail-value { font-size: 0.88rem; color: var(--text); font-weight: 500; }

.btn-primary-sm {
  display: flex; align-items: center; gap: 6px; padding: 9px 18px;
  background: var(--accent); color: white; border: none; border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 600; transition: var(--transition);
}
.btn-primary-sm:hover { background: var(--accent-light); transform: translateY(-1px); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,25,41,0.5); backdrop-filter: blur(4px);
  z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--bg-2); border-radius: var(--radius-lg); padding: 28px;
  width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.modal-close { background: none; border: none; color: var(--text-muted); padding: 4px; border-radius: 6px; transition: var(--transition); }
.modal-close:hover { background: var(--bg-3); color: var(--text); }
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-select, .form-input, .form-textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 0.88rem; color: var(--text); background: var(--bg-2); outline: none; transition: var(--transition);
}
.form-select:focus, .form-input:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,80,144,0.1); }
.form-textarea { resize: vertical; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.btn-cancel {
  padding: 10px 20px; background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.88rem; font-weight: 500; color: var(--text-muted); transition: var(--transition);
}
.btn-cancel:hover { background: var(--border); color: var(--text); }
.btn-submit {
  padding: 10px 24px; background: var(--accent); color: white; border: none;
  border-radius: var(--radius); font-size: 0.88rem; font-weight: 600; transition: var(--transition);
}
.btn-submit:hover { background: var(--accent-light); }

.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--text); color: white;
  padding: 12px 20px; border-radius: var(--radius); display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 1000; animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(10,25,41,0.4); z-index: 199; }
.sidebar-overlay.active { display: block; }

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .leave-balance-grid { grid-template-columns: repeat(2, 1fr); }
  .attendance-stats-row { grid-template-columns: repeat(2, 1fr); }
  .profile-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { padding: 32px 24px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-close { display: flex; }
  .main-wrap { margin-left: 0; }
  .menu-toggle { display: flex; }
  .two-col { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 20px 16px; }
  .topbar { padding: 0 16px; }
  .topbar-date { display: none; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .attendance-stats-row { grid-template-columns: 1fr 1fr; }
  .leave-balance-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
