:root {
  --bg: #f4f1ea;
  --bg-soft: #ebe6db;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-mute: #8a8a8a;
  --line: #d4cdbe;
  --line-soft: #e2dccf;
  --paper: #fbf9f4;
  --accent: #c8431f;
  --gold: #b8893d;
  --green: #4a6b3a;
  --blue: #355c7d;
  --shadow-sm: 0 1px 2px rgba(26,26,26,.06);
  --shadow: 0 4px 16px rgba(26,26,26,.08);
  --shadow-lg: 0 12px 40px rgba(26,26,26,.12);
  --radius: 4px;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter Tight', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── THIN SCROLLBARS (webkit) ───────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* ── GLOBAL FORM CONTROL RESETS ─────────────────────────────────────── */

/* All <select>: strip browser chrome, add custom chevron arrow */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M1 1L8 8L15 1' stroke='%238a8a8a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  cursor: pointer;
}
select:focus { outline: none; }

/* Date inputs: strip browser chrome, keep calendar trigger but make it subtle */
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  cursor: text;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.4;
  cursor: pointer;
  filter: saturate(0) brightness(0.4);
  padding: 2px 0;
  margin-left: 2px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.75;
}

html, body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
body::before {
  content: ''; position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(200,67,31,.04), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(184,137,61,.05), transparent 50%);
  pointer-events: none; z-index: 0;
}
.app { position: relative; z-index: 1; }

/* HEADER */
header.top {
  border-bottom: 1px solid var(--line); background: var(--paper);
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.brand { display: flex; align-items: baseline; gap: 14px; }
.brand-mark {
  font-family: var(--display); font-weight: 500;
  font-size: 28px; letter-spacing: -0.02em; line-height: 1;
}
.brand-mark em { font-style: italic; color: var(--accent); }
.brand-tag {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-mute);
  border-left: 1px solid var(--line); padding-left: 14px;
}
.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
  background: transparent; border: 1px solid transparent;
  color: var(--ink-soft); padding: 10px 18px;
  font-family: var(--body); font-size: 12px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; border-radius: var(--radius);
  transition: all .15s ease;
}
.nav-tab:hover { color: var(--ink); background: var(--bg-soft); }
.nav-tab.active { background: var(--ink); color: var(--paper); }
.nav-tab.exec-only::after {
  content: '★'; margin-left: 6px; color: var(--gold); font-size: 9px;
}
.nav-tab.active.exec-only::after { color: var(--paper); }

.user-chip {
  display: flex; align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: 100px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.user-chip-link {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 5px;
  text-decoration: none; color: inherit;
  transition: background .15s;
  cursor: pointer;
}
.user-chip-link:hover { background: var(--bg-soft); }
.user-chip .avatar { width: 32px; height: 32px; font-size: 11.5px; margin: 0; flex-shrink: 0; }
.user-chip-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.user-chip-role {
  font-size: 10px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-family: var(--mono);
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-chip-sep {
  width: 1px; background: var(--line); flex-shrink: 0; margin: 6px 0;
}
.logout-btn {
  padding: 0 16px;
  font-family: var(--mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-mute); cursor: pointer;
  background: transparent; border: none;
  transition: color .15s, background .15s;
}
.logout-btn:hover { color: var(--accent); background: rgba(200,67,31,.06); }

/* LAYOUT */
main { padding: 32px; max-width: 1600px; margin: 0 auto; }
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px; margin-bottom: 28px;
  flex-wrap: wrap; gap: 16px;
}
.page-title {
  font-family: var(--display); font-weight: 400;
  font-size: 32px; line-height: 1; letter-spacing: -0.025em;
}
.page-title em { font-style: italic; color: var(--accent); }
.page-sub {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.16em; margin-top: 6px;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; font-family: var(--body);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer; border-radius: var(--radius);
  transition: all .15s ease; text-decoration: none;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.danger { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.danger:hover { background: var(--accent); color: var(--paper); }
.btn.sm { padding: 7px 12px; font-size: 10.5px; }
.btn.lg { padding: 14px 28px; font-size: 13px; width: 100%; justify-content: center; }

/* AVATAR */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-family: var(--display); font-weight: 500; font-size: 13px;
  color: var(--paper); margin-right: 10px; vertical-align: middle;
}
.emp-cell { display: flex; align-items: center; }
.you-tag {
  display: inline-block; padding: 1px 7px;
  background: var(--accent); color: var(--paper);
  border-radius: 100px;
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-left: 6px; vertical-align: middle; font-weight: 600;
}

/* PANELS & TABLES */
.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.panel-head {
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-soft);
}
.panel-title {
  font-family: var(--display); font-size: 20px; font-weight: 500;
  letter-spacing: -0.01em;
}
.panel-body { padding: 20px 22px; }
table.data {
  width: 100%; border-collapse: collapse;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
table.data th {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-mute); text-align: left; padding: 14px 18px;
  background: var(--bg-soft); border-bottom: 1px solid var(--line);
  font-weight: 500;
}
table.data td {
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
  font-size: 13px; vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #fcf9f0; }

/* BADGES */
.badge {
  padding: 3px 9px; border-radius: 100px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--paper);
}

/* Role badges (Twitter-style hierarchy indicators) */
.badge-admin {
  display: inline-block; padding: 1px 7px; margin-left: 5px;
  background: #b8893d; color: var(--paper);
  border-radius: 100px; font-family: var(--mono);
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  vertical-align: middle;
}
.badge-manager {
  display: inline-block; padding: 1px 7px; margin-left: 5px;
  background: #b04040; color: var(--paper);
  border-radius: 100px; font-family: var(--mono);
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  vertical-align: middle;
}
.badge-employee {
  display: inline-block; padding: 1px 7px; margin-left: 5px;
  background: #355c7d; color: var(--paper);
  border-radius: 100px; font-family: var(--mono);
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  vertical-align: middle;
}
.tag-mono {
  font-family: var(--mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-mute); margin-top: 3px;
}

/* ACTIVITY GRID (my days — away today + coming up side by side) */
.activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 24px;
}
@media (max-width: 860px) {
  .activity-grid { grid-template-columns: 1fr; }
}
.away-list { padding: 0; max-height: 320px; overflow-y: auto; }
.away-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 18px; border-bottom: 1px solid var(--line-soft);
  gap: 10px; transition: background .1s;
}
.away-row:last-child { border-bottom: none; }
.away-row:hover { background: #faf7f0; }
.away-empty {
  padding: 36px 20px; text-align: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.12em;
}

/* MY DAYS */
.my-days {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
  margin-bottom: 24px; position: relative; overflow: hidden;
}
.my-days::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
}
.my-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px; align-items: end;
}
.my-stat { border-right: 1px solid var(--line-soft); padding-right: 24px; }
.my-stat:last-child { border-right: none; }
.my-stat-lbl {
  font-family: var(--mono); font-size: 10px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 6px;
}
.my-stat-val {
  font-family: var(--display); font-size: 32px; font-weight: 400;
  line-height: 1; letter-spacing: -0.02em;
}
.my-stat-val em { font-style: italic; color: var(--accent); font-weight: 300; }
.my-stat-meta {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--ink-soft); margin-top: 6px;
}

/* CALENDAR */
.cal-wrap {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.cal-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  background: var(--bg-soft); flex-wrap: wrap; gap: 12px;
}
.cal-month {
  font-family: var(--display); font-weight: 400;
  font-size: 28px; letter-spacing: -0.02em;
}
.cal-month em { font-style: italic; color: var(--accent); font-weight: 300; }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.cal-nav a, .cal-nav button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer;
  font-family: var(--display); font-size: 18px; color: var(--ink);
  border-radius: var(--radius); transition: all .15s;
}
.cal-nav a:hover, .cal-nav button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cal-nav .today-btn {
  width: auto; padding: 0 14px;
  font-family: var(--body); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cal-filters {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
  background: var(--paper); flex-wrap: wrap;
}
.filter-label {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-mute); margin-right: 4px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--line);
  border-radius: 100px; background: var(--paper);
  font-size: 11.5px; font-weight: 500; cursor: pointer;
  transition: all .15s; user-select: none;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow {
  padding: 12px 10px;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line-soft);
  background: var(--bg-soft); text-align: left;
}
.cal-dow:last-child { border-right: none; }
.cal-day {
  min-height: 120px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 8px; background: var(--paper);
  position: relative; transition: background .15s;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day.other { background: var(--bg-soft); }
.cal-day.other .cal-num { color: var(--ink-mute); }
.cal-day.weekend { background: linear-gradient(180deg, var(--paper) 0%, #f6f2e9 100%); }
.cal-day.today { background: #fff8ec; box-shadow: inset 0 0 0 2px var(--accent); }
.cal-num {
  font-family: var(--display); font-size: 16px; font-weight: 500;
  line-height: 1; margin-bottom: 6px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.cal-num .count {
  font-family: var(--mono); font-size: 9.5px; color: var(--ink-mute);
  background: var(--bg-soft); padding: 2px 6px;
  border-radius: 100px; font-weight: 500;
}
.cal-num .count.wfh-count {
  background: transparent; border: 1px dashed var(--line); color: var(--ink-soft);
}
.leave-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 7px; margin-bottom: 3px;
  background: var(--bg-soft); border-left: 3px solid var(--ink);
  border-radius: 2px; font-size: 10.5px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.3;
}
.leave-pill .pill-name { font-weight: 600; }
.leave-pill .pill-type { color: var(--ink-mute); font-size: 9.5px; }
.leave-pill.wfh {
  background: transparent;
  border-left-style: dashed; border-left-width: 2px;
  color: var(--ink-soft); font-style: italic;
}
.leave-pill.wfh .pill-name { font-weight: 500; }
.leave-pill.wfh::before {
  content: '⌂'; font-style: normal; font-size: 10px; margin-right: 1px;
}
.leave-pill.mine { box-shadow: inset 0 0 0 1px rgba(200,67,31,.4); }
.leave-more {
  font-family: var(--mono); font-size: 9.5px;
  color: var(--ink-mute); padding: 2px 7px; margin-top: 2px;
}

/* DASHBOARD STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
  position: relative; overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ink);
}
.stat.accent::before { background: var(--accent); }
.stat.gold::before { background: var(--gold); }
.stat.green::before { background: var(--green); }
.stat.blue::before { background: var(--blue); }
.stat-label {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-mute); margin-bottom: 8px;
}
.stat-val {
  font-family: var(--display); font-size: 44px; font-weight: 400;
  line-height: 1; letter-spacing: -0.02em;
}
.stat-meta {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--ink-soft); margin-top: 8px;
}
.dash-grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 20px; margin-bottom: 20px;
}
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }

.dept-row {
  display: grid; grid-template-columns: 140px 1fr 60px;
  align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.dept-row:last-child { border-bottom: none; }
.dept-name { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.dept-bar {
  height: 8px; background: var(--bg-soft);
  border-radius: 100px; overflow: hidden; position: relative;
}
.dept-bar-fill { height: 100%; transition: width .4s ease; }
.dept-count {
  font-family: var(--mono); font-size: 12px;
  text-align: right; color: var(--ink-soft); font-weight: 500;
}

.upcoming-row {
  display: grid; grid-template-columns: 60px 1fr auto;
  gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.upcoming-row:last-child { border-bottom: none; }
.up-date { font-family: var(--display); text-align: center; }
.up-date .day { font-size: 22px; font-weight: 500; line-height: 1; }
.up-date .mo {
  font-family: var(--mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-mute); margin-top: 2px;
}
.up-info { display: flex; flex-direction: column; gap: 2px; }
.up-name { font-weight: 600; font-size: 13px; }
.up-meta { font-size: 11.5px; color: var(--ink-mute); }

/* FORMS */
.form-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); max-width: 580px;
  margin: 0 auto; padding: 32px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-mute); margin-bottom: 6px; font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); background: var(--paper);
  font-family: var(--body); font-size: 14px; color: var(--ink);
  border-radius: var(--radius); transition: border-color .15s;
}
.field select { padding-right: 34px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink);
}
.field textarea { resize: vertical; min-height: 70px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-help {
  font-size: 11px; color: var(--ink-mute);
  margin-top: 4px; font-style: italic;
}
.approver-rec-hint {
  font-style: normal; color: var(--ink-soft);
  background: rgba(184,137,61,.07); border: 1px solid rgba(184,137,61,.2);
  border-radius: 6px; padding: 6px 10px; display: flex; align-items: center; gap: 6px;
}
.rec-star { color: var(--gold); font-size: 12px; flex-shrink: 0; }
.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

/* REJECT MODAL */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  padding: 20px;
}
.modal-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: min(460px, 100%);
  box-shadow: 0 12px 48px rgba(0,0,0,.18);
  overflow: hidden;
}
.modal-bar { height: 4px; background: var(--accent); }
.modal-inner { padding: 28px 28px 24px; }
.modal-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.modal-sub   { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; line-height: 1.55; }
.modal-inner textarea {
  width: 100%; min-height: 90px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; font-family: inherit; font-size: 13.5px;
  color: var(--ink); background: #fff; resize: vertical;
  margin-bottom: 16px;
}
.modal-inner textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* YEAR STRIP */
.year-strip {
  display: flex; align-items: center; gap: 16px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.year-strip-label {
  font-size: 11px; font-weight: 600; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: .12em; white-space: nowrap;
}
.year-strip-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.year-pill {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 4px; padding: 5px 10px;
}
.year-pill-type { font-size: 12px; color: var(--ink-soft); }
.year-pill-days { font-size: 12px; font-weight: 700; font-family: var(--mono); }

/* PROFILE PAGE */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  .profile-layout { grid-template-columns: 1fr; }
}
.profile-hero {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 24px 24px 0;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
  flex-shrink: 0; letter-spacing: .04em;
}
.profile-hero-info { flex: 1; min-width: 0; }
.profile-name {
  font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.2;
}
.profile-role {
  font-size: 13px; color: var(--ink-soft); margin-top: 3px;
}
.profile-info-grid { padding: 20px 24px 8px; }
.profile-info-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-label {
  font-size: 12px; color: var(--ink-mute); width: 110px; flex-shrink: 0;
  padding-top: 1px;
}
.profile-info-val { font-size: 13px; color: var(--ink); font-weight: 500; flex: 1; }
.profile-stat-row {
  display: flex; gap: 0;
  border-top: 1px solid var(--line-soft); padding: 4px 0;
}
.profile-stat {
  flex: 1; text-align: center; padding: 16px 8px;
  border-right: 1px solid var(--line-soft);
}
.profile-stat:last-child { border-right: none; }
.profile-stat-val { font-size: 26px; font-weight: 700; color: var(--ink); font-family: var(--mono); }
.profile-stat-lbl { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.profile-breakdown { padding: 4px 0 8px; }
.profile-breakdown-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft);
}
.profile-breakdown-row:last-child { border-bottom: none; }
.profile-bar-track {
  width: 80px; height: 6px; background: var(--bg-soft);
  border-radius: 3px; overflow: hidden;
}
.profile-bar-fill { height: 100%; border-radius: 3px; transition: width .3s; }

/* LOGIN */
.login-bg {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-bg::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(200,67,31,.08), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(184,137,61,.1), transparent 60%);
  pointer-events: none;
}
.login-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); width: min(440px, 100%);
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.login-head {
  padding: 36px 36px 24px; border-bottom: 1px solid var(--line-soft);
  text-align: center;
}
.login-mark {
  font-family: var(--display); font-weight: 400;
  font-size: 36px; letter-spacing: -0.025em; line-height: 1;
}
.login-mark em { font-style: italic; color: var(--accent); }
.login-tag {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-mute); margin-top: 12px;
}
.login-body { padding: 28px 36px 32px; }
.login-error {
  background: rgba(200,67,31,.08); color: var(--accent);
  padding: 11px 14px; border-radius: var(--radius);
  font-size: 12.5px; margin-bottom: 18px;
  border: 1px solid rgba(200,67,31,.2);
}
.login-foot {
  padding: 16px 36px;
  background: var(--bg-soft); border-top: 1px solid var(--line-soft);
  text-align: center;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.link-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 10px; color: var(--ink-mute);
  text-decoration: underline; text-transform: uppercase; letter-spacing: 0.14em;
  padding: 0;
}
.link-btn:hover { color: var(--accent); }

/* Microsoft SSO button */
.btn-microsoft {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 13px 20px;
  background: #fff; border: 1.5px solid #d4d4d4; border-radius: var(--radius);
  font-family: var(--body); font-size: 14px; font-weight: 600;
  color: #1a1a1a; cursor: pointer; text-decoration: none;
  transition: all .15s ease;
  box-shadow: var(--shadow-sm);
}
.btn-microsoft:hover { border-color: #0078d4; box-shadow: 0 0 0 3px rgba(0,120,212,.1); }
.ms-logo { width: 21px; height: 21px; flex-shrink: 0; }

/* Pending setup page */
.pending-body { text-align: center; padding: 32px 36px; }
.pending-icon { font-size: 40px; margin-bottom: 16px; }
.pending-title {
  font-family: var(--display); font-size: 26px; font-weight: 400;
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.pending-text {
  font-size: 14px; color: var(--ink-soft); line-height: 1.7;
  margin-bottom: 16px;
}
.field-optional { font-size: 11px; color: var(--ink-mute); font-weight: 400; }

/* Self-service setup form (inside login-card) */
.setup-card { max-width: 460px; }
.setup-form { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.setup-form .field { margin-bottom: 0; }
.setup-submit-btn { width: 100%; margin-top: 4px; }

/* Onboard / quick-assign inline forms in employees page */
.onboard-form {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.onboard-select {
  padding: 6px 28px 6px 10px; font-size: 12px;
  background-color: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink);
  font-family: var(--body);
}
.nodept-banner {
  background: rgba(53,92,125,.06); border-color: rgba(53,92,125,.22);
}

/* FORM SECTIONS */
.form-section-label {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-mute);
  padding-bottom: 10px; margin-top: 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line-soft);
}
.toggle-group { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.toggle-option {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 13px; color: var(--ink-soft);
}
.toggle-option input[type="radio"] { accent-color: var(--accent); }


/* PENDING SETUP BANNER */
.pending-banner {
  background: rgba(184,137,61,.07); border: 1px solid rgba(184,137,61,.25);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 20px;
}
.pending-banner-head {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px;
}
.pending-banner-icon { font-size: 22px; line-height: 1; }
.pending-banner-title { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.pending-banner-sub { font-size: 12px; color: var(--ink-soft); }
.pending-list { display: flex; flex-direction: column; gap: 8px; }
.pending-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 10px 14px;
}

/* SEARCH BOX */
.search-box {
  display: flex; align-items: center;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0 12px; width: 280px;
}
.search-box input {
  border: none; outline: none; padding: 9px 8px;
  font-family: var(--body); font-size: 13px;
  background: transparent; width: 100%;
}
.emp-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}

/* EMPTY STATES */
.empty {
  text-align: center; padding: 60px 20px; color: var(--ink-mute);
}
.empty-title {
  font-family: var(--display); font-size: 24px; font-weight: 400;
  color: var(--ink); margin-bottom: 6px;
}
.empty-sub {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.14em;
}

/* FOOTER */
footer.app-foot {
  text-align: center; padding: 24px 32px 36px;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.18em;
}
footer.app-foot .dot { color: var(--accent); }

/* INLINE FORM */
.inline-form { display: inline; margin: 0; padding: 0; }

/* NAV BADGE (pending count) */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--paper);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 100px; margin-left: 5px;
  vertical-align: middle; line-height: 1;
}
.nav-tab.active .nav-badge { background: var(--paper); color: var(--accent); }

/* AVATAR SIZE VARIANTS */
.avatar.sm { width: 26px; height: 26px; font-size: 10px; margin-right: 0; }
.avatar.xs { width: 22px; height: 22px; font-size: 9px;  margin-right: 0; flex-shrink: 0; }

/* INFO / WARNING BANNERS */
.info-banner {
  background: rgba(184,137,61,.08); border: 1px solid rgba(184,137,61,.28);
  border-radius: var(--radius); padding: 12px 18px;
  margin-bottom: 20px; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}

/* DEPARTMENT MANAGER — TWO-COLUMN LAYOUT */
main.dept-main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0; align-items: start;
  padding: 0; max-width: 100%;
}

/* Left sidebar */
.dept-sidebar {
  background: var(--paper); border-right: 1px solid var(--line);
  min-height: calc(100vh - 65px);
  position: sticky; top: 65px;
  max-height: calc(100vh - 65px);
  overflow-y: auto; display: flex; flex-direction: column;
}
.dept-sidebar-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-mute);
  position: sticky; top: 0; z-index: 2;
}
.sidebar-count {
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 100px;
}
.dept-sidebar-body { flex: 1; }
.sidebar-all-good {
  padding: 40px 20px; text-align: center;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.12em;
}
.sidebar-emp-card {
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 9px;
  transition: background .1s;
}
.sidebar-emp-card:hover { background: #faf7f0; }
.sidebar-emp-card:last-child { border-bottom: none; }
.assign-select-form { display: flex; width: 100%; }
.assign-select {
  width: 100%; padding: 7px 28px 7px 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); font-family: var(--body); font-size: 12px;
  color: var(--ink); cursor: pointer; transition: border-color .15s;
}
.assign-select:hover { border-color: var(--ink); }
.assign-select:focus { outline: none; border-color: var(--accent); }

/* Right column */
.dept-right-col {
  padding: 28px 32px;
  min-height: calc(100vh - 65px);
}
.dept-right-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px; margin-bottom: 24px;
  flex-wrap: wrap; gap: 16px;
}

/* DEPT SIDEBAR — search bar */
.dept-sidebar-search {
  padding: 10px 14px; border-bottom: 1px solid var(--line-soft);
  background: var(--paper); position: sticky; top: 48px; z-index: 1;
}
.dept-sidebar-search .search-wrap { position: relative; }
.dept-sidebar-search .search-wrap::before {
  content: '⌕'; position: absolute; left: 9px; top: 50%;
  transform: translateY(-50%); font-size: 15px; color: var(--ink-mute);
  pointer-events: none;
}
.dept-sidebar-search input {
  width: 100%; padding: 7px 10px 7px 28px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); font-family: var(--body);
  font-size: 12px; color: var(--ink); transition: border-color .15s;
}
.dept-sidebar-search input:focus { outline: none; border-color: var(--ink); }

/* DEPT CARDS — square grid */
.dept-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.dept-card-sq {
  height: 300px; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow .15s;
}
.dept-card-sq:hover { box-shadow: var(--shadow); }
.dept-card-sq-head {
  flex-shrink: 0;
  border-top: 4px solid #888; /* color overridden inline */
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 11px 13px 10px; background: var(--bg-soft);
  border-bottom: 1px solid var(--line); gap: 8px;
}
.dept-card-name {
  font-family: var(--display); font-size: 17px; font-weight: 500;
  letter-spacing: -0.01em; line-height: 1.1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dept-card-count {
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-mute); margin-top: 3px;
}
.dept-card-sq-actions { display: flex; gap: 4px; flex-shrink: 0; }
.dept-icon-btn {
  width: 24px; height: 24px; border-radius: var(--radius);
  border: 1px solid var(--line); background: transparent;
  font-size: 11px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s; color: var(--ink-mute); text-decoration: none;
}
.dept-icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.dept-icon-btn.danger:hover { border-color: var(--accent); color: var(--accent); }

/* Scrollable member list */
.dept-card-members {
  flex: 1; overflow-y: auto; padding: 0;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.dept-card-members::-webkit-scrollbar { width: 3px; }
.dept-card-members::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.dept-card-empty-inner {
  padding: 24px 12px; text-align: center;
  font-size: 11px; color: var(--ink-mute); font-style: italic;
}
.dept-member-row-compact {
  display: flex; align-items: center;
  padding: 7px 10px; gap: 6px;
  border-bottom: 1px solid var(--line-soft); transition: background .1s;
}
.dept-member-row-compact:last-of-type { border-bottom: none; }
.dept-member-row-compact:hover { background: #faf7f0; }
.dept-member-name {
  font-weight: 600; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dept-member-sub {
  font-size: 10px; color: var(--ink-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.move-select-compact {
  padding: 3px 20px 3px 6px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); font-size: 10px; color: var(--ink-soft);
  cursor: pointer; max-width: 80px; flex-shrink: 0;
  background-position: right 5px center;
  background-size: 8px 5px;
}
.move-select-compact:hover { border-color: var(--ink); }
.remove-btn-compact {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--line); background: transparent;
  font-size: 13px; color: var(--ink-mute); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; line-height: 1; padding: 0;
}
.remove-btn-compact:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

/* Pinned bottom quick-assign */
.dept-card-assign {
  flex-shrink: 0; border-top: 1px solid var(--line-soft);
  padding: 7px 10px; background: var(--bg-soft);
}
.dept-card-assign select {
  width: 100%; padding: 6px 26px 6px 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); font-size: 11px; font-family: var(--body);
  color: var(--ink-soft); cursor: pointer; transition: border-color .15s;
}
.dept-card-assign select:hover { border-color: var(--ink); }

/* RESPONSIVE */
@media (max-width: 900px) {
  main.dept-main-layout {
    grid-template-columns: 1fr;
  }
  .dept-sidebar {
    position: static; max-height: 300px; border-right: none;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 720px) {
  main { padding: 20px 16px; }
  header.top { padding: 14px 18px; }
  .page-title { font-size: 32px; }
  .cal-day { min-height: 80px; padding: 5px; }
  .cal-num { font-size: 13px; }
  .leave-pill { font-size: 9px; padding: 2px 5px; }
  .leave-pill .pill-type { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .dept-row { grid-template-columns: 100px 1fr 50px; }
  .user-chip-info { display: none; }
  .dept-right-col { padding: 20px 16px; }
}

/* ── LEAVE DETAIL PAGE ───────────────────────────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
.detail-main { display: flex; flex-direction: column; }
.detail-info-grid { padding: 0 20px 16px; display: flex; flex-direction: column; gap: 0; }
.detail-info-row {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.detail-info-row:last-child { border-bottom: none; }
.detail-info-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-mute); padding-top: 2px;
}
.detail-info-val { font-size: 13px; color: var(--ink); }

/* Approval chain */
.approval-chain { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 0; }
.chain-step { display: flex; gap: 14px; padding: 14px 0; position: relative; }
.chain-step:not(:last-child)::after {
  content: ''; position: absolute; left: 7px; top: 34px;
  width: 2px; bottom: 0; background: var(--line);
}
.chain-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  margin-top: 3px; border: 2px solid transparent;
}
.chain-dot-blue  { background: var(--blue);   border-color: var(--blue); }
.chain-dot-green { background: var(--green);  border-color: var(--green); }
.chain-dot-red   { background: var(--accent); border-color: var(--accent); }
.chain-dot-grey  { background: var(--line);   border-color: var(--ink-mute); }
.chain-body { flex: 1; }
.chain-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--ink-mute); margin-bottom: 6px;
}
.chain-person { display: flex; align-items: center; gap: 8px; }
.chain-override-note {
  margin-top: 8px; padding: 7px 10px;
  background: rgba(184,137,61,.1); border: 1px solid rgba(184,137,61,.3);
  border-radius: var(--radius); font-size: 12px; color: var(--gold);
}

/* Audit timeline */
.audit-timeline {
  padding: 4px 16px 16px;
  display: flex; flex-direction: column; gap: 0;
}
.audit-entry { display: flex; gap: 12px; padding: 12px 0; position: relative; }
.audit-entry:not(:last-child)::after {
  content: ''; position: absolute; left: 7px; top: 28px;
  width: 2px; bottom: 0; background: var(--line-soft);
}
.audit-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  margin-top: 2px;
}
.audit-dot-green { background: var(--green); }
.audit-dot-red   { background: var(--accent); }
.audit-dot-blue  { background: var(--blue); }
.audit-dot-grey  { background: var(--line); border: 2px solid var(--ink-mute); }
.audit-content { flex: 1; min-width: 0; }
.audit-action {
  font-size: 13px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.audit-by { font-weight: 400; color: var(--ink-soft); }
.audit-note {
  margin-top: 4px; font-size: 11px; color: var(--ink-soft);
  font-style: italic; line-height: 1.5;
}
.audit-time {
  margin-top: 3px; font-size: 10px; color: var(--ink-mute);
  font-family: var(--mono);
}
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
}

/* ── REPORTS PAGE ────────────────────────────────────────────────────────── */
.report-filter-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.report-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.report-filter-actions {
  display: flex; align-items: center; gap: 8px;
}
.report-preview-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.report-count {
  font-family: var(--mono); font-size: 22px; font-weight: 600;
  color: var(--ink); margin-right: 6px;
}
.report-hint {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 60px 20px; text-align: center;
  color: var(--ink-mute);
}
.report-hint-icon { font-size: 36px; }
.report-hint-text { font-size: 14px; max-width: 380px; line-height: 1.6; }
@media (max-width: 860px) {
  .report-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .report-filters { grid-template-columns: 1fr; }
}

/* ── CC CHIP WIDGET ──────────────────────────────────────────────────────── */
.cc-wrap {
  position: relative;
}
.cc-chip-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: text;
  transition: border-color .15s;
}
.cc-chip-box:focus-within {
  border-color: var(--ink-soft);
  outline: none;
}
.cc-search-input {
  flex: 1;
  min-width: 160px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: var(--body);
  color: var(--ink);
  padding: 2px 0;
  outline: none;
}
.cc-search-input::placeholder { color: var(--ink-mute); }

/* chips */
.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 8px 3px 4px;
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
}
.cc-chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.cc-chip-name { font-weight: 500; }
.cc-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-mute);
  font-size: 15px;
  line-height: 1;
  padding: 0 1px;
  display: flex;
  align-items: center;
}
.cc-chip-remove:hover { color: var(--accent); }

/* dropdown */
.cc-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
}
.cc-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background .1s;
}
.cc-option:hover { background: var(--bg-soft); }
.cc-option-sel { background: var(--bg-soft); }
.cc-opt-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.cc-opt-info { flex: 1; min-width: 0; }
.cc-opt-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-opt-dept { font-weight: 400; color: var(--ink-mute); }
.cc-opt-email { font-size: 11px; color: var(--ink-mute); margin-top: 1px; }
.cc-opt-check {
  font-size: 13px;
  color: var(--green);
  font-weight: 700;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.cc-no-result {
  padding: 14px 12px;
  font-size: 13px;
  color: var(--ink-mute);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL ENHANCEMENTS — focus, interactions, polish, responsiveness
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Better focus states: use accent red instead of plain dark border ─── */
.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box input:focus,
.cc-chip-box:focus-within,
.dept-sidebar-search input:focus,
.assign-select:focus,
.onboard-select:focus {
  border-color: var(--accent) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(200,67,31,.10);
}

/* ── Button micro-interactions ──────────────────────────────────────── */
.btn:active       { transform: scale(.97); }
.btn.ghost:active { transform: scale(.97); }
.btn.danger:active{ transform: scale(.97); }
.nav-tab:active   { transform: scale(.96); }

/* ── Table zebra rows ───────────────────────────────────────────────── */
table.data tbody tr:nth-child(even) td { background: rgba(26,26,26,.018); }
table.data tbody tr:hover td           { background: #fcf9f0 !important; }

/* ── Input placeholder colour ───────────────────────────────────────── */
::placeholder { color: var(--ink-mute); opacity: .7; }

/* ── Avatar fallback colour (slate, not grey) ───────────────────────── */
.avatar { background: #475569; }

/* ── Panel title italic accent ──────────────────────────────────────── */
.panel-title em { font-style: italic; color: var(--accent); }

/* ── Scrollable table wrapper (shared) ──────────────────────────────── */
.table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 300px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.table-scroll table.data {
  border: none;
  border-radius: 0;
  min-width: 640px;
}
.table-scroll thead { position: sticky; top: 0; z-index: 2; background: var(--paper); }

/* ── Info banner with left accent bar ───────────────────────────────── */
.info-banner { border-left: 3px solid var(--gold); }

/* ── Page transitions (smooth page render) ──────────────────────────── */
main { animation: fadeUp .18s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Improved nav tab active indicator ─────────────────────────────── */
.nav-tab.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 2px 8px rgba(26,26,26,.14);
}

/* ── Stat card hover ────────────────────────────────────────────────── */
.stat { transition: box-shadow .15s, transform .15s; }
.stat:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

/* ── Panel hover ────────────────────────────────────────────────────── */
.panel { transition: box-shadow .15s; }

/* ── Dept card hover shadow ─────────────────────────────────────────── */
.dept-card-sq { transition: box-shadow .15s, transform .15s; }
.dept-card-sq:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

/* ── My-stat hover ──────────────────────────────────────────────────── */
.my-stat { transition: opacity .1s; }

/* ── Badge colour corrections (slate for employee, not blue) ────────── */
.badge-employee { background: #475569; }

/* ── Search box: expand on focus ────────────────────────────────────── */
.search-box { transition: box-shadow .15s; }
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,67,31,.10);
}

/* ── Sidebar emp card: subtler hover ────────────────────────────────── */
.sidebar-emp-card:hover { background: var(--bg-soft); }

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════════════════════════════════════════ */

/* ── Tablet: ≤ 1024px ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  main { padding: 28px 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .my-days-grid { grid-template-columns: repeat(2, 1fr); }
  .form-card { max-width: 100%; }
  .report-filters { grid-template-columns: 1fr 1fr; }
}

/* ── Small tablet / large phone: ≤ 768px ───────────────────────────── */
@media (max-width: 768px) {
  header.top { padding: 12px 16px; gap: 10px; }
  .brand-mark { font-size: 22px; }
  .brand-tag  { display: none; }
  .nav-tabs   { gap: 2px; flex-wrap: wrap; }
  .nav-tab    { padding: 8px 12px; font-size: 11px; }

  main { padding: 20px 16px; }
  .page-title { font-size: 26px; }
  .page-head  { padding-bottom: 16px; margin-bottom: 20px; }

  .activity-grid        { grid-template-columns: 1fr; }
  .my-days-grid         { grid-template-columns: repeat(2, 1fr); }
  .stats-grid           { grid-template-columns: repeat(2, 1fr); }
  .dash-grid            { grid-template-columns: 1fr; }
  .detail-layout        { grid-template-columns: 1fr; }
  .profile-layout       { grid-template-columns: 1fr; }
  .field-row            { grid-template-columns: 1fr; }
  .report-filters       { grid-template-columns: 1fr; }
  .report-filter-actions{ flex-wrap: wrap; }

  .form-card   { padding: 20px; }
  .panel-head  { padding: 12px 16px; }
  .panel-body  { padding: 16px; }

  .stat { padding: 16px 18px; }
  .stat-val { font-size: 36px; }
}

/* ── Phone: ≤ 480px ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  header.top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav-tabs  { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .nav-tab   { white-space: nowrap; padding: 7px 10px; font-size: 10.5px; }

  main { padding: 16px 12px; }
  .page-title  { font-size: 22px; }
  .page-head   { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-head > div:last-child { width: 100%; display: flex; gap: 8px; }

  .my-days-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .my-stat-val  { font-size: 26px; }

  .form-card    { padding: 16px; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; justify-content: center; }

  .dept-cards-grid { grid-template-columns: 1fr; }
  .dept-card-sq    { height: auto; min-height: 250px; }

  .modal-box    { width: 100%; border-radius: 12px 12px 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  table.data th, table.data td { padding: 10px 12px; }
  .cal-day { min-height: 60px; padding: 4px; }
}
