@font-face {
  font-family: Inter;
  src: url('./inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: 'Plus Jakarta Sans', Inter, 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
  font-size: 14.5px;
  font-kerning: normal;
  font-optical-sizing: auto;
  font-feature-settings: 'cv11' 1;
  text-rendering: optimizeLegibility;
  color: #15213a;
  background: #f5f7fc;
  --page: #f5f7fc;
  --surface: #fff;
  --ink: #15213a;
  --muted: #566580;
  --subtle: #63738c;
  --line: #e3e9f2;
  --line-strong: #cfd9e8;
  --blue: #254cda;
  --blue-dark: #1939ae;
  --blue-soft: #ebf0ff;
  --green: #08724f;
  --green-soft: #e8f7ef;
  --red: #a63646;
  --red-soft: #fceef0;
  --amber: #85510b;
  --amber-soft: #fff4df;
  --violet: #5949a5;
  --violet-soft: #f0edff;
  --neutral: #52637f;
  --neutral-soft: #eef2f8;
  --shadow: 0 4px 18px #1830540a;
  --radius: 16px;
  --sidebar: 252px;
  --ease-ui: cubic-bezier(.2, .75, .25, 1);
  --gutter: clamp(24px, 3vw, 46px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; line-height: 1.55; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { text-wrap: balance; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #718cff; outline-offset: 3px; }
::selection { background: #dce6ff; color: #112d7e; }

.icon {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tabular, time, .countdown, [data-until] { font-variant-numeric: tabular-nums; }

.boot-state {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  color: var(--muted);
  font-weight: 600;
}

noscript {
  display: block;
  margin: 20px;
  text-align: center;
}

.brand {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.sidebar-head .brand { flex: 1; }

.brand small {
  color: #647590;
  font-size: 12px;
  font-weight: 650;
}

.brand-plate {
  display: grid;
  width: min(100%, 173px);
  height: 44px;
  min-width: 0;
  place-items: center;
}

.brand-plate img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.boot-brand { width: 155px; height: 43px; }
.topbar-brand { display: none; }

.auth-layout {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr) minmax(0, .91fr);
  padding: 19px;
  background: #fff;
}

.auth-visual {
  position: relative;
  display: grid;
  min-height: min(630px, calc(100dvh - 38px));
  min-width: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e0e9f9;
  border-radius: 23px;
  background: radial-gradient(ellipse at 51% 43%, #fff 0%, #f3f7ff 57%, #e9effb 100%);
}

.auth-visual::before {
  position: absolute;
  inset: 13px;
  border: 1px solid #fff;
  border-radius: 16px;
  content: '';
  pointer-events: none;
}

.auth-animation {
  position: relative;
  width: min(94%, 560px);
  aspect-ratio: 1;
}

.auth-animation-player {
  position: absolute;
  inset: 0;
}

.auth-animation-player > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-animation-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.auth-animation.is-ready .auth-animation-fallback { display: none; }

.auth-side {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(26px, 5vw, 84px);
  background: #fff;
}

.auth-card { width: min(100%, 414px); }
.auth-brand { margin-bottom: 24px; }
.auth-brand .brand-plate { width: min(100%, 198px); height: 51px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 25px;
  padding: 4px;
  border: 1px solid #e9edf4;
  border-radius: 13px;
  background: #f2f5fa;
}

.auth-tab {
  min-height: 41px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
}

.auth-tab:hover { color: var(--blue-dark); }
.auth-tab[aria-pressed="true"] {
  border-color: #e4eaf4;
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 2px 4px #16325909;
}

.form-head { margin: 0 0 5px; }
.form-head h1 { font-size: clamp(26px, 2.7vw, 38px); line-height: 1.17; font-weight: 760; letter-spacing: -.041em; }
.form-head p { margin-top: 9px; color: var(--muted); line-height: 1.6; }
.auth-card .form-stack { gap: 17px; }
.auth-card .btn-primary { min-height: 48px; margin-top: 3px; }

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  z-index: 12;
  top: 0;
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  flex-direction: column;
  padding: 22px 15px max(15px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  border-right: 1px solid #d4deec;
  background: linear-gradient(170deg, #edf2f8 0%, #e8eef6 48%, #e2eaf4 100%);
  box-shadow: 3px 0 18px #1f39500a;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 8px 25px;
}

.side-nav { display: flex; flex-direction: column; gap: 25px; margin-bottom: 28px; }
.nav-group { display: grid; gap: 3px; }
.nav-group > p {
  margin: 0 12px 7px;
  color: #667994;
  font-size: 10.5px;
  font-weight: 760;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #465771;
  font-size: 13.5px;
  font-weight: 650;
  text-align: left;
  transition: background-color 190ms var(--ease-ui), color 190ms ease,
    border-color 190ms ease, box-shadow 190ms ease, transform 190ms var(--ease-ui);
}

.nav-link .icon { width: 18px; height: 18px; }
.nav-link:hover { background: #ffffffba; color: #1d365f; }
.nav-link[data-current] {
  border-color: #cbdaf2;
  background: #ffffffef;
  color: #244ac4;
  font-weight: 760;
  box-shadow: 0 3px 12px #28446d10;
}

.nav-link[data-current]::after {
  position: absolute;
  left: 0;
  width: 3px;
  height: 19px;
  border-radius: 0 4px 4px 0;
  background: #4970e9;
  content: '';
}
.nav-link[data-current] span { padding-right: 0; }

.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #d3deeb;
}

.side-account {
  display: flex;
  min-width: 0;
  min-height: 48px;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #273b5c;
  text-align: left;
  transition: background-color 180ms ease, color 180ms ease;
}

.side-account:hover, .side-account[aria-current] { background: #ffffffc7; }

.account-avatar {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8e4ff;
  border-radius: 11px;
  background: #e8efff;
  color: #2449c7;
  font-size: 12px;
  font-weight: 760;
}

.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-account-copy { display: grid; min-width: 0; gap: 2px; }
.side-account-copy strong, .side-account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-account-copy strong { font-size: 12px; font-weight: 720; }
.side-account-copy small { color: #687b94; font-size: 11px; }

.main-area { min-width: 0; }
.skip-link {
  position: fixed;
  z-index: 30;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface);
  font-weight: 650;
}
.skip-link:focus { transform: none; }

.topbar {
  position: sticky;
  z-index: 9;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 8px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.topbar-start, .topbar-end, .breadcrumb { display: flex; min-width: 0; align-items: center; gap: 12px; }
.topbar-end { flex: 0 0 auto; }
.breadcrumb { gap: 8px; color: var(--subtle); font-size: 13px; }
.breadcrumb-home { white-space: nowrap; }
.breadcrumb strong { overflow: hidden; color: var(--ink); font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-chevron { color: #8291aa; }
.breadcrumb-chevron .icon { width: 13px; height: 13px; }

.server-time {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f9fbfe;
  color: #354560;
  white-space: nowrap;
}

.server-time .icon { width: 15px; height: 15px; color: var(--subtle); }
.server-time time { font-size: 12px; font-weight: 700; }
.server-time small { color: var(--muted); font-size: 10px; font-weight: 700; }
.top-avatar { width: 39px; height: 39px; }
.top-avatar:hover { background: #d9e5ff; }

.icon-button {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover { border-color: var(--line); background: #f3f6fc; color: var(--ink); }
.logout-button:hover { background: var(--red-soft); color: var(--red); }
.mobile-menu, .sidebar-close { display: none; }
.menu-overlay { display: none; }

.content {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 32px var(--gutter) 52px;
  scroll-margin-top: 78px;
}

.content:focus { outline: none; }
.page-head {
  display: flex;
  min-height: 70px;
  align-items: end;
  justify-content: space-between;
  gap: 14px 22px;
  margin: 0 0 24px;
}

.page-copy { min-width: 0; }
.page-head h1 {
  font-size: clamp(28px, 3.15vw, 44px);
  line-height: 1.14;
  font-weight: 780;
  letter-spacing: -.043em;
  overflow-wrap: anywhere;
}

.page-head p { max-width: 66ch; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.page-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: end; gap: 8px; }
.page-date {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: #465674;
  font-size: 13px;
  font-weight: 620;
}

.page-date .icon { width: 17px; height: 17px; color: var(--blue); }
.date-field { display: grid; gap: 4px; font-size: 11px; font-weight: 670; color: var(--muted); }
.date-field input { min-width: 145px; font-weight: 620; }

.btn {
  position: relative;
  display: inline-flex;
  min-height: 43px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: #34445e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.36;
  text-align: center;
  transition: background-color 190ms ease, border-color 190ms ease,
    color 190ms ease, box-shadow 190ms ease, transform 190ms var(--ease-ui);
}

.btn .icon { width: 17px; height: 17px; }
.btn:hover:enabled { border-color: #bccbe0; background: #f5f8ff; color: var(--ink); }
.btn:disabled { opacity: .55; }
.btn.full { width: 100%; }
.btn-small { min-height: 35px; padding: 6px 9px; border-radius: 8px; font-size: 12px; }
.btn-small .icon { width: 15px; height: 15px; }

.btn-primary { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 2px 4px #204cde25; }
.btn-primary:hover:enabled { border-color: var(--blue-dark); background: var(--blue-dark); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: #2546b9; }
.btn-quiet:hover:enabled { border-color: #dce4fb; background: #f0f4ff; color: #1939ae; }
.btn-danger { border-color: #efd3d9; color: var(--red); }
.btn-danger:hover:enabled { border-color: #e3b7c0; background: var(--red-soft); color: #96293c; }
.btn-danger-solid { border-color: #ae354c; background: #ae354c; color: #fff; }
.btn-danger-solid:hover:enabled { border-color: #8f2438; background: #8f2438; color: #fff; }
.btn-hero { border-color: #fff; background: #fff; color: #1b40b7; box-shadow: 0 4px 10px #0b267145; }
.btn-hero:hover:enabled { border-color: #dfe9ff; background: #ebf1ff; color: #173cae; }

.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.loading { pointer-events: none; }
.loading::after, .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  content: '';
}

.icon-button.loading .icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.panel, .stat {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  min-height: 73px;
  align-items: center;
  justify-content: space-between;
  gap: 12px 15px;
  padding: 16px 21px;
  border-bottom: 1px solid var(--line);
}

.panel-head > div:first-child { min-width: 0; }
.panel-head h2 { font-size: 17px; font-weight: 730; line-height: 1.3; letter-spacing: -.035em; overflow-wrap: anywhere; }
.panel-head p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.panel-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.panel-actions .btn { min-height: 36px; }
.panel-body { min-width: 0; padding: 21px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stats--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat { padding: 15px 17px 16px; }
.stat-head {
  display: flex;
  min-height: 35px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #44546e;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.stat-head > span:first-child { overflow-wrap: anywhere; }
.stat-value {
  display: block;
  margin: 4px 0 3px;
  font-size: clamp(27px, 3vw, 37px);
  font-weight: 740;
  line-height: 1.05;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}

.stat small { display: block; color: var(--subtle); font-size: 11px; line-height: 1.5; }
.icon-tile {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
}
.icon-tile .icon { width: 18px; height: 18px; }
.tile--blue { background: var(--blue-soft); color: var(--blue); }
.tile--green { background: var(--green-soft); color: var(--green); }
.tile--red { background: var(--red-soft); color: var(--red); }
.tile--amber { background: var(--amber-soft); color: var(--amber); }
.tile--violet { background: var(--violet-soft); color: var(--violet); }

.shift-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(260px, .87fr);
  align-items: center;
  gap: 24px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: clamp(20px, 2.8vw, 35px);
  border: 1px solid #2d51da;
  border-radius: 20px;
  background: radial-gradient(ellipse at 100% 12%, #5d88ff 0%, transparent 55%),
    linear-gradient(123deg, #1735a7 0%, #244cdb 54%, #3563eb 100%);
  color: #fff;
  box-shadow: 0 6px 17px #204cde20;
}

.hero-rings {
  position: absolute;
  z-index: -1;
  width: 395px;
  height: 395px;
  right: -131px;
  bottom: -232px;
  border: 1px solid #c7d7ff70;
  border-radius: 50%;
  box-shadow: 0 0 0 36px #c9d9ff1e, 0 0 0 73px #c9d9ff18, 0 0 0 111px #c9d9ff12, 0 0 0 148px #c9d9ff0f;
}

.hero-copy { min-width: 0; }
.hero-shift {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid #e8f1ff65;
  border-radius: 99px;
  background: #fff2;
  font-size: 11px;
  font-weight: 670;
}

.hero-shift .icon { width: 14px; height: 14px; }
.hero-copy h2 {
  margin-top: 11px;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 750;
  line-height: 1.13;
  letter-spacing: -.054em;
  text-wrap: balance;
}
.hero-copy p { margin-top: 6px; color: #edf2ff; font-size: 13px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.hero-timer { display: flex; align-items: center; gap: 7px; color: #f0f4ff; font-size: 12px; }
.hero-timer .icon { width: 16px; height: 16px; }
.hero-timer strong { display: inline-block; min-width: 59px; margin-left: 2px; font-weight: 700; }

.hero-progress {
  min-width: 0;
  padding: 17px 18px 18px;
  border: 1px solid #d5e2ff50;
  border-radius: 15px;
  background: #122c8b66;
}

.hero-progress-head, .hero-metric { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.hero-progress-head { color: #eef3ff; font-size: 12px; font-weight: 620; }
.hero-progress-head .icon { width: 17px; height: 17px; }
.hero-metric { margin: 5px 0 11px; }
.hero-metric strong { font-size: 32px; font-weight: 750; line-height: 1.1; letter-spacing: -.06em; }
.hero-metric strong span { color: #d4e0ff; font-size: 19px; font-weight: 540; letter-spacing: -.025em; }
.hero-metric > span { font-size: 12px; font-weight: 700; }

.progress-segments { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.segment { height: 8px; border-radius: 3px; background: #d7e2ff48; }
.segment--exempt { background: #d7e2ff24; }
.segment--submitted, .legend-dot--submitted { background: #88efd3; }
.segment--open, .legend-dot--open { background: #fff; }
.segment--missed, .legend-dot--missed { background: #ffc2ca; }

.hero-legend, .breakdown-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; }
.hero-legend { margin-top: 11px; color: #eef3ff; font-size: 10.5px; }
.hero-legend > span, .breakdown-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot, .breakdown-legend i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }

.dashboard-columns, .work-columns, .account-layout {
  display: grid;
  align-items: start;
  gap: 17px;
}
.dashboard-columns {
  grid-template-columns: minmax(0, 1.37fr) minmax(0, .93fr);
  margin-bottom: 18px;
}
.work-columns { grid-template-columns: minmax(285px, .77fr) minmax(0, 1.43fr); }
.account-layout { grid-template-columns: minmax(270px, .75fr) minmax(0, 1.25fr); }
.panel-stack { display: grid; min-width: 0; gap: 17px; }

.timeline { margin: 0; padding: 6px 20px 9px; list-style: none; }
.timeline-row {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.timeline-row + .timeline-row { border-top: 1px solid var(--line); }
.timeline-index {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 10px;
  background: #f1f4f9;
  color: #425572;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}
.timeline-index--active { background: #e9efff; color: var(--blue); }
.timeline-row strong, .timeline-row small { display: block; }
.timeline-row strong { font-weight: 710; font-variant-numeric: tabular-nums; }
.timeline-row small { margin-top: 2px; color: var(--subtle); font-size: 11px; }

.quick-links, .manage-actions { display: grid; gap: 7px; padding: 12px; }
.quick-link {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.quick-link:hover { border-color: #e1e9fa; background: #f7f9ff; }
.quick-link--danger:hover { border-color: #f1dce1; background: #fff8fa; }
.quick-link > span:nth-child(2) { display: grid; min-width: 0; flex: 1; gap: 2px; }
.quick-link strong { font-size: 13px; font-weight: 690; }
.quick-link small { color: var(--subtle); font-size: 11px; line-height: 1.4; }
.quick-link > .icon { width: 16px; height: 16px; color: var(--subtle); }

.breakdown { display: grid; gap: 13px; }
.breakdown-row { display: grid; gap: 8px; }
.breakdown-title { display: flex; min-width: 0; align-items: center; gap: 9px; }
.breakdown-title > div { display: grid; min-width: 0; flex: 1; }
.breakdown-title strong { font-size: 13px; }
.breakdown-title small { color: var(--subtle); font-size: 11px; }
.breakdown-count { color: var(--muted); font-size: 11px; font-weight: 670; white-space: nowrap; }
.breakdown-bar { display: flex; height: 9px; overflow: hidden; border-radius: 99px; background: #edf1f8; }
.breakdown-bar i { min-width: 1px; }
.bar--green { background: #27a77d; }
.bar--red { background: #db6a7a; }
.bar--blue { background: #4c71ed; }
.bar--neutral { background: #dfe6f3; }
.breakdown-legend { color: var(--muted); font-size: 11px; }

.pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 20px;
  background: var(--neutral-soft);
  color: var(--neutral);
  font-size: 11px;
  font-weight: 640;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.pill i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.pill--blue { background: var(--blue-soft); color: #2044ba; }
.pill--green { background: var(--green-soft); color: var(--green); }
.pill--red { background: var(--red-soft); color: var(--red); }
.pill--amber { background: var(--amber-soft); color: var(--amber); }
.pill--violet { background: var(--violet-soft); color: var(--violet); }

.slot-grid, .task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.slot-card, .task-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.slot--open {
  border-color: #aebff9;
  background: #f3f6ff;
  box-shadow: inset 3px 0 #4167ed;
}

.slot--missed { background: #fdfbfc; }
.slot--upcoming, .slot--exempt { background: #fafbfe; }
.slot-top, .task-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.slot-index { color: var(--muted); font-size: 11px; font-weight: 680; }
.slot-card h3 {
  margin-top: 4px;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 735;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}

.slot-copy, .task-description {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.56;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.slot-card--details {
  position: relative;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.slot-card--details:hover {
  border-color: #c3d0f4;
  box-shadow: 0 2px 8px #263f7821;
}

.slot-card .slot-copy {
  display: -webkit-box;
  min-block-size: 3.12em;
  max-block-size: 3.12em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.slot-meta, .field-hint { display: block; color: var(--subtle); font-size: 11.5px; line-height: 1.5; }
.slot-footer { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: space-between; margin: auto 0 0; padding-top: 6px; }
.slot-footer--detail { min-height: 39px; gap: 4px 7px; padding-top: 5px; border-top: 1px solid var(--line); }

.slot-detail-button {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 3px 0 3px 3px;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 680;
}

.slot-detail-button .icon { width: 15px; height: 15px; }
.slot-detail-button::after { position: absolute; inset: 0; border-radius: 13px; content: ''; }
.slot-detail-button:focus-visible { outline: none; }
.slot-detail-button:focus-visible::after { outline: 3px solid #718cff; outline-offset: 2px; }
.slot-clock { display: inline-flex; align-items: center; gap: 5px; color: var(--blue-dark); font-size: 12px; font-weight: 660; }
.slot-clock .icon { width: 15px; height: 15px; }

.task-top > span:first-child { display: flex; align-items: center; gap: 5px; color: var(--subtle); font-size: 11px; font-weight: 650; }
.task-top .icon { width: 14px; height: 14px; }
.task-card h3 { margin-top: 4px; color: var(--ink); font-size: 16px; letter-spacing: -.023em; overflow-wrap: anywhere; }
.task-action { margin-top: auto; padding-top: 8px; }
.task-result {
  padding: 11px 12px;
  border: 1px solid #e5ebf5;
  border-radius: 9px;
  background: #f6f8fd;
  color: var(--muted);
  font-size: 12px;
}
.task-result strong { color: var(--ink); font-weight: 680; }
.task-result p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-result small { color: var(--subtle); font-size: 11px; }

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  position: relative;
  display: flex;
  min-width: 160px;
  max-width: 320px;
  flex: 1 1 190px;
  align-items: center;
  color: var(--subtle);
}
.search-field .icon { position: absolute; left: 11px; width: 16px; height: 16px; pointer-events: none; }
.list-toolbar select { width: auto; max-width: 100%; }
.list-count { margin-left: auto; color: var(--subtle); font-size: 11px; font-weight: 620; white-space: nowrap; }

.table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.data-table {
  width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  color: #41516d;
  font-size: 13px;
  text-align: left;
}
.data-table th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fd;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf1f7;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.data-table td:first-child, .data-table th:first-child { padding-left: 20px; }
.data-table td:last-child, .data-table th:last-child { padding-right: 20px; }
.data-table tbody tr:not(.empty-row):hover td { background: #fbfcff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
.data-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }
.data-table strong { color: var(--ink); font-weight: 690; }
.inline-muted, .cell-stack small { color: var(--subtle); font-size: 11px; }
.cell-stack { display: grid; justify-items: start; gap: 4px; min-width: 0; }

.identity { display: flex; min-width: 0; align-items: center; gap: 9px; }
.identity-avatar { width: 33px; height: 33px; border-radius: 9px; }
.identity > div { display: grid; min-width: 0; gap: 1px; }
.identity strong, .identity small { overflow-wrap: anywhere; }
.identity strong { color: var(--ink); font-size: 13px; font-weight: 690; }
.identity small { color: var(--subtle); font-size: 11px; }

.task-cell { min-width: 0; max-width: 360px; }
.task-cell > p, .task-details > p { font-size: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.task-details {
  margin-top: 3px;
  padding: 4px 7px;
  border: 1px solid #e4ebf9;
  border-radius: 7px;
  background: #f7f9ff;
}
.task-details summary { cursor: pointer; color: var(--blue-dark); font-size: 11px; font-weight: 650; }
.task-details > p { margin: 5px 0; }

.empty-state, .loading-pane {
  display: grid;
  min-height: 136px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px 16px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong { color: var(--ink); font-size: 14px; font-weight: 690; }
.empty-state p { max-width: 50ch; font-size: 12px; }
.empty-state .icon-tile { width: 39px; height: 39px; }
.loading-pane {
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 620;
}
.loading-pane .spinner { width: 18px; height: 18px; color: var(--blue); }

.error-panel { padding: 4px 15px 23px; text-align: center; }

.form-stack, .field { display: grid; min-width: 0; gap: 14px; }
.form-stack label, .field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #3b4a65;
  font-size: 13px;
  font-weight: 650;
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.label-optional { color: var(--subtle); font-weight: 500; }

input:not([type="checkbox"]), select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 490;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

select { padding-right: 23px; }
input::placeholder, textarea::placeholder { color: #64748d; opacity: 1; }
textarea { min-height: 98px; resize: vertical; line-height: 1.54; }
input:not([type="checkbox"]):focus, select:focus, textarea:focus {
  border-color: #6887ee;
  outline: none;
  box-shadow: 0 0 0 3px #3d69fe26;
}
input[type="date"], input[type="time"] { font-variant-numeric: tabular-nums; }
input[type="file"] { min-height: 40px; padding: 6px; color: var(--muted); }
input::file-selector-button {
  height: 29px;
  margin-right: 8px;
  padding: 2px 8px;
  border: 1px solid #dbe4f8;
  border-radius: 6px;
  background: #eff4ff;
  color: #2447b9;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.search-field input { padding-left: 35px; }

.password-field { position: relative; min-width: 0; }
.password-field input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  width: 37px;
  height: 35px;
  place-items: center;
  transform: translateY(-50%);
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--subtle);
}
.password-toggle:hover { background: #eef3fd; color: var(--blue); }
.password-toggle .icon { width: 17px; height: 17px; }

.form-error {
  margin-top: 3px;
  padding: 10px 11px;
  border: 1px solid #f2cdd5;
  border-radius: 9px;
  background: #fff1f4;
  color: #912d40;
  font-size: 12px;
  font-weight: 620;
  overflow-wrap: anywhere;
}

.recipient-preview, .dialog-context {
  display: flex;
  min-width: 0;
  align-items: start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #dbe5ff;
  border-radius: 10px;
  background: #f1f5ff;
  color: #2544b6;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.recipient-preview strong, .recipient-preview small { display: block; }
.recipient-preview small { margin-top: 3px; color: #485e8a; font-size: 11px; }
.recipient-preview > .icon, .dialog-context > .icon { width: 17px; height: 17px; }

.profile-card { display: flex; align-items: center; gap: 13px; padding-bottom: 19px; }
.profile-card > div { min-width: 0; overflow-wrap: anywhere; }
.profile-card h3 { font-size: 17px; font-weight: 740; letter-spacing: -.027em; }
.profile-card p { color: var(--muted); font-size: 12px; }
.profile-avatar { width: 58px; height: 58px; border-radius: 15px; font-size: 18px; }

.dialog {
  width: min(92vw, 528px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce5f4;
  border-radius: 17px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 22px 70px #111b4252;
}
.dialog::backdrop { background: #15244683; animation: backdrop-in 210ms ease-out both; }
/* Animations only use opacity and transform to avoid layout work. */
.dialog[open] { animation: dialog-in 210ms var(--ease-ui) both; }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.dialog-head {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 17px 13px 21px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.dialog-head h2 { font-size: 21px; font-weight: 750; line-height: 1.22; letter-spacing: -.036em; overflow-wrap: anywhere; }
.dialog-body { display: grid; gap: 15px; padding: 18px 21px 21px; }
.dialog-body > p:not(.form-error) { color: var(--muted); overflow-wrap: anywhere; }
.dialog-body > p strong { color: var(--ink); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 5px; }
.dialog[aria-busy="true"] [data-close] { pointer-events: none; opacity: .55; }
.report-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.report-period-time { min-width: 0; flex: 1 1 170px; }
.report-period-time strong, .report-period-time small { display: block; }
.report-period-time strong { font-size: 14px; }
.report-period-time small, .report-entry-head small { color: var(--subtle); font-size: 11.5px; }
.report-period-time small { margin-top: 2px; }

.report-entry, .report-empty {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e2e9f5;
  border-radius: 11px;
  background: #f7f9fe;
}

.report-entry-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 9px; }
.report-entry-head h3 { font-size: 13px; font-weight: 710; }

.report-entry-text {
  max-block-size: min(43vh, 405px);
  margin-top: 9px;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.staff-dialog-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; }
.manage-actions { gap: 4px; padding: 0; }

.toast {
  position: fixed;
  z-index: 25;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  width: max-content;
  max-width: min(440px, calc(100vw - 36px));
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  transform: translateY(5px);
  border: 1px solid #c3e9d8;
  border-radius: 11px;
  background: #ecfbf4;
  color: #096445;
  box-shadow: 0 7px 24px #172f5a16;
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast--error { border-color: #eccad2; background: #fff1f4; color: #912d40; }
.toast.show { transform: none; opacity: 1; }

@media (max-width: 1220px) {
  :root { --sidebar: 228px; --gutter: 25px; }
  .sidebar { padding-inline: 12px; }
  .stat { padding-inline: 13px; }
  .work-columns { grid-template-columns: minmax(248px, .77fr) minmax(0, 1.43fr); }
  .work-columns .data-table td, .work-columns .data-table th { padding-inline: 8px; }
  .work-columns .data-table td:first-child, .work-columns .data-table th:first-child { padding-left: 14px; }
  .work-columns .data-table td:last-child, .work-columns .data-table th:last-child { padding-right: 14px; }
  .work-columns .list-toolbar { padding-inline: 14px; }
}

@media (max-width: 1100px) {
  .work-columns { grid-template-columns: 1fr; }
  .work-columns form .btn.full { width: fit-content; }
  .work-columns .data-table td, .work-columns .data-table th { padding-inline: 12px; }
  .work-columns .data-table td:first-child, .work-columns .data-table th:first-child { padding-left: 20px; }
  .work-columns .data-table td:last-child, .work-columns .data-table th:last-child { padding-right: 20px; }
  .work-columns .list-toolbar { padding-inline: 20px; }
  .slot-grid, .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-side { padding: clamp(23px, 4vw, 54px); }
}

@media (max-width: 900px) {
  :root { --gutter: 23px; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  body.menu-open { overflow: hidden; }
  .sidebar {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: min(300px, calc(100vw - 30px));
    padding-top: max(17px, env(safe-area-inset-top));
    transform: translateX(-101%);
    visibility: hidden;
    overscroll-behavior: contain;
    transition: transform 240ms var(--ease-ui), visibility 240ms;
    will-change: transform;
  }
  .sidebar.open { transform: none; visibility: visible; }
  .topbar-brand { display: grid; width: 112px; height: 33px; }
  .menu-overlay {
    position: fixed;
    z-index: 19;
    inset: 0;
    display: block;
    background: #16274488;
    animation: menu-shade-in 240ms ease-out both;
  }
  .mobile-menu, .sidebar-close { display: grid; }
  .slot-grid, .task-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .auth-layout { grid-template-columns: 1fr; align-content: start; gap: 16px; padding: 12px; }
  .auth-visual {
    --auth-visual-height: clamp(158px, 48vw, 235px);
    height: var(--auth-visual-height);
    min-height: 0;
    border-radius: 16px;
  }
  .auth-visual::before { inset: 7px; border-radius: 11px; }
  .auth-animation { width: min(86%, calc(var(--auth-visual-height) - 14px)); }
  .auth-animation-fallback { width: 49px; height: 49px; }
  .auth-brand { margin-bottom: 17px; }
  .auth-brand .brand-plate { width: min(100%, 172px); height: 45px; }
  .auth-side { align-content: start; padding: 6px 12px 25px; }
  .auth-tabs { margin-bottom: 17px; }
  .auth-card .form-stack { gap: 13px; }

  .page-head { align-items: start; flex-direction: column; margin-bottom: 18px; }
  .page-head h1 { font-size: clamp(28px, 6vw, 36px); }
  .page-head p { font-size: 13px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shift-hero { grid-template-columns: 1fr; gap: 17px; }
  .hero-progress { max-width: 490px; }
  .hero-rings { right: -198px; bottom: -187px; }
  .dashboard-columns, .account-layout { grid-template-columns: 1fr; gap: 12px; }
  .slot-grid, .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --gutter: 15px; }
  .topbar { min-height: 60px; padding-block: 7px; }
  .topbar-start, .topbar-end { gap: 7px; }
  .breadcrumb { display: none; }
  .topbar-brand { width: 97px; height: 30px; }
  .server-time { gap: 4px; padding-inline: 6px; }
  .server-time .icon { width: 13px; height: 13px; }
  .server-time time { font-size: 11px; }
  .server-time small { font-size: 9px; }
  .content { padding-top: 21px; }
  .page-head { gap: 10px; }
  .page-actions { width: 100%; }
  .stats--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats--three .stat:last-child { grid-column: 1 / -1; }
  .panel-head { min-height: 62px; padding: 13px 14px; }
  .panel-head h2 { font-size: 16px; }
  .panel-body { padding: 14px; }
  .list-toolbar, .work-columns .list-toolbar { padding: 10px 13px; gap: 7px; }
  .list-toolbar select { flex: 1 1 auto; }
  .list-count { margin-left: 0; }
  .stat { padding: 12px; }
  .stat-head { font-size: 12px; }
  .stat .icon-tile, .timeline-index { width: 32px; height: 32px; }
  .stat .icon { width: 16px; height: 16px; }
  .stat-value { font-size: 29px; }
  .timeline { padding-inline: 14px; }
  .timeline-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; }

  .table-wrap { overflow: visible; }
  .data-table { display: block; padding: 10px; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .data-table tbody { display: grid; gap: 8px; }
  .data-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
  }
  .data-table tr td, .work-columns .data-table tr td {
    display: grid;
    justify-items: start;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .data-table td::before {
    color: var(--subtle);
    font-size: 10px;
    font-weight: 650;
    content: attr(data-label);
  }
  .data-table tr td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .data-table tr td[data-label="Tugas"], .data-table tr td[data-label="Keterangan"] { grid-column: 1 / -1; }
  .data-table td:first-child:has(.identity)::before, .data-table .empty-row td::before { display: none; }
  .data-table tr.empty-row { padding: 0; border: 0; }
  .data-table tr.empty-row td { justify-items: stretch; padding: 0; border: 0; }
  .data-table .task-cell { max-width: 100%; }
  .data-table .inline-muted { margin-top: -6px; }

  input:not([type="checkbox"]), select, textarea { min-height: 44px; font-size: 16px; }
  .date-field input { min-width: 128px; }
  .btn, .btn-small, .panel-actions .btn { min-height: 42px; }
  .icon-button, .top-avatar { width: 42px; height: 42px; }
  .dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 20px);
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
  }
  .dialog-head { padding: 11px 13px 11px 16px; }
  .dialog-body { padding: 14px 16px max(18px, env(safe-area-inset-bottom)); }
}

@media (max-width: 432px) {
  .slot-grid, .task-grid, .field-row { grid-template-columns: 1fr; }
  .panel-head { flex-wrap: wrap; }
  .panel-actions .btn { padding-inline: 8px; }
  .slot-card, .task-card { padding: 12px; }
  .hero-copy h2 { text-wrap: initial; }
  .hero-progress { padding: 13px; }
  .work-columns form .btn.full { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.member-avatar {
  position: relative;
  width: 40px;
  height: 40px;
}

.member-avatar img { position: absolute; inset: 0; }

.team-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
}

.team-filter .search-field { width: min(100%, 310px); }
.team-count { color: var(--subtle); font-size: 12px; font-weight: 650; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 228px), 1fr));
  gap: 12px;
}

.team-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafcff;
}

.team-card .btn { justify-content: space-between; margin-top: auto; }
.team-identity { display: flex; min-width: 0; flex: 1 0 auto; align-items: center; gap: 10px; }
.team-card .team-identity { flex: 1 1 auto; }
.team-identity strong, .team-identity small { display: block; overflow-wrap: anywhere; }
.team-identity strong { font-size: 14px; font-weight: 720; }
.team-identity small { color: var(--muted); font-size: 12px; }
.team-member-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; padding: 15px; }
.team-member-head .team-identity { flex: 1 1 auto; }

.team-view-switch {
  display: flex;
  max-width: 100%;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--neutral-soft);
}

.team-view-switch button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.team-view-switch [aria-pressed="true"] {
  border-color: #dce6fa;
  background: white;
  color: var(--blue-dark);
  box-shadow: 0 1px 3px #183e6b12;
}

.team-view-switch .icon { width: 15px; height: 15px; }
.team-task { min-width: 0; }
.team-task h3, .task-notes { overflow-wrap: anywhere; }

.task-notes {
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}

.team-task-result {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.team-task-result summary { cursor: pointer; color: var(--blue-dark); font-weight: 700; }
.team-task-result > div { margin-top: 8px; padding: 8px; border-radius: 8px; background: var(--neutral-soft); }
.team-task-result small { display: block; margin-bottom: 5px; color: var(--subtle); }

.chat-room {
  width: min(100%, 960px);
  overflow: hidden;
}

.chat-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.chat-head p { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.chat-status { color: var(--amber); font-size: 11px; font-weight: 670; }
.chat-status::before { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; content: ''; }

.chat-scroll {
  height: clamp(245px, 47dvh, 490px);
  padding: 16px 20px 28px;
  overflow: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #f8faff;
}

.chat-empty { display: grid; min-height: 100%; place-content: center; }
.chat-older { display: grid; justify-items: center; margin-bottom: 13px; }
.chat-messages { display: grid; gap: 22px; }
.chat-message {
  --chat-avatar-size: 40px;
  display: grid;
  grid-template-columns: var(--chat-avatar-size) minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.chat-message-main { display: grid; min-width: 0; justify-items: start; }
.chat-message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 7px;
  max-width: 100%;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.chat-message-meta strong { color: var(--ink); font-size: 13px; font-weight: 730; }
.chat-message-meta .pill { min-height: 0; padding: 3px 6px; }

.chat-message--own { grid-template-columns: minmax(0, 1fr) var(--chat-avatar-size); }
.chat-message--own .member-avatar { grid-area: 1 / 2; }
.chat-message--own .chat-message-main { grid-area: 1 / 1; justify-items: end; }
.chat-message--own .chat-message-meta { justify-content: end; }

.chat-bubble {
  position: relative;
  display: grid;
  width: fit-content;
  min-width: 0;
  max-width: min(100%, 600px);
  gap: 5px;
  padding: 8px 11px;
  border: 1px solid #e2eaf5;
  border-radius: 4px 13px 13px 13px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.chat-message--own .chat-bubble {
  border-color: #d6e2fb;
  border-radius: 13px 4px 13px 13px;
  background: #eaf0ff;
  color: #1b365e;
}
.chat-text { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-bubble--image { padding: 5px; }
.chat-bubble--image .chat-text { padding: 1px 6px 4px; }

.chat-time {
  position: absolute;
  inset-block-start: calc(100% + 3px);
  inset-inline-start: 8px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  pointer-events: none;
  visibility: hidden;
}

.chat-message--own .chat-time { inset-inline-start: auto; inset-inline-end: 8px; }
.chat-bubble:focus-visible .chat-time,
.chat-bubble:has(.chat-image-button:focus-visible) .chat-time,
.chat-bubble--selected .chat-time { visibility: visible; }

@media (hover: hover) {
  .chat-bubble:hover .chat-time { visibility: visible; }
}

.chat-image-button {
  display: block;
  width: fit-content;
  max-width: min(100%, 420px);
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.chat-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  border-radius: 8px;
}

.chat-image-full {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 64dvh;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 10px;
}

.chat-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}

.chat-form textarea {
  min-height: 44px;
  max-height: 150px;
  overflow-y: auto;
  resize: none;
}

.chat-choose-image { width: 42px; min-width: 0; padding-inline: 0; }
.chat-choose-image .icon, .chat-remove-image .icon { width: 18px; height: 18px; }

.chat-preview {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faff;
}

.chat-preview img {
  width: 54px;
  height: 48px;
  object-fit: cover;
  border-radius: 7px;
}
.chat-preview > div { grid-column: 2; }
.chat-preview strong { display: block; font-size: 12px; }
.chat-preview small { display: block; color: var(--muted); font-size: 11px; }
.chat-remove-image { grid-column: 3; min-height: 34px; padding: 5px 7px; }
.chat-form .form-error { grid-column: 1 / -1; }
.brand-settings { max-width: 870px; }

.brand-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.brand-current {
  display: grid;
  min-height: 128px;
  place-content: center stretch;
  justify-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8faff;
}

.brand-current .brand-plate { width: min(100%, 246px); height: 63px; }
.brand-current small { color: var(--subtle); font-size: 11px; font-weight: 630; text-align: center; }

@media (max-width: 640px) {
  .brand-settings-layout { grid-template-columns: 1fr; gap: 14px; }
  .chat-head, .chat-scroll, .chat-form { padding-inline: 12px; }
  .chat-scroll { height: clamp(236px, 44dvh, 400px); }
  .chat-message { --chat-avatar-size: 34px; }
  .chat-message .member-avatar { width: 34px; height: 34px; border-radius: 9px; }
}

@media (max-width: 400px) {
  .chat-head { grid-template-columns: auto minmax(0, 1fr); gap: 6px 8px; }
  .chat-status { grid-column: 2; }
  .chat-form button { padding-inline: 10px; }
}


/* v1.4.6 — Calm slate sidebar, crisp light surfaces and restrained interaction. */
.sidebar-head .brand small { color: #586c89; }
.sidebar .brand-plate { max-width: 100%; }
.sidebar .icon-button { color: #506582; }
.sidebar .icon-button:hover { border-color: #cad8e8; background: #ffffffbc; color: #203a61; }
.sidebar .account-avatar { border-color: #d3e0f3; background: #f3f6ff; color: #2b53b8; }
.sidebar .logout-button:hover { border-color: #e9ced6; background: #fff3f4; color: var(--red); }
.sidebar .side-account-copy strong { font-size: 12.5px; }
.nav-link:focus-visible, .side-account:focus-visible, .sidebar .icon-button:focus-visible {
  outline-color: #5578e5;
  outline-offset: 1px;
}
.topbar { box-shadow: 0 2px 16px #253d5c06; }
.panel-head h2 { font-weight: 750; letter-spacing: -.025em; }
.stat-value, .page-head h1, .form-head h1, .panel-head h2, .dialog-head h2 { font-kerning: normal; }
.stat-value, .server-time time { font-variant-numeric: tabular-nums; }
.auth-tab, .icon-button, .password-toggle, .team-view-switch button {
  transition: background-color 180ms ease, border-color 180ms ease,
    color 180ms ease, box-shadow 180ms ease;
}
.slot-card, .task-card, .team-card, .stat {
  transition: border-color 200ms ease, box-shadow 200ms ease,
    transform 200ms var(--ease-ui);
}
@keyframes menu-shade-in { from { opacity: 0; } to { opacity: 1; } }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .sidebar .nav-link:not([data-current]):hover { transform: translateX(2px); }
  .btn:not(:disabled):hover { transform: translateY(-1px); }
  .btn:not(:disabled):active { transform: translateY(0); }
  .stat:hover, .team-card:hover, .task-card:hover {
    transform: translateY(-2px);
    border-color: #d5e0f0;
    box-shadow: 0 7px 22px #20395e0d;
  }
  .slot-card--details:hover { transform: translateY(-2px); }
}

@media (max-width: 900px) {
  .sidebar { box-shadow: 12px 0 34px #15284920; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { will-change: auto; }
  .stat, .team-card, .task-card, .slot-card--details, .btn,
  .sidebar .nav-link { transform: none !important; }
}
