/* =========================================================
   FIELDSTONE HR — Design tokens
   Ink navy + warm copper. Serif brand mark, clean sans UI,
   mono for data/IDs (fits an HR/records product).
========================================================= */
:root{
  --ink: #161B22;
  --ink-soft: #232B36;
  --ink-line: #313B48;
  --paper: #F7F5F0;
  --paper-raised: #FFFFFF;
  --paper-line: #E4DFD2;
  --copper: #C1642F;
  --copper-dark: #9E4E22;
  --moss: #52664F;
  --text: #23241E;
  --text-muted: #6B6D62;
  --text-inverse: #F3F1EA;
  --text-inverse-muted: #A9B0BC;
  --danger: #B4402A;
  --success: #3E6B4C;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(22,27,34,0.06);
  --shadow-md: 0 8px 24px rgba(22,27,34,0.10);
  --shadow-lg: 0 24px 60px rgba(22,27,34,0.22);

  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3{ font-family: var(--font-display); margin:0; }
p{ margin:0; }
ul{ margin:0; padding:0; list-style:none; }
a{ color: inherit; }
button{ font-family: inherit; }

.muted{ color: var(--text-muted); }
.eyebrow{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper-dark);
  margin-bottom: 10px;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible{
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

/* Views (this file will grow to host dashboard/employees/etc panels) */
.view{ display:none; min-height:100vh; }
.view--active{ display:block; }

/* =========================================================
   LOGIN LAYOUT
========================================================= */
.login{
  min-height:100vh;
  display:grid;
  grid-template-columns: minmax(360px, 42%) 1fr;
}

/* ---- Brand panel ---- */
.login__brand{
  position:relative;
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(193,100,47,0.16), transparent 60%),
    var(--ink);
  color: var(--text-inverse);
  padding: 48px 56px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
}
.login__brand-inner{ display:flex; flex-direction:column; gap:34px; max-width: 420px; position:relative; z-index:2; }

.brand{ display:flex; align-items:center; gap:12px; }
.brand__mark{ color: var(--copper); display:flex; }
.brand__name{
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.brand__name em{ font-style: normal; color: var(--copper); }

.login__tagline{
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height:1.3;
  font-weight:400;
  color: var(--text-inverse);
}

.login__points{ display:flex; flex-direction:column; gap:14px; }
.login__points li{
  display:flex; align-items:baseline; gap:12px;
  font-size:14.5px; color: var(--text-inverse-muted);
}
.login__points li span{
  font-family: var(--font-mono);
  font-size:12px;
  color: var(--copper);
  min-width: 20px;
}

.login__quote{
  border-top: 1px solid var(--ink-line);
  padding-top:18px;
  margin-top:4px;
}
.login__quote p{
  font-family: var(--font-display);
  font-style: italic;
  font-size:15px;
  color: var(--text-inverse);
  line-height:1.5;
}
.login__quote span{
  display:block;
  margin-top:8px;
  font-size:12.5px;
  color: var(--text-inverse-muted);
}

/* Decorative ID badge, signature element */
.login__badge-deco{
  position:absolute;
  right: -60px;
  bottom: -60px;
  z-index:1;
  transform: rotate(-8deg);
  opacity: 0.9;
}
.idcard{
  width: 200px;
  height: 260px;
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
  position:relative;
}
.idcard__strip{
  height: 10px;
  border-radius: 4px;
  background: var(--copper);
  margin-bottom: 22px;
  width: 60%;
}
.idcard__row{
  height: 10px;
  border-radius: 4px;
  background: var(--ink-line);
  margin-bottom: 10px;
}
.idcard__row--photo{
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--copper), var(--copper-dark));
  margin-bottom: 18px;
}
.idcard__row--short{ width: 45%; }
.idcard__punch{
  position:absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 12px;
  background: var(--paper);
  border-radius: 0 0 8px 8px;
}

/* ---- Form panel ---- */
.login__form-panel{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding: 48px clamp(28px, 6vw, 96px);
  background: var(--paper);
}
.login__form-wrap{ width:100%; max-width: 400px; margin: 0 auto; }

.login__form-head{ margin-bottom: 28px; }
.login__form-head h1{
  font-size: clamp(28px, 3.4vw, 34px);
  font-weight: 500;
  margin: 2px 0 8px;
}
.login__form-head p{ font-size: 14.5px; }

/* Role switch (demo aid) */
.role-switch{
  display:flex;
  gap:4px;
  padding: 4px;
  background: var(--paper-line);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.role-switch__btn{
  flex:1;
  border:none;
  background:transparent;
  padding: 9px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 7px;
  cursor:pointer;
  transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.role-switch__btn.is-active{
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Fields */
.field{ margin-bottom: 18px; }
.field--row{ display:flex; align-items:center; margin-top: 4px; }
.field label{
  display:block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.field__label-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; }
.field__label-row label{ margin-bottom:0; }

.link-small{ font-size: 12.5px; color: var(--copper-dark); text-decoration: none; font-weight:600; }
.link-small:hover{ text-decoration: underline; }

.field__control{
  position:relative;
  display:flex;
  align-items:center;
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-sm);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field__control:focus-within{
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(193,100,47,0.14);
}
.field__icon{ color: var(--text-muted); margin-left: 12px; flex-shrink:0; }
.field__control input{
  width:100%;
  border:none;
  background:transparent;
  outline:none;
  padding: 12px 12px;
  font-size: 14.5px;
  font-family: var(--font-body);
  color: var(--text);
}
.field__control input::placeholder{ color: #B7B29F; }
.field__toggle{
  border:none; background:transparent; cursor:pointer;
  color: var(--text-muted);
  padding: 8px 10px;
  display:flex; align-items:center;
  border-radius: 6px;
}
.field__toggle.is-active{ color: var(--copper-dark); }
.field__toggle:hover{ color: var(--ink); }

.field__control.has-error, input.has-error + .field__control, .field__control:has(input.has-error){
  border-color: var(--danger);
}
input.has-error{ }
.field__error{
  display:none;
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 6px;
}
.field__error.is-visible{ display:block; }

/* Custom checkbox */
.checkbox{
  display:flex; align-items:center; gap:10px;
  font-size: 13.5px; color: var(--text-muted);
  cursor:pointer;
  user-select:none;
}
.checkbox input{ position:absolute; opacity:0; width:0; height:0; }
.checkbox__box{
  width:18px; height:18px;
  border-radius: 5px;
  border: 1.5px solid var(--paper-line);
  background: var(--paper-raised);
  display:inline-flex; align-items:center; justify-content:center;
  flex-shrink:0;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.checkbox__box::after{
  content:"";
  width: 9px; height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
  opacity:0;
  transition: opacity .12s var(--ease);
}
.checkbox input:checked + .checkbox__box{
  background: var(--copper);
  border-color: var(--copper);
}
.checkbox input:checked + .checkbox__box::after{ opacity:1; }
.checkbox input:focus-visible + .checkbox__box{ outline: 2px solid var(--copper); outline-offset:2px; }

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:none; border-radius: var(--radius-sm);
  font-weight:600; font-size: 14.5px;
  padding: 13px 20px;
  cursor:pointer;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .15s var(--ease);
}
.btn--block{ width:100%; }
.btn--primary{
  background: var(--ink);
  color: var(--text-inverse);
}
.btn--primary:hover{ background: #202834; }
.btn--primary:active{ transform: translateY(1px); }
.btn--primary svg{ transition: transform .15s var(--ease); }
.btn--primary:hover svg{ transform: translateX(2px); }

.btn.is-loading{ position:relative; color:transparent; pointer-events:none; }
.btn.is-loading::after{
  content:"";
  position:absolute;
  width:16px; height:16px;
  border-radius:50%;
  border: 2px solid rgba(243,241,234,0.35);
  border-top-color: var(--text-inverse);
  animation: spin .7s linear infinite;
}

@keyframes spin{ to{ transform: rotate(360deg); } }

.login__demo-hint{
  margin-top: 14px;
  text-align:center;
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.login__footer{
  max-width:400px;
  margin: 32px auto 0;
  width:100%;
  display:flex; justify-content:space-between;
  font-size:12px; color: var(--text-muted);
}
.login__footer-links a{ text-decoration:none; margin-left:14px; }
.login__footer-links a:hover{ color: var(--ink); text-decoration:underline; }

/* =========================================================
   MODAL (forgot password)
========================================================= */
.modal-overlay{
  display:none;
  position:fixed; inset:0;
  background: rgba(22,27,34,0.5);
  align-items:center; justify-content:center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay.is-open{ display:flex; }
.modal{
  position:relative;
  background: var(--paper-raised);
  border-radius: var(--radius-lg);
  padding: 32px;
  width:100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.modal h2{ font-size:22px; font-weight:500; margin-bottom:8px; }
.modal .muted{ display:block; margin-bottom: 20px; font-size:14px; }
.modal__close{
  position:absolute; top:16px; right:16px;
  border:none; background: var(--paper); color: var(--text-muted);
  width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.modal__close:hover{ color: var(--ink); }
.modal__success{
  display:none;
  margin-top:14px;
  font-size:13px;
  color: var(--success);
  font-weight:600;
}
.modal__success.is-visible{ display:block; }

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px){
  .login{ grid-template-columns: 1fr; }
  .login__brand{
    padding: 36px 28px 90px;
  }
  .login__badge-deco{ display:none; }
  .login__points{ display:none; }
  .login__quote{ display:none; }
  .login__form-panel{ padding: 36px 24px; }
}

@media (max-width: 480px){
  .login__brand{ padding: 28px 20px 40px; }
  .login__tagline{ font-size: 19px; }
  .login__form-head h1{ font-size:26px; }
}

/* =========================================================
   APP SHELL — sidebar + topbar + content
========================================================= */
:root{
  --slate: #5C7A93;
  --sidebar-w: 248px;
  --topbar-h: 68px;
}

.app{ display:flex; min-height:100vh; }

/* ---- Sidebar ---- */
.sidebar{
  width: var(--sidebar-w);
  flex-shrink:0;
  background: var(--ink);
  color: var(--text-inverse);
  display:flex;
  flex-direction:column;
  position: sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  z-index: 40;
}
.sidebar__brand{
  display:flex; align-items:center; gap:10px;
  padding: 20px 20px 16px;
  color: var(--text-inverse);
}
.sidebar__brand .brand__mark{ color: var(--copper); }
.brand__name--sm{ font-size:16px; }
.sidebar__close{ display:none; margin-left:auto; background:transparent; border:none; color: var(--text-inverse-muted); cursor:pointer; }

.sidebar__nav{ flex:1; padding: 8px 12px 12px; display:flex; flex-direction:column; }
.sidebar__group-label{
  font-family: var(--font-mono);
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color: #7C8494;
  padding: 16px 10px 6px;
}
.navlink{
  display:flex; align-items:center; gap:10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-inverse-muted);
  text-decoration:none;
  font-size: 13.8px;
  font-weight:500;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.navlink svg{ flex-shrink:0; opacity:0.85; }
.navlink:hover{ background: var(--ink-soft); color: var(--text-inverse); }
.navlink.is-active{ background: var(--ink-soft); color: var(--text-inverse); box-shadow: inset 2.5px 0 0 var(--copper); }

.sidebar__footer{
  padding: 14px 16px;
  border-top: 1px solid var(--ink-line);
  display:flex; align-items:center; gap:10px;
}
.sidebar__user{ display:flex; align-items:center; gap:10px; min-width:0; flex:1; }
.sidebar__user-text{ display:flex; flex-direction:column; min-width:0; }
.sidebar__user-text strong{ font-size:13px; color: var(--text-inverse); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar__user-text em{ font-style:normal; font-size:11.5px; color: var(--text-inverse-muted); }

.avatar{
  width:32px; height:32px; border-radius:50%;
  background: linear-gradient(135deg, var(--copper), var(--copper-dark));
  color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:12.5px; font-weight:700;
  flex-shrink:0;
  font-family: var(--font-mono);
}
.avatar--sm{ width:28px; height:28px; font-size:11px; }

.icon-btn{
  width:36px; height:36px;
  border-radius:8px;
  border:none;
  background:transparent;
  color: var(--text-inverse-muted);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
  flex-shrink:0;
}
.sidebar .icon-btn:hover{ background: var(--ink-soft); color: var(--text-inverse); }

.sidebar-scrim{
  display:none;
  position:fixed; inset:0;
  background: rgba(22,27,34,0.5);
  z-index:39;
}

/* ---- Main / topbar ---- */
.app__main{ flex:1; min-width:0; display:flex; flex-direction:column; }

.topbar{
  height: var(--topbar-h);
  flex-shrink:0;
  display:flex; align-items:center; gap:18px;
  padding: 0 24px;
  background: var(--paper-raised);
  border-bottom: 1px solid var(--paper-line);
  position:sticky; top:0; z-index:20;
}
.topbar__menu{ display:none; color: var(--text); }
.topbar__menu:hover{ background: var(--paper-line); }
.topbar__title h2{ font-size:17px; font-weight:600; font-family: var(--font-body); }
.topbar__title{ display:flex; flex-direction:column; line-height:1.25; }
.topbar__title .muted{ font-size:11.5px; }

.topbar__search{
  flex:1;
  max-width: 420px;
  margin-left: 12px;
  display:flex; align-items:center; gap:8px;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-muted);
}
.topbar__search input{
  border:none; outline:none; background:transparent;
  font-size:13.5px; width:100%; color: var(--text); font-family: var(--font-body);
}
.topbar__search input::placeholder{ color:#ADA895; }

.topbar__actions{ display:flex; align-items:center; gap:8px; margin-left:auto; }
.topbar .icon-btn{ color: var(--text-muted); }
.topbar .icon-btn:hover{ background: var(--paper-line); color: var(--ink); }
.topbar__bell{ position:relative; }
.badge-dot{
  position:absolute; top:5px; right:5px;
  background: var(--copper);
  color:#fff;
  font-size:9px; font-weight:700;
  min-width:14px; height:14px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono);
  border: 1.5px solid var(--paper-raised);
}

.profile-menu{ position:relative; }
.profile-menu__trigger{
  display:flex; align-items:center; gap:8px;
  background:transparent; border:none; cursor:pointer;
  padding: 5px 8px 5px 5px;
  border-radius: 20px;
  transition: background .14s var(--ease);
}
.profile-menu__trigger:hover{ background: var(--paper-line); }
.profile-menu__name{ font-size:13px; font-weight:600; color: var(--text); }
.profile-menu__trigger svg{ color: var(--text-muted); }

.profile-menu__dropdown{
  display:none;
  position:absolute; right:0; top: calc(100% + 8px);
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  min-width: 180px;
  padding: 6px;
  z-index: 30;
}
.profile-menu__dropdown.is-open{ display:block; }
.profile-menu__dropdown a{
  display:block;
  padding: 9px 10px;
  border-radius:6px;
  font-size:13.5px;
  text-decoration:none;
  color: var(--text);
}
.profile-menu__dropdown a:hover{ background: var(--paper); }
.profile-menu__dropdown hr{ border:none; border-top:1px solid var(--paper-line); margin:5px 0; }

/* ---- Content ---- */
.content{ padding: 28px 28px 60px; max-width: 1320px; }
.content__intro h1{ font-size: clamp(22px, 2.4vw, 27px); font-weight:500; margin-bottom:4px; }
.content__intro{ margin-bottom: 26px; }

/* KPI cards */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap:16px;
  margin-bottom: 28px;
}
.kpi-card{
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display:flex; flex-direction:column; gap:6px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .16s var(--ease), transform .16s var(--ease);
}
.kpi-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-card__icon{
  width:34px; height:34px; border-radius:9px;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:6px;
}
.kpi-card__icon--ink{ background: rgba(22,27,34,0.07); color: var(--ink); }
.kpi-card__icon--copper{ background: rgba(193,100,47,0.12); color: var(--copper-dark); }
.kpi-card__icon--moss{ background: rgba(82,102,79,0.14); color: var(--moss); }
.kpi-card__icon--slate{ background: rgba(92,122,147,0.14); color: var(--slate); }
.kpi-card__value{
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight:500;
  color: var(--ink);
  line-height:1;
}
.kpi-card__label{ font-size:12.5px; color: var(--text-muted); font-weight:600; }
.kpi-card__delta{ font-size:11.5px; color: var(--text-muted); }
.kpi-card__delta--up{ color: var(--success); }
.kpi-card__delta--down{ color: var(--text-muted); }
.kpi-card__delta--warn{ color: var(--copper-dark); font-weight:600; }

/* Charts */
.chart-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:16px;
}
.chart-card{
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.chart-card--wide{ grid-column: span 1; }
.chart-card__head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:18px; }
.chart-card__head h3{ font-size:14.5px; font-weight:600; font-family: var(--font-body); color: var(--text); }
.chart-card__head .muted{ font-size:12px; }
.chart-body--center{ display:flex; flex-direction:column; align-items:center; gap:14px; }

/* Horizontal bar list (department chart) */
.barlist{ display:flex; flex-direction:column; gap:13px; }
.barlist__row{ display:grid; grid-template-columns: 34px 1fr 28px; align-items:center; gap:10px; }
.barlist__code{ font-family: var(--font-mono); font-size:11px; color: var(--text-muted); }
.barlist__track{ height:10px; background: var(--paper); border-radius:6px; overflow:hidden; }
.barlist__fill{
  display:block; height:100%; width:0;
  border-radius:6px;
  background: linear-gradient(90deg, var(--copper-dark), var(--copper));
  transition: width .8s var(--ease);
}
.barlist__value{ font-family: var(--font-mono); font-size:12px; text-align:right; color: var(--text); }

/* Donut (gender chart) */
.donut{ width:150px; height:150px; }
.donut__seg{ transition: stroke-dasharray .8s var(--ease); }
.donut__total{ font-family: var(--font-mono); font-size:20px; font-weight:600; fill: var(--ink); }
.donut__label{ font-family: var(--font-body); font-size:9.5px; fill: var(--text-muted); text-transform:uppercase; letter-spacing:0.06em; }

.legend{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.legend__item{ display:flex; align-items:center; gap:6px; font-size:12px; color: var(--text-muted); }
.legend__item i{ width:9px; height:9px; border-radius:50%; display:inline-block; }
.legend__item b{ color: var(--text); font-family: var(--font-mono); font-weight:600; }

/* Vertical bars (leave stats) */
.vbars{ display:flex; align-items:flex-end; justify-content:space-between; gap:10px; height:160px; padding-top:10px; }
.vbars__col{ flex:1; display:flex; flex-direction:column; align-items:center; height:100%; justify-content:flex-end; gap:8px; }
.vbars__value{ font-family: var(--font-mono); font-size:11.5px; color: var(--text-muted); }
.vbars__bar{
  width:100%; max-width:36px; height:0;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--moss), #3d4f3b);
  transition: height .8s var(--ease);
}
.vbars__label{ font-size:11px; color: var(--text-muted); text-align:center; }

/* Stacked horizontal bars (attendance) */
.stackbars{ display:flex; flex-direction:column; gap:14px; }
.stackbars__row{ display:grid; grid-template-columns: 34px 1fr; align-items:center; gap:10px; }
.stackbars__day{ font-family: var(--font-mono); font-size:11.5px; color: var(--text-muted); }
.stackbars__track{ display:flex; height:16px; border-radius:6px; overflow:hidden; background: var(--paper); }
.stackbars__seg{ display:block; height:100%; width:0; transition: width .8s var(--ease); }
.seg--present{ background: var(--moss); }
.seg--late{ background: var(--copper); }
.seg--wfh{ background: var(--slate); }
.seg--absent{ background: var(--danger); }

/* Toast */
.toast{
  position:fixed; bottom:24px; left:50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: var(--text-inverse);
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  opacity:0;
  pointer-events:none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 200;
}
.toast.is-visible{ opacity:1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   RESPONSIVE — app shell
========================================================= */
.kpi-grid--compact{ grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px){
  .kpi-grid{ grid-template-columns: repeat(3, 1fr); }
  .chart-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 900px){
  .kpi-grid--compact{ grid-template-columns: repeat(2, 1fr); }
  .sidebar{
    position:fixed; left:0; top:0;
    transform: translateX(-100%);
    transition: transform .22s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open{ transform: translateX(0); }
  .sidebar__close{ display:block; }
  .sidebar-scrim.is-open{ display:block; }
  .topbar__menu{ display:flex; }
  .topbar__search{ display:none; }
  .content{ padding: 20px 16px 48px; }
}

@media (max-width: 640px){
  .kpi-grid{ grid-template-columns: repeat(2, 1fr); }
  .topbar{ gap:10px; padding:0 14px; }
  .profile-menu__name{ display:none; }
}

@media (max-width: 420px){
  .kpi-grid{ grid-template-columns: 1fr 1fr; }
  .vbars{ height:130px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* =========================================================
   PAGES (within .content)
========================================================= */
.page{ display:none; }
.page--active{ display:block; }

.content__intro--row{
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap;
}
.content__intro--row h1{ font-size: clamp(22px, 2.4vw, 27px); font-weight:500; margin-bottom:4px; }

.btn--ghost{
  background: transparent;
  border: 1px solid var(--paper-line);
  color: var(--text);
}
.btn--ghost:hover{ background: var(--paper); }
.btn--danger{ background: var(--danger); color:#fff; }
.btn--danger:hover{ background: #9a3520; }

/* ---- Toolbar ---- */
.toolbar{
  display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  margin-bottom: 18px;
}
.toolbar__search{
  display:flex; align-items:center; gap:8px;
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text-muted);
  flex: 1 1 220px;
  max-width: 320px;
}
.toolbar__search input{
  border:none; outline:none; background:transparent;
  font-size:13.5px; width:100%; color: var(--text); font-family: var(--font-body);
}
.toolbar__select{
  border: 1px solid var(--paper-line);
  background: var(--paper-raised);
  border-radius:8px;
  padding: 9px 10px;
  font-size:13.5px;
  color: var(--text);
  font-family: var(--font-body);
  cursor:pointer;
}
.toolbar__select:focus-visible{ outline: 2px solid var(--copper); outline-offset:1px; }
.toolbar__reset{ margin-left:auto; white-space:nowrap; }

/* ---- Table ---- */
.table-card{
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow:hidden;
}
.table-scroll{ overflow-x:auto; }
.data-table{ width:100%; border-collapse:collapse; min-width: 820px; }
.data-table th{
  text-align:left;
  font-size:11.5px;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color: var(--text-muted);
  font-weight:600;
  padding: 13px 16px;
  border-bottom: 1px solid var(--paper-line);
  background: var(--paper);
}
.data-table td{
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1px solid var(--paper-line);
  vertical-align:middle;
}
.data-table tbody tr:last-child td{ border-bottom:none; }
.data-table tbody tr:hover{ background: rgba(193,100,47,0.04); }
.ta-right{ text-align:right; }
.ellipsis{ max-width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.cell-employee{ display:flex; align-items:center; gap:10px; }
.cell-employee strong{ display:block; font-size:13.5px; font-weight:600; }
.cell-employee__sub{ font-size:11.5px; }
.cell-employee__avatar{ font-size:11px; }

.mono-tag{ font-family: var(--font-mono); font-size:12px; color: var(--text-muted); }

.badge{
  display:inline-flex; align-items:center; gap:5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size:11.5px;
  font-weight:600;
}
.badge--active{ background: rgba(82,102,79,0.14); color: var(--moss); }
.badge--inactive{ background: rgba(107,109,98,0.14); color: var(--text-muted); }

.row-actions{ display:flex; justify-content:flex-end; gap:4px; }
.row-action{
  width:30px; height:30px;
  border-radius:7px;
  border:none; background:transparent;
  color: var(--text-muted);
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.row-action:hover{ background: var(--paper); color: var(--ink); }
.row-action--danger:hover{ background: rgba(180,64,42,0.1); color: var(--danger); }
.row-action--ok:hover{ background: rgba(82,102,79,0.12); color: var(--moss); }

.table-empty{
  display:none;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size:13.5px;
}
.table-empty.is-visible{ display:flex; }

.table-footer{ margin-top:12px; font-size:12.5px; }

/* =========================================================
   Modal variants + form grid (Add/Edit Employee)
========================================================= */
.modal-overlay{ overflow-y:auto; padding: 40px 20px; }
.modal--wide{ max-width: 640px; }
.modal--sm{ max-width: 340px; }

.modal__actions{
  display:flex; justify-content:flex-end; gap:10px;
  margin-top: 22px;
}
.modal__actions .btn{ width:auto; }

.form-photo-row{
  display:flex; align-items:center; gap:14px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--paper-line);
}
.form-photo-row__label{ display:block; font-size:13px; font-weight:600; margin-bottom:2px; }
.photo-upload{
  width:64px; height:64px;
  border-radius:50%;
  background: var(--paper);
  border: 1.5px dashed var(--paper-line);
  display:flex; align-items:center; justify-content:center;
  color: var(--text-muted);
  cursor:pointer;
  overflow:hidden;
  flex-shrink:0;
  transition: border-color .15s var(--ease);
}
.photo-upload:hover{ border-color: var(--copper); }
.photo-upload img{ width:100%; height:100%; object-fit:cover; }
#photo-placeholder{ display:flex; }

.form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
}
.field--span2{ grid-column: span 2; }
.form-grid select{
  width:100%;
  border:none; background:transparent; outline:none;
  padding: 12px 12px;
  font-size:14.5px;
  font-family: var(--font-body);
  color: var(--text);
  cursor:pointer;
}
.form-grid input[readonly]{ color: var(--text-muted); font-family: var(--font-mono); font-size:13px; }

/* =========================================================
   VIEW DRAWER
========================================================= */
#view-drawer-overlay{
  background: rgba(22,27,34,0.4);
  justify-content:flex-end;
  align-items:stretch;
  padding:0;
}
.drawer{
  position:relative;
  width: 100%;
  max-width: 400px;
  height:100vh;
  background: var(--paper-raised);
  padding: 32px 28px;
  overflow-y:auto;
  box-shadow: var(--shadow-lg);
  animation: drawerIn .22s var(--ease);
}
@keyframes drawerIn{ from{ transform: translateX(24px); opacity:0; } to{ transform: translateX(0); opacity:1; } }

.drawer__head{ display:flex; align-items:center; gap:14px; margin: 8px 0 24px; }
.drawer__avatar{
  width:56px; height:56px; border-radius:50%;
  background: linear-gradient(135deg, var(--copper), var(--copper-dark));
  object-fit:cover;
}
.drawer__head h2{ font-size:19px; font-weight:500; margin-bottom:6px; }

.drawer__section{ margin-bottom: 22px; }
.drawer__section-label{
  display:block;
  font-family: var(--font-mono);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom:8px;
  border-bottom: 1px solid var(--paper-line);
}
.drawer__list{ display:flex; flex-direction:column; gap:10px; }
.drawer__list > div{ display:flex; justify-content:space-between; gap:12px; }
.drawer__list dt{ font-size:12.5px; color: var(--text-muted); }
.drawer__list dd{ margin:0; font-size:13px; font-weight:600; text-align:right; }

/* =========================================================
   RESPONSIVE — employees page
========================================================= */
@media (max-width: 700px){
  .form-grid{ grid-template-columns: 1fr; }
  .field--span2{ grid-column: span 1; }
  .toolbar__reset{ margin-left:0; }
  .drawer{ max-width:100%; }
}

/* =========================================================
   EMPLOYEE PROFILE PAGE
========================================================= */
.crumb-back{
  display:inline-flex; align-items:center; gap:6px;
  background:transparent; border:none; cursor:pointer;
  font-family: var(--font-mono); font-size:12px; letter-spacing:0.04em;
  color: var(--text-muted); padding:0; margin-bottom:10px;
  transition: color .15s var(--ease);
}
.crumb-back:hover{ color: var(--copper-dark); }
.crumb-back svg{ flex-shrink:0; }

/* ---- Header card ---- */
.profile-header{
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
  margin-bottom: 22px;
}
.profile-header__photo{
  width:76px; height:76px; border-radius:50%;
  background: linear-gradient(135deg, var(--copper), var(--copper-dark));
  color:#fff; font-family: var(--font-mono); font-weight:700; font-size:22px;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; overflow:hidden;
}
.profile-header__photo img{ width:100%; height:100%; object-fit:cover; }
.profile-header__info{ flex:1; min-width:220px; }
.profile-header__info h2{ font-size:21px; font-weight:500; margin-bottom:6px; }
.profile-header__meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px;
  font-size:13px; color: var(--text-muted); margin-bottom:10px;
}
.profile-header__badges{ display:flex; gap:8px; flex-wrap:wrap; }
.profile-header__actions{ display:flex; gap:10px; flex-shrink:0; }
.profile-header__actions .btn{ width:auto; }

.badge--warn{ background: rgba(193,100,47,0.14); color: var(--copper-dark); }
.badge--danger{ background: rgba(180,64,42,0.12); color: var(--danger); }
.badge--info{ background: rgba(92,122,147,0.14); color: var(--slate); }
.badge--neutral{ background: var(--paper); color: var(--text-muted); border:1px solid var(--paper-line); }

/* ---- Tabs ---- */
.profile-tabs{
  display:flex; gap:4px; flex-wrap:wrap;
  border-bottom: 1px solid var(--paper-line);
  margin-bottom: 22px;
}
.profile-tabs__btn{
  border:none; background:transparent; cursor:pointer;
  padding: 11px 4px; margin-right:22px;
  font-size:13.5px; font-weight:600; color: var(--text-muted);
  position:relative; top:1px;
  border-bottom: 2px solid transparent;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.profile-tabs__btn:hover{ color: var(--ink); }
.profile-tabs__btn.is-active{ color: var(--ink); border-bottom-color: var(--copper); }

.profile-panel{ display:none; }
.profile-panel.is-active{ display:block; animation: panelIn .18s var(--ease); }
@keyframes panelIn{ from{ opacity:0; transform: translateY(4px); } to{ opacity:1; transform: translateY(0); } }

/* ---- Overview: info cards ---- */
.info-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.info-card{
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.info-card__title{
  display:block;
  font-family: var(--font-mono);
  font-size:11px; text-transform:uppercase; letter-spacing:0.06em;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--paper-line);
}
.info-card .drawer__list{ gap:13px; }
.info-card .drawer__list dt{ flex-shrink:0; }
.info-card .drawer__list dd{ overflow-wrap:anywhere; }

/* ---- Panel section heading (used inside Attendance/Leave/Payroll) ---- */
.panel-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-bottom:14px; flex-wrap:wrap;
}
.panel-head h3{ font-size:15.5px; font-weight:500; }

/* ---- Leave balance strip ---- */
.leave-balance{
  display:grid; grid-template-columns: repeat(4, 1fr); gap:14px;
  margin-bottom:20px;
}
.leave-balance__item{
  background: var(--paper-raised); border:1px solid var(--paper-line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}
.leave-balance__item strong{ display:block; font-size:20px; font-family: var(--font-mono); margin-bottom:2px; }
.leave-balance__item span{ font-size:12px; color: var(--text-muted); }

/* ---- Documents list ---- */
.alert-banner{
  display:flex; align-items:center; gap:10px;
  background: rgba(193,100,47,0.08);
  border: 1px solid rgba(193,100,47,0.25);
  color: var(--copper-dark);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size:13px; font-weight:500;
  margin-bottom: 18px;
}
.alert-banner svg{ flex-shrink:0; }

.doc-list{ display:flex; flex-direction:column; gap:10px; }
.doc-row{
  display:flex; align-items:center; gap:14px;
  background: var(--paper-raised); border:1px solid var(--paper-line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 14px 18px;
}
.doc-row__icon{
  width:38px; height:38px; border-radius:9px; flex-shrink:0;
  background: rgba(22,27,34,0.06); color: var(--ink);
  display:flex; align-items:center; justify-content:center;
}
.doc-row__body{ flex:1; min-width:0; }
.doc-row__body strong{ display:block; font-size:13.5px; font-weight:600; }
.doc-row__body span{ font-size:12px; color: var(--text-muted); }
.doc-row__dates{ font-size:12px; color: var(--text-muted); text-align:right; white-space:nowrap; }
.doc-row__dates b{ display:block; color: var(--text); font-weight:600; font-family: var(--font-mono); font-size:11.5px; }

/* ---- Payroll summary ---- */
.payroll-summary{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:14px;
  margin-bottom:20px;
}
.payroll-summary__item{
  background: var(--ink); color: var(--text-inverse);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.payroll-summary__item strong{ display:block; font-size:19px; font-family: var(--font-mono); margin-bottom:2px; }
.payroll-summary__item span{ font-size:11.5px; color: var(--text-inverse-muted); }
.payroll-summary__item--accent{ background: linear-gradient(135deg, var(--copper), var(--copper-dark)); }
.payroll-summary__item--accent span{ color: rgba(255,255,255,0.75); }

/* ---- Performance scores ---- */
.perf-head{
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin-bottom:20px;
}
.perf-rating{ display:flex; align-items:center; gap:12px; }
.perf-rating__num{ font-family: var(--font-display); font-size:34px; color: var(--copper-dark); line-height:1; }
.perf-rating__label strong{ display:block; font-size:14px; }
.perf-rating__label span{ font-size:12px; color: var(--text-muted); }

.scorebars{ display:flex; flex-direction:column; gap:16px; margin-bottom:22px; }
.scorebars__row{ display:grid; grid-template-columns: 140px 1fr 34px; align-items:center; gap:12px; }
.scorebars__label{ font-size:13px; font-weight:600; }
.scorebars__track{ height:8px; border-radius:6px; background: var(--paper); overflow:hidden; }
.scorebars__fill{ display:block; height:100%; width:0; background: var(--copper); border-radius:6px; transition: width .8s var(--ease); }
.scorebars__value{ font-family: var(--font-mono); font-size:12.5px; color: var(--text-muted); text-align:right; }

.perf-comment{
  background: var(--paper-raised); border:1px solid var(--paper-line);
  border-left: 3px solid var(--copper);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 16px 18px; font-size:13.5px; line-height:1.6; color: var(--text);
}
.perf-comment span{ display:block; margin-top:10px; font-size:12px; color: var(--text-muted); }

/* ---- Responsive ---- */
@media (max-width: 900px){
  .info-grid{ grid-template-columns: 1fr; }
  .leave-balance{ grid-template-columns: repeat(2, 1fr); }
  .payroll-summary{ grid-template-columns: 1fr; }
}
@media (max-width: 640px){
  .profile-header{ flex-direction:column; align-items:flex-start; }
  .profile-header__actions{ width:100%; }
  .profile-header__actions .btn{ flex:1; }
  .doc-row{ flex-wrap:wrap; }
  .doc-row__dates{ text-align:left; }
  .scorebars__row{ grid-template-columns: 100px 1fr 30px; }
  .leave-balance{ grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   DEPARTMENTS PAGE
========================================================= */
.dept-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 18px;
}
.dept-card{
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  display:flex;
  flex-direction:column;
  gap:14px;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.dept-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-1px); }

.dept-card__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.dept-card__head h3{ font-size:16.5px; font-weight:500; }
.dept-card__icon{
  width:40px; height:40px; border-radius:10px; flex-shrink:0;
  background: rgba(193,100,47,0.12); color: var(--copper-dark);
  display:flex; align-items:center; justify-content:center;
}

.dept-card__desc{
  font-size:13px; color: var(--text-muted); line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  min-height: 2.9em;
}

.dept-card__meta{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding-top:12px; border-top:1px solid var(--paper-line);
  font-size:12.5px;
}
.dept-card__head-person{ display:flex; align-items:center; gap:8px; min-width:0; }
.dept-card__head-person span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color: var(--text); }
.dept-card__count{ font-family: var(--font-mono); color: var(--text-muted); white-space:nowrap; }
.dept-card__count b{ color: var(--text); font-weight:700; }

.dept-card__actions{ display:flex; gap:8px; }
.dept-card__actions .btn{ flex:1; width:auto; padding:9px 10px; font-size:12.5px; }
.dept-card__icon-actions{ display:flex; gap:2px; }

.dept-empty{
  grid-column: 1 / -1;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding: 60px 20px; color: var(--text-muted); font-size:13.5px;
  background: var(--paper-raised); border:1px dashed var(--paper-line); border-radius: var(--radius-md);
}

@media (max-width: 480px){
  .dept-grid{ grid-template-columns: 1fr; }
}

/* ---- Job Positions (recruitment) ---- */
.job-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.job-card{
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  display:flex;
  flex-direction:column;
  gap:12px;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.job-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-1px); }

.job-card__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.job-card__head h3{ font-size:16px; font-weight:500; }
.job-card__dept{ font-size:12px; color: var(--text-muted); }

.job-card__desc{
  font-size:13px; color: var(--text-muted); line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  min-height: 2.9em;
}

.job-card__meta-list{
  display:grid; grid-template-columns: 1fr 1fr;
  gap:6px 10px;
  padding-top:12px; border-top:1px solid var(--paper-line);
  font-size:12.5px; color: var(--text-muted);
}
.job-card__meta-list b{ color: var(--text); font-weight:600; }

@media (max-width: 480px){
  .job-grid{ grid-template-columns: 1fr; }
  .job-card__meta-list{ grid-template-columns: 1fr; }
}

/* ---- Candidates: Kanban board ---- */
.kanban-board{
  display:flex;
  gap:16px;
  overflow-x:auto;
  padding-bottom:10px;
  align-items:flex-start;
}
.kanban-col{
  flex: 0 0 268px;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  display:flex;
  flex-direction:column;
  max-height: calc(100vh - 340px);
  min-height: 220px;
}
.kanban-col__head{
  display:flex; align-items:center; gap:8px;
  padding:14px 14px 12px;
  border-bottom:1px solid var(--paper-line);
  flex-shrink:0;
}
.kanban-col__head h3{ font-size:13.5px; font-weight:600; letter-spacing:.01em; }
.kanban-col__dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.kanban-col__dot--ink{ background: var(--ink-soft); }
.kanban-col__dot--slate{ background: var(--slate); }
.kanban-col__dot--copper{ background: var(--copper); }
.kanban-col__dot--moss{ background: var(--moss); }
.kanban-col__dot--danger{ background: var(--danger); }
.kanban-col__count{
  margin-left:auto;
  font-family: var(--font-mono); font-size:11.5px; color: var(--text-muted);
  background: var(--paper-raised); border:1px solid var(--paper-line);
  border-radius:20px; padding:1px 8px;
}

.kanban-col__body{
  flex:1;
  overflow-y:auto;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.kanban-col__body.is-dragover{ background: rgba(193,100,47,0.06); }

.candidate-card{
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding:13px 14px;
  cursor:grab;
  display:flex; flex-direction:column; gap:8px;
  transition: box-shadow .14s var(--ease), transform .14s var(--ease), opacity .14s var(--ease);
}
.candidate-card:hover{ box-shadow: var(--shadow-md); }
.candidate-card.is-dragging{ opacity:0.4; }

.candidate-card__head{ display:flex; align-items:center; gap:9px; }
.candidate-card__head strong{ font-size:13.5px; font-weight:600; line-height:1.25; }
.candidate-card__position{ font-size:11.5px; color: var(--text-muted); display:block; }

.candidate-card__meta{ display:flex; flex-wrap:wrap; gap:6px 10px; font-size:11.5px; color: var(--text-muted); }
.candidate-card__meta span b{ color: var(--text); font-weight:600; }

.candidate-card__footer{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.candidate-card__actions{ display:flex; gap:2px; }
.candidate-card__actions .row-action{ width:26px; height:26px; }

@media (max-width: 720px){
  .kanban-col{ flex-basis:82vw; }
}

/* =========================================================
   UPCOMING BIRTHDAYS (Dashboard)
========================================================= */
.birthday-card{ margin-top:16px; }
.birthday-list{ display:flex; flex-direction:column; gap:2px; }
.birthday-row{
  display:flex; align-items:center; gap:14px;
  padding:10px 2px;
  border-bottom:1px solid var(--paper-line);
}
.birthday-row:last-child{ border-bottom:none; }
.birthday-row__avatar{
  width:38px; height:38px; border-radius:50%; flex-shrink:0;
  background: rgba(193,100,47,0.12); color: var(--copper-dark);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-size:12.5px; font-weight:600;
}
.birthday-row__body{ flex:1; min-width:0; }
.birthday-row__body strong{ display:block; font-size:13.5px; font-weight:600; }
.birthday-row__body span{ font-size:12px; color: var(--text-muted); }
.birthday-row__date{ text-align:right; flex-shrink:0; }
.birthday-row__date b{ display:block; font-family: var(--font-mono); font-size:12.5px; margin-bottom:4px; font-weight:500; }
.birthday-empty{ font-size:13px; color: var(--text-muted); padding:6px 2px; margin:0; }

/* =========================================================
   NOTIFICATIONS PAGE
========================================================= */
.chip-group{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.chip{
  font-family: var(--font-body); font-size:12.5px; font-weight:600;
  padding:7px 14px; border-radius:999px;
  background: var(--paper-raised); border:1px solid var(--paper-line);
  color: var(--text-muted); cursor:pointer;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.chip:hover{ border-color: var(--copper); color: var(--text); }
.chip.is-active{ background: var(--ink); border-color: var(--ink); color: var(--text-inverse); }

.notif-list{ display:flex; flex-direction:column; gap:10px; }
.notif-row{
  display:flex; align-items:flex-start; gap:14px;
  background: var(--paper-raised); border:1px solid var(--paper-line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 14px 18px; cursor:pointer;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.notif-row:hover{ box-shadow: var(--shadow-md); transform: translateY(-1px); }
.notif-row--unread{ border-left: 3px solid var(--copper); }
.notif-row__icon{
  width:38px; height:38px; border-radius:9px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
.notif-row__icon--ink{ background: rgba(22,27,34,0.07); color: var(--ink); }
.notif-row__icon--copper{ background: rgba(193,100,47,0.12); color: var(--copper-dark); }
.notif-row__icon--moss{ background: rgba(82,102,79,0.14); color: var(--moss); }
.notif-row__icon--slate{ background: rgba(92,122,147,0.14); color: var(--slate); }
.notif-row__body{ flex:1; min-width:0; }
.notif-row__head{ display:flex; align-items:center; gap:8px; margin-bottom:4px; flex-wrap:wrap; }
.notif-row__head strong{ font-size:13.5px; font-weight:600; }
.notif-row__body p{ font-size:12.5px; color: var(--text-muted); line-height:1.5; margin:0; }
.notif-row__dot{
  width:7px; height:7px; border-radius:50%; background: var(--copper);
  margin-left:auto; flex-shrink:0;
}

@media (max-width: 640px){
  .birthday-row__date{ text-align:left; }
  .notif-row{ flex-wrap:wrap; }
}
/* =========================================================
   REPORTS & SETTINGS — reusable sub-tabs, export bar, forms
========================================================= */
.subtabs-row{
  display:flex; gap:22px; flex-wrap:wrap;
  border-bottom:1px solid var(--paper-line);
  margin-bottom:22px;
}
.subtabs-row .tab-btn{
  padding:10px 2px; background:none; border:none;
  border-bottom:2px solid transparent;
  font-family: var(--font-body); font-size:13.5px; font-weight:600;
  color: var(--text-muted); cursor:pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.subtabs-row .tab-btn:hover{ color: var(--ink); }
.subtabs-row .tab-btn.is-active{ color: var(--ink); border-bottom-color: var(--copper); }

.subpanel{ display:none; }
.subpanel.is-active{ display:block; animation: panelIn .18s var(--ease); }

.report-panel-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  margin-bottom:14px; flex-wrap:wrap;
}
.report-panel-head h2{
  font-family: var(--font-body); font-size:16.5px; font-weight:600; margin-bottom:3px;
}
.report-panel-head p{ font-size:13px; }
.report-actions{ display:flex; gap:10px; flex-shrink:0; }
.report-actions .btn{ width:auto; padding-left:16px; padding-right:16px; }

/* ---- Settings ---- */
.settings-layout{ display:grid; gap:20px; max-width: 720px; }
.settings-card{
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}
.settings-card__title{
  display:block;
  font-family: var(--font-mono);
  font-size:11px; text-transform:uppercase; letter-spacing:0.06em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--paper-line);
}
.settings-row{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:13px 0; border-bottom:1px solid var(--paper-line);
}
.settings-row:last-child{ border-bottom:none; padding-bottom:2px; }
.settings-row__text strong{ display:block; font-size:14px; font-weight:600; margin-bottom:2px; }
.settings-row__text span{ font-size:12.5px; color: var(--text-muted); }

/* Toggle switch */
.toggle{ position:relative; display:inline-block; width:40px; height:23px; flex-shrink:0; cursor:pointer; }
.toggle input{ position:absolute; opacity:0; width:0; height:0; }
.toggle__track{
  position:absolute; inset:0; background: var(--paper-line); border-radius:999px;
  transition: background .16s var(--ease);
}
.toggle__track::after{
  content:''; position:absolute; top:2.5px; left:2.5px; width:18px; height:18px;
  background:#fff; border-radius:50%; box-shadow: var(--shadow-sm);
  transition: transform .16s var(--ease);
}
.toggle input:checked + .toggle__track{ background: var(--moss); }
.toggle input:checked + .toggle__track::after{ transform: translateX(17px); }
.toggle input:focus-visible + .toggle__track{ outline:2px solid var(--copper); outline-offset:2px; }

@media (max-width: 640px){
  .report-panel-head{ align-items:flex-start; }
  .settings-card{ padding:18px 16px; }
}