/* AccessHR shell. Tokens from docs/UI_GUIDE.md; layout from docs/ui-samples/Main.dc.html and Dashboard.dc.html. */
:root {
  --ahr-brand: #0F766E;
  --ahr-brand-dark: #115E59;
  --ahr-bg: #F6F7F9;
  --ahr-surface: #FFFFFF;
  --ahr-border: #E3E7EC;
  --ahr-border-strong: #CBD2DA;
  --ahr-text: #14202B;
  --ahr-text-2: #5B6B7A;
  --ahr-muted-bg: #F1F3F6;
  --ahr-chip-bg: #E7EAEE;
  --ahr-menu-bg: #0E1B24;
  --ahr-menu-text: #C9D4DD;
  --ahr-menu-active: rgba(255, 255, 255, 0.1);
  --ahr-accent: #F2A33A;
  --ahr-success: #1A9E5C;
  --ahr-danger: #D92D20;
  --ahr-info: #4C7DF0;
  --ahr-warning-bg: #FFF6E5;
  --ahr-warning-border: #F5D9A1;
  --ahr-warning-text: #7A4B00;
  --ahr-radius-card: 14px;
  --ahr-radius-input: 10px;
  --ahr-menu-w: 248px;
  --ahr-menu-w-mini: 72px;
  --ahr-font: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.ahr-dark {
  --ahr-bg: #0B141B;
  --ahr-surface: #121E27;
  --ahr-border: #22313D;
  --ahr-border-strong: #33465A;
  --ahr-text: #E6EDF3;
  --ahr-text-2: #9FB0BF;
  --ahr-muted-bg: #1A2833;
  --ahr-chip-bg: #1A2833;
  --ahr-warning-bg: #3A2C12;
  --ahr-warning-border: #6B4E1A;
  --ahr-warning-text: #F8D9A0;
}

html, body { margin: 0; }
body { font-family: var(--ahr-font); color: var(--ahr-text); background: var(--ahr-bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--ahr-brand); outline-offset: 2px; }
.ahr-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */
.ahr-shell { display: flex; min-height: 100vh; background: var(--ahr-bg); color: var(--ahr-text); }

.ahr-nav {
  flex: 0 0 var(--ahr-menu-w); width: var(--ahr-menu-w); box-sizing: border-box;
  background: var(--ahr-menu-bg); color: var(--ahr-menu-text);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  transition: width .2s, flex-basis .2s, padding .2s;
}
.ahr-shell.is-mini .ahr-nav { flex-basis: var(--ahr-menu-w-mini); width: var(--ahr-menu-w-mini); padding: 20px 8px; }
.ahr-nav :focus-visible { outline-color: #FFFFFF; }

.ahr-nav-brand { display: flex; align-items: center; padding: 4px 10px 20px; }
.ahr-shell.is-mini .ahr-nav-brand { justify-content: center; padding: 4px 0 20px; }
.ahr-nav-brand img, .ahr-nav-foot img { display: block; max-width: 100%; width: auto; }

.ahr-nav-toggle {
  align-self: flex-end; width: 32px; height: 32px; margin-bottom: 8px;
  border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: var(--ahr-menu-text);
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.ahr-nav-toggle:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.ahr-shell.is-mini .ahr-nav-toggle { align-self: center; }
.ahr-shell.is-mini .ahr-nav-toggle svg { transform: rotate(180deg); }

.ahr-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; min-height: 44px; box-sizing: border-box;
  border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ahr-menu-text); text-decoration: none;
}
.ahr-nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.ahr-nav-item.active { background: var(--ahr-menu-active); color: #FFFFFF; }
.ahr-nav-item svg { flex: none; }
.ahr-shell.is-mini .ahr-nav-item { justify-content: center; }
/* Hidden visually, still read by screen readers, so collapsed links keep their names. */
.ahr-shell.is-mini .ahr-nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ahr-nav-foot { margin-top: auto; padding: 16px 4px 4px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: flex; align-items: center; }
.ahr-shell.is-mini .ahr-nav-foot { justify-content: center; }

.ahr-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }

.ahr-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 28px; background: var(--ahr-surface); border-bottom: 1px solid var(--ahr-border);
}
.ahr-header-left, .ahr-header-right { display: flex; align-items: center; gap: 14px; }
.ahr-header-left { flex: 1 1 280px; min-width: 0; }
.ahr-search {
  display: flex; align-items: center; gap: 10px; background: var(--ahr-muted-bg); border-radius: 10px;
  padding: 0 14px; height: 42px; width: 100%; max-width: 360px; min-width: 0; box-sizing: border-box; color: var(--ahr-text-2);
}
.ahr-search input { border: 0; background: transparent; outline: none; font-size: 14px; color: var(--ahr-text); width: 100%; min-width: 0; }
.ahr-search input::placeholder { color: var(--ahr-text-2); }

.ahr-lang { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ahr-text-2); }
.ahr-lang a { color: var(--ahr-text-2); text-decoration: none; padding: 6px 4px; border-radius: 6px; }
.ahr-lang a:hover { color: var(--ahr-text); }
.ahr-lang a[aria-current="true"] { color: var(--ahr-text); }

.ahr-icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--ahr-border);
  background: var(--ahr-surface); color: var(--ahr-text); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.ahr-icon-btn:hover { background: var(--ahr-muted-bg); }
.ahr-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #CCE7E3; color: #0B5A53;
  display: inline-flex; align-items: center; justify-content: center;
}

.ahr-content { flex: 1; padding: 24px 28px 32px; display: flex; flex-direction: column; gap: 20px; }

.ahr-footer {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ahr-border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 12px; color: var(--ahr-text-2);
}
.ahr-credit-link { color: var(--ahr-brand); font-weight: 600; text-decoration: none; }
.ahr-credit-link:hover, .ahr-credit-link:focus { color: var(--ahr-brand-dark); text-decoration: none; }
/* Brand text on dark backgrounds uses a lighter shade to keep 4.5:1 contrast. */
.ahr-dark .ahr-credit-link, .ahr-dark .ahr-login-row a { color: var(--ahr-brand-light, #5EC4B8); }
.ahr-dark .ahr-credit-link:hover, .ahr-dark .ahr-credit-link:focus { color: #FFFFFF; }

.ahr-burger { display: none; }
.ahr-backdrop { display: none; }

/* ---------- Page blocks ---------- */
.ahr-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ahr-page-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.ahr-page-sub { color: var(--ahr-text-2); font-size: 14px; margin-top: 4px; }
.ahr-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.ahr-card { background: var(--ahr-surface); border: 1px solid var(--ahr-border); border-radius: var(--ahr-radius-card); padding: 20px; min-width: 0; box-sizing: border-box; }
.ahr-card h2 { margin: 0 0 16px; font-size: 16px; font-weight: 700; }
.ahr-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.ahr-card-head h2 { margin: 0; }
.ahr-row { display: flex; flex-wrap: wrap; gap: 16px; }
.ahr-col-2 { flex: 2 1 480px; }
.ahr-col-1 { flex: 1 1 300px; }

.ahr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.ahr-kpi { padding: 18px; }
.ahr-kpi-label { display: flex; justify-content: space-between; align-items: center; color: var(--ahr-text-2); font-size: 13px; font-weight: 600; }
.ahr-kpi-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ahr-kpi-value { font-size: 32px; font-weight: 800; margin-top: 10px; letter-spacing: -0.02em; }
.ahr-kpi-note { font-size: 12px; color: var(--ahr-text-2); margin-top: 4px; }

.ahr-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--ahr-text-2); font-size: 14px; padding: 24px 12px; min-height: 120px; }
.ahr-empty svg { color: var(--ahr-border-strong); }

.ahr-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px;
  background: var(--ahr-warning-bg); border: 1px solid var(--ahr-warning-border); color: var(--ahr-warning-text);
}
.ahr-banner-text { flex: 1 1 320px; font-size: 14px; line-height: 1.45; }
.ahr-banner-btn { height: 38px; padding: 0 16px; border-radius: 9px; border: 0; background: var(--ahr-warning-text); color: var(--ahr-surface); font-weight: 600; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; }

.ahr-btn {
  height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--ahr-border-strong); background: var(--ahr-surface);
  color: var(--ahr-text); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.ahr-btn-primary { border: 0; background: var(--ahr-brand); color: #FFFFFF; font-weight: 700; padding: 0 18px; }
.ahr-btn-primary:hover { background: var(--ahr-brand-dark); }
.ahr-btn[disabled] { cursor: not-allowed; opacity: .6; }

/* ---------- Login (static page) ---------- */
.ahr-login { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--ahr-bg); }
.ahr-login-brand {
  flex: 1 1 520px; min-width: 0; background: var(--ahr-brand); color: #FFFFFF; padding: 48px 56px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px; position: relative; overflow: hidden;
}
.ahr-login-brand::before { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, 0.07); }
.ahr-login-brand::after { content: ""; position: absolute; right: 60px; bottom: -160px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); }
.ahr-login-brand > * { position: relative; }
.ahr-login-brand > img { align-self: flex-start; }
.ahr-login-brand h1 { margin: 0 0 16px; font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.ahr-login-brand p { margin: 0; font-size: 17px; line-height: 1.55; opacity: 0.88; max-width: 520px; }
.ahr-login-credit { font-size: 13px; line-height: 1.7; opacity: 0.85; }
.ahr-login-credit a { color: #FFFFFF; font-weight: 700; text-decoration: none; }
.ahr-login-credit a:hover, .ahr-login-credit a:focus { color: #FFE2B5; text-decoration: none; }

.ahr-login-panel { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; padding: 32px 40px; box-sizing: border-box; }
.ahr-login-top { display: flex; justify-content: flex-end; }
.ahr-segmented { display: flex; background: var(--ahr-chip-bg); border-radius: 10px; padding: 3px; }
.ahr-segmented a { border: 0; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ahr-text-2); min-height: 20px; }
.ahr-segmented a[aria-current="true"] { background: var(--ahr-surface); color: var(--ahr-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.ahr-login-center { flex: 1; display: flex; align-items: center; justify-content: center; }
.ahr-login-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.ahr-login-form h2 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.ahr-login-lead { color: var(--ahr-text-2); font-size: 15px; }
.ahr-login-logo { margin-bottom: 18px; display: block; width: auto; }
.ahr-field { display: flex; flex-direction: column; gap: 6px; }
.ahr-field label { font-size: 13px; font-weight: 600; }
.ahr-field input {
  height: 48px; border: 1px solid var(--ahr-border-strong); border-radius: var(--ahr-radius-input); padding: 0 14px;
  font-size: 15px; background: var(--ahr-surface); color: var(--ahr-text); box-sizing: border-box;
}
.ahr-field input:focus { outline: 2px solid var(--ahr-brand); outline-offset: 1px; }
.ahr-login-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.ahr-login-row label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.ahr-login-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ahr-brand); }
.ahr-login-row a { color: var(--ahr-brand); }
.ahr-login-row a:hover { color: var(--ahr-brand-dark); }
.ahr-login-submit { height: 50px; border: 0; border-radius: 10px; background: var(--ahr-brand); color: #FFFFFF; font-size: 16px; font-weight: 700; cursor: pointer; }
.ahr-login-submit:hover { background: var(--ahr-brand-dark); }
.ahr-notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  background: var(--ahr-warning-bg); color: var(--ahr-warning-text); font-size: 13px; line-height: 1.45;
}
.ahr-notice svg { flex: none; margin-top: 1px; }

/* ---------- Narrow screens: menu becomes an overlay drawer ---------- */
@media (max-width: 959.98px) {
  .ahr-nav {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 1300; transform: translateX(-100%); transition: transform .2s;
    width: var(--ahr-menu-w) !important; flex-basis: auto !important; padding: 20px 14px !important;
  }
  .ahr-shell.nav-open .ahr-nav { transform: none; }
  .ahr-shell .ahr-nav-label { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; }
  .ahr-shell .ahr-nav-item { justify-content: flex-start !important; }
  .ahr-shell .ahr-nav-brand { justify-content: flex-start !important; padding: 4px 10px 20px !important; }
  .ahr-nav-toggle { display: none; }
  .ahr-burger { display: inline-flex; }
  .ahr-shell.nav-open .ahr-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 1299; border: 0; padding: 0; }
  .ahr-header, .ahr-content { padding-left: 16px; padding-right: 16px; }
  .ahr-login-brand { padding: 32px 24px; }
  .ahr-login-brand h1 { font-size: 30px; }
  .ahr-login-panel { padding: 24px 16px; }
}

@media (max-width: 599.98px) {
  .ahr-header-right { gap: 8px; }
  .ahr-login-brand { flex-basis: 100%; }
  .ahr-login-panel { flex-basis: 100%; }
}

@media (pointer: coarse) {
  .ahr-nav-toggle { width: 44px; height: 44px; }
  .ahr-icon-btn { width: 44px; height: 44px; }
  .ahr-lang a { padding: 12px 6px; }
  .ahr-segmented a { padding: 12px 16px; }
}
