/* =========================================================
   LEAVE.IO – Employee Leave Management System
   Shared stylesheet for all pages.
   Theme taken from the LEAVE.IO logo: black, sky blue (#55AEFE), white.
   ========================================================= */
:root {
  color-scheme: dark;
  /* brand (from the logo) */
  --brand: #55aefe;
  --brand-strong: #7cc1ff;
  --brand-deep: #1f7fd6;
  --brand-ink: #02101d;               /* text on a blue button */
  --brand-soft: rgba(85, 174, 254, .12);
  --brand-line: rgba(85, 174, 254, .35);

  /* surfaces */
  --bg: #050608;
  --sidebar: #000;
  --surface: #0c1016;
  --surface-2: #121821;
  --surface-3: #18202b;
  --border: #212a35;
  --border-strong: #2e3a48;

  /* text */
  --text: #eaf0f6;
  --text-2: #c3ccd7;
  --muted: #8693a4;

  /* status */
  --green: #3fd07f;
  --green-soft: rgba(63, 208, 127, .13);
  --red: #ff5d62;
  --red-soft: rgba(255, 93, 98, .13);
  --amber: #f6b73c;
  --amber-soft: rgba(246, 183, 60, .14);
  --pink: #ff7ab0;
  --pink-soft: rgba(255, 122, 176, .13);

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --heading: 'Saira', 'Poppins', Arial, sans-serif;

  /* old names kept so nothing else breaks */
  --navy: var(--sidebar);
  --active: var(--brand);
  --blue: var(--brand);
  --btn-blue: var(--brand);
  --cyan: var(--brand);
  --yellow: var(--brand);
  --pending: var(--amber);
  --soft: var(--surface-2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Poppins', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--brand); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
code { background: var(--surface-3); border: 1px solid var(--border); padding: 0 5px; border-radius: 4px; font-size: .92em; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }

/* ---------------- Layout ---------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 60;
  transition: transform .25s ease;
}

.brand {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.brand-logo { display: block; width: 100%; max-width: 176px; height: auto; }

.nav { padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-2);
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .15s, color .15s;
}
.nav a i { width: 20px; text-align: center; font-size: 16px; color: var(--muted); transition: color .15s; }
.nav a:hover { background: var(--surface-2); color: #fff; }
.nav a:hover i { color: var(--brand); }
.nav a.active { background: var(--brand-soft); color: #fff; border-color: var(--brand-line); }
.nav a.active i { color: var(--brand); }
.nav a[data-logout] { margin-top: 8px; }

.main { margin-left: 240px; flex: 1; padding: 26px 34px 40px; min-width: 0; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 26px;
}
.welcome h1, .page-title { font-family: var(--heading); font-size: 22px; font-weight: 600; letter-spacing: .2px; }
.welcome p { font-size: 12px; color: var(--muted); margin-top: 4px; }

.top-icons { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.top-icons a {
  color: var(--text-2); font-size: 17px; position: relative; text-decoration: none;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .15s, color .15s;
}
.top-icons a:hover { color: var(--brand); border-color: var(--brand-line); }
.top-icons .dot {
  position: absolute; top: 6px; right: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--surface);
}

.menu-btn {
  display: none;
  background: none; border: none;
  font-size: 22px; color: var(--text);
}
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 55;
}

/* ---------------- Cards ---------------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat-card { padding: 22px 14px 18px; text-align: center; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--brand-line), transparent); }
.stat-card h3 { font-size: 13px; font-weight: 500; color: var(--text-2); }
.stat-card .num { font-family: var(--heading); font-size: 40px; font-weight: 600; color: var(--brand); margin: 14px 0 8px; line-height: 1; }
.stat-card .num.dark { color: #fff; }
.stat-card small { font-size: 11px; color: var(--muted); }
.stat-card small.blue { color: var(--brand); }

.dash-row { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.quick { padding: 22px 26px 24px; text-align: center; }
.quick h3, .recent h3 { font-family: var(--heading); font-size: 16px; font-weight: 600; margin-bottom: 18px; }
.recent { padding: 22px 24px 14px; }
.recent h3 { text-align: left; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter .15s, background .15s, border-color .15s, color .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn-block { display: flex; width: 100%; }
/* primary = logo blue with dark text (blue / cyan / yellow all map to the brand button) */
.btn-blue, .btn-cyan, .btn-yellow { background: var(--brand); color: var(--brand-ink); }
.btn-blue:hover, .btn-cyan:hover, .btn-yellow:hover { background: var(--brand-strong); filter: none; }
.btn-outline, .btn-outline-light { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover, .btn-outline-light:hover { border-color: var(--brand); color: var(--brand); filter: none; }
.quick .btn { margin-bottom: 14px; padding: 12px 10px; }

/* ---------------- Tables ---------------- */
.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 11px; font-weight: 600; text-align: left; padding: 10px 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.table td { font-size: 12.5px; padding: 12px 8px; border-top: 1px solid var(--border); }
.table th:last-child, .table td:last-child { text-align: right; }

.status { font-weight: 600; }
.status.approved { color: var(--green); }
.status.rejected { color: var(--red); }
.status.pending { color: var(--amber); }
.status.cancelled { color: var(--muted); }

.table-wrap { overflow-x: auto; }

/* History */
.toolbar { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.select, .search {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  height: 38px;
  padding: 0 12px;
  font-size: 12.5px;
  background: var(--surface);
  color: var(--text);
}
.select:focus, .search:focus { outline: none; border-color: var(--brand); }
.select { width: 200px; }
.search-box { position: relative; width: 260px; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search { width: 100%; padding-left: 36px; }
.search::placeholder { color: var(--muted); }

.history-table {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.history-table table { width: 100%; border-collapse: collapse; }
.history-table th {
  background: var(--surface-2);
  font-size: 11.5px; font-weight: 600; color: var(--text-2);
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: .4px;
}
.history-table th:first-child { border-top-left-radius: 12px; }
.history-table th:last-child { border-top-right-radius: 12px; }
.history-table td { font-size: 12.5px; padding: 14px; border-bottom: 1px solid var(--border); }
.history-table tr:last-child td { border-bottom: none; }
.history-table td.c, .history-table th.c { text-align: center; }
.eye-btn { background: none; border: none; color: var(--muted); font-size: 15px; }
.eye-btn:hover { color: var(--brand); }
.empty-row td { text-align: center; color: var(--muted); padding: 28px; }

.table-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 11.5px; color: var(--muted); gap: 12px; flex-wrap: wrap; }
.pager { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.pager button { background: none; border: none; color: var(--muted); }
.pager span { border: 1px solid var(--border); border-radius: 4px; padding: 1px 7px; color: var(--text); }

/* ---------------- Forms ---------------- */
.form-grid { max-width: 940px; }
.form-row { display: grid; grid-template-columns: 170px 1fr; align-items: start; gap: 12px; margin-bottom: 18px; }
.form-row label { font-size: 12.5px; padding-top: 11px; color: var(--text-2); }
.form-row label .req { color: var(--text); }
.dates { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.dates label { padding-top: 0; }
.control {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.control::placeholder { color: var(--muted); }
.control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.control.invalid { border-color: var(--red); }
select.control { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.control option, .select option { background: var(--surface-2); color: var(--text); }
textarea.control { min-height: 64px; resize: vertical; }
.inline { display: flex; align-items: center; gap: 14px; }
.inline .control { max-width: 175px; }
.hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.error-text { font-size: 12px; color: var(--red); margin-top: 6px; display: none; }
.error-text.show { display: block; }
.file-btn {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 9px 16px;
  font-size: 12.5px;
}
.file-btn:hover { border-color: var(--brand); }
.form-actions { display: flex; justify-content: center; gap: 54px; margin-top: 30px; padding-left: 170px; }
.form-actions .btn { min-width: 150px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); margin-top: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

/* ---------------- Leave balance ---------------- */
.balance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 26px; max-width: 860px; }
.balance-card { padding: 18px 20px 0; position: relative; overflow: hidden; }
.balance-card h3 { font-size: 13px; font-weight: 600; padding-right: 68px; }
.balance-card .num { font-family: var(--heading); font-size: 34px; font-weight: 600; color: var(--brand); margin: 14px 0 2px; line-height: 1; }
.balance-card .num.dark { color: #fff; }
.balance-card .label { font-size: 12px; margin-bottom: 18px; color: var(--muted); }
.balance-card .illus {
  position: absolute; top: 14px; right: 16px;
  width: 50px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
}
.balance-card .bar { height: 4px; background: var(--surface-3); margin: 0 -20px; }
.balance-card .bar > div { height: 100%; background: var(--brand); }
.balance-card .foot { display: flex; justify-content: space-between; font-size: 11px; padding: 12px 0 12px; color: var(--muted); }

.illus.a { background: var(--brand-soft); color: var(--brand); }
.illus.b { background: var(--pink-soft); color: var(--pink); }
.illus.c { background: var(--amber-soft); color: var(--amber); }
.illus.d { background: var(--green-soft); color: var(--green); }

/* ---------------- Notifications ---------------- */
.notif-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.link-btn { background: none; border: none; color: var(--brand); font-size: 12.5px; text-decoration: none; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.notif-list { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.notif {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 18px 12px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.notif:last-child { border-bottom: none; }
.notif:hover { background: var(--surface-2); }
.notif .ico {
  width: 46px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 17px; flex-shrink: 0;
}
.notif .body { flex: 1; min-width: 0; }
.notif .msg { font-size: 13px; color: var(--text-2); }
.notif .time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.notif .chev { color: var(--muted); font-size: 12px; }
.notif.unread .msg { font-weight: 600; color: var(--text); }
.notif .new-dot { width: 8px; height: 8px; background: var(--brand); border-radius: 50%; display: none; box-shadow: 0 0 0 4px var(--brand-soft); }
.notif.unread .new-dot { display: block; }
.notif.hidden { display: none; }
.view-all { text-align: center; margin-top: 22px; }

/* ---------------- Profile ---------------- */
.profile-wrap { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 26px; align-items: start; max-width: 880px; }
.avatar {
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-line);
  display: grid; place-items: center;
  font-family: var(--heading);
  font-size: 20px; font-weight: 700;
  overflow: hidden;
  margin-bottom: 14px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.photo-col { text-align: left; }
.photo-col .link-btn { font-size: 12px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; margin-bottom: 6px; color: var(--text-2); }
.field .control { padding: 9px 12px; }
.field .control[readonly] { background: var(--surface); color: var(--muted); }
.pw-box { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 18px 16px 16px; margin-top: 20px; }
.pw-box h3 { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.pw-box .btn { display: flex; margin: 18px auto 0; min-width: 126px; padding: 9px 18px; font-size: 13px; }

/* ---------------- Modals (shared) ---------------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop.open { display: flex; animation: fade .18s ease; }
.modal {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  width: 100%; max-width: 350px;
  padding: 26px 24px 22px;
  text-align: center;
  animation: pop .2s ease;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.modal.wide { max-width: 480px; text-align: left; }
.modal-icon { font-size: 32px; margin-bottom: 12px; }
.modal-icon.red { color: var(--red); }
.modal-icon.green { color: var(--green); }
.modal-icon.yellow { color: var(--amber); }
.modal-icon.blue { color: var(--brand); }
.modal.wide .modal-icon { text-align: center; }
.modal h2 { font-family: var(--heading); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.modal.wide h2 { text-align: center; }
.modal p { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.modal.wide p.lead { text-align: center; margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: center; gap: 14px; margin-top: 22px; }
.modal-actions.wrap { flex-wrap: wrap; gap: 10px; }
.modal-actions .btn { min-width: 92px; padding: 9px 18px; font-size: 13px; }
.modal .field { text-align: left; margin-top: 14px; }

.detail-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.detail-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.detail-list div:last-child { border-bottom: none; }
.detail-list dt { color: var(--muted); }
.detail-list dd { font-weight: 500; text-align: right; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------------- Login / setup / first password ---------------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 30px 16px;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(85, 174, 254, .10), transparent 60%),
    radial-gradient(700px 400px at 90% 100%, rgba(85, 174, 254, .06), transparent 60%),
    var(--bg);
}
.login-shell {
  display: grid; grid-template-columns: 1fr 1fr;
  width: 100%; max-width: 1000px;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.login-left, .login-right { padding: 40px 44px; min-height: 560px; }
.login-left {
  background: #000;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  border-right: 1px solid var(--border);
}
.login-right { background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.auth-logo { width: 220px; max-width: 70%; height: auto; display: block; }
.auth-hero { margin-top: 56px; position: relative; z-index: 1; }
.login-title { font-family: var(--heading); font-weight: 600; font-size: 34px; line-height: 1.15; color: #fff; }
.login-title span { color: var(--brand); display: block; }
.auth-lead { color: var(--text-2); font-size: 13.5px; line-height: 1.6; margin-top: 14px; max-width: 360px; }
.peaks { position: absolute; left: 0; right: 0; bottom: 70px; width: 100%; height: 120px; color: var(--brand); opacity: .55; }
.login-left .tagline { margin-top: auto; font-size: 11.5px; color: var(--muted); position: relative; z-index: 1; }

.login-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  display: grid; place-items: center;
  font-size: 28px; color: var(--brand);
  margin-bottom: 14px;
}
.login-right h1, .auth-card h1 { font-family: var(--heading); font-size: 26px; font-weight: 600; text-align: center; }
.login-right .sub, .auth-card .sub { font-size: 12.5px; margin: 6px 0 24px; color: var(--muted); text-align: center; line-height: 1.6; }
.login-form { width: 100%; }
.login-form > label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 6px; color: var(--text-2); }
.input-icon {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0 14px;
  height: 48px;
  margin-bottom: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.input-icon:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input-icon > i { font-size: 16px; color: var(--brand); width: 20px; text-align: center; }
.input-icon input { border: none; outline: none; flex: 1; font-size: 13px; background: transparent; color: var(--text); min-width: 0; }
.input-icon input::placeholder { color: var(--muted); }
.input-icon .toggle-pw { background: none; border: none; color: var(--muted); font-size: 14px; }
.input-icon.invalid { border-color: var(--red); }
.login-opts { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin: 2px 0 20px; color: var(--text-2); }
.login-opts label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; cursor: pointer; }
.login-opts input { width: 16px; height: 16px; accent-color: var(--brand); }
.login-opts .link-btn { font-size: 12px; font-weight: 600; }
.login-form .btn { width: 100%; margin: 0 auto; display: flex; height: 46px; font-size: 15px; border-radius: 10px; }
.or { font-size: 11px; font-weight: 600; margin: 24px 0 16px; color: var(--muted); }
.help { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }
.help .link-btn { font-size: 12px; }
.login-error { color: var(--red); font-size: 12px; text-align: center; margin-bottom: 12px; display: none; }
.login-error.show { display: block; }

.first-time {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 22px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  font-size: 12px; color: var(--text-2); line-height: 1.6; width: 100%;
}
.first-time > i { color: var(--brand); margin-top: 3px; }
.first-time strong { color: var(--text); }
.first-time .link-btn { font-size: 12px; font-weight: 600; }

.setup-banner {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin-bottom: 26px; padding: 12px 14px;
  border: 1px solid var(--brand-line); background: var(--brand-soft); border-radius: 12px;
}
.setup-banner > i { color: var(--brand); font-size: 18px; }
.setup-banner strong { display: block; font-size: 13px; }
.setup-banner span { font-size: 11.5px; color: var(--text-2); line-height: 1.5; display: block; }
.setup-banner .btn { padding: 8px 16px; font-size: 13px; flex-shrink: 0; }

/* numbered steps (setup page, How it works, CSV import) */
.steps { list-style: none; counter-reset: s; margin: 6px 0 14px; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding-left: 36px; font-size: 12.5px; color: var(--text-2); line-height: 1.55; min-height: 24px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--muted); background: var(--surface-2);
}
.steps li strong { color: var(--text); font-weight: 600; }
.steps.on-dark { margin-top: 28px; gap: 14px; }
.steps.on-dark li { font-size: 13px; padding-top: 2px; }
.steps li.cur::before { border-color: var(--brand); color: var(--brand-ink); background: var(--brand); }
.steps li.done::before { content: '\2713'; border-color: var(--green); color: var(--green); background: var(--green-soft); }

.setup-form fieldset { border: none; }
.setup-form .field { margin-bottom: 14px; }
.setup-form .btn { margin-top: 8px; }
.setup-actions { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.setup-actions .btn { width: auto; }
.setup-locked { text-align: center; display: flex; flex-direction: column; align-items: center; }
.setup-locked .btn { width: auto; }
.login-right .field-grid .field { margin-top: 0; }

.auth-card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 34px 36px 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center;
}
.auth-card .auth-logo { width: 170px; margin-bottom: 26px; }
.auth-card .field { width: 100%; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-row { grid-template-columns: 1fr; }
  .profile-wrap { grid-template-columns: 1fr 1fr; }
  .photo-col { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
  .photo-col .avatar { margin: 0; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .overlay.show { display: block; }
  .menu-btn { display: block; }
  .main { margin-left: 0; padding: 18px 16px 32px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-left { min-height: auto; padding-bottom: 30px; border-right: none; border-bottom: 1px solid var(--border); }
  .auth-hero { margin-top: 30px; }
  .peaks { display: none; }
  .login-left .tagline { margin-top: 24px; }
  .login-right { min-height: auto; }
  .form-row { grid-template-columns: 1fr; gap: 4px; }
  .form-row label { padding-top: 0; }
  .form-actions { padding-left: 0; gap: 16px; }
  .balance-grid { grid-template-columns: 1fr; max-width: none; }
}
@media (max-width: 560px) {
  .stats { gap: 12px; }
  .stat-card .num { font-size: 32px; }
  .profile-wrap { grid-template-columns: 1fr; }
  .dates { grid-template-columns: 1fr; }
  .toolbar .select, .search-box { width: 100%; }
  .login-left, .login-right { padding: 26px 18px; }
  .login-title { font-size: 28px; }
  .auth-card { padding: 26px 18px; }
  .setup-banner { flex-wrap: wrap; }
}

/* =========================================================
   CEO / APPROVER PAGES  +  shared additions
   ========================================================= */
.btn-green { background: var(--green); color: #03140a; }
.btn-red { background: var(--red); color: #1d0405; }
.btn-grey { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); font-size: 12.5px; padding: 7px 14px; }
.btn-grey:hover { border-color: var(--brand); color: var(--brand); filter: none; }
.btn:disabled { opacity: .7; cursor: default; }
.welcome p span, .welcome h1 span { font: inherit; }
.req-doc { color: var(--red); font-weight: 600; }
.pending-note { color: var(--amber); font-weight: 600; font-size: 11px; }
.notif-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 13px; }
.view-all .done { color: var(--muted); pointer-events: none; }
.muted { color: var(--muted); font-size: 12px; }
.muted-sm { color: var(--muted); font-size: 11.5px; line-height: 1.6; }

/* Approver stat cards (left aligned like the mockup) */
.stats.approver .stat-card { text-align: left; padding: 20px 18px 16px; text-decoration: none; color: inherit; font: inherit; transition: border-color .15s, transform .15s; }
.stats.approver .stat-card .num { margin: 16px 0 8px; font-size: 38px; }
.stat-card.link { cursor: pointer; }
.stat-card.link:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.stats.approver small { color: var(--muted); }

/* Panel with header */
.panel { padding: 18px 22px 10px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel-head h3 { font-family: var(--heading); font-size: 16px; font-weight: 600; }
.ceo-table th { border-bottom: 1px solid var(--border); }
.ceo-table td { font-size: 12.5px; }
.table th.c, .table td.c { text-align: center; }
tr.clickable { cursor: pointer; transition: background .12s; }
tr.clickable:hover td { background: var(--surface-2); }
.table .empty-row td, .history-table .empty-row td { text-align: center; color: var(--muted); padding: 26px; }

/* Approve / reject icon buttons */
.acts { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.history-table .acts { justify-content: center; width: 100%; }
.act { background: none; border: none; font-size: 18px; line-height: 1; padding: 2px; text-decoration: none; transition: transform .12s; }
.act:hover { transform: scale(1.18); }
.act.approve { color: var(--green); }
.act.reject { color: var(--red); }
.act.view { color: var(--muted); font-size: 15px; }
.act.view:hover { color: var(--brand); }

/* Quick filter chips */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.chips button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 500; }
.chips button span { background: var(--surface-3); border-radius: 999px; padding: 0 7px; margin-left: 4px; font-size: 11px; }
.chips button:hover { border-color: var(--brand); color: var(--brand); }
.history-table small.sub { display: block; color: var(--muted); font-size: 11px; }
.ceo-list td { padding: 13px 12px; }

/* Numbered pager */
.num-pager { gap: 6px; }
.num-pager button { border: 1px solid var(--border-strong); border-radius: 6px; min-width: 28px; height: 28px; color: var(--text-2); background: var(--surface); font-size: 11.5px; }
.num-pager button.active { border-color: var(--brand); color: var(--brand-ink); background: var(--brand); font-weight: 600; }
.num-pager button:disabled { opacity: .35; cursor: default; }

/* Toolbar layout for employees */
.tb-left, .tb-right { display: flex; gap: 12px; flex-wrap: wrap; }
.pill { display: inline-block; margin-left: 8px; background: var(--amber-soft); color: var(--amber); border-radius: 999px; padding: 1px 8px; font-size: 10.5px; font-weight: 600; }
.pill.info { background: var(--brand-soft); color: var(--brand); }
.role-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--border-strong); color: var(--text-2); }
.role-tag.manager { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }

.welcome-banner {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--brand-line); background: var(--brand-soft);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 20px;
}
.welcome-banner > i { color: var(--brand); font-size: 18px; margin-top: 2px; }
.welcome-banner strong { display: block; font-size: 14px; margin-bottom: 3px; }
.welcome-banner span { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.welcome-banner .link-btn { margin-left: auto; color: var(--muted); font-size: 16px; }

/* Request details */
.back-link { color: var(--brand); font-size: 12.5px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.rule { border: none; border-top: 1px solid var(--border); margin: 12px 0 22px; }
#reqDetail.loading { opacity: .5; }
.req-head { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; flex-wrap: wrap; }
.avatar.lg { width: 76px; height: 76px; font-size: 22px; margin: 0; flex-shrink: 0; }
.avatar.xl { width: 92px; height: 92px; font-size: 26px; margin: 0 auto 8px; }
.who h2 { font-family: var(--heading); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.who p { font-size: 12.5px; margin-top: 4px; color: var(--text-2); }
.req-status { margin-left: auto; text-align: center; }
.req-status p { font-size: 12px; margin-top: 8px; color: var(--muted); }
.badge { display: inline-block; min-width: 120px; padding: 8px 20px; border-radius: 8px; font-weight: 600; font-size: 13px; text-align: center; border: 1px solid; }
.badge.pending { background: var(--amber-soft); color: var(--amber); border-color: rgba(246, 183, 60, .4); }
.badge.approved { background: var(--green-soft); color: var(--green); border-color: rgba(63, 208, 127, .4); }
.badge.rejected { background: var(--red-soft); color: var(--red); border-color: rgba(255, 93, 98, .4); }
.badge.cancelled { background: var(--surface-2); color: var(--muted); border-color: var(--border-strong); }
.req-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.req-card { padding: 16px 20px 14px; }
.req-card h3 { font-family: var(--heading); font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.kv > div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 8px 0; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.kv > div:last-child { border-bottom: none; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 500; overflow-wrap: anywhere; }
.kv dd a { color: var(--brand); }
.kv dd.neg { color: var(--red); }
.req-side { display: flex; flex-direction: column; gap: 16px; }
.req-side .kv > div { grid-template-columns: 1fr auto; }
.req-actions { display: flex; gap: 18px; justify-content: center; margin-top: 30px; }
.req-actions .btn { min-width: 120px; padding: 10px 22px; }
.warn { background: var(--red-soft); color: #ffb3b5; font-size: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 93, 98, .3); text-align: left; }

/* Modals – forms and lists */
.modal textarea.control { min-height: 70px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-grid .field { margin-top: 10px; margin-bottom: 0; }
.modal .error-text { text-align: center; margin-top: 10px; }
.detail-list.on-leave dt small, .detail-list.on-leave dd small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.detail-list.on-leave dt { color: var(--text); font-weight: 500; }
.emp-modal, .emp-form { max-width: 540px; }
.emp-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.emp-top .avatar { width: 58px; height: 58px; margin: 0; font-size: 18px; }
.emp-modal h2 { text-align: left !important; margin-bottom: 2px; }
.emp-top p { font-size: 12px; color: var(--muted); }
.mini-h { font-size: 12px; font-weight: 600; margin: 18px 0 8px; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; }
.mini-bals { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.mini-bal { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); background: var(--surface-2); }
.mini-bal strong { color: var(--brand); font-size: 15px; }
.mini-bal small { color: var(--muted); font-size: 10px; font-weight: 400; }
.mini-req { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; text-decoration: none; }
.mini-req small { display: block; color: var(--muted); font-size: 11px; }
.mini-req:hover { color: var(--brand); }

/* CSV import drop zone */
.drop {
  position: relative; border: 1.5px dashed var(--border-strong); border-radius: 12px;
  padding: 22px; text-align: center; color: var(--text-2); font-size: 12.5px; background: var(--surface-2);
  transition: border-color .15s;
}
.drop:hover { border-color: var(--brand); }
.drop i { display: block; font-size: 24px; color: var(--brand); margin-bottom: 8px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Login details shown after registering someone */
.creds { display: grid; gap: 10px; max-height: 300px; overflow-y: auto; margin-bottom: 12px; }
.cred { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.cred-who strong { display: block; font-size: 13px; }
.cred-who small { color: var(--muted); font-size: 11.5px; }
.cred dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.cred dt { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.cred dd { font-size: 14px; font-weight: 600; color: var(--brand); margin-top: 2px; }

/* CEO profile */
.ceo-profile { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; max-width: 980px; }
.profile-card { padding: 24px 22px 16px; text-align: center; }
.profile-card .link-btn { font-size: 12px; }
.profile-card h2 { font-family: var(--heading); font-size: 18px; font-weight: 600; margin-top: 10px; }
.profile-card .muted { margin-top: 2px; }
.info-list { list-style: none; text-align: left; margin-top: 18px; }
.info-list li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--border); }
.info-list i { width: 22px; font-size: 15px; color: var(--brand); text-align: center; margin-top: 3px; }
.info-list strong { display: block; font-size: 12px; }
.info-list span { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.info-list li:first-child span { color: var(--brand); }
.info-card { padding: 0; overflow: hidden; }
.info-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.info-head h3 { font-size: 13px; font-weight: 600; }
.info-head.sec { border-top: 1px solid var(--border); margin-top: 8px; }
.info-rows > div { display: grid; grid-template-columns: 160px 1fr; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.info-rows dt { font-weight: 500; color: var(--muted); }
.info-card .muted-sm { padding: 12px 16px 16px; }

/* CEO history timeline */
.ceo-history { list-style: none; padding: 0 16px 16px; display: grid; gap: 0; }
.ceo-history li { display: flex; gap: 12px; position: relative; padding: 0 0 14px 2px; }
.ceo-history li:not(:last-child)::after { content: ''; position: absolute; left: 7px; top: 16px; bottom: 0; width: 1px; background: var(--border-strong); }
.ceo-history .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); margin-top: 4px; flex-shrink: 0; }
.ceo-history li.now .dot { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.ceo-history strong { font-size: 13px; }
.ceo-history small { display: block; font-size: 11.5px; color: var(--muted); }
.ceo-history strong + small { display: inline; margin-left: 4px; }

/* Hand-over modal */
.handover { max-width: 560px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.seg label, .opt-list label {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.seg input, .opt-list input { accent-color: var(--brand); margin-top: 3px; }
.seg label.on, .opt-list label.on { border-color: var(--brand); background: var(--brand-soft); }
.opt-list { display: grid; gap: 8px; }
.opt-list strong { display: block; font-size: 12.5px; }
.opt-list small { display: block; color: var(--muted); font-size: 11.5px; }

input[type=date].control::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }

@media (max-width: 1100px) {
  .req-grid { grid-template-columns: 1fr; }
  .ceo-profile { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .field-grid, .seg, .cred dl { grid-template-columns: 1fr; }
  .kv > div, .info-rows > div { grid-template-columns: 1fr; gap: 2px; }
  .req-status { margin-left: 0; text-align: left; }
  .tb-left, .tb-right, .tb-left .search-box, .tb-left .select { width: 100%; }
  .tb-right .btn, .toolbar > .btn { flex: 1; }
}

/* =========================================================
   ADMIN PAGES
   ========================================================= */
.role-tag.admin { border-color: rgba(246, 183, 60, .4); color: var(--amber); background: var(--amber-soft); }
.role-tag.ceo { border-color: rgba(63, 208, 127, .4); color: var(--green); background: var(--green-soft); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; align-items: stretch; }
.admin-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-stack { display: flex; flex-direction: column; gap: 22px; }
.admin-grid .panel, .admin-stack .panel { padding-bottom: 16px; }
.panel-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.panel .select { width: auto; min-width: 110px; }
.panel-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel .wide-select { width: 100%; max-width: 340px; margin: 4px 0 10px; }
.reports { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.att { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); text-decoration: none; line-height: 1.5; }
.att:first-child { border-top: none; }
.att > i:first-child { width: 16px; text-align: center; flex-shrink: 0; }
.att.bad > i:first-child { color: var(--red); }
.att.warn > i:first-child { color: var(--amber); }
.att.info > i:first-child { color: var(--brand); }
.att .go { margin-left: auto; color: var(--muted); font-size: 10px; }
a.att:hover { color: var(--brand); }

.chart-empty { padding: 26px 8px; text-align: center; color: var(--muted); font-size: 12.5px; }
.hbar { display: grid; grid-template-columns: minmax(0, 118px) minmax(0, 1fr) 30px; gap: 10px; align-items: center; padding: 6px 0; font-size: 12px; }
.hb-label { color: var(--text-2); line-height: 1.3; overflow-wrap: anywhere; }
.hb-track { display: block; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.hb-val { text-align: right; color: var(--text); font-weight: 600; }
.cols { display: flex; gap: 12px; height: 170px; padding-top: 6px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: center; }
.col-plot { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; border-bottom: 1px solid var(--border-strong); }
.col-plot span { font-size: 12px; font-weight: 600; color: var(--text); }
.col-plot i { display: block; width: 100%; max-width: 28px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--brand); }
.col small { padding-top: 7px; font-size: 11px; color: var(--muted); }

@media (max-width: 1100px) {
  .admin-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .admin-grid, .admin-grid.three { grid-template-columns: minmax(0, 1fr); }
  .panel-head { flex-wrap: wrap; gap: 8px; }
}
.btn-sm { padding: 7px 14px; font-size: 12.5px; }

/* Billing */
.bil-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.period-chips button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.plan-card { display: flex; flex-direction: column; padding: 20px 22px; }
.plan-card.current { border-color: var(--brand-line); }
.plan-card h3 { font-family: var(--heading); font-size: 17px; font-weight: 600; }
.plan-price { font-family: var(--heading); font-size: 32px; font-weight: 600; color: var(--brand); margin-top: 12px; line-height: 1.1; }
.plan-price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.plan-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: 8px 0 14px; min-height: 52px; }
.plan-card ul { list-style: none; flex: 1; margin-bottom: 16px; }
.plan-card li { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-2); padding: 4px 0; line-height: 1.45; }
.plan-card li i { color: var(--green); font-size: 11px; margin-top: 4px; }
@media (max-width: 1100px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-note { min-height: 0; }
}
@media (max-width: 560px) {
  .bil-stats { grid-template-columns: minmax(0, 1fr); }
}

/* Subscription strip on the approver dashboard */
.plan-strip { display: flex; align-items: center; gap: 14px; padding: 14px 20px; margin-bottom: 26px; }
.plan-strip > i { color: var(--brand); font-size: 18px; }
.plan-strip strong { display: block; font-size: 14px; margin-bottom: 2px; }
.plan-strip span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.plan-strip .btn { margin-left: auto; flex-shrink: 0; }
@media (max-width: 560px) {
  .plan-strip { flex-wrap: wrap; }
  .plan-strip .btn { margin-left: 0; width: 100%; }
}
