/* SANSA HRMS — classic enterprise dark theme (sansaai.in) */
:root {
  --bg: #0b0e14;
  --bg-mesh: radial-gradient(1200px 600px at 10% -10%, rgba(16, 185, 129, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 110%, rgba(99, 102, 241, 0.08), transparent 50%),
    linear-gradient(180deg, #0b0e14 0%, #101622 100%);
  --surface: #131922;
  --surface2: #1a2230;
  --surface3: #243044;
  --header: linear-gradient(90deg, #0b3d2e 0%, #065f46 45%, #047857 100%);
  --header-solid: #065f46;
  --accent: #34d399;
  --accent2: #059669;
  --accent-gold: #c9a227;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #1e293b;
  --danger: #f87171;
  --warning: #fbbf24;
  --success: #4ade80;
  --radius: 12px;
  --sidebar-w: 72px;
  --header-h: 56px;
  --font: 'Inter', system-ui, sans-serif;
}

body[data-theme="keka"] {
  --header: linear-gradient(90deg, #5b0a4a 0%, #8b1a6b 45%, #c026a0 100%);
  --header-solid: #8b1a6b;
  --accent: #e879f9;
  --accent2: #c026d3;
  --accent-soft: rgba(232, 121, 249, 0.14);
  --bg-mesh: radial-gradient(1200px 600px at 10% -10%, rgba(192, 38, 211, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 110%, rgba(139, 26, 107, 0.1), transparent 50%),
    linear-gradient(180deg, #0b0e14 0%, #101622 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  background-image: var(--bg-mesh);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-hero {
  background: linear-gradient(145deg, #022c22 0%, #0b0e14 42%, #134e4a 100%);
  display: grid;
  place-items: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(52, 211, 153, 0.15), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(201, 162, 39, 0.08), transparent 40%);
}
.login-brand { position: relative; text-align: center; }
.login-brand .wordmark {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #34d399, #059669, #c9a227);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-brand h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 0.5rem; color: #e2e8f0; }
.login-brand p { color: #94a3b8; margin-top: 0.75rem; font-size: 1rem; line-height: 1.6; }
.login-brand .gem {
  width: 72px; height: 72px; border-radius: 20px;
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 12px 40px rgba(5, 150, 105, 0.35);
  display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
  margin: 0 auto 1.25rem; color: #fff; letter-spacing: 0.05em;
}
.login-panel {
  background: #fff;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(2rem, 5vw, 4rem);
}
.login-panel h2 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.login-panel .sub { color: #64748b; font-size: 0.9rem; margin-bottom: 1.5rem; }
.login-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.login-tabs button {
  flex: 1; border: 1px solid #e2e8f0; background: #f8fafc;
  padding: 0.5rem; border-radius: 8px; cursor: pointer; font: inherit; font-size: 0.85rem;
}
.login-tabs button.active { background: var(--accent2); color: #fff; border-color: var(--accent2); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.75rem; font-weight: 600; color: #475569; margin-bottom: 0.35rem; }
.field input {
  width: 100%; padding: 0.65rem 0.75rem; border: 1px solid #cbd5e1;
  border-radius: 8px; font: inherit; font-size: 0.95rem;
}
.field input:focus { outline: none; border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(5,150,105,0.15); }
.login-panel input:-webkit-autofill,
.login-panel input:-webkit-autofill:hover,
.login-panel input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out 0s;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: none; border-radius: 8px; padding: 0.65rem 1rem; font: inherit;
  font-weight: 600; cursor: pointer; transition: 0.15s;
}
.btn-primary { background: var(--accent2); color: #fff; width: 100%; }
.btn-primary:hover { background: #047857; }
.btn-outline { background: #fff; border: 1px solid #cbd5e1; color: #334155; width: 100%; margin-top: 0.5rem; }
.btn-outline:hover { background: #f8fafc; }
.divider { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0; color: #94a3b8; font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
.alert { padding: 0.65rem 0.75rem; border-radius: 8px; font-size: 0.85rem; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.captcha-row { display: flex; gap: 0.5rem; align-items: center; }
.captcha-box {
  background: #ecfdf5; color: #065f46; font-weight: 700; letter-spacing: 0.15em;
  padding: 0.5rem 0.75rem; border-radius: 6px; font-family: monospace; min-width: 80px; text-align: center;
}
.otp-sent { color: #047857; font-size: 0.85rem; margin-bottom: 0.75rem; }

@media (max-width: 768px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { min-height: 200px; padding: 2rem; }
  .login-hero h1 { font-size: 1.75rem; }
}

/* ── App shell ── */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: var(--header-h) 1fr; height: 100vh; }
.app-sidebar {
  grid-row: 1 / -1; background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: 0.75rem 0; gap: 0.25rem; overflow-y: auto;
}
.app-sidebar .logo-mini {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
  display: grid; place-items: center; font-weight: 800; font-size: 0.65rem;
  color: #fff; margin-bottom: 0.75rem; flex-shrink: 0; letter-spacing: 0.02em;
}
.brand-wordmark {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fff, #a7f3d0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-right: 0.25rem;
}
.nav-item {
  width: 52px; padding: 0.5rem 0.25rem; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  color: var(--muted); font-size: 0.6rem; text-align: center; cursor: pointer;
  border: none; background: transparent; font-family: inherit;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item .icon { font-size: 1.25rem; line-height: 1; display: grid; place-items: center; }
.nav-item .icon svg { width: 22px; height: 22px; }
.logo-mini svg { width: 32px; height: 32px; }
.nav-badge {
  position: absolute; top: 2px; right: 2px; background: var(--danger);
  color: #fff; font-size: 0.55rem; padding: 1px 4px; border-radius: 99px;
}

.app-header {
  background: var(--header-solid);
  background-image: var(--header);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.org-name { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.search-wrap { flex: 1; max-width: 520px; position: relative; }
.search-wrap input {
  width: 100%; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; padding: 0.45rem 0.75rem 0.45rem 2rem; border-radius: 8px; font: inherit; font-size: 0.85rem;
}
.search-wrap input::placeholder { color: rgba(255,255,255,0.55); }
.search-wrap input:focus { outline: none; background: rgba(255,255,255,0.18); }
.search-wrap .s-icon { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); opacity: 0.6; }
.search-kbd { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); font-size: 0.65rem; color: rgba(255,255,255,0.5); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.header-btn {
  width: 36px; height: 36px; border-radius: 8px; border: none;
  background: rgba(255,255,255,0.1); color: #fff; cursor: pointer; font-size: 1rem;
}
.header-btn:hover { background: rgba(255,255,255,0.2); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  background: var(--surface3); border: 2px solid rgba(255,255,255,0.3);
}

.app-main { overflow-y: auto; background: transparent; padding: 1.25rem; }

/* Profile hero */
.profile-hero { margin: -1.25rem -1.25rem 1.25rem; }
.profile-banner {
  height: 120px;
  background: linear-gradient(120deg, #047857, #059669, #0d9488, #c9a227);
  opacity: 0.92;
}
.profile-head {
  background: var(--surface); padding: 0 1.5rem 1rem;
  border-bottom: 1px solid var(--border); position: relative;
}
.profile-head-inner { display: flex; gap: 1rem; align-items: flex-end; margin-top: -40px; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--surface);
  background: var(--surface3); object-fit: cover; flex-shrink: 0;
}
.profile-name { font-size: 1.35rem; font-weight: 800; letter-spacing: 0.02em; }
.profile-title { color: var(--muted); font-size: 0.9rem; }
.status-pill {
  display: inline-block; font-size: 0.65rem; font-weight: 700; padding: 2px 8px;
  border-radius: 4px; margin-left: 0.5rem; vertical-align: middle;
}
.status-in { background: rgba(34,197,94,0.2); color: var(--success); }
.status-out { background: rgba(239,68,68,0.2); color: var(--danger); }
.contact-bar {
  display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 0.75rem;
  padding: 0.65rem 0; font-size: 0.8rem; color: var(--muted);
}
.contact-bar span { display: flex; align-items: center; gap: 0.35rem; }
.org-row { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 0.5rem; font-size: 0.8rem; }
.org-row dt { color: var(--muted); font-weight: 500; }
.org-row dd { font-weight: 600; margin-top: 0.15rem; }

/* Tabs */
.tabs-primary, .tabs-secondary { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.tabs-primary { background: var(--surface); padding: 0 1.5rem; }
.tabs-primary button {
  background: none; border: none; color: var(--muted); font: inherit;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.85rem 1rem; cursor: pointer; position: relative;
}
.tabs-primary button.active { color: var(--text); }
.tabs-primary button.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-bottom-color: var(--accent);
}
.tabs-secondary { padding: 0.75rem 1.5rem 0; gap: 0.5rem; border: none; }
.tabs-secondary button {
  background: var(--surface2); border: none; color: var(--muted);
  font: inherit; font-size: 0.8rem; padding: 0.4rem 0.85rem; border-radius: 6px; cursor: pointer;
}
.tabs-secondary button.active { background: var(--header); color: #fff; }

/* Cards & tables */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.card-rich {
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: linear-gradient(180deg, rgba(52,211,153,0.04) 0%, var(--surface) 40%);
}
.card-head-rich { border-bottom: 1px solid rgba(52, 211, 153, 0.2); }
.card-head {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.card-head h3 { font-size: 1rem; font-weight: 600; }
.card-body { padding: 1.25rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; border-left: 4px solid var(--accent);
  backdrop-filter: blur(8px);
}
.stat-card .label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .value { font-size: 1.75rem; font-weight: 700; margin-top: 0.35rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th { text-align: left; padding: 0.65rem 1rem; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
tr:hover td { background: var(--surface2); }
.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.badge-pending { background: rgba(245,158,11,0.2); color: var(--warning); }
.badge-approved { background: rgba(34,197,94,0.2); color: var(--success); }
.badge-rejected { background: rgba(239,68,68,0.2); color: var(--danger); }
.badge-mandatory { background: rgba(249,115,22,0.2); color: #fb923c; }

.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.75rem; border-radius: 6px; }
.btn-success { background: var(--accent2); color: #fff; border: none; cursor: pointer; }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); cursor: pointer; }
.btn-ghost { background: var(--surface2); border: 1px solid var(--border); color: var(--text); cursor: pointer; }

.grid-2 { display: grid; grid-template-columns: 1fr 320px; gap: 1.25rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.settings-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.25rem; min-height: 400px; }
.settings-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem; }
.settings-nav a {
  display: block; padding: 0.75rem 1rem; border-radius: 8px; color: var(--muted); font-size: 0.85rem;
}
.settings-nav a.active { background: var(--header); color: #fff; border: 1px solid rgba(52,211,153,0.35); }
.settings-nav a small { display: block; font-size: 0.7rem; opacity: 0.7; margin-top: 0.15rem; }

.dropdown-menu {
  position: absolute; right: 0; top: 100%; margin-top: 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 200px; box-shadow: 0 12px 40px rgba(0,0,0,0.4); z-index: 100; padding: 0.35rem;
}
.dropdown-menu button, .dropdown-menu a {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  padding: 0.55rem 0.75rem; border: none; background: none; color: var(--text);
  font: inherit; font-size: 0.85rem; cursor: pointer; border-radius: 6px; text-align: left;
}
.dropdown-menu button:hover { background: var(--surface2); }

.search-results {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  max-height: 320px; overflow-y: auto; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.search-results div { padding: 0.6rem 0.85rem; cursor: pointer; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.search-results div:hover { background: var(--surface2); }

.empty-state { text-align: center; padding: 3rem; color: var(--muted); }
.edit-icon { float: right; cursor: pointer; opacity: 0.5; }
.edit-icon:hover { opacity: 1; }

.page-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.25rem; }
.page-sub { color: var(--muted); font-size: 0.9rem; }

.hrms-dialog {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 14px; padding: 0; max-width: 720px; width: calc(100vw - 2rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  margin: 0; z-index: 10000;
}
.hrms-dialog[open] { display: block; }
.hrms-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.hrms-dialog form { padding: 1.25rem 1.5rem 1.5rem; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.dialog-head h3 { font-size: 1.1rem; font-weight: 700; }
.dialog-actions { display: flex; gap: 0.5rem; margin-top: 1.25rem; flex-wrap: wrap; }

.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 1rem;
  max-height: min(60vh, 520px); overflow-y: auto; padding-right: 0.25rem;
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-field label { display: block; font-size: 0.72rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.04em; }
.form-field input, .form-field select {
  width: 100%; padding: 0.6rem 0.7rem; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text); font: inherit;
}
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-hint { display: block; margin-top: 0.35rem; font-size: 0.72rem; color: var(--muted); }
.form-check-row { margin: 0.75rem 0; font-size: 0.85rem; }
.form-check-row label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }

.toast-box {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 20000;
  padding: 0.85rem 1.1rem; border-radius: 10px; font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35); max-width: min(420px, calc(100vw - 2rem));
}
.toast-box.hidden { display: none; }
.toast-error { background: #7f1d1d; color: #fecaca; border: 1px solid #ef4444; }
.toast-success { background: #064e3b; color: #a7f3d0; border: 1px solid #10b981; }

.org-tree { max-height: 520px; overflow: auto; }
.org-card {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.6rem 0.85rem; margin: 0.35rem 0; display: flex; flex-direction: column; gap: 0.15rem;
}
.org-card span { color: var(--muted); font-size: 0.85rem; }
.org-card small { color: var(--accent); font-size: 0.75rem; }
.team-row { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.inbox-item { padding: 0.85rem; border-bottom: 1px solid var(--border); cursor: pointer; }
.inbox-item:hover { background: var(--surface2); }
.inbox-item.unread { border-left: 3px solid var(--accent); background: rgba(16,185,129,0.06); }

.perf-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.perf-tabs button {
  background: var(--surface2); border: 1px solid var(--border); color: var(--muted);
  padding: 0.45rem 0.9rem; border-radius: 8px; cursor: pointer; font: inherit; font-size: 0.85rem;
}
.perf-tabs button.active { background: var(--header-solid); color: #fff; border-color: transparent; }
.goal-card {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem; margin-bottom: 0.75rem;
}
.goal-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.goal-progress { height: 8px; background: var(--surface); border-radius: 99px; overflow: hidden; margin-top: 0.5rem; }
.goal-bar { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 99px; }

.learn-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem; margin-top: 1rem;
}
.learn-stats strong { display: block; font-size: 1.5rem; margin-top: 0.25rem; }
.course-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem;
}
.course-card {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 1rem;
}
.course-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.course-cat { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.course-card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.course-desc { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.5rem; line-height: 1.4; min-height: 2.5rem; }
.course-meta { font-size: 0.8rem; color: var(--muted); }
.course-actions { display: flex; gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap; }
.lesson-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border);
}
.lesson-row.lesson-done { opacity: 0.75; }
.lesson-row.lesson-active { background: rgba(16,185,129,0.06); margin: 0 -1rem; padding: 0.85rem 1rem; border-radius: 8px; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-head {
  text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--muted);
  padding: 0.5rem 0;
}
.cal-cell {
  min-height: 72px; border: 1px solid var(--border); border-radius: 8px;
  padding: 0.35rem; background: var(--surface2); font-size: 0.8rem;
}
.cal-pad { background: transparent; border-color: transparent; }
.cal-weekend { opacity: 0.65; }
.cal-holiday { background: rgba(16,185,129,0.12); border-color: var(--accent); }
.cal-day { font-weight: 600; display: block; }
.cal-holiday-name {
  display: block; font-size: 0.65rem; color: var(--accent); margin-top: 0.2rem;
  line-height: 1.2; overflow: hidden; text-overflow: ellipsis;
}

/* Org module — Keka-style top tabs */
.org-shell { margin: -1.25rem -1.25rem 0; }
.org-top-tabs {
  display: flex; flex-wrap: wrap; gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
}
.org-top-tabs a {
  padding: 0.85rem 1rem; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; position: relative;
}
.org-top-tabs a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.org-top-tabs a.active::after {
  content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: var(--accent);
}
.org-content { padding: 1.25rem; }

.filter-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border: 1px solid rgba(52,211,153,0.25); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 1rem; background: var(--surface2);
}
.filter-cell {
  padding: 0.65rem 0.85rem; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.filter-cell label { display: block; font-size: 0.62rem; color: var(--muted); letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.filter-cell select, .filter-cell input {
  width: 100%; background: transparent; border: none; color: var(--text);
  font: inherit; font-size: 0.85rem; font-weight: 600;
}
.filter-actions { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.btn-run {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff; border: 1px solid rgba(52,211,153,0.5);
  padding: 0.5rem 1.25rem; border-radius: 8px; cursor: pointer; font-weight: 600;
}

.perm-matrix { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.perm-matrix th, .perm-matrix td {
  border: 1px solid var(--border); padding: 0.55rem 0.65rem; text-align: center;
}
.perm-matrix th:first-child, .perm-matrix td:first-child { text-align: left; min-width: 180px; }
.perm-matrix thead th { background: var(--surface2); color: var(--muted); font-size: 0.68rem; text-transform: uppercase; }
.perm-check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

.team-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 1.25rem;
}
.team-stat-card {
  background: var(--surface); border: 1px solid rgba(52,211,153,0.3);
  border-radius: var(--radius); padding: 1.1rem;
}
.team-stat-card .num { font-size: 2rem; font-weight: 800; margin: 0.35rem 0; }
.team-stat-card a { font-size: 0.8rem; color: var(--accent); }

.app-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem;
}
.app-card {
  background: var(--surface2); border: 1px solid rgba(52,211,153,0.25);
  border-radius: 12px; padding: 1rem; transition: border-color 0.15s, transform 0.15s;
}
.app-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.app-card h4 { margin: 0.5rem 0 0.35rem; font-size: 0.95rem; }
.app-card p { color: var(--muted); font-size: 0.82rem; line-height: 1.4; margin: 0; }
.app-badge { display: inline-block; font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); margin-top: 0.75rem; }

.header-btn svg { width: 18px; height: 18px; vertical-align: middle; }
.search-wrap .s-icon svg { width: 16px; height: 16px; opacity: 0.7; }

.report-list { list-style: none; padding: 0; }
.report-list li {
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.report-list a { font-weight: 600; color: var(--accent); font-size: 0.95rem; }
.report-list p { color: var(--muted); font-size: 0.82rem; margin-top: 0.35rem; }

.banner-warn {
  border: 1px solid rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.08);
  border-radius: var(--radius); padding: 1rem 1.25rem; color: #fcd34d;
  display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 1rem;
}
.link-accent { color: var(--accent); cursor: pointer; font-weight: 600; font-size: 0.85rem; }

@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; }
  .org-shell { margin: 0; }
  .inbox-layout { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
}

.org-sub-tabs {
  display: flex; flex-wrap: wrap; gap: 0; padding: 0 1rem;
  background: var(--surface2); border-bottom: 1px solid rgba(52,211,153,0.2);
}
.org-sub-tabs a {
  padding: 0.65rem 1rem; font-size: 0.78rem; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.org-sub-tabs a.active { color: var(--text); border-bottom-color: var(--accent); background: rgba(52,211,153,0.06); }

.me-module-tabs button { font-size: 0.68rem; letter-spacing: 0.05em; }

.info-box {
  border: 1px solid rgba(56, 189, 248, 0.4); background: rgba(56, 189, 248, 0.08);
  border-radius: 8px; padding: 0.85rem 1rem; font-size: 0.85rem;
}
.info-box p { color: var(--muted); margin-top: 0.35rem; font-size: 0.82rem; }

.doc-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; }
.doc-folder-item {
  display: block; padding: 0.75rem 1rem; border-radius: 8px; color: var(--text);
  text-decoration: none; margin-bottom: 0.35rem; border: 1px solid transparent;
}
.doc-folder-item.active { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.35); }
.doc-folder-item small { display: block; color: var(--muted); font-size: 0.75rem; margin-top: 0.2rem; }

.asset-chip {
  display: inline-block; padding: 0.2rem 0.5rem; margin: 0.15rem;
  background: var(--surface2); border: 1px solid rgba(52,211,153,0.25); border-radius: 6px; font-size: 0.75rem;
}

.inbox-layout { display: grid; grid-template-columns: 200px 280px 1fr; gap: 1rem; min-height: 360px; }
.inbox-pane { min-height: 280px; }
.inbox-tabs { display: flex; gap: 0.5rem; padding: 0.75rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.inbox-tabs button { background: none; border: none; color: var(--muted); font: inherit; font-size: 0.75rem; cursor: pointer; }
.inbox-tabs button.active { color: var(--accent); font-weight: 600; }
.inbox-section-label { padding: 0.75rem 1rem 0.35rem; font-size: 0.65rem; color: var(--muted); letter-spacing: 0.06em; }
.inbox-cat { display: block; width: 100%; text-align: left; padding: 0.65rem 1rem; background: none; border: none; color: var(--text); font: inherit; cursor: pointer; }
.inbox-cat.active { background: rgba(52,211,153,0.12); border-left: 3px solid var(--accent); }
.inbox-task-item { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); cursor: pointer; }
.inbox-task-item:hover, .inbox-task-item.active { background: rgba(52,211,153,0.08); }

.engage-hero h2 { font-size: 1.75rem; }

.login-sso { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.login-sso .btn-outline { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.login-sso-icon { width: 18px; height: 18px; flex-shrink: 0; }

.salary-page-grid { align-items: start; }
.salary-breakup { display: grid; gap: 1rem; }
.salary-section-label { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 0.5rem; text-transform: uppercase; }
.salary-line { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.9rem; }
.salary-line.ded strong { color: #f87171; }
.salary-line.salary-total { border-top: 1px solid var(--border); margin-top: 0.35rem; padding-top: 0.5rem; font-weight: 600; }
.salary-net { display: flex; justify-content: space-between; padding: 0.85rem 1rem; margin-top: 0.5rem; background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.35); border-radius: 8px; font-size: 1.05rem; }
.salary-timeline { position: relative; padding-left: 1.25rem; border-left: 2px solid rgba(52,211,153,0.25); }
.salary-timeline-item { position: relative; padding: 0.65rem 0 0.65rem 0.75rem; cursor: pointer; border-radius: 6px; }
.salary-timeline-item:hover, .salary-timeline-item.active { background: rgba(52,211,153,0.08); }
.salary-timeline-dot { position: absolute; left: -1.38rem; top: 1rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.salary-timeline-body span { display: block; color: var(--accent); font-weight: 600; margin-top: 0.15rem; }
.salary-timeline-body small { color: var(--muted); font-size: 0.75rem; }

.team-cal-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; font-size: 0.8rem; color: var(--muted); }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.35rem; vertical-align: middle; }
.team-cal-wrap { overflow-x: auto; }
.team-cal-table { min-width: 720px; font-size: 0.75rem; }
.team-cal-name { min-width: 140px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.team-cal-day { text-align: center; min-width: 28px; color: var(--muted); font-weight: 600; }
.team-cal-day.is-weekend { opacity: 0.5; }
.team-cal-cell { width: 28px; height: 22px; padding: 0; border-radius: 3px; }
.cal-st-present { background: rgba(52,211,153,0.55); }
.cal-st-wfh { background: rgba(167,139,250,0.55); }
.cal-st-on-duty { background: rgba(45,212,191,0.5); }
.cal-st-leave { background: rgba(251,191,36,0.55); }
.cal-st-absent { background: rgba(248,113,113,0.45); }
.cal-st-holiday { background: rgba(96,165,250,0.45); }
.cal-st-weekend { background: rgba(148,163,184,0.15); }
.cal-st-none { background: rgba(255,255,255,0.03); }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.25rem; vertical-align: middle; }

.org-tree-visual { padding: 0.5rem 0; }
.org-tree-node { margin: 0.35rem 0; }
.org-tree-children {
  margin-left: 1.25rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(124,58,237,0.25);
}
.org-card-visual {
  display: inline-block;
  min-width: 160px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(124,58,237,0.2);
  background: var(--surface2);
}
.org-card-visual strong { display: block; font-size: 0.9rem; }
.org-emp-no { display: block; color: var(--muted) !important; margin-top: 0.15rem; }

.inbox-check-item { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.5rem 0; font-size: 0.9rem; cursor: pointer; }
.inbox-activity-row { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.inbox-activity-row p { margin: 0.15rem 0 0; font-size: 0.85rem; }
.inbox-task-item.unread { border-left: 3px solid var(--accent); }

.app-icon-box { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; margin-bottom: 0.5rem; }
.app-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.app-card { padding: 1rem; border: 1px solid rgba(52,211,153,0.2); border-radius: 10px; }
.app-card h4 { margin: 0.35rem 0; font-size: 0.95rem; }
.app-card p { color: var(--muted); font-size: 0.8rem; margin: 0 0 0.75rem; min-height: 2.5rem; }
.app-badge { font-size: 0.65rem; padding: 0.15rem 0.45rem; border-radius: 4px; background: rgba(52,211,153,0.15); color: var(--accent); }

.oneonone-cal-item { padding: 0.75rem; margin-bottom: 0.5rem; border: 1px solid rgba(52,211,153,0.2); border-radius: 8px; }
.oneonone-cal-item p { margin: 0.25rem 0; font-size: 0.9rem; }

@media (max-width: 960px) {
  .inbox-layout { grid-template-columns: 1fr; }
  .salary-page-grid { grid-template-columns: 1fr !important; }
}
