/* ── KORIUM UI — Brand: Navy #16324F, Blue #1a6bdc ───────── */
:root {
  --navy:    #16324F;
  --blue:    #1a6bdc;
  --blue-lt: #4FC3F7;
  --emerald: #0E7C5B;
  --gold:    #C77E1F;
  --danger:  #C0392B;
  --bg:      #F0F4F8;
  --surface: #FFFFFF;
  --border:  #D8DEE6;
  --text:    #2D3748;
  --muted:   #718096;
  --radius:  8px;
  --shadow:  0 2px 8px rgba(22,50,79,.08);
}

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

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* ── License banner ───────────────────────────────────────── */
.license-banner {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}
.license-banner--warning { background: #FEF3CD; color: #856404; }
.license-banner--danger  { background: #FEE2E2; color: #991B1B; }
.license-banner a { color: inherit; font-weight: 700; }

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

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 230px;
  min-width: 230px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar__logo-img { height: 34px; width: auto; border-radius: 6px; }
.sidebar__logo-text {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px;
}
.sidebar__brand {
  font-family: 'Sora', sans-serif;
  font-weight: 600; font-size: 15px;
  color: #fff;
}

.sidebar__nav {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}
.sidebar__nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  color: #B2C2D8;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: background .15s, color .15s;
}
.sidebar__nav li a svg {
  width: 17px; height: 17px;
  flex-shrink: 0;
  fill: currentColor;
}
.sidebar__nav li a:hover,
.sidebar__nav li a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.sidebar__nav li a.active {
  border-left: 3px solid var(--blue-lt);
  background: rgba(26,107,220,.18);
}
.sidebar__section {
  padding: 14px 18px 4px;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  font-weight: 600;
}
.sidebar__section--toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.sidebar__section--toggle:hover { color: rgba(255,255,255,.6); }
.sidebar__chevron { transition: transform .15s; flex-shrink: 0; fill: none; }
.sidebar__submenu {
  list-style: none;
  max-height: 600px;
  overflow: hidden;
  transition: max-height .2s ease;
}
.sidebar__submenu.collapsed { max-height: 0; }

.sidebar__footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
}
.sidebar__footer a { color: #B2C2D8; text-decoration: none; display: block; }
.sidebar__footer a:hover { color: #fff; }
.sidebar__logout { color: #e57373 !important; margin-top: 4px; }

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar__menu { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--navy); }
.topbar__title { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 16px; color: var(--navy); flex: 1; }
.topbar__right { display: flex; align-items: center; gap: 16px; }
.topbar__notif { position: relative; color: var(--muted); }
.topbar__notif .badge {
  position: absolute; top: -5px; right: -6px;
  background: var(--danger); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}
.topbar__user { font-size: 12px; color: var(--muted); }

.page-body { padding: 24px; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.card__title {
  font-family: 'Sora', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Stat tiles ───────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-tile {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border-left: 4px solid var(--blue);
}
.stat-tile--green  { border-color: var(--emerald); }
.stat-tile--amber  { border-color: var(--gold); }
.stat-tile--red    { border-color: var(--danger); }
.stat-tile__val { font-family: 'Sora'; font-size: 28px; font-weight: 700; color: var(--navy); }
.stat-tile__lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-top: 2px; }

/* ── Tables ───────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; letter-spacing: .8px;
  text-transform: uppercase; color: var(--muted);
  padding: 10px 14px; border-bottom: 2px solid var(--border);
  font-weight: 600;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f7faff; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge--green  { background: #EAFAF1; color: #1E8449; }
.badge--amber  { background: #FEF9E7; color: #9A6A00; }
.badge--red    { background: #FEF0F0; color: #C0392B; }
.badge--blue   { background: #EBF5FB; color: #1A5276; }
.badge--grey   { background: #F2F3F4; color: #717D7E; }

/* ── Attendance dots ──────────────────────────────────────── */
.att-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.att-dot {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700; color: #fff;
  font-family: monospace;
}
.att-dot--on     { background: var(--emerald); }
.att-dot--late   { background: var(--gold); }
.att-dot--absent { background: var(--danger); }
.att-dot--leave  { background: var(--blue); }
.att-dot--hol    { background: #9AA6B8; }
.att-dot--off    { background: #E2E8F0; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin-bottom: 5px;
}
.form-control {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: 6px; font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--text); background: #fff;
  transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--blue); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 6px;
  border: none; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-navy    { background: var(--navy); color: #fff; }
.btn-success { background: var(--emerald); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-sm      { padding: 5px 12px; font-size: 12px; }

/* ── Net pay block (payslip) ──────────────────────────────── */
.net-pay-block {
  background: var(--navy); border-radius: 10px;
  color: #fff; padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px;
}
.net-pay-block .amount {
  font-family: 'Sora'; font-size: 28px; font-weight: 700;
}
.net-pay-block .words {
  font-size: 12px; color: #B2C2D8; font-style: italic; max-width: 260px; text-align: right;
}

/* ── Lock screen ──────────────────────────────────────────── */
.lock-screen {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg);
}
.lock-card {
  background: #fff; border-radius: 12px; padding: 40px;
  max-width: 420px; text-align: center; box-shadow: var(--shadow);
}
.lock-card h1 { color: var(--danger); font-size: 20px; margin-bottom: 10px; }
.lock-card p  { color: var(--muted); font-size: 14px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -230px; z-index: 100; transition: left .25s; height: 100vh; }
  .sidebar.open { left: 0; }
  .topbar__menu { display: block; }
  .form-row { grid-template-columns: 1fr; }
}
