/* ==========================================================================
   HRlume APP — Stitch design-system unification (2026-08-09)

   Final presentation layer for the redesigned product shell and the first
   five reference workspaces (Dashboard, People, Employee profile, Mood and
   Settings). Behaviour, permissions and routes intentionally stay untouched.
   ========================================================================== */

:root {
  --sidebar-width: 256px;
  --header-height: 64px;
  --content-max: 1344px;
  --workspace-max: 1280px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .035);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .045), 0 8px 22px rgba(15, 23, 42, .025);
  --shadow-md: 0 8px 26px rgba(15, 23, 42, .07);
}

body {
  background: var(--color-bg);
  letter-spacing: -.004em;
}

h1,
h2,
h3 { letter-spacing: -.025em; }

/* ── Product shell ─────────────────────────────────────────────────────── */
.app-sidebar {
  gap: 0;
  padding: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: none;
}

:root[data-theme='dark'] .app-sidebar {
  border-right-color: var(--color-border);
  background: var(--color-surface);
}

.sidebar__brand {
  display: flex;
  min-height: 80px;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar__brand-row { width: 100%; gap: 10px; }

.sidebar__brand-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.sidebar__brand-full {
  height: 28px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.sidebar__brand-compact { width: 32px; height: 32px; border-radius: 8px; }
.sidebar__brandname { font-size: 15px; letter-spacing: -.015em; }
.sidebar__powered { margin-top: 3px; padding-left: 46px; font-size: 10px; opacity: .55; }

.sidebar__profile {
  min-height: 102px;
  margin: 0;
  padding: 22px 20px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar__profile:hover {
  border-color: var(--color-border);
  background: var(--color-surface-hover);
  box-shadow: none;
  transform: none;
}

.sidebar__profile-avatar .employee-avatar { box-shadow: none; }
.sidebar__profile-name { font-size: 13px; }
.sidebar__profile-role { margin-top: 3px; font-size: 11px; }
.sidebar__profile:hover .sidebar__profile-arrow { transform: none; }

.sidebar__section-label {
  margin: 0;
  padding: 20px 20px 8px;
  color: var(--color-fg-subtle);
  font-size: 9px;
  letter-spacing: .1em;
}

.sidebar__nav { gap: 2px; padding-inline: 8px; }

.sidebar__link {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.sidebar__link > .icon:first-child {
  width: 19px;
  height: 19px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: currentColor;
  box-shadow: none;
}

.sidebar__link:hover {
  background: var(--color-surface-hover);
  color: var(--color-fg);
  transform: none;
}

.sidebar__link:hover > .icon:first-child {
  background: transparent;
  color: var(--color-primary);
  box-shadow: none;
}

.sidebar__link.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  box-shadow: none;
}

.sidebar__link.is-active > .icon:first-child {
  background: transparent;
  color: var(--color-primary);
  box-shadow: none;
}

/* Navigation is an operational map: each destination keeps a quiet icon
   surface so the rail remains scannable in both themes and on Android. */
.sidebar__link > .icon:first-child {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--color-border) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-surface-hover) 62%, transparent);
}
.sidebar__link:hover > .icon:first-child {
  border-color: color-mix(in srgb, var(--color-primary) 20%, var(--color-border));
  background: var(--color-primary-soft);
}
.sidebar__link.is-active > .icon:first-child {
  border-color: color-mix(in srgb, var(--color-primary) 28%, transparent);
  background: color-mix(in srgb, var(--color-primary-soft) 82%, var(--color-surface));
  box-shadow: 0 5px 14px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.sidebar__submenu {
  padding: 6px;
  border-radius: 10px;
  background: var(--color-surface);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sidebar__submenu-link { padding: 9px 11px; border-radius: 7px; }
.sidebar__submenu-link::before { display: none; }

.sidebar__bottom {
  margin-top: auto;
  padding: 12px 8px 10px;
  border-top: 1px solid var(--color-border);
}

.sidebar__bottom .sidebar__section-label { padding: 0 12px 8px; }
.sidebar__bottom .sidebar__link { padding-inline: 12px; }

.sidebar__collapse {
  min-height: 40px;
  margin-top: 2px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.sidebar__collapse .icon {
  width: 19px;
  height: 19px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.app-header {
  height: var(--header-height);
  gap: 16px;
  padding-inline: 24px;
  border-bottom: 1px solid var(--color-border);
  /* Slightly translucent + blurred rather than a flat opaque fill, so
     content scrolling underneath (sticky header) reads as a layer floating
     above the page instead of a plain painted bar. Falls back to the old
     flat --color-surface automatically wherever backdrop-filter isn't
     supported (older WebViews) since color-mix's alpha still applies. */
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hdr-search { max-width: 720px; }

.hdr-search input {
  height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--color-surface-2);
  box-shadow: none;
}

.hdr-search input:hover { border-color: var(--color-border); }
.hdr-icon,
.hdr-user { border-radius: 8px; }
.hdr-actions { gap: 4px; }
.hdr-user { margin-left: 4px; }

.app-view { padding: 32px 32px 56px; }

.license-banner {
  padding-block: 10px;
  border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

/* The new system is intentionally flatter: hierarchy comes from spacing and
   typography, not from large radii, gradients and floating cards. */
.card {
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.btn {
  min-height: 40px;
  border-radius: 8px;
}

.btn--primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: none;
}

.btn--primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  box-shadow: none;
  transform: none;
}

.btn--ghost { background: var(--color-surface); }

.dropdown-menu {
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
}

.modal {
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .18);
}

.modal__head { padding: 22px 24px 18px; }
.modal__body { padding: 22px 24px 24px; }
.modal__close { border-radius: 8px; }

/* ── Shared workspace headings ─────────────────────────────────────────── */
.workspace-hero,
.settings-page-head,
.company-settings-head,
.calendar-settings-head,
.sub-page-head {
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.workspace-hero::after,
.settings-page-head::after,
.company-settings-head::after,
.calendar-settings-head::after,
.sub-page-head::after { display: none; }

.workspace-hero { padding: 24px 24px 0; }
.workspace-hero__top { padding-bottom: 22px; }
.workspace-hero > .workspace-hero__content { padding-bottom: 22px; }

/* ── Dashboard ─────────────────────────────────────────────────────────── */
.dashboard-grid {
  max-width: 1200px;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}

.dash-main { gap: 30px; }
.dash-aside { gap: 16px; }
.greeting-block h1 { font-size: clamp(1.75rem, 2.4vw, 2.1rem); }

.dash-surveys {
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.dash-survey-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface-2);
  box-shadow: none;
}

.announcement-card { padding: 20px; }

.announcement-card.is-pinned {
  border-left-width: 3px;
  background: var(--color-surface);
}

.announcement-card__img { max-height: 220px; border-radius: 9px; }

.stat-chip {
  min-height: 126px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.stat-chip__value { font-size: 1.75rem; }
.dash-card,
.leave-widget { padding: 18px; }

/* ── People directory and employee profile ────────────────────────────── */
.people-workspace { padding-top: 0; }

.people-hero.workspace-hero {
  border-color: color-mix(in srgb, var(--color-primary) 12%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary-soft) 42%, var(--color-surface));
}

.people-hero.workspace-hero::after {
  display: block;
  top: -92px;
  right: 38px;
  width: 220px;
  height: 220px;
  border-color: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.people-overview { gap: 14px; }

.people-kpi,
.onboard-stat {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.onboard-stat:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-xs);
  transform: none;
}

.people-toolbar {
  padding: 14px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.people-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.people-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.people-card__meta {
  gap: 12px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.people-card__footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.org-chart { border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }

.profile { max-width: var(--workspace-max); }
.profile-header { border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.profile-header::before { opacity: .45; }
.profile-panel,
.profile-side-card { border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }

/* ── Settings hub ──────────────────────────────────────────────────────── */
.settings-hub-page { width: min(var(--workspace-max), 100%); }

.settings-hub-page .settings-hub-head {
  align-items: center;
  padding: 24px;
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.settings-hub-head__icon {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: 10px;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  box-shadow: none;
}

.settings-hub-head__icon .icon { width: 22px; height: 22px; }
.settings-hub-head .settings-title { font-size: clamp(1.65rem, 2.5vw, 2rem); }

.settings-hub-page .settings-search {
  width: min(420px, 100%);
  height: 44px;
  border-radius: 8px;
  background: var(--color-surface-2);
  box-shadow: none;
}

.settings-hub-page .settings-hub-chips {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-hub-page .settings-hub-chip {
  min-height: 104px;
  padding: 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.settings-hub-page .settings-hub-chip:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.settings-hub-page .settings-hub-chip__icon,
.settings-hub-page .settings-hub-row__icon {
  border-radius: 9px;
}

.settings-hub-categories { column-gap: 24px; }
.settings-hub-page .settings-hub-card { border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.settings-hub-page .settings-hub-row { min-height: 60px; border-radius: 8px; }

/* ── Mood check-in ─────────────────────────────────────────────────────── */
.mood-checkin-modal {
  max-width: 820px;
  border-color: var(--color-border);
  border-radius: 14px;
  box-shadow: 0 28px 76px rgba(15, 23, 42, .2);
}

.mood-checkin-modal .modal__head {
  padding: 24px 28px 20px;
  background: var(--color-surface);
}

.mood-checkin-modal .modal__icon { width: 40px; height: 40px; border-radius: 9px; }
.mood-checkin-modal .modal__subtitle { margin-left: 52px; }
.mood-checkin-modal .modal__body { padding: 22px 28px 26px; }

.mood-intro {
  padding: 16px;
  border-color: color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-primary-soft) 48%, var(--color-surface));
}

.mood-picker { gap: 12px; }

.mood-opt {
  min-height: 154px;
  padding: 18px 8px;
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: none;
}

.mood-opt:hover {
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
  background: var(--color-surface);
  box-shadow: none;
  transform: none;
}

.mood-opt.is-active {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-primary-soft);
  transform: none;
}

.mood-opt.is-active .mood-emoji { transform: none; }
.mood-opt__check { display: none; }

.mood-emoji {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mood-label { font-size: 13px; }
.mood-actions { padding-top: 18px; border-top: 1px solid var(--color-border); }

/* ── Responsive shell ──────────────────────────────────────────────────── */
@media (min-width: 901px) {
  :root[data-sidebar-collapsed] .app-sidebar { padding-inline: 0; }
  :root[data-sidebar-collapsed] .sidebar__brand {
    min-height: 72px;
    justify-content: center;
    padding-inline: 10px;
  }
  :root[data-sidebar-collapsed] .sidebar__profile {
    width: 100%;
    min-height: 68px;
    justify-content: center;
    margin: 0;
    padding: 12px;
  }
  :root[data-sidebar-collapsed] .sidebar__section-label { padding-inline: 0; }
  :root[data-sidebar-collapsed] .sidebar__nav { padding-inline: 8px; }
  :root[data-sidebar-collapsed] .sidebar__link,
  :root[data-sidebar-collapsed] .sidebar__collapse {
    width: 44px;
    min-height: 42px;
    justify-content: center;
    margin-inline: auto;
    padding: 10px;
  }
  :root[data-sidebar-collapsed] .sidebar__link > .icon:first-child,
  :root[data-sidebar-collapsed] .sidebar__collapse .icon { width: 19px; height: 19px; }
  :root[data-sidebar-collapsed] .sidebar__bottom { padding-inline: 8px; }
}

@media (min-width: 901px) and (max-height: 800px) {
  .app-sidebar { padding-block: 0; }
  .sidebar__brand { min-height: 60px; padding-block: 10px; }
  .sidebar__brand-icon { width: 32px; height: 32px; }
  .sidebar__profile { min-height: 66px; padding-block: 10px; }
  .sidebar__section-label { padding-top: 10px; }
  .sidebar__link { min-height: 34px; padding-block: 6px; }
  .sidebar__link > .icon:first-child { width: 18px; height: 18px; }
  .sidebar__bottom { padding-block: 7px; }
  .sidebar__collapse { min-height: 34px; padding-block: 6px; }
}

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 292px; gap: 24px; }
}

@media (max-width: 900px) {
  .app-sidebar {
    width: min(88vw, 336px);
    padding: max(10px, env(safe-area-inset-top, 0px)) 0 max(8px, env(safe-area-inset-bottom, 0px));
  }
  .sidebar__brand { min-height: 68px; padding-inline: 18px 58px; }
  .sidebar__profile { min-height: 80px; padding: 16px 18px; }
  .sidebar__section-label { padding: 14px 18px 7px; }
  .sidebar__nav { padding-inline: 8px; }
  .sidebar__bottom { padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)); }
  .app-header { height: 60px; padding-inline: 14px; }
  .app-view { padding: 24px 20px 44px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dash-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-chips { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .settings-hub-page .settings-hub-chips { grid-template-columns: 1fr; }
  .settings-hub-categories { column-count: 1; }
}

@media (max-width: 560px) {
  .app-view { padding: 20px 14px 36px; }
  .workspace-hero { padding: 20px 18px 0; }
  .card { border-radius: 11px; }
  .modal { border-radius: 13px; }
  .modal__head { padding: 20px 18px 16px; }
  .modal__body { padding: 18px; }
  .dash-aside { grid-template-columns: 1fr; }
  .stat-chip { min-height: 110px; }
  .settings-hub-page .settings-hub-head { padding: 20px; }
  .settings-hub-head__copy { align-items: flex-start; }
  .settings-hub-head__icon { width: 42px; height: 42px; flex-basis: 42px; }
  .mood-checkin-modal .modal__head { padding: 20px 18px 16px; }
  .mood-checkin-modal .modal__subtitle { margin-left: 0; }
  .mood-checkin-modal .modal__body { padding: 18px; }
  .mood-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mood-opt { min-height: 112px; }
  .mood-opt:last-child { grid-column: 1 / -1; }
}

/* ── 2026-08-12: dense-workspace shell and overview refinements ────────── */
.auth-showcase__brand--company {
  width: 100%;
  min-width: 0;
}
.auth-showcase__brand--company > span:last-child {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  white-space: nowrap;
}

.sidebar__brand {
  align-items: center;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
  cursor: default;
}
.sidebar__brand-row {
  width: 100%;
  min-width: 0;
  justify-content: center;
}
.sidebar__brandname {
  max-width: calc(100% - 48px);
  flex: 0 1 auto;
}
.sidebar__powered {
  justify-content: center;
  margin-top: 4px;
  padding-left: 0;
}

.app-sidebar { overflow: hidden; }
.sidebar__nav--workspace {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--color-fg-subtle) 42%, transparent) transparent;
}
.sidebar__nav--workspace::-webkit-scrollbar { width: 5px; }
.sidebar__nav--workspace::-webkit-scrollbar-track { background: transparent; }
.sidebar__nav--workspace::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-fg-subtle) 38%, transparent);
}
.sidebar__bottom {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin-top: 0;
  background: var(--color-surface);
}
@media (min-width: 901px) {
  .sidebar__submenu {
    position: fixed;
    top: var(--sidebar-submenu-top, 12px);
    left: var(--sidebar-submenu-left, var(--sidebar-width));
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }
}

.settings-hub-page .settings-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  box-sizing: border-box;
  overflow: visible;
}
.settings-hub-page .settings-search > .icon { flex: none; }
.settings-hub-page .settings-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 0;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .sidebar__nav--workspace { padding-bottom: 8px; }
}

@media (max-width: 420px) {
  .settings-search__key { display: none; }
  .settings-hub-page .settings-search { grid-template-columns: auto minmax(0, 1fr); }
}

/* Employee profile: keep every module intact while turning the long flat
   tab rail into scannable semantic groups. */
.profile-tabs {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--color-surface-2) 72%, var(--color-surface));
  scrollbar-width: thin;
}
.profile-tab-group {
  display: flex;
  min-width: max-content;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--color-surface) 82%, transparent);
}
.profile-tab-group__label {
  padding-inline: 7px;
  color: var(--color-fg-subtle);
  font-size: 9px;
  font-weight: var(--font-bold);
  letter-spacing: .07em;
  line-height: 1.4;
  text-transform: uppercase;
}
.profile-tab-group__items { display: flex; align-items: center; gap: 3px; }
.profile-tabs .profile-tab {
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
}
.profile-tabs .profile-tab:hover { background: var(--color-surface-hover); }
.profile-tabs .profile-tab.is-active {
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

@media (max-width: 700px) {
  .profile-tabs {
    margin-inline: -2px;
    padding: 7px;
    scroll-snap-type: x proximity;
  }
  .profile-tab-group { scroll-snap-align: start; }
  .profile-tab-group__items { max-width: min(82vw, 390px); flex-wrap: wrap; }
  .profile-tabs .profile-tab { min-height: 38px; padding-inline: 11px; }
}

/* ── Stitch follow-up: Settings workspace ──────────────────────────────── */
.app-view:has(> .settings-hub-page) {
  max-width: none;
  padding: 0;
}

.settings-hub-page {
  display: grid;
  width: 100%;
  min-height: calc(100vh - var(--header-height) - 42px); min-height: calc(100dvh - var(--header-height) - 42px);
  grid-template-columns: 320px minmax(0, 1fr);
  margin: 0;
  padding: 0;
  background: var(--color-surface);
}

.settings-hub-rail {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  height: calc(100vh - var(--header-height)); height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  min-width: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface-2);
  scrollbar-width: thin;
}

.settings-hub-page .settings-hub-head {
  display: block;
  margin: 0;
  padding: 24px 20px 20px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-hub-head__copy { display: block; }
.settings-hub-head .settings-title { margin: 0 0 6px; font-size: 21px; letter-spacing: -.025em; }
.settings-hub-subtitle { max-width: 29ch; font-size: 13px; line-height: 1.45; }

.settings-hub-page .settings-search {
  width: 100%;
  min-width: 0;
  height: 44px;
  margin-top: 20px;
  border-radius: 8px;
  background: var(--color-surface);
}

.settings-hub-rail__label {
  display: block;
  padding: 20px 30px 8px;
  color: var(--color-fg-muted);
  font-size: 11px;
  font-weight: var(--font-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.settings-hub-category-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 20px 24px;
}

.settings-hub-category-btn {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 13px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-fg);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}

.settings-hub-category-btn .icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: var(--color-fg-muted);
}

.settings-hub-category-btn:hover { background: var(--color-surface-hover); }

.settings-hub-category-btn.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  box-shadow: inset -2px 0 0 var(--color-primary);
}

.settings-hub-category-btn.is-active .icon { color: var(--color-primary); }

.settings-hub-content {
  min-width: 0;
  padding: 42px clamp(28px, 4vw, 56px) 64px;
  background: var(--color-surface);
}

.settings-hub-content > * { width: min(900px, 100%); margin-inline: auto; }
.settings-hub-page .settings-hub-section { margin-bottom: 0; }

.settings-hub-section__head { margin-bottom: 16px; }
.settings-hub-section__head .settings-hub-section__title { font-size: 14px; }

.settings-hub-page .settings-hub-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.settings-hub-page .settings-hub-chip {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 18px 12px;
  border-radius: 9px;
  background: var(--color-surface-2);
  box-shadow: none;
  text-align: center;
}

.settings-hub-page .settings-hub-chip:hover {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.settings-hub-page .settings-hub-chip__icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.settings-hub-page .settings-hub-chip__icon .icon { width: 20px; height: 20px; }
.settings-hub-chip__text { align-items: center; }
.settings-hub-chip__label { font-size: 14px; }
.settings-hub-page .settings-hub-chip__desc,
.settings-hub-page .settings-hub-chip__arrow { display: none; }

.settings-hub-divider {
  height: 1px;
  margin-top: 40px;
  margin-bottom: 40px;
  background: var(--color-border);
}

.settings-hub-active-head { margin-bottom: 28px; }
.settings-hub-active-head[hidden] { display: none; }
.settings-hub-active-head h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.settings-hub-active-head p { margin: 7px 0 0; color: var(--color-fg-muted); font-size: 14px; }

.settings-hub-categories {
  display: block;
  column-count: auto;
  margin-top: 0;
}

.settings-hub-categories .settings-hub-section {
  display: block;
  width: 100%;
  margin: 0;
}

.settings-hub-category-section[hidden],
.settings-hub-section--frequent[hidden] { display: none; }

.settings-hub-page .settings-hub-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 9px;
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.settings-hub-card__head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.settings-hub-card__head h3 { margin: 0; font-size: 14px; }
.settings-hub-card__head span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-fg-muted);
  font-size: 11px;
}

.settings-hub-page .settings-hub-row {
  min-height: 82px;
  padding: 17px 20px;
  border-radius: 0;
  border-bottom: 1px solid var(--color-border);
}

.settings-hub-page .settings-hub-row:last-child { border-bottom: 0; }
.settings-hub-page .settings-hub-row__icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 9px; }
.settings-hub-page .settings-hub-row__label { font-size: 14px; }
.settings-hub-page .settings-hub-row__desc { margin-top: 3px; }

/* ── Stitch follow-up: Mood check-in ───────────────────────────────────── */
.mood-checkin-modal {
  display: flex;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  flex-direction: column;
  max-width: 820px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  border-radius: 28px;
  background: color-mix(in srgb, var(--color-surface-2) 88%, var(--color-surface));
  box-shadow: 0 30px 80px rgba(15, 23, 42, .2);
}

.mood-checkin-modal .modal__head {
  position: relative;
  display: flex;
  min-height: 228px;
  align-items: center;
  justify-content: center;
  padding: 42px 72px 22px;
  border: 0;
  background: transparent;
  text-align: center;
  flex: 0 0 auto;
}

.mood-checkin-modal .modal__head-text,
.mood-checkin-modal .modal__title-row {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.mood-checkin-modal .modal__icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: 16px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  box-shadow: var(--shadow-xs);
}

.mood-checkin-modal .modal__icon .icon { width: 28px; height: 28px; }
.mood-checkin-modal .modal__title { font-size: 27px; letter-spacing: -.035em; }
.mood-checkin-modal .modal__subtitle { margin: 8px 0 0; font-size: 15px; }

.mood-checkin-modal .modal__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-surface) 78%, transparent);
  box-shadow: var(--shadow-sm);
}

.mood-checkin-modal .modal__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 50px 48px;
  scrollbar-gutter: stable;
}

.mood-intro {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 38px;
  padding: 20px 24px;
  border: 1px solid color-mix(in srgb, var(--color-surface) 80%, var(--color-border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--color-surface) 76%, transparent);
  box-shadow: var(--shadow-xs);
}

.mood-intro__icon { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; color: var(--color-primary); }
.mood-intro__eyebrow { margin-bottom: 6px; color: var(--color-fg); font-size: 14px; letter-spacing: 0; text-transform: none; }
.mood-intro p { max-width: none; font-size: 14px; line-height: 1.65; }

.mood-picker { gap: 14px; margin-bottom: 46px; }

.mood-opt {
  min-height: 176px;
  gap: 12px;
  padding: 20px 8px;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--color-surface) 76%, transparent);
  box-shadow: none;
}

.mood-opt:hover {
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.mood-opt.is-active {
  border: 2px solid #f5b700;
  background: color-mix(in srgb, #fff7cf 48%, var(--color-surface));
  box-shadow: 0 0 0 4px color-mix(in srgb, #f5b700 18%, transparent), var(--shadow-sm);
  transform: none;
}

.mood-emoji {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mood-emoji > span { font-size: 44px; filter: drop-shadow(0 3px 4px rgba(15, 23, 42, .08)); }
.mood-label { min-height: 34px; color: var(--color-fg); font-size: 13px; font-weight: var(--font-medium); }
.mood-opt.is-active .mood-label { color: var(--color-fg); font-weight: var(--font-bold); }
.mood-opt__check { display: none; }

.mood-note-field textarea { background: var(--color-surface); }

.mood-actions {
  justify-content: flex-end;
  margin-top: 0;
  padding-top: 22px;
  border-top-color: color-mix(in srgb, var(--color-border) 68%, transparent);
}

.mood-actions__buttons { display: flex; align-items: center; gap: 12px; }
.mood-submit-btn { min-width: 230px; }

@media (max-width: 1100px) {
  .settings-hub-page { grid-template-columns: 276px minmax(0, 1fr); }
  .settings-hub-content { padding-inline: 28px; }
  .settings-hub-page .settings-hub-chips { gap: 10px; }
}

@media (max-width: 900px) {
  .app-view:has(> .settings-hub-page) { padding: 0; }
  .settings-hub-page { min-height: calc(100vh - 102px); min-height: calc(100dvh - 102px); grid-template-columns: 1fr; }
  .settings-hub-rail {
    position: static;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }
  .settings-hub-page .settings-hub-head { padding: 20px; }
  .settings-hub-rail__label { padding: 16px 20px 8px; }
  .settings-hub-category-nav {
    overflow-x: auto;
    flex-direction: row;
    padding: 0 20px 18px;
    padding-right: 54px;
    scroll-padding-inline: 20px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 34px), transparent 100%);
  }
  .settings-hub-category-nav::-webkit-scrollbar { display: none; }
  .settings-hub-category-btn {
    width: auto;
    min-width: max-content;
    min-height: 40px;
    padding: 8px 12px;
    scroll-snap-align: start;
  }
  .settings-hub-category-btn.is-active { box-shadow: inset 0 -2px 0 var(--color-primary); }
  .settings-hub-content { padding: 28px 20px 48px; }
}

@media (max-width: 700px) {
  .settings-hub-page .settings-hub-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-hub-page .settings-hub-chip { min-height: 96px; gap: 9px; padding-block: 14px; }
  .settings-hub-page .settings-hub-chip__icon { width: 42px; height: 42px; flex-basis: 42px; }
  .settings-hub-page .settings-hub-chip:last-child:nth-child(odd) {
    min-height: 72px;
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    padding-inline: 16px;
    text-align: left;
  }
  .settings-hub-page .settings-hub-chip:last-child:nth-child(odd) .settings-hub-chip__text {
    align-items: flex-start;
  }
  .settings-hub-divider { margin-block: 28px; }
  .settings-hub-active-head { margin-bottom: 20px; }
  .settings-hub-active-head h2 { font-size: 22px; }
  .mood-checkin-modal { width: calc(100vw - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 22px; }
  .mood-checkin-modal .modal__head { min-height: 132px; padding: 22px 52px 14px; }
  .mood-checkin-modal .modal__icon { width: 40px; height: 40px; margin-bottom: 10px; border-radius: 12px; }
  .mood-checkin-modal .modal__icon .icon { width: 22px; height: 22px; }
  .mood-checkin-modal .modal__title { font-size: 20px; line-height: 1.2; }
  .mood-checkin-modal .modal__subtitle { margin-top: 5px; font-size: 13px; }
  .mood-checkin-modal .modal__close { top: 16px; right: 16px; width: 40px; height: 40px; }
  .mood-checkin-modal .modal__body { padding: 0 18px 22px; overflow-y: auto; }
  .mood-intro { margin-bottom: 16px; padding: 12px 14px; border-radius: 14px; }
  .mood-intro p { font-size: 12px; line-height: 1.45; }
  /* Five cards cannot stay legible in one 340px-wide row. A balanced 3+2
     composition keeps every card equal within its row and gives the two
     longer edge labels enough room without returning to oversized tiles. */
  .mood-picker { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
  .mood-opt, .mood-opt:last-child { grid-column: span 2; min-height: 88px; gap: 6px; padding: 9px 4px; border-radius: 13px; }
  /* Explicit tracks prevent older `last-child` rules from making the final
     row 2/3 + 1/3 on cached mobile stylesheets. */
  .mood-picker > .mood-opt:nth-child(4) { grid-column: 1 / span 3; }
  .mood-picker > .mood-opt:nth-child(5) { grid-column: 4 / span 3; }
  .mood-emoji > span { font-size: 27px; }
  .mood-label { min-height: 24px; font-size: 10px; line-height: 1.15; overflow-wrap: normal; }
  .mood-actions { align-items: stretch; flex-direction: column; gap: 18px; }
  .mood-actions__buttons { width: 100%; }
  .mood-actions__buttons .btn { min-width: 0; flex: 1; }
}

@media (max-width: 420px) {
  .settings-hub-page .settings-hub-row { min-height: 74px; padding: 14px; }
  .settings-hub-page .settings-hub-row__icon { width: 38px; height: 38px; flex-basis: 38px; }
  .settings-hub-page .settings-hub-chip { padding-inline: 8px; }
  .mood-actions__buttons { flex-direction: column-reverse; }
  .mood-actions__buttons .btn { width: 100%; }
  .mood-checkin-modal .modal__body { padding-inline: 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Lume Precision · Leave center + absence request (Stitch set 3)
   The API contract and workflows stay in their existing modules; this
   layer only gives the two surfaces the quieter, high-trust composition
   defined by the new design system.
   ═══════════════════════════════════════════════════════════════════════ */

body .lv-head.workspace-hero {
  margin-bottom: 30px;
  padding: 28px 30px 0;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-surface);
  box-shadow: none;
}
body .lv-head.workspace-hero::after { display: none; }
.lv-head.workspace-hero > .workspace-hero__content { padding: 0 0 30px; }
.lv-head.workspace-hero .workspace-hero__eyebrow {
  margin-bottom: 7px;
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .075em;
}
.lv-head.workspace-hero h1 {
  margin: 0 0 7px;
  font-family: 'Sora', var(--font-sans);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.lv-head.workspace-hero .workspace-hero__description {
  max-width: 780px;
  color: var(--color-fg-muted);
  font-size: 14px;
  line-height: 1.55;
}
.lv-head.workspace-hero > .workspace-hero__nav.lv-tabs {
  gap: 30px;
  min-height: 54px;
  padding: 0;
  border-top: 0;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}
.lv-head.workspace-hero > .workspace-hero__nav.lv-tabs .lv-tab {
  min-height: 54px;
  padding: 0 4px;
  border-radius: 0;
  font-size: 14px;
}
/* polish.css pulls the first tab left by --space-4 (16px) to align its text
   under the heading — calibrated for the pre-redesign 24px container
   padding + 16px tab padding. This block dropped both to 0/4px without
   adjusting that pull, so the negative margin overshot past the container's
   left edge and clipped the first 1-2 letters of "Мої відпустки". No pull
   needed here — 0 padding already lines the tab up with the heading. */
.lv-head.workspace-hero > .workspace-hero__nav.lv-tabs > .lv-tab:first-child {
  margin-inline-start: 0;
}

.lv-hub { padding-bottom: 42px; }
.lv-hub .card {
  border-color: var(--color-border);
  border-radius: 16px;
  box-shadow: none;
}
.lv-hub .card:hover { border-color: var(--color-border-strong); }
.lv-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.lv-summary-card {
  min-height: 146px;
  padding: 28px 30px;
  gap: 24px;
}
.lv-summary-card:hover { transform: none; box-shadow: none; }
.lv-summary-card__ring-wrap,
.lv-kpi-ring { width: 72px; height: 72px; }
.lv-summary-card__icon { width: 34px; height: 34px; }
.lv-summary-card__icon .icon { width: 18px; height: 18px; }
.lv-summary-card__num {
  font-family: 'Sora', var(--font-sans);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.035em;
}
.lv-summary-card__num span { font-size: 13px; }
.lv-summary-card__label {
  max-width: none;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.35;
}
.lv-summary-card__sub { margin-top: 3px; font-size: 12px; }
.lv-summary-card--pending {
  background: color-mix(in srgb, var(--color-warning-soft) 78%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-warning) 35%, var(--color-border));
}
.lv-summary-card--pending .lv-summary-card__icon--flat {
  width: 54px;
  height: 54px;
  background: color-mix(in srgb, var(--color-warning) 14%, transparent);
}
.lv-summary-card--pending .lv-summary-card__icon .icon { width: 24px; height: 24px; }

.lv-hub__body {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 30px;
  margin-bottom: 38px;
}
.lv-section-head { margin-bottom: 18px; }
/* h2/.btn sizing deliberately left to leaves.css's own .lv-section-head
   rules (var(--text-lg), the standard .btn) — this file used to override
   both with a one-off 22px Sora heading + 44px button, unlike every other
   list-head H2 in the app (people-results-head, docs-list-head, kb-list-
   head, sv-list-head, assets-list-head, sub-section-head all use
   var(--text-lg)) — "Останні запити"/"Подати запит" stood out next to
   everything else on the page for exactly that reason. */
.lv-req-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lv-req-card {
  min-height: 140px;
  padding: 20px;
  gap: 14px;
}
.lv-req-card:hover { box-shadow: 0 10px 26px rgba(16, 24, 40, .06); }
.lv-req-card__dates {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.lv-req-card__meta {
  flex-direction: row;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.lv-type-badge,
.status-badge.lv-pending,
.status-badge.lv-approved,
.status-badge.lv-rejected {
  min-height: 25px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11px;
}
.lv-widget { padding: 22px 24px; }
.lv-widget__head { margin-bottom: 20px; }
.lv-widget__head h3 { font-size: 14px; }
.lv-widget__icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.lv-widget__list { gap: 15px; }
.lv-widget__row-title { font-weight: 650; }
.lv-widget__balance-row { gap: 8px; margin-bottom: 16px; }
.lv-widget .balance-bar { height: 8px; }
.lv-widget__action { min-height: 42px; border-radius: 9px; }

/* Absence request is a contained modal now, rather than a white page that
   visually replaces the whole application. */
.lvw-overlay {
  justify-content: center;
  padding: 32px;
  background: rgba(20, 25, 35, .42);
  backdrop-filter: blur(4px);
}
.lvw {
  width: min(1440px, calc(100vw - 64px));
  height: min(90vh, 1120px); height: min(90dvh, 1120px);
  max-width: 1440px;
  max-height: 90vh; max-height: 90dvh;
  margin: auto;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface-2);
  box-shadow: 0 28px 70px rgba(16, 24, 40, .22);
  transform: translateY(18px) scale(.985);
  transition: transform var(--dur-base) var(--ease-out);
}
.lvw-overlay--in .lvw { transform: none; }
.lvw__head {
  min-height: 150px;
  padding: 28px 38px;
  background: var(--color-surface);
}
.lvw__heading h2 {
  margin: 6px 0 6px;
  font-family: 'Sora', var(--font-sans);
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.lvw__heading p { max-width: 700px; font-size: 14px; }
.lvw__kicker { font-size: 10px; letter-spacing: .11em; }
.lvw__head .modal__close {
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--color-fg-subtle);
}
.lvw__head .modal__close:hover {
  border-color: var(--color-border);
  background: var(--color-surface-hover);
  color: var(--color-fg);
}
.lvw__body {
  grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr);
  align-items: start;
  gap: 30px;
  padding: 34px 40px 42px;
  background: var(--color-surface-2);
  overscroll-behavior: contain;
}
.lvw__main { gap: 24px; }
.lvw-form-section {
  padding: 28px 30px;
  border-radius: 18px;
  background: var(--color-surface);
  box-shadow: 0 2px 6px rgba(16, 24, 40, .025);
}
.lvw-form-section__head {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.lvw-form-section__head > span {
  width: 36px;
  height: 36px;
  background: var(--color-primary-soft);
  font-size: 13px;
}
.lvw-form-section__head h3 {
  margin-bottom: 5px;
  font-family: 'Sora', var(--font-sans);
  font-size: 17px;
  letter-spacing: -.015em;
}
.lvw-form-section__head p { font-size: 13px; line-height: 1.5; }
.lvw-type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lvw-type-card {
  min-height: 178px;
  gap: 12px;
  padding: 22px;
  border-width: 1px;
  border-radius: 14px;
  box-shadow: 0 2px 5px rgba(16, 24, 40, .025);
}
.lvw-type-card:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
  box-shadow: 0 8px 22px rgba(16, 24, 40, .055);
}
.lvw-type-card.is-selected {
  border-width: 2px;
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary-soft) 45%, var(--color-surface));
}
.lvw-type-card__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 5px;
  border-radius: 10px;
}
.lvw-type-card__name { font-size: 14px; line-height: 1.4; }
.lvw-type-card__balance { margin-top: auto; }
.lvw-cal-big { max-width: 600px; }
.lvw-cal-big .lvr-cal__head { margin-bottom: 18px; }
.lvw-cal-grid-big { gap: 4px 0; }
.lvw-cal-grid-big .lvw-cd-big { height: 48px; border-radius: 10px; }
.lvw-range-readout {
  min-height: 42px;
  margin-top: 20px;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--color-surface-2);
}
.lvw__aside {
  top: 0;
  gap: 20px;
  align-self: start;
}
.lvw-aside__card {
  padding: 28px 30px;
  border-radius: 18px;
  background: var(--color-surface);
  box-shadow: 0 2px 6px rgba(16, 24, 40, .025);
}
.lvw-aside__card h4 {
  margin-bottom: 24px;
  font-family: 'Sora', var(--font-sans);
  font-size: 15px;
}
.lvw-aside__card--summary {
  background: color-mix(in srgb, var(--color-primary-soft) 62%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
}
.lvw-aside__eyebrow { margin-bottom: 24px; letter-spacing: .1em; }
.lvw-aside__card .lvr-sum-row { min-height: 41px; }
.lvw-aside__card .lvr-sum-row--total { margin-top: 3px; padding-top: 15px; }
.lvw__foot {
  min-height: 78px;
  padding: 16px 38px;
  background: var(--color-surface);
}
.lvw__foot-actions .btn {
  min-width: 132px;
  min-height: 44px;
  border-radius: 10px;
}

@media (max-width: 1100px) {
  .lvw-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lvw__body { grid-template-columns: minmax(0, 1fr) 290px; padding-inline: 28px; }
}

@media (max-width: 900px) {
  .lv-hub__body { grid-template-columns: 1fr; }
  .lvw-overlay { padding: 14px; }
  .lvw { width: calc(100vw - 28px); height: calc(100vh - 28px); height: calc(100dvh - 28px); max-height: none; }
  .lvw__body { grid-template-columns: 1fr; }
  .lvw__aside { position: static; }
}

@media (max-width: 700px) {
  body .lv-head.workspace-hero { margin-bottom: 22px; padding: 22px 20px 0; border-radius: 15px; }
  .lv-head.workspace-hero > .workspace-hero__content { padding-bottom: 22px; }
  .lv-head.workspace-hero > .workspace-hero__nav.lv-tabs { gap: 22px; min-height: 49px; }
  .lv-head.workspace-hero > .workspace-hero__nav.lv-tabs .lv-tab { min-height: 49px; }
  .lv-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .lv-summary-card {
    min-height: 108px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  .lv-summary-card__ring-wrap,
  .lv-kpi-ring { width: 42px; height: 42px; }
  .lv-summary-card__icon { width: 24px; height: 24px; }
  .lv-summary-card--pending .lv-summary-card__icon--flat { width: 42px; height: 42px; }
  .lv-summary-card--pending .lv-summary-card__icon .icon { width: 18px; height: 18px; }
  .lv-summary-card__num { font-size: 21px; }
  .lv-summary-card__label { margin-top: 0; font-size: 12px; overflow-wrap: anywhere; }
  .lv-summary-card__sub { margin-top: 0; line-height: 1.25; }
  .lv-req-grid { grid-template-columns: 1fr; }
  .lv-req-card { min-height: 132px; }
  /* padding-top here, not just padding:0 shorthand, otherwise it silently
     discards leaves.css's own --safe-area-top reservation at exactly the
     breakpoint that needs it (small phones) — same class of bug as
     .workflow-modal's dvh fix: .lvw's own height below is a viewport unit,
     not a percentage of this overlay, so it doesn't auto-shrink for the
     overlay's padding on its own; the calc() here does that explicitly. */
  .lvw-overlay { padding: 0; padding-top: var(--safe-area-top); }
  .lvw {
    width: 100vw;
    height: calc(100vh - var(--safe-area-top)); height: calc(100dvh - var(--safe-area-top));
    border: 0;
    border-radius: 0;
  }
  .lvw__head { min-height: 126px; padding: 22px 20px; }
  .lvw__heading h2 { font-size: 22px; }
  .lvw__heading p { display: block; font-size: 12px; }
  .lvw__body { gap: 16px; padding: 18px 16px 28px; }
  .lvw-form-section { padding: 20px 18px; border-radius: 15px; }
  .lvw-form-section__head { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; margin-bottom: 20px; }
  .lvw-form-section__head > span { width: 32px; height: 32px; }
  .lvw-type-grid { grid-template-columns: 1fr; gap: 10px; }
  .lvw-type-card {
    min-height: 102px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    padding: 16px;
  }
  .lvw-type-card__icon { grid-row: 1 / 3; margin: 0; }
  .lvw-type-card__balance { margin: 0; }
  .lvw-cal-grid-big .lvw-cd-big { height: 40px; font-size: 13px; }
  .lvw-aside__card { padding: 22px 20px; border-radius: 15px; }
  .lvw__foot { min-height: 72px; padding: 12px 16px; }
}

@media (max-width: 420px) {
  .lv-req-card__meta { flex-direction: column; }
  .lvw__head .modal__close { width: 38px; height: 38px; }
  .lvw__foot-actions { gap: 8px; }
  .lvw__foot-actions .btn { min-height: 42px; }
}

/* ════════════════════════════════════════════════════════════════════════
   2026-08-14 UI audit: Calm Operational Clarity
   Canonical finishing rules for the shared shell and cross-module surfaces.
   They intentionally contain no feature-specific data or behaviour.
   ═══════════════════════════════════════════════════════════════════════════ */

.app-view {
  width: 100%;
  max-width: var(--content-max);
  padding: var(--content-section-gap) var(--content-gutter) 64px;
}

.app-sidebar {
  isolation: isolate;
  gap: 0;
}

.sidebar__nav--workspace {
  padding-block: 4px 12px;
  scroll-padding-block: 8px;
}

.sidebar__bottom {
  box-shadow: 0 -12px 24px color-mix(in srgb, var(--color-surface) 94%, transparent);
}

.sidebar__link,
.sidebar__collapse,
.hdr-icon,
.hdr-user,
.dropdown-item {
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  padding-inline: var(--content-gutter);
}

.hdr-search { max-width: 620px; }
.hdr-search input { padding-right: 48px; }

.workspace-hero,
.settings-page-head {
  border-color: color-mix(in srgb, var(--color-border) 88%, transparent);
  background:
    radial-gradient(420px 180px at 100% 0, color-mix(in srgb, var(--color-primary) 8%, transparent), transparent 72%),
    var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.workspace-hero h1,
.settings-page-head h1 {
  text-wrap: balance;
}

.workspace-hero__description,
.settings-page-head p {
  max-width: 68ch;
  text-wrap: pretty;
}

.workspace-hero__top > .btn,
.workspace-hero__top > [class*="action"] {
  flex: 0 0 auto;
}

/* Canonical mood selector. Earlier Stitch explorations used multiple 3+2
   grids, producing mismatched tiles on phones. Five equal compact choices
   now stay in one predictable row and the dialog uses one scroll region. */
.mood-checkin-modal {
  display: flex;
  width: min(720px, calc(100vw - 32px));
  max-width: 720px;
  max-height: min(760px, calc(100vh - 32px)); max-height: min(760px, calc(100dvh - 32px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, var(--color-border));
  border-radius: 24px;
  background: var(--color-surface);
  box-shadow: 0 28px 80px color-mix(in srgb, var(--color-fg) 22%, transparent);
}

.mood-checkin-modal .modal__head {
  position: relative;
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 72px 20px 26px;
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(260px 130px at 100% 0, color-mix(in srgb, var(--color-primary) 11%, transparent), transparent 75%),
    var(--color-surface);
  text-align: left;
}

.mood-checkin-modal .modal__head-text,
.mood-checkin-modal .modal__title-row {
  align-items: center;
  flex-direction: row;
}

.mood-checkin-modal .modal__head-text { min-width: 0; }
.mood-checkin-modal .modal__title-row { gap: 12px; }
.mood-checkin-modal .modal__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: 13px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  box-shadow: none;
}
.mood-checkin-modal .modal__icon .icon { width: 21px; height: 21px; }
.mood-checkin-modal .modal__title { font-size: 22px; letter-spacing: -.035em; }
.mood-checkin-modal .modal__subtitle { margin: 5px 0 0 54px; font-size: 13px; }
.mood-checkin-modal .modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.mood-checkin-modal .modal__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px 26px 26px;
  scrollbar-gutter: stable;
}

.mood-intro {
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface-2);
  box-shadow: none;
}
.mood-intro__eyebrow { margin-bottom: 3px; color: var(--color-fg); font-size: 13px; letter-spacing: 0; text-transform: none; }
.mood-intro p { font-size: 13px; line-height: 1.5; }
.mood-picker {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.mood-opt,
.mood-opt:last-child {
  grid-column: auto;
  min-height: 116px;
  gap: 8px;
  padding: 12px 6px;
  border: 1px solid var(--color-border);
  border-radius: 15px;
  background: var(--color-surface);
  box-shadow: none;
}
.mood-opt:hover { border-color: color-mix(in srgb, var(--mood-c) 52%, var(--color-border)); transform: translateY(-1px); }
.mood-opt.is-active {
  border: 1px solid var(--mood-c);
  background: color-mix(in srgb, var(--mood-s) 60%, var(--color-surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mood-c) 13%, transparent);
  transform: none;
}
.mood-emoji { width: 44px; height: 44px; border: 0; background: transparent; box-shadow: none; }
.mood-emoji > span { font-size: 30px; filter: none; }
.mood-label { min-height: 30px; color: var(--color-fg); font-size: 11px; line-height: 1.2; font-weight: var(--font-semibold); }
.mood-opt__check { display: grid; width: 18px; height: 18px; top: 7px; right: 7px; }
.mood-note-field textarea { background: var(--color-surface); }
.mood-actions { margin-top: 0; padding-top: 18px; border-top: 1px solid var(--color-border); }
.mood-actions__buttons { display: flex; align-items: center; gap: 10px; }
.mood-submit-btn { min-width: 220px; }

@media (max-width: 900px) {
  .app-view { padding: 24px 20px 48px; }
  .sidebar__bottom { box-shadow: 0 -10px 20px color-mix(in srgb, var(--color-surface) 92%, transparent); }
}

@media (max-width: 600px) {
  .app-view { padding: 20px 14px 40px; }
  .workspace-hero,
  .settings-page-head { border-radius: 16px; }
  .workspace-hero__top { align-items: stretch; flex-direction: column; }
  .workspace-hero__top > .btn,
  .workspace-hero__top > [class*="action"] { width: 100%; }

  .mood-checkin-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
    border-radius: 20px;
  }
  .mood-checkin-modal .modal__head { padding: 18px 58px 16px 18px; }
  .mood-checkin-modal .modal__title { font-size: 19px; }
  .mood-checkin-modal .modal__subtitle { margin-left: 48px; font-size: 12px; }
  .mood-checkin-modal .modal__icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
  .mood-checkin-modal .modal__close { top: 16px; right: 14px; width: 36px; height: 36px; }
  .mood-checkin-modal .modal__body { padding: 16px; }
  .mood-intro { margin-bottom: 14px; padding: 11px 12px; }
  .mood-intro p { font-size: 11px; line-height: 1.4; }
  .mood-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin-bottom: 16px; }
  .mood-opt,
  .mood-opt:last-child,
  .mood-picker > .mood-opt:nth-child(4),
  .mood-picker > .mood-opt:nth-child(5) {
    grid-column: auto;
    min-height: 82px;
    gap: 4px;
    padding: 7px 2px;
    border-radius: 12px;
  }
  .mood-emoji { width: 34px; height: 34px; }
  .mood-emoji > span { font-size: 24px; }
  .mood-label { min-height: 23px; font-size: 9px; line-height: 1.12; overflow-wrap: anywhere; }
  .mood-opt__check { display: none; }
  .mood-actions { gap: 10px; padding-top: 14px; }
  .mood-actions__buttons { width: 100%; flex-direction: column-reverse; }
  .mood-actions__buttons .btn { width: 100%; min-width: 0; }
}

/* Android status bar clearance (env(safe-area-inset-top), 0 everywhere
   except the Android app — see index.html's viewport-fit=cover). Appended
   last, deliberately: earlier .app-header/.app-sidebar rules in this same
   cascade (polish.css, and this file's own earlier rules) each redeclare
   height/padding as flat shorthands that silently discarded the same fix
   when it previously lived only in layout.css — profile avatar and header
   icons were clipping into the status bar as a result. */
.app-header {
  height: auto;
  min-height: calc(var(--header-height) + var(--safe-area-top));
  padding-top: var(--safe-area-top);
}
@media (max-width: 900px) {
  .app-sidebar { padding-top: var(--safe-area-top); }
}

/* Employee passport — identity first, using real HR fields only. */
.profile { width: 100%; }
.profile-back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-bottom: 12px; font-weight: var(--font-semibold); }
.profile-back .icon { width: 16px; height: 16px; }
.profile-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px 28px; overflow: visible; padding: 26px 28px 0; border-left: 4px solid var(--color-primary); background: var(--color-surface); }
.profile-header::before { display: none; }
.profile-header__identity { display: flex; align-items: center; min-width: 0; gap: 20px; }
.profile-header__identity .employee-avatar { box-shadow: 0 0 0 5px var(--color-surface), 0 0 0 6px color-mix(in srgb, var(--color-primary) 28%, var(--color-border)); }
.profile-header__eyebrow { color: var(--color-primary); font-size: 10px; font-weight: var(--font-bold); letter-spacing: .11em; text-transform: uppercase; }
.profile-header__info { gap: 5px; }
.profile-header__title-row { flex-wrap: wrap; gap: 8px 12px; }
.profile-header__info h1 { margin: 0; font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -.035em; line-height: 1.12; }
.profile-header__pos { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; font-size: 14px; }
.profile-header__pos span { color: var(--color-border-strong); }
.profile-header__contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.profile-header__contacts a { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 9px; border: 1px solid var(--color-border); border-radius: 8px; color: var(--color-fg-muted); background: var(--color-surface-2); font-size: 12px; font-weight: var(--font-semibold); }
.profile-header__contacts a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.profile-header__contacts .icon { width: 14px; height: 14px; }
.profile-facts { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-inline: -28px; border-top: 1px solid var(--color-border); background: color-mix(in srgb, var(--color-surface-2) 72%, var(--color-surface)); }
.profile-fact { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 72px; padding: 13px 18px; border-right: 1px solid var(--color-border); }
.profile-fact:last-child { border-right: 0; }
.profile-fact__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--color-primary); background: var(--color-primary-soft); }
.profile-fact__icon .icon { width: 15px; height: 15px; }
.profile-fact span:last-child { min-width: 0; }
.profile-fact small, .profile-security-note small { display: block; color: var(--color-fg-subtle); font-size: 10px; line-height: 1.25; }
.profile-fact strong, .profile-security-note strong { display: block; overflow: hidden; color: var(--color-fg); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-tabs { position: sticky; z-index: 8; top: calc(var(--header-height) + var(--safe-area-top)); margin-bottom: 20px; box-shadow: 0 8px 18px color-mix(in srgb, var(--color-bg) 72%, transparent); }
.profile-tabs .profile-tab:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.profile-grid { grid-template-columns: minmax(0, 8fr) minmax(250px, 3fr); gap: 20px; }
.profile-panel { padding: 0; }
.profile-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-section { min-height: 100%; padding: 22px; }
.profile-section__head { margin-bottom: 18px; }
.profile-section__title { font-size: 16px; letter-spacing: -.015em; }
.profile-section .info-grid { gap: 0; }
.profile-section .info-grid__row { grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.profile-section .info-grid__row:last-child { border-bottom: 0; }
.profile-section__link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--color-border); color: var(--color-primary); font-size: 12px; font-weight: var(--font-semibold); }
.profile-section__link .icon { width: 15px; height: 15px; }
.profile-security-note { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 10px; color: var(--color-success); background: var(--color-success-soft); }
.profile-security-note > .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.profile-security-note strong { white-space: normal; }
.profile-side-card { padding: 18px; }
.profile-side-card__head h3 { color: var(--color-fg); font-size: 12px; letter-spacing: .02em; }
.profile-side-card__contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.profile-side-card__contact-actions .btn { gap: 6px; min-width: 0; }
.profile-side-card__contact-actions .icon { width: 14px; height: 14px; }
@media (max-width: 1100px) {
  .profile-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-fact:nth-child(3) { border-right: 0; }
  .profile-fact:nth-child(n + 4) { border-top: 1px solid var(--color-border); }
}
@media (max-width: 900px) {
  .profile-header { grid-template-columns: minmax(0, 1fr) auto; align-items: start; padding: 22px 22px 0; }
  .profile-header__actions { width: auto; align-self: start; }
  .profile-header__actions > .btn { flex: none; }
  .profile-facts { margin-inline: -22px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .profile-header { grid-template-columns: 1fr; gap: 16px; padding: 18px 16px 0; }
  .profile-header__identity { align-items: flex-start; gap: 14px; }
  .profile-header__identity .employee-avatar { width: 68px !important; height: 68px !important; }
  .profile-header__info h1 { font-size: 23px; }
  .profile-header__actions { width: 100%; }
  .profile-header__actions > .btn { flex: 1; }
  .profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: -16px; }
  .profile-fact { min-height: 64px; padding: 11px 13px; }
  .profile-fact:nth-child(3) { border-right: 1px solid var(--color-border); }
  .profile-fact:nth-child(even) { border-right: 0; }
  .profile-fact:nth-child(n + 3) { border-top: 1px solid var(--color-border); }
  .profile-tabs { top: calc(var(--header-height) + var(--safe-area-top)); margin-inline: -6px; border-radius: 13px; }
  .profile-tab-group__items { flex-wrap: nowrap; max-width: none; }
  .profile-section-grid, .profile-sidebar { grid-template-columns: 1fr; }
  .profile-section { padding: 18px 16px; }
  .profile-section .info-grid__row { grid-template-columns: 1fr; gap: 3px; padding: 9px 0; }
}

/* Personal profile records: one shared visual language for skills, emergency
   contacts and dependents instead of borrowing certification cards. */
.profile-tab-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 4px 2px; }
.profile-tab-heading > div { min-width: 0; }
.profile-tab-heading span { display: block; color: var(--color-fg); font-size: 16px; font-weight: var(--font-bold); letter-spacing: -.015em; }
.profile-tab-heading p { max-width: 62ch; margin: 4px 0 0; color: var(--color-fg-muted); font-size: 12px; line-height: 1.5; }
.profile-tab-heading__count { flex: 0 0 auto; padding: 6px 9px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-fg-muted); background: var(--color-surface); font-size: 11px; font-weight: var(--font-semibold); }
.profile-work-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.profile-work-summary--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-work-summary__item { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid var(--color-border); border-radius: 14px; background: linear-gradient(145deg, color-mix(in srgb, var(--color-primary-soft) 36%, var(--color-surface)), var(--color-surface)); }
.profile-work-summary__item > span { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--color-primary); background: var(--color-primary-soft); }
.profile-work-summary__item .icon { width: 16px; height: 16px; }
.profile-work-summary__item div { min-width: 0; }
.profile-work-summary__item b { display: block; color: var(--color-fg); font-size: 18px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.profile-work-summary__item small { display: block; margin-top: 3px; overflow: hidden; color: var(--color-fg-muted); font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.profile-register-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 1px; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-border); }
.profile-register-summary__item { position: relative; display: grid; min-width: 0; min-height: 70px; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 13px; background: var(--color-surface); }
.profile-register-summary__item::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--color-primary); opacity: .7; }
.profile-register-summary__item.is-success::before { background: var(--color-success); }
.profile-register-summary__item.is-warning::before { background: var(--color-warning); }
.profile-register-summary__item.is-danger::before { background: var(--color-danger); }
.profile-register-summary__item > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: var(--color-primary); background: var(--color-primary-soft); }
.profile-register-summary__item.is-success > span { color: var(--color-success); background: var(--color-success-soft); }
.profile-register-summary__item.is-warning > span { color: var(--color-warning); background: var(--color-warning-soft); }
.profile-register-summary__item.is-danger > span { color: var(--color-danger); background: var(--color-danger-soft); }
.profile-register-summary__item .icon { width: 15px; height: 15px; }
.profile-register-summary__item b { display: block; color: var(--color-fg); font-size: 17px; line-height: 1; font-variant-numeric: tabular-nums; }
.profile-register-summary__item small { display: block; margin-top: 4px; overflow: hidden; color: var(--color-fg-muted); font-size: 10px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.profile-panel .doc-list, .profile-panel .asset-list { align-items: stretch; }
.profile-panel .doc-item, .profile-panel .asset-item { position: relative; min-height: 82px; overflow: hidden; }
.profile-panel .doc-item::before, .profile-panel .asset-item::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--color-primary); opacity: .65; }
.profile-panel .asset-item__warranty.is-warning { color: var(--color-warning); font-weight: var(--font-semibold); }
.profile-learning-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-panel .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-learning-grid .lms-card { min-height: 250px; }
.profile-learning-grid .lms-card__head { grid-template-columns: auto minmax(0, 1fr) auto; }
.profile-learning-card__icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--color-primary); background: var(--color-primary-soft); }
.profile-learning-card__icon .icon { width: 18px; height: 18px; }
.profile-learning-grid .is-overdue .profile-learning-card__icon { color: var(--color-danger); background: var(--color-danger-soft); }
.profile-learning-grid .is-complete .profile-learning-card__icon { color: var(--color-success); background: var(--color-success-soft); }
.profile-learning-card__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: auto 0 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-border); }
.profile-learning-card__facts > div { min-width: 0; padding: 9px; background: var(--color-surface-2); }
.profile-learning-card__facts dt { color: var(--color-fg-muted); font-size: 9px; }
.profile-learning-card__facts dd { margin: 3px 0 0; overflow: hidden; color: var(--color-fg); font-size: 10px; font-weight: var(--font-semibold); text-overflow: ellipsis; white-space: nowrap; }
.comp-profile-current { position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 20px; overflow: hidden; background: linear-gradient(130deg, color-mix(in srgb, var(--color-primary-soft) 62%, var(--color-surface)), var(--color-surface) 72%); }
.comp-profile-current::after { content: ''; position: absolute; width: 160px; height: 160px; right: -72px; top: -92px; border-radius: 50%; background: color-mix(in srgb, var(--color-primary) 9%, transparent); }
.comp-profile-current__icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: var(--color-primary); background: var(--color-primary-soft); }
.comp-profile-current__icon .icon { width: 21px; height: 21px; }
.comp-profile-current div { min-width: 0; }
.comp-profile-current small, .comp-profile-current p { display: block; margin: 0; color: var(--color-fg-muted); font-size: 11px; }
.comp-profile-current strong { display: block; margin: 3px 0; color: var(--color-fg); font-size: 23px; letter-spacing: -.025em; }
.comp-profile-history__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 0 2px 11px; }
.comp-profile-history__head h3 { margin: 0; color: var(--color-fg); font-size: 14px; }
.comp-profile-history__head p { margin: 3px 0 0; color: var(--color-fg-muted); font-size: 11px; }
.comp-profile-history__head > span { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 999px; color: var(--color-primary); background: var(--color-primary-soft); font-size: 11px; font-weight: var(--font-bold); }
.comp-profile-ledger { position: relative; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.comp-profile-ledger::before { content: ''; position: absolute; left: 22px; top: 22px; bottom: 22px; width: 1px; background: var(--color-border); }
.comp-profile-ledger li { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px 17px; }
.comp-profile-ledger__mark { z-index: 1; width: 9px; height: 9px; justify-self: center; border: 3px solid var(--color-surface); border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.comp-profile-ledger li > div { min-width: 0; }
.comp-profile-ledger small { color: var(--color-fg-subtle); font-size: 10px; }
.comp-profile-ledger strong { display: block; margin-top: 2px; color: var(--color-fg); font-size: 13px; }
.comp-profile-ledger p { margin: 3px 0 0; color: var(--color-fg-muted); font-size: 11px; overflow-wrap: anywhere; }
.comp-profile-ledger li > b { color: var(--color-fg); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.profile-record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.profile-record-card { position: relative; display: flex; min-width: 0; min-height: 150px; flex-direction: column; padding: 18px; overflow: hidden; }
.profile-record-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--color-primary); }
.profile-record-card--emergency::before { background: var(--color-warning); }
.profile-record-card--skill::before { background: var(--color-success); }
.profile-record-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.profile-record-card__head > div { min-width: 0; }
.profile-record-card__head h3 { margin: 0; overflow: hidden; color: var(--color-fg); font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.profile-record-card__head p { margin: 2px 0 0; color: var(--color-fg-muted); font-size: 11px; }
.profile-record-card__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--color-primary); background: var(--color-primary-soft); }
.profile-record-card--emergency .profile-record-card__icon { color: var(--color-warning); background: var(--color-warning-soft); }
.profile-record-card--skill .profile-record-card__icon { color: var(--color-success); background: var(--color-success-soft); }
.profile-record-card__icon .icon { width: 17px; height: 17px; }
.profile-record-card__details { display: grid; gap: 7px; margin-top: 14px; }
.profile-record-card__details a, .profile-record-card__details p { display: flex; align-items: flex-start; gap: 7px; min-width: 0; margin: 0; color: var(--color-fg-muted); font-size: 12px; overflow-wrap: anywhere; }
.profile-record-card__details a:hover { color: var(--color-primary); }
.profile-record-card__details .icon { width: 14px; height: 14px; margin-top: 1px; flex: 0 0 auto; }
.profile-record-card__actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: auto; padding-top: 16px; }
.profile-record-empty { display: grid; min-height: 250px; place-items: center; align-content: center; padding: 32px 20px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); text-align: center; background: color-mix(in srgb, var(--color-surface-2) 58%, transparent); }
.profile-record-empty > span { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 12px; border-radius: 14px; color: var(--color-primary); background: var(--color-primary-soft); }
.profile-record-empty .icon { width: 21px; height: 21px; }
.profile-record-empty h3 { margin: 0; color: var(--color-fg); font-size: 15px; }
.profile-record-empty p { max-width: 46ch; margin: 6px 0 0; color: var(--color-fg-muted); font-size: 12px; line-height: 1.5; }
@media (max-width: 700px) {
  .profile-tab-heading { align-items: stretch; flex-direction: column; }
  .profile-tab-heading .btn { width: 100%; }
  .profile-record-grid { grid-template-columns: 1fr; }
  .profile-record-card { min-height: 138px; }
  .profile-work-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-work-summary--compact { grid-template-columns: 1fr; }
  .profile-register-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-learning-grid { grid-template-columns: 1fr; }
  .profile-panel .cert-grid { grid-template-columns: 1fr; }
  .comp-profile-ledger li { grid-template-columns: 18px minmax(0, 1fr); }
  .comp-profile-ledger li > b { grid-column: 2; }
}
@media (max-width: 420px) {
  .profile-work-summary { grid-template-columns: 1fr; }
  .comp-profile-current { align-items: flex-start; }
  .comp-profile-current strong { font-size: 20px; }
  .profile-register-summary { grid-template-columns: 1fr; }
  .profile-learning-card__facts { grid-template-columns: 1fr; }
}
