:root {
  --ink: #17243a;
  --muted: #6f7b8d;
  --muted-light: #98a3b1;
  --line: #e1e7ef;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --navy-950: #071d3d;
  --navy-900: #0b2d5c;
  --navy-800: #103f7d;
  --navy-700: #1c5da4;
  --amber: #ffc54d;
  --amber-strong: #f5a524;
  --gold: #f2a33b;
  --blue: #5e93d0;
  --danger: #c33f4c;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 44, 82, 0.04), 0 7px 24px rgba(15, 44, 82, 0.055);
  --shadow-lg: 0 24px 70px rgba(7, 29, 61, 0.2);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  background: var(--canvas);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  display: block;
  width: 190px;
  height: auto;
  object-fit: contain;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 680;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.button-primary {
  color: white;
  background: var(--navy-900);
  box-shadow: 0 8px 18px rgba(18, 55, 42, 0.13);
}

.button-primary:hover:not(:disabled) {
  background: var(--navy-800);
  box-shadow: 0 10px 24px rgba(18, 55, 42, 0.2);
}

.button-primary .icon {
  width: 17px;
  height: 17px;
}

.button-secondary {
  color: var(--navy-900);
  border-color: #d6dfda;
  background: #fff;
}

.button-light {
  min-height: 37px;
  color: var(--navy-950);
  background: #fff;
}

.button-ghost {
  color: #59675f;
  border-color: var(--line);
  background: white;
}

.button-danger {
  color: white;
  background: #bd3545;
  box-shadow: 0 8px 18px rgba(189, 53, 69, 0.16);
}

.button-danger:hover:not(:disabled) {
  background: #a92d3c;
  box-shadow: 0 10px 24px rgba(189, 53, 69, 0.23);
}

.button-large {
  min-height: 52px;
  border-radius: 12px;
}

.button-small {
  min-height: 36px;
  padding-inline: 14px;
  font-size: 13px;
}

.button-full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  color: #758179;
  border: 0;
  border-radius: 10px;
  background: transparent;
  transition: color 150ms ease, background 150ms ease;
}

.icon-button:hover {
  color: var(--navy-900);
  background: #edf1ee;
}

.icon-button .icon {
  width: 19px;
  height: 19px;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Login */
.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 47%) 1fr;
  background: #f8faf7;
}

.login-story {
  position: relative;
  display: flex;
  min-height: calc(100vh - 28px);
  flex-direction: column;
  justify-content: space-between;
  margin: 14px 0 14px 14px;
  padding: 42px clamp(40px, 5vw, 76px) 46px;
  overflow: hidden;
  color: white;
  border-radius: 24px;
  background:
    radial-gradient(circle at 79% 15%, rgba(255, 197, 77, 0.14), transparent 27%),
    linear-gradient(148deg, #154e91 0%, #0b2d5c 55%, #071d3d 100%);
}

.login-grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255,255,255,.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.11) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to right, black, transparent 85%);
}

.login-story > *:not(.login-grid, .story-orbit) {
  position: relative;
  z-index: 2;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  color: #8f9c94;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.login-calendar {
  display: flex;
  width: 100%;
  flex: 1;
  align-items: center;
  margin: 28px 0;
}

.dashboard-calendar { margin-bottom: 16px; }

.project-calendar {
  width: min(100%, 600px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.project-calendar--login {
  color: #fff;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 18px 50px rgba(0, 12, 36, .15);
  backdrop-filter: blur(8px);
}

.project-calendar-kicker {
  color: #ba7620;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.project-calendar--login .project-calendar-kicker { color: var(--amber); }
.project-calendar-today { margin: 9px 0 6px; font-size: clamp(23px, 2.2vw, 29px); line-height: 1.2; }
.project-calendar-header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.project-calendar--login .project-calendar-header p { color: rgba(255, 255, 255, .75); }
.project-calendar-content { margin-top: 23px; }
.project-calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-calendar-month { font-size: 16px; text-transform: capitalize; }
.project-calendar-navigation { display: flex; gap: 7px; }
.project-calendar-navigation button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
}
.project-calendar-navigation .icon { display: block; width: 15px; height: 15px; }
.project-calendar-navigation button[data-month-offset="-1"] .icon { transform: rotate(180deg); }
.project-calendar-navigation button:hover { border-color: var(--amber-strong); background: rgba(245, 165, 36, .13); }
.project-calendar--login .project-calendar-navigation button { color: #fff; border-color: rgba(255, 255, 255, .23); }
.project-calendar-weekdays,
.project-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.project-calendar-weekdays { margin-top: 18px; }
.project-calendar-weekdays span { color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.project-calendar--login .project-calendar-weekdays span { color: rgba(255, 255, 255, .64); }
.project-calendar-days { margin-top: 7px; }
.project-calendar-day,
.project-calendar-blank { min-width: 0; height: 39px; }
.project-calendar-day {
  position: relative;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}
.project-calendar-day:hover { background: rgba(245, 165, 36, .12); }
.project-calendar-day.is-selected { border-color: var(--amber-strong); background: rgba(245, 165, 36, .15); }
.project-calendar-day.is-today { font-weight: 850; }
.project-calendar-day.is-today:not(.is-selected) { border-color: var(--line); }
.project-calendar-day.has-agenda::after {
  position: absolute;
  bottom: 3px;
  left: calc(50% - 10px);
  width: 20px;
  height: 4px;
  border-radius: 3px;
  background: var(--amber-strong);
  content: '';
}
.project-calendar--login .project-calendar-day { color: #fff; }
.project-calendar--login .project-calendar-day.is-today:not(.is-selected) { border-color: rgba(255, 255, 255, .42); }
.project-calendar--login .project-calendar-day.has-agenda::after { background: var(--amber); }
.project-calendar-status { min-height: 19px; margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.project-calendar-status:empty { display: none; }
.project-calendar--login .project-calendar-status { color: rgba(255, 255, 255, .74); }
.project-calendar-details { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.project-calendar-details[hidden] { display: none; }
.project-calendar-details-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.project-calendar-details-heading strong { font-size: 14px; font-weight: 750; text-transform: capitalize; }
.project-calendar-details-heading span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.project-calendar-events { display: grid; max-height: 280px; gap: 9px; overflow-y: auto; }
.project-calendar-event { min-width: 0; padding: 11px 13px; border-left: 4px solid var(--amber-strong); border-radius: 8px; background: var(--canvas); }
.project-calendar-event-label { display: block; color: #a56815; font-size: 12px; font-weight: 750; }
.project-calendar-event-project { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.project-calendar-event-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.project-calendar-event-note { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
:root[data-theme="dark"] .project-calendar-event-label { color: var(--amber); }

.story-orbit {
  position: absolute;
  border: 1px solid rgba(255, 197, 77, 0.17);
  border-radius: 50%;
}

.orbit-one {
  right: -230px;
  bottom: -175px;
  width: 570px;
  height: 570px;
}

.orbit-two {
  right: -121px;
  bottom: -67px;
  width: 350px;
  height: 350px;
  box-shadow: 0 0 90px rgba(255, 197, 77, 0.045) inset;
}

.orbit-two::before {
  position: absolute;
  top: 30px;
  left: 41px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 8px rgba(255, 197, 77, 0.1);
  content: "";
}

.login-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding: 70px clamp(40px, 8vw, 136px) 28px;
}

.login-card {
  width: min(100%, 430px);
  margin: auto;
}

.login-heading {
  margin-bottom: 36px;
}

.login-heading h2 {
  margin: 12px 0 10px;
  color: var(--ink);
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -1px;
}

.login-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.login-help { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.login-help[hidden] { display: none; }

.field-group {
  margin-bottom: 20px;
}

.field-group label,
.label-row label {
  display: block;
  margin-bottom: 8px;
  color: #39463f;
  font-size: 12px;
  font-weight: 700;
}

.field-group small {
  display: block;
  margin-top: 7px;
  color: #8b958f;
  font-size: 11px;
  line-height: 1.5;
}

.label-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.label-row span {
  color: #96a099;
  font-size: 10px;
}

.input-wrap {
  position: relative;
}

.input-wrap > .icon:first-child {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: #95a099;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-wrap input,
.field-group > input,
.field-group select {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid #dce3df;
  border-radius: 10px;
  outline: none;
  background: #fff;
  font-size: 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-wrap input {
  padding-left: 45px;
  padding-right: 48px;
}

.input-wrap input:focus,
.field-group > input:focus,
.field-group select:focus {
  border-color: #4f7fbd;
  box-shadow: 0 0 0 4px rgba(28, 93, 164, 0.09);
}

.field-group > input.is-derived {
  color: #526b87;
  background: #f2f6fb;
  cursor: default;
}

.brand-other-field[hidden] { display: none; }

input::placeholder {
  color: #b0b8b3;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  color: #87928c;
  border: 0;
  border-radius: 8px;
  background: transparent;
  transform: translateY(-50%);
}

.input-action:hover {
  background: #f1f4f2;
}

.input-action .icon {
  width: 17px;
  height: 17px;
}

.input-action .eye-closed,
.input-action.is-visible .eye-open {
  display: none;
}

.input-action.is-visible .eye-closed {
  display: block;
}

.form-error {
  min-height: 19px;
  margin: -5px 0 10px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.has-error {
  animation: shake 300ms ease;
}

@keyframes shake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.secure-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
  padding: 14px 16px;
  color: #718078;
  border: 1px solid #e4e9e5;
  border-radius: 11px;
  background: #f9faf9;
}

.secure-note > .icon {
  width: 20px;
  color: #376ba8;
}

.secure-note div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
}

.secure-note strong {
  color: #46564d;
  font-size: 11px;
}

.login-footer {
  display: flex;
  width: min(100%, 430px);
  justify-content: space-between;
  margin: 55px auto 0;
  color: #a0a8a3;
  font-size: 10px;
}

/* App shell */
.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 254px minmax(0, 1fr);
  background: var(--canvas);
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 254px;
  flex-direction: column;
  padding: 27px 18px 17px;
  color: white;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 88%, rgba(255,197,77,.08), transparent 25%),
    linear-gradient(175deg, #0d3972, #071e40 72%);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.main-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 42px;
}

.nav-label {
  margin: 0 12px 12px;
  color: rgba(255,255,255,.31);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.6px;
}

.nav-label-spaced {
  margin-top: 30px;
}

.nav-item {
  display: flex;
  width: 100%;
  height: 45px;
  align-items: center;
  gap: 13px;
  margin-bottom: 4px;
  padding: 0 12px;
  color: rgba(255,255,255,.6);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 560;
  transition: color 150ms, background 150ms;
}

.nav-item:hover {
  color: white;
  background: rgba(255,255,255,.055);
}

.nav-item.active {
  color: var(--navy-950);
  background: var(--amber);
  font-weight: 720;
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
}

.nav-item .icon {
  width: 18px;
  height: 18px;
}

.nav-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  place-items: center;
  padding: 0 5px;
  color: rgba(255,255,255,.66);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  font-size: 9px;
}

.nav-item.active .nav-count {
  color: var(--navy-900);
  background: rgba(18,55,42,.09);
}

.nav-lock {
  margin-left: auto;
  opacity: .4;
}

.nav-button {
  border: 0;
  text-align: left;
  background: transparent;
}

.sidebar-profile {
  display: grid;
  grid-template-columns: 36px 1fr 32px;
  align-items: center;
  gap: 10px;
  padding: 15px 4px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-profile > div:nth-child(2) {
  min-width: 0;
}

.sidebar-profile strong,
.sidebar-profile span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile strong {
  color: rgba(255,255,255,.82);
  font-size: 10px;
}

.sidebar-profile span {
  margin-top: 3px;
  color: rgba(255,255,255,.36);
  font-size: 9px;
}

.sidebar-profile .icon-button {
  color: rgba(255,255,255,.38);
}

.sidebar-profile .icon-button:hover {
  color: white;
  background: rgba(255,255,255,.06);
}

.avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #194b83;
  border-radius: 10px;
  background: #e4edf8;
  font-size: 10px;
  font-weight: 800;
}

.avatar-sidebar {
  color: var(--navy-900);
  background: var(--amber);
}

.main-content {
  min-width: 0;
  grid-column: 2;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  height: 70px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 3.2vw, 48px);
  border-bottom: 1px solid #e1e7ef;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #96a099;
  font-size: 10px;
}

.breadcrumbs .icon {
  width: 12px;
}

.breadcrumbs strong {
  color: #46534c;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  position: relative;
  display: flex;
  width: 218px;
  height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  color: #9ca6a0;
  border: 1px solid #e0e6e2;
  border-radius: 9px;
  background: #f8f9f8;
}

.header-search .icon {
  width: 15px;
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
}

.header-search kbd {
  padding: 2px 5px;
  color: #9aa39e;
  border: 1px solid #dce2de;
  border-radius: 4px;
  background: white;
  font-family: inherit;
  font-size: 8px;
}

.theme-toggle,
.notification-button {
  border: 1px solid #e1e6e3;
}

.notification-center {
  position: relative;
}

.notification-button {
  position: relative;
}

.notification-button .notification-count {
  position: absolute;
  top: -6px;
  right: -7px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 12px;
  background: #d83e4f;
  font-size: 9px;
  font-weight: 800;
}

.notification-button.has-unread {
  color: #c93647;
  border-color: rgba(201, 54, 71, .34);
  background: #fff3f5;
}

.notification-button .notification-count[hidden] { display: none; }

.notification-popover {
  position: absolute;
  z-index: 30;
  top: 47px;
  right: 0;
  width: min(390px, calc(100vw - 30px));
  overflow: hidden;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(7, 29, 61, .18);
}

.notification-popover[hidden] { display: none; }
.notification-popover > header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 16px; border-bottom: 1px solid #e8edf3; }
.notification-popover h2,
.notification-popover p { margin: 0; }
.notification-popover h2 { color: #2d4058; font-size: 15px; }
.notification-popover header p { margin-top: 4px; color: #8794a4; font-size: 11px; }
.notification-popover .text-button { flex: 0 0 auto; color: #2e69a7; font-size: 10px; }
.notification-list { max-height: min(470px, calc(100vh - 150px)); overflow-y: auto; }
.notification-item { position: relative; display: grid; width: 100%; grid-template-columns: 9px 1fr; gap: 10px; padding: 14px 16px; color: inherit; border: 0; border-bottom: 1px solid #edf0f4; background: #fff; text-align: left; }
.notification-item:hover { background: #f7f9fc; }
.notification-item > i { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #c9d1dc; }
.notification-item.is-unread { background: #f4f8fd; }
.notification-item.is-unread > i { background: #d83e4f; box-shadow: 0 0 0 4px #fde7ea; }
.notification-item strong,
.notification-item p,
.notification-item time { display: block; }
.notification-item strong { color: #34475e; font-size: 12px; }
.notification-item p { margin: 5px 0 0; color: #6f7e91; font-size: 11px; line-height: 1.5; }
.notification-item time { margin-top: 6px; color: #9aa5b2; font-size: 10px; }
.notification-empty { display: flex; min-height: 210px; flex-direction: column; align-items: center; justify-content: center; padding: 25px; color: #8d99a8; text-align: center; }
.notification-empty .icon { width: 27px; height: 27px; margin-bottom: 12px; }
.notification-empty strong { color: #46586e; font-size: 13px; }
.notification-empty p { max-width: 260px; margin: 6px 0 0; font-size: 11px; line-height: 1.5; }

.topbar-divider {
  width: 1px;
  height: 27px;
  margin: 0 4px;
  background: #e2e7e3;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-chip > span:nth-child(2) {
  display: flex;
  max-width: 120px;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.profile-chip strong,
.profile-chip small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip strong {
  color: #344139;
  font-size: 10px;
}

.profile-chip small {
  color: #929c96;
  font-size: 8px;
}

.profile-chip > .icon {
  width: 13px;
  color: #909b95;
  transform: rotate(90deg);
}

.dashboard-body {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 40px clamp(24px, 3.2vw, 48px) 23px;
}

.welcome-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}

.welcome-row h1 {
  margin: 0 0 6px;
  color: #1b2922;
  font-size: clamp(25px, 2.3vw, 33px);
  line-height: 1.15;
  letter-spacing: -1.1px;
}

.welcome-row h1 span {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
}

.welcome-row p {
  margin: 0;
  color: #7b8881;
  font-size: 12px;
}

.security-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  color: white;
  border-radius: 13px;
  background: linear-gradient(100deg, #d78215, #f1a42f);
  box-shadow: var(--shadow-sm);
}

.security-banner-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255,255,255,.13);
}

.security-banner-icon .icon { width: 17px; }
.security-banner > div:nth-child(2) { flex: 1; }
.security-banner strong { font-size: 11px; }
.security-banner p { margin: 3px 0 0; color: rgba(255,255,255,.7); font-size: 10px; }

.panel {
  border: 1px solid #e1e7ef;
  background: white;
  box-shadow: var(--shadow-sm);
}

.panel {
  min-width: 0;
  border-radius: 14px;
  transition: box-shadow 250ms;
}

.overview-administration { margin-top: 16px; }

.panel-highlight {
  box-shadow: 0 0 0 3px rgba(35,96,70,.12), var(--shadow-sm);
}

.panel-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid #edf0ee;
}

.panel-header h2,
.panel-header p { margin: 0; }
.panel-header h2 { color: #29372f; font-size: 13px; letter-spacing: -.2px; }
.panel-header p { margin-top: 5px; color: #929c96; font-size: 9px; }

.text-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: #4d735f;
  border: 0;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}

.text-button .icon { width: 12px; }

.engineering-operations-panel .text-button { color: var(--amber-strong); }
.engineering-operations-panel .text-button:hover { color: #d98212; }

.panel-count {
  padding: 5px 8px;
  color: #426b9d;
  border-radius: 7px;
  background: #edf4fb;
  font-size: 8px;
  font-weight: 750;
}

.table-wrap {
  min-height: 290px;
  max-height: 430px;
  overflow-y: auto;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  height: 36px;
  padding: 0 17px;
  color: #99a39d;
  background: #fafbfa;
  font-size: 7px;
  font-weight: 780;
  letter-spacing: .75px;
  text-align: left;
  white-space: nowrap;
}

td {
  height: 62px;
  padding: 0 17px;
  color: #76827b;
  border-top: 1px solid #eff2f0;
  font-size: 9px;
  white-space: nowrap;
}

tbody tr {
  transition: background 150ms;
}

tbody tr:hover { background: #fbfcfb; }

.table-user {
  display: flex;
  min-width: 170px;
  align-items: center;
  gap: 10px;
}

.table-user > .avatar {
  display: inline-grid;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.table-user strong,
.table-user span {
  display: block;
}

.table-user strong { max-width: 160px; overflow: hidden; color: #344139; font-size: 10px; text-overflow: ellipsis; }
.table-user div > span { max-width: 170px; margin-top: 4px; overflow: hidden; color: #929c96; font-size: 8px; text-overflow: ellipsis; }

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.role-badge {
  padding: 5px 8px;
  color: #516159;
  border: 1px solid #e2e7e4;
  border-radius: 6px;
  background: #fafbfa;
  font-size: 8px;
  font-weight: 650;
}

.role-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--navy-900);
}

.role-badge.role-admin i { background: #5e8fc9; }
.role-badge.role-sales i { background: #dda64a; }
.role-badge.role-engineer i { background: #7ea4bd; }

td .icon-button { width: 28px; height: 28px; }

.reset-password-button { color: var(--navy-700); }
.reset-password-button:hover { color: var(--navy-900); background: #eaf2fc; }

.delete-account-button {
  color: #bd5260;
}

.delete-account-button:hover {
  color: #a72f3e;
  background: #fbecef;
}

.self-label {
  color: #9aa4b1;
  font-size: 8px;
  font-weight: 650;
}

.empty-state {
  display: none;
  min-height: 240px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #84918a;
  text-align: center;
}

.empty-state.is-visible { display: flex; }
.empty-state .icon { width: 28px; height: 28px; margin-bottom: 13px; color: #a9b2ad; }
.empty-state strong { color: #4a5850; font-size: 11px; }
.empty-state p { max-width: 270px; margin: 6px 0 0; font-size: 9px; line-height: 1.5; }

.operations-body {
  padding: 18px 20px 20px;
}

.operations-snapshot > h3,
.operations-section-head h3 {
  margin: 0;
  color: #65736b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.operations-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.operations-counter {
  position: relative;
  min-width: 0;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid #e5eaf0;
  border-radius: 10px;
  background: #fafbfd;
}

.operations-counter::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: #315f92;
  content: "";
}

.operations-counter span,
.operations-counter strong { display: block; }
.operations-counter span { overflow: hidden; color: #88959f; font-size: 8px; font-weight: 800; letter-spacing: .7px; text-overflow: ellipsis; white-space: nowrap; }
.operations-counter strong { margin-top: 5px; color: #23374e; font-size: 21px; line-height: 1; }
.operations-counter.tone-progress::before { background: #4f8dcc; }
.operations-counter.tone-waiting::before { background: #d99a32; }
.operations-counter.tone-overdue::before { background: #c95562; }

.operations-attention {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf0ee;
}

.operations-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operations-section-head > span {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding-inline: 6px;
  color: #7b602e;
  border-radius: 20px;
  background: #fbf1df;
  font-size: 9px;
  font-weight: 800;
}

.operations-attention-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.operations-attention-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #e7ebf0;
  border-radius: 9px;
  background: #fcfdfd;
}

.operations-attention-copy { min-width: 0; }
.operations-attention-copy strong,
.operations-attention-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operations-attention-copy strong { color: #31455d; font-size: 10px; }
.operations-attention-copy span { max-width: 220px; margin-top: 3px; color: #89969f; font-size: 9px; }

.operations-attention-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
}

.operations-reason,
.operations-status {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-reason {
  padding: 3px 6px;
  color: #426a99;
  border-radius: 5px;
  background: #edf4fb;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .35px;
  text-transform: uppercase;
}

.operations-reason.reason-overdue { color: #a43e4c; background: #fae9ec; }
.operations-reason.reason-preparation-not-ready { color: #90621f; background: #fbf0dc; }
.operations-status { color: #8d9992; font-size: 8px; }

.operations-empty {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #71827a;
  border: 1px dashed #dce4df;
  border-radius: 9px;
  background: #fbfcfb;
  font-size: 10px;
}

.operations-empty .icon { width: 15px; color: #3f78b2; }

.dashboard-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  color: #a0a9a4;
  font-size: 8px;
}

.dashboard-footer strong { color: #77847d; }

.sidebar-overlay,
.mobile-only {
  display: none;
}

/* Modal */
.modal-open { overflow: hidden; }

.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  opacity: 0;
  transition: opacity 180ms ease;
}

.modal-layer.is-open { opacity: 1; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 29, 22, 0.63);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  max-height: calc(100vh - 40px);
  padding: 25px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(.98);
  transition: transform 200ms ease;
}

.modal-layer.is-open .modal-card { transform: translateY(0) scale(1); }

.modal-header {
  display: grid;
  grid-template-columns: 43px 1fr 38px;
  align-items: center;
  gap: 13px;
  margin-bottom: 25px;
}

.modal-header h2 {
  margin: 4px 0 0;
  color: #24332b;
  font-size: 18px;
  letter-spacing: -.5px;
}

.modal-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: var(--navy-700);
  border-radius: 11px;
  background: #eaf2fb;
}

.modal-icon .icon { width: 19px; }

.modal-form .field-group { margin-bottom: 17px; }

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin: -5px 0 22px;
  padding: 4px;
  border: 1px solid #e1e7ef;
  border-radius: 11px;
  background: #f3f6fa;
}

.settings-tabs button {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #758398;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.settings-tabs button:hover {
  color: var(--navy-800);
}

.settings-tabs button.is-active {
  color: var(--navy-900);
  background: white;
  box-shadow: 0 2px 8px rgba(15, 44, 82, 0.08);
}

.settings-tabs .icon {
  width: 15px;
  height: 15px;
}

.settings-panel[hidden] {
  display: none;
}

.account-settings-modal .modal-actions {
  justify-content: stretch;
}

.account-settings-modal .modal-actions .button {
  width: 100%;
}

.select-wrap { position: relative; }
.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #6c7871;
  border-bottom: 1.5px solid #6c7871;
  content: "";
  pointer-events: none;
  transform: translateY(-68%) rotate(45deg);
}

.field-group select {
  appearance: none;
  cursor: pointer;
}

.info-strip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 19px;
  padding: 12px 13px;
  color: #456889;
  border: 1px solid #d7e4f2;
  border-radius: 10px;
  background: #f1f6fc;
  font-size: 10px;
  line-height: 1.5;
}

.info-strip .icon { width: 16px; margin-top: 1px; color: #2e69a7; }
.info-strip.warning { color: #85672f; border-color: #ecdfc3; background: #fcf7ed; }
.info-strip.warning .icon { color: #a8782e; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 5px;
  padding-top: 19px;
  border-top: 1px solid #edf0ee;
}

.credential-modal {
  width: min(100%, 450px);
  text-align: center;
}

.delete-account-modal,
.reset-password-modal {
  width: min(100%, 430px);
  text-align: center;
}

.danger-emblem {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 2px auto 18px;
  place-items: center;
  color: #b63343;
  border-radius: 50%;
  background: #fbe8eb;
  box-shadow: 0 0 0 8px #fff5f6;
}

.danger-emblem .icon {
  width: 21px;
  height: 21px;
}

.delete-account-modal h2,
.reset-password-modal h2 {
  margin: 8px 0;
  color: #26364d;
  font-size: 21px;
}

.delete-account-modal > p,
.reset-password-modal > p {
  margin: 0 auto 20px;
  color: #788495;
  font-size: 11px;
  line-height: 1.6;
}

.delete-account-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
  text-align: left;
}

.delete-account-identity strong,
.delete-account-identity span {
  display: block;
}

.delete-account-identity strong {
  color: #34445b;
  font-size: 10px;
}

.delete-account-identity div > span {
  margin-top: 4px;
  color: #8995a5;
  font-size: 9px;
}

.success-emblem {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 2px auto 18px;
  place-items: center;
  color: #174d85;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 8px #fff5dd;
}

.credential-modal h2 {
  margin: 8px 0;
  color: #24322a;
  font-size: 21px;
}

.credential-modal > p {
  margin: 0 auto 20px;
  color: #77837c;
  font-size: 11px;
  line-height: 1.6;
}

.credential-box {
  margin-bottom: 15px;
  padding: 7px 15px 14px;
  border: 1px solid #dee6e1;
  border-radius: 12px;
  background: #fafbfa;
  text-align: left;
}

.credential-box > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 2px;
  border-bottom: 1px solid #e7ebe8;
}

.credential-box span { color: #8a958f; font-size: 9px; }
.credential-box strong { color: #344139; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.credential-box .button-copy { width: 100%; margin-top: 13px; color: var(--navy-800); border-color: #d8e2dc; background: white; font-size: 10px; }

.password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -6px 0 18px;
}

.password-rules span {
  padding: 4px 7px;
  color: #7b8881;
  border-radius: 5px;
  background: #f2f4f2;
  font-size: 8px;
}

/* Toast and loader */
.toast-region {
  position: fixed;
  z-index: 200;
  top: 20px;
  right: 20px;
  display: flex;
  width: min(360px, calc(100vw - 40px));
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  color: #3c4b43;
  border: 1px solid #dfe6e1;
  border-radius: 11px;
  background: white;
  box-shadow: 0 12px 35px rgba(16,47,37,.14);
  font-size: 11px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 200ms, transform 200ms;
}

.toast-visible { opacity: 1; transform: translateY(0); }
.toast-mark { display: grid; width: 22px; height: 22px; place-items: center; color: white; border-radius: 50%; background: #2f70b5; font-size: 11px; font-weight: 800; }
.toast-error .toast-mark { background: var(--danger); }

.app-loader {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--navy-950);
}

.loader-logo {
  width: 230px;
  height: auto;
}

.current-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  background: #f7f9fc;
}

.current-identity span {
  color: #8a96a6;
  font-size: 9px;
}

.current-identity strong {
  max-width: 70%;
  overflow: hidden;
  color: #2e405a;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loader-bar { width: 70px; height: 2px; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.1); }
.loader-bar span { display: block; width: 35px; height: 100%; background: var(--amber); animation: loading 1s ease-in-out infinite alternate; }
@keyframes loading { to { transform: translateX(35px); } }

/* Engineering requests */
.feature-view {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 40px clamp(24px, 3.2vw, 48px) 23px;
}

.feature-loader,
.feature-error {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #7a8798;
  text-align: center;
}

.feature-loader .spinner {
  border-color: #d8e2ee;
  border-top-color: var(--navy-700);
}

.feature-loader p,
.feature-error p { margin: 0; font-size: 11px; }
.feature-error strong { color: #34445b; font-size: 13px; }

.requests-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.requests-heading h1 {
  margin: 9px 0 6px;
  color: #1c2c43;
  font-size: clamp(25px, 2.3vw, 33px);
  letter-spacing: -1px;
}

.requests-heading p { margin: 0; color: #7b8797; font-size: 12px; }
.request-heading-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.request-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}

.request-metric {
  display: flex;
  min-height: 89px;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid #e1e7ef;
  border-radius: 13px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.request-metric > span {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: #2869ad;
  border-radius: 10px;
  background: #eaf2fb;
}

.request-metric.tone-orange > span { color: #b36517; background: #fff0df; }
.request-metric.tone-yellow > span { color: #9c7218; background: #fff7d9; }
.request-metric.tone-red > span { color: #b33c4a; background: #fbecef; }
.request-metric .icon { width: 18px; }
.request-metric strong,
.request-metric small { display: block; }
.request-metric strong { color: #273950; font-size: 22px; letter-spacing: -.6px; }
.request-metric small { margin-top: 3px; color: #8a96a5; font-size: 9px; }

.request-registry { overflow: hidden; }

.request-toolbar {
  display: flex;
  min-height: 79px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid #e9edf2;
}

.request-toolbar h2,
.request-toolbar p { margin: 0; }
.request-toolbar h2 { color: #293a51; font-size: 13px; }
.request-toolbar p { margin-top: 5px; color: #929dab; font-size: 9px; }

.request-filters { display: flex; align-items: center; gap: 8px; }
.request-filters select,
.compact-search {
  height: 37px;
  color: #5f6f83;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f9fafc;
  font-size: 9px;
}

.request-filters select { min-width: 125px; padding: 0 27px 0 10px; outline: none; }
.compact-search { display: flex; width: 220px; align-items: center; gap: 8px; padding: 0 10px; }
.compact-search .icon { width: 14px; color: #96a1af; }
.compact-search input { min-width: 0; flex: 1; border: 0; outline: none; background: transparent; font-size: 9px; }

.request-table-wrap { min-height: 310px; overflow-x: auto; }
.request-table tbody tr { cursor: pointer; }
.request-table tbody tr:focus { outline: 2px solid rgba(28,93,164,.22); outline-offset: -2px; }
.request-table td { height: 69px; }
.request-number strong,
.request-number span,
.request-project strong,
.request-project span { display: block; }
.request-number strong { color: #214f83; font-size: 9px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.request-number span { margin-top: 4px; color: #9aa4b1; font-size: 8px; }
.request-project { min-width: 170px; }
.request-project strong { max-width: 190px; overflow: hidden; color: #35465c; font-size: 10px; text-overflow: ellipsis; }
.request-project span { max-width: 190px; margin-top: 4px; overflow: hidden; color: #8c98a6; font-size: 8px; text-overflow: ellipsis; }
.request-support { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.request-engineer { color: #4e6076; }

.priority-badge,
.request-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .45px;
  white-space: nowrap;
}

.priority-low { color: #617185; background: #eff2f5; }
.priority-normal { color: #2c659f; background: #edf4fb; }
.priority-high { color: #9a671e; background: #fff3df; }
.priority-critical { color: #ad3544; background: #fbecef; }
.request-status-badge { color: #365f91; background: #edf4fb; }
.status-closed { color: #3f7160; background: #ebf5f0; }
.status-completed { color: #477365; background: #edf5f1; }
.status-waiting-information,
.status-waiting-external { color: #93641e; background: #fff3df; }
.status-rejected,
.status-cancelled { color: #a6404d; background: #fbecef; }
.status-draft { color: #6e7886; background: #eff2f5; }

.request-empty {
  display: none;
  min-height: 310px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8d99a8;
  text-align: center;
}
.request-empty.is-visible { display: flex; }
.request-empty .icon { width: 30px; height: 30px; margin-bottom: 12px; color: #a9b5c3; }
.request-empty strong { color: #43546a; font-size: 11px; }
.request-empty p { margin: 6px 0 0; font-size: 9px; }

/* Request form */
.request-form-modal {
  width: min(100%, 980px);
  padding: 0;
}

.request-form-header,
.request-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 28px 20px;
  border-bottom: 1px solid #e7ecf2;
}

.request-form-header h2,
.request-form-header p { margin: 0; }
.request-form-header h2 { margin-top: 5px; color: #26384f; font-size: 20px; letter-spacing: -.5px; }
.request-form-header p { margin-top: 5px; color: #8b96a5; font-size: 9px; }

.form-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 15px 28px;
  border-bottom: 1px solid #edf0f4;
  background: #f8fafc;
}

.form-stepper button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 0;
  color: #97a1af;
  border: 0;
  background: transparent;
  font-size: 9px;
  text-align: center;
}

.form-stepper button:not(:last-child)::after {
  position: absolute;
  top: 13px;
  right: calc(-50% + 18px);
  left: calc(50% + 18px);
  height: 1px;
  background: #dce3eb;
  content: "";
}

.form-stepper button strong {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0 5px;
  background: #f8fafc;
  line-height: 1.35;
}

.form-stepper button span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #d7dfe8;
  border-radius: 50%;
  background: white;
  font-size: 8px;
  font-weight: 800;
}

.form-stepper button.is-active { color: var(--navy-800); }
.form-stepper button.is-active span { color: #fff; border-color: var(--navy-800); background: var(--navy-800); }

.request-form-step { display: none; padding: 24px 28px 8px; }
.request-form-step.is-active { display: block; }
.focused-update-modal { width: min(100%, 760px); }
.preparation-modal { width: min(100%, 880px); }
.focused-update-body { padding: 24px 28px 8px; }

.form-section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 5px 0 19px;
}

.form-section-heading:not(:first-child) { margin-top: 30px; padding-top: 25px; border-top: 1px solid #edf0f4; }
.form-section-heading > span { display: grid; width: 31px; height: 31px; place-items: center; color: var(--navy-800); border-radius: 8px; background: #eaf2fb; font-size: 10px; font-weight: 800; }
.form-section-heading h3,
.form-section-heading p { margin: 0; }
.form-section-heading h3 { color: #33445a; font-size: 12px; }
.form-section-heading p { margin-top: 3px; color: #929dab; font-size: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 15px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.request-form-modal textarea,
.detail-side-card textarea { width: 100%; padding: 12px 13px; resize: vertical; color: #26384f; border: 1px solid #dce4ed; border-radius: 9px; outline: none; background: white; font-size: 11px; line-height: 1.5; }
.request-form-modal textarea:focus,
.detail-side-card textarea:focus { border-color: #4f7fbd; box-shadow: 0 0 0 4px rgba(28,93,164,.08); }

.check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.check-card { position: relative; display: flex; min-height: 39px; align-items: center; gap: 8px; padding: 8px 10px; color: #657489; border: 1px solid #dfe6ee; border-radius: 8px; background: #fafbfd; cursor: pointer; font-size: 9px; }
.check-card:has(input:checked) { color: var(--navy-800); border-color: #8eb0d4; background: #edf4fb; }
.check-card input { width: 13px; height: 13px; accent-color: var(--navy-700); }

.attachment-queue { margin: 18px 0; padding: 14px; border: 1px dashed #b9cbe0; border-radius: 10px; background: #f5f9fd; }
.attachment-queue-heading,
.attachment-detail-heading,
.attachment-detail-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.attachment-queue-heading strong,
.attachment-queue-heading span { display: block; }
.attachment-queue-heading strong { color: #405873; font-size: 12px; }
.attachment-queue-heading span,
.attachment-detail-heading p { margin: 4px 0 0; color: #7d8da0; font-size: 10px; line-height: 1.45; }
.attachment-select-button { flex: none; cursor: pointer; }
.attachment-queue-list { display: grid; gap: 7px; margin-top: 11px; }
.attachment-queue-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 1px solid #dce6f0; border-radius: 8px; background: #fff; }
.attachment-queue-item strong,
.attachment-queue-item span { display: block; overflow-wrap: anywhere; }
.attachment-queue-item strong { color: #405168; font-size: 11px; }
.attachment-queue-item span,
.attachment-empty,
.attachment-detail-status { margin: 3px 0 0; color: #8796a7; font-size: 10px; }

.request-form-error { margin: 0 28px; }
.request-form-actions { position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 9px; padding: 16px 28px; border-top: 1px solid #e7ecf2; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.request-form-actions #previous-step .icon { transform: rotate(180deg); }

.request-type-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.request-type-card {
  position: relative;
  display: flex;
  min-height: 134px;
  flex-direction: column;
  align-items: flex-start;
  padding: 13px;
  color: #617187;
  border: 1px solid #dce4ed;
  border-radius: 12px;
  background: #fbfcfd;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.request-type-card:has(input:checked) {
  color: var(--navy-800);
  border-color: #7ea6d0;
  background: #edf4fb;
  box-shadow: 0 0 0 3px rgba(28, 93, 164, .07);
}

.request-type-card:has(input:disabled) { cursor: default; }
.request-type-card input { position: absolute; top: 13px; right: 13px; accent-color: var(--navy-700); }
.request-type-card .type-symbol { display: grid; width: 34px; height: 34px; margin-bottom: 12px; place-items: center; color: var(--navy-800); border-radius: 9px; background: #e5eef8; font-size: 11px; font-weight: 850; }
.request-type-card:has(input:checked) .type-symbol { color: var(--navy-950); background: var(--amber); }
.request-type-card strong { color: #34465c; font-size: 12px; }
.request-type-card small { margin-top: 6px; color: #8491a1; font-size: 9px; line-height: 1.45; }

.repeat-list { display: flex; flex-direction: column; gap: 12px; }
.repeat-card { overflow: hidden; border: 1px solid #dfe6ef; border-radius: 12px; background: #fafbfd; }
.repeat-card.affected-product-card { overflow: visible; }
.repeat-card > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid #e5eaf0; background: #f3f6fa; }
.repeat-card > header strong,
.repeat-card > header small { display: block; }
.repeat-card > header strong { color: #35485f; font-size: 12px; }
.repeat-card > header small { margin-top: 3px; color: #8794a4; font-size: 10px; }
.repeat-fields { padding: 16px 15px 0; }
.add-repeat { margin: 12px 0 20px; }
.repeat-section-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 5px 0 10px; }
.repeat-section-intro strong { color: #35485f; font-size: 12px; }
.repeat-section-intro span { color: #8794a4; font-size: 10px; text-align: right; }
.icon-text-button { padding: 5px 8px; color: #a33b49; border: 0; border-radius: 7px; background: #fbecef; font: inherit; font-size: 11px; font-weight: 700; }

.sku-combobox { position: relative; }
.sku-combobox:focus-within { z-index: 12; }
.sku-combobox-control { position: relative; }
.sku-combobox-control input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid #dce3df;
  border-radius: 10px;
  outline: none;
  background: #fff;
  font-size: 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.sku-combobox-control input:focus { border-color: #4f7fbd; box-shadow: 0 0 0 4px rgba(28, 93, 164, .09); }
.sku-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% - 14px);
  right: 0;
  left: 0;
  max-height: 310px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #d8e1eb;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 16px 35px rgba(29, 47, 70, .18);
}
.sku-suggestions[hidden] { display: none; }
.sku-suggestion {
  display: block;
  width: 100%;
  padding: 9px 10px;
  color: #31445b;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.sku-suggestion:hover,
.sku-suggestion:focus { outline: none; background: #eef5fc; }
.sku-suggestion strong { display: block; font-size: 12px; line-height: 1.35; }
.sku-suggestion small { margin: 3px 0 0; overflow: hidden; color: #7b899b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sku-suggestion-more,
.sku-suggestion-empty { padding: 10px; color: #8390a0; font-size: 10px; line-height: 1.45; text-align: center; }

.vendor-toggle {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  color: #53667d;
  border: 1px solid #e3d5b8;
  border-radius: 11px;
  background: #fff9ed;
  cursor: pointer;
}
.vendor-toggle input { margin-top: 2px; accent-color: var(--amber-strong); }
.vendor-toggle strong,
.vendor-toggle small { display: block; }
.vendor-toggle strong { color: #6f5225; font-size: 12px; }
.vendor-toggle small { margin-top: 4px; color: #987b4e; font-size: 10px; line-height: 1.45; }
.vendor-fields { margin-top: 15px; padding: 17px 17px 0; border: 1px solid #eadfc8; border-radius: 11px; background: #fffcf5; }
.vendor-fields[hidden] { display: none; }
/* Request detail */
.request-detail-modal { width: min(100%, 1020px); padding: 0; }
.request-detail-header h2,
.request-detail-header p { margin: 0; }
.detail-title-line { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.request-detail-header h2 { color: #26384f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; }
.request-detail-header p { margin-top: 7px; color: #8995a4; font-size: 10px; }
.request-type-pill,
.request-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  color: #795513;
  border-radius: 6px;
  background: #fff1cc;
  font-size: 9px;
  font-weight: 780;
}
.request-type-pill { margin-bottom: 2px; letter-spacing: .35px; text-transform: uppercase; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; }
.request-detail-modal:has(#closure-fields:not([hidden])) .detail-layout { grid-template-columns: minmax(0, 1fr) 420px; }
.detail-main { padding: 23px 26px 30px; border-right: 1px solid #e9edf2; }
.detail-sidebar { padding: 22px; background: #f8fafc; }
#archive-request-button,
#delete-draft-button { display: flex; margin-top: 12px; }
.detail-section { margin-bottom: 28px; }
.attachment-detail-heading { align-items: flex-start; margin-bottom: 12px; }
.attachment-detail-heading h3 { margin: 0; color: #35465c; font-size: 12px; text-transform: uppercase; letter-spacing: .65px; }
.attachment-detail-list,
.archived-attachment-list { display: grid; gap: 8px; margin-top: 12px; }
.attachment-detail-item { padding: 11px 12px; border: 1px solid #e0e7ef; border-radius: 9px; background: #fafbfd; }
.attachment-detail-copy { min-width: 0; }
.attachment-detail-copy strong,
.attachment-detail-copy span,
.attachment-detail-copy small { display: block; overflow-wrap: anywhere; }
.attachment-detail-copy strong { color: #3b4d64; font-size: 11px; }
.attachment-detail-copy span,
.attachment-detail-copy small { margin-top: 3px; color: #8492a3; font-size: 9px; }
.attachment-detail-actions { display: flex; flex: none; gap: 6px; }
.attachment-detail-actions .button { min-height: 31px; padding: 7px 10px; }
.attachment-delete-button { color: #ad4450; }
.detail-section > h3,
.detail-side-card > h3 { margin: 0 0 14px; color: #35465c; font-size: 10px; text-transform: uppercase; letter-spacing: .65px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.detail-grid > div span,
.detail-grid > div strong { display: block; }
.detail-grid > div span { color: #909cab; font-size: 8px; }
.detail-grid > div strong { margin-top: 5px; color: #42536a; font-size: 10px; line-height: 1.4; white-space: pre-wrap; }
.detail-copy { padding: 16px; border: 1px solid #e4e9ef; border-radius: 10px; background: #fbfcfd; }
.detail-copy label { display: block; color: #8e9aa9; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.detail-copy p { margin: 6px 0 17px; color: #46576d; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }
.detail-copy p:last-child { margin-bottom: 0; }

.detail-side-card { margin-bottom: 13px; padding: 15px; border: 1px solid #e1e7ef; border-radius: 11px; background: white; }
.detail-side-card .detail-grid { grid-template-columns: 1fr; gap: 12px; }
.detail-side-card form > label { display: block; margin: 11px 0 6px; color: #758398; font-size: 8px; font-weight: 700; }
.detail-side-card select,
.detail-side-card input { width: 100%; height: 39px; padding: 0 10px; color: #43546a; border: 1px solid #dce4ed; border-radius: 8px; outline: none; background: white; font-size: 9px; }
.detail-side-card .button { margin-top: 10px; }
.side-note { margin: 0; color: #7d8998; font-size: 9px; line-height: 1.55; }
.detail-empty-note { grid-column: 1 / -1; margin: 0; color: #7d8998; font-size: 11px; line-height: 1.55; }
.status-update-card { container-type: inline-size; }
.status-update-form { display: grid; gap: 20px; }
.status-form-section { min-width: 0; }
.status-form-section-heading { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 10px; margin-bottom: 18px; }
.status-form-section-heading > span { display: grid; width: 26px; height: 26px; place-items: center; color: #8a641f; border-radius: 8px; background: #fff0c8; font-size: 9px; font-weight: 800; }
.status-form-section-heading strong,
.status-form-section-heading small { display: block; }
.status-form-section-heading strong { color: #35465c; font-size: 11px; line-height: 1.35; }
.status-form-section-heading small { margin-top: 4px; color: #8390a1; font-size: 9px; line-height: 1.5; }
.status-form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.status-form-field { min-width: 0; }
.status-form-field > label { display: block; margin: 0 0 7px; color: #758398; font-size: 9px; font-weight: 700; line-height: 1.35; }
.status-form-field-full { grid-column: 1 / -1; }
.closure-fields { display: grid; gap: 28px; padding-top: 28px; border-top: 1px solid #e3e9f0; }
.closure-fields[hidden] { display: none; }
.closure-special { margin: 0; padding: 18px; border: 1px solid #dfe6ef; border-radius: 10px; background: #f7f9fc; }
.closeout-section { padding-top: 28px; border-top: 1px solid #e3e9f0; }
.status-check-field { min-height: 40px; margin: 0; padding: 10px 11px; color: #5f6f83; border: 1px solid #dfe6ef; border-radius: 8px; background: #fafbfd; font-size: 9px; font-weight: 700; line-height: 1.35; }
.status-form-subsection { margin-top: 24px; padding: 16px; border: 1px solid #dfe6ef; border-radius: 10px; background: #f7f9fc; }
.status-form-subheading { margin-bottom: 16px; }
.status-form-subheading strong,
.status-form-subheading small { display: block; }
.status-form-subheading strong { color: #40536b; font-size: 10px; }
.status-form-subheading small { margin-top: 4px; color: #8390a1; font-size: 9px; line-height: 1.45; }
.inline-check { display: flex !important; align-items: center; gap: 7px; }
.inline-check input { width: 13px; height: 13px; }
#knowledge-capture-fields[hidden] { display: none; }
#knowledge-capture-fields { margin-top: 2px; }

@container (min-width: 330px) {
  .status-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.activity-timeline { display: flex; flex-direction: column; gap: 0; }
.activity-item { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: 9px; min-height: 57px; }
.activity-item:not(:last-child)::before { position: absolute; top: 14px; bottom: -2px; left: 4px; width: 1px; background: #dce4ed; content: ""; }
.activity-item > i { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 2px; border: 2px solid #fff; border-radius: 50%; background: #3d76b2; box-shadow: 0 0 0 2px #c9d9e9; }
.activity-item strong,
.activity-item p,
.activity-item span { display: block; margin: 0; }
.activity-item strong { color: #405168; font-size: 9px; }
.activity-item p { margin-top: 4px; color: #758295; font-size: 9px; }
.activity-item span { margin-top: 4px; color: #a0a9b4; font-size: 8px; }

.request-archive-modal h2,
.request-archive-log-header h2 { margin: 0 0 10px; color: #26384f; font-size: 19px; }
.request-archive-modal p,
.request-archive-log-header p { color: #65758a; font-size: 12px; line-height: 1.6; }
.request-archive-modal label { display: block; margin: 18px 0 7px; color: #405168; font-size: 12px; font-weight: 700; }
.request-archive-modal textarea { width: 100%; padding: 10px; border: 1px solid #dce4ed; border-radius: 8px; font: inherit; resize: vertical; }
.request-archive-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 15px; }
.request-archive-log-modal { width: min(100%, 760px); }
.request-archive-log-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 18px; }
.request-archive-log-header p { margin: 0; }
.request-archive-entry { margin-bottom: 14px; padding: 16px; border: 1px solid #e1e7ef; border-radius: 11px; }
.request-archive-entry h3 { margin: 0 0 4px; color: #405168; font-size: 14px; }
.request-archive-project { margin: 0 0 14px; color: #65758a; font-size: 12px; }
.request-archive-entry .detail-grid { margin-bottom: 14px; }
.request-archive-entry details { border-top: 1px solid #e1e7ef; padding-top: 10px; }
.request-archive-entry summary { color: #3d76b2; cursor: pointer; font-size: 12px; font-weight: 700; }
.request-archive-entry .activity-timeline { margin-top: 15px; }
:root[data-theme="dark"] .request-archive-modal h2,
:root[data-theme="dark"] .request-archive-log-header h2,
:root[data-theme="dark"] .request-archive-entry h3,
:root[data-theme="dark"] .request-archive-modal label { color: #dce5f2; }
:root[data-theme="dark"] .request-archive-modal p,
:root[data-theme="dark"] .request-archive-log-header p,
:root[data-theme="dark"] .request-archive-project { color: #a8b5c6; }
:root[data-theme="dark"] .request-archive-entry { border-color: #273548; }
:root[data-theme="dark"] .request-archive-modal textarea { color: #dce5f2; border-color: #344257; background: #111b29; }

/* Readability pass: sidebar navigation and buttons intentionally keep their established size. */
.section-kicker { font-size: 12px; }
.profile-chip strong { font-size: 12px; }
.profile-chip small { font-size: 10px; }
.welcome-row p { font-size: 14px; }
.security-banner strong { font-size: 13px; }
.security-banner p { font-size: 12px; }
.panel-header h2 { font-size: 15px; }
.panel-header p { font-size: 11px; }
.panel-count { font-size: 10px; }
th { font-size: 9px; }
td { font-size: 11px; }
.table-user strong { font-size: 12px; }
.table-user div > span,
.role-badge,
.self-label { font-size: 10px; }
.empty-state strong { font-size: 13px; }
.empty-state p { font-size: 11px; }
.operations-snapshot > h3,
.operations-section-head h3 { font-size: 11px; }
.operations-counter span { font-size: 9px; }
.operations-attention-copy strong { font-size: 11px; }
.operations-attention-copy span,
.operations-status { font-size: 10px; }
.operations-reason { font-size: 8px; }
.operations-empty,
.dashboard-footer { font-size: 10px; }
.current-identity span { font-size: 11px; }
.current-identity strong { font-size: 12px; }
.credential-box span { font-size: 11px; }
.credential-box strong { font-size: 12px; }
.password-rules span { font-size: 10px; }
.request-metric small,
.request-toolbar p { font-size: 11px; }
.request-filters select,
.compact-search,
.compact-search input { font-size: 11px; }
.request-number strong { font-size: 11px; }
.request-number span { font-size: 10px; }
.request-project strong { font-size: 12px; }
.request-project span { font-size: 10px; }
.priority-badge,
.request-status-badge { font-size: 9px; }
.request-empty strong { font-size: 13px; }
.request-empty p { font-size: 11px; }
.request-form-header p { font-size: 11px; }
.form-stepper button { font-size: 11px; }
.form-stepper button span { font-size: 10px; }
.form-section-heading p { font-size: 10px; }
.check-card { font-size: 11px; }
.request-detail-header p { font-size: 12px; }
.detail-section > h3,
.detail-side-card > h3 { font-size: 12px; }
.detail-grid > div span,
.detail-copy label,
.detail-side-card form > label { font-size: 10px; }
.detail-grid > div strong,
.detail-copy p { font-size: 12px; }
.detail-side-card select,
.detail-side-card input,
.side-note,
.activity-item strong,
.activity-item p { font-size: 11px; }
.activity-item span { font-size: 10px; }

/* Dark theme */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7edf7;
  --muted: #9ba8ba;
  --muted-light: #7f8da1;
  --line: #2a384b;
  --surface: #151f2d;
  --canvas: #0d1521;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.18), 0 9px 28px rgba(0,0,0,.2);
  --shadow-lg: 0 28px 80px rgba(0,0,0,.48);
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .app-shell,
:root[data-theme="dark"] .login-shell,
:root[data-theme="dark"] .login-panel { background: var(--canvas); }

:root[data-theme="dark"] .topbar {
  border-color: #253245;
  background: rgba(16, 25, 38, .92);
}

:root[data-theme="dark"] .breadcrumbs,
:root[data-theme="dark"] .profile-chip small,
:root[data-theme="dark"] .welcome-row p,
:root[data-theme="dark"] .requests-heading p,
:root[data-theme="dark"] .panel-header p,
:root[data-theme="dark"] .request-toolbar p,
:root[data-theme="dark"] .dashboard-footer,
:root[data-theme="dark"] .request-form-header p,
:root[data-theme="dark"] .request-detail-header p,
:root[data-theme="dark"] .form-section-heading p,
:root[data-theme="dark"] .detail-grid > div span,
:root[data-theme="dark"] .detail-copy label,
:root[data-theme="dark"] .activity-item span { color: #8d9aae; }

:root[data-theme="dark"] .breadcrumbs strong,
:root[data-theme="dark"] .profile-chip strong,
:root[data-theme="dark"] .welcome-row h1,
:root[data-theme="dark"] .requests-heading h1,
:root[data-theme="dark"] .panel-header h2,
:root[data-theme="dark"] .request-toolbar h2,
:root[data-theme="dark"] .table-user strong,
:root[data-theme="dark"] .request-project strong,
:root[data-theme="dark"] .request-form-header h2,
:root[data-theme="dark"] .request-detail-header h2,
:root[data-theme="dark"] .form-section-heading h3,
:root[data-theme="dark"] .detail-section > h3,
:root[data-theme="dark"] .detail-side-card > h3,
:root[data-theme="dark"] .detail-grid > div strong,
:root[data-theme="dark"] .detail-copy p,
:root[data-theme="dark"] .activity-item strong { color: #dce5f2; }

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .request-metric,
:root[data-theme="dark"] .modal-card,
:root[data-theme="dark"] .detail-side-card {
  border-color: #273548;
  background: #151f2d;
}

:root[data-theme="dark"] .header-search,
:root[data-theme="dark"] .compact-search,
:root[data-theme="dark"] .request-filters select,
:root[data-theme="dark"] .current-identity,
:root[data-theme="dark"] .credential-box,
:root[data-theme="dark"] .info-strip,
:root[data-theme="dark"] .secure-note {
  color: #a8b5c6;
  border-color: #2b394c;
  background: #111b29;
}

:root[data-theme="dark"] .header-search input,
:root[data-theme="dark"] .compact-search input { color: #dce5f2; }
:root[data-theme="dark"] .header-search kbd { color: #8e9bad; border-color: #344257; background: #1a2635; }
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .notification-button { color: #b8c5d6; border-color: #334156; }
:root[data-theme="dark"] .icon-button:hover { color: #f1f5fb; background: #202d3e; }
:root[data-theme="dark"] .topbar-divider { background: #2b384a; }
:root[data-theme="dark"] .avatar { color: #d9e7f7; background: #26384d; }
:root[data-theme="dark"] .avatar-sidebar { color: var(--navy-900); background: var(--amber); }

:root[data-theme="dark"] .button-secondary,
:root[data-theme="dark"] .button-ghost {
  color: #d5e0ee;
  border-color: #354459;
  background: #192535;
}

:root[data-theme="dark"] .panel-header,
:root[data-theme="dark"] .operations-attention,
:root[data-theme="dark"] .request-toolbar { border-color: #273548; }
:root[data-theme="dark"] td { color: #a5b1c1; }
:root[data-theme="dark"] .operations-snapshot > h3,
:root[data-theme="dark"] .operations-section-head h3,
:root[data-theme="dark"] .operations-attention-copy span,
:root[data-theme="dark"] .operations-status { color: #91a0b3; }
:root[data-theme="dark"] .operations-counter,
:root[data-theme="dark"] .operations-attention-item,
:root[data-theme="dark"] .operations-empty { border-color: #2b394c; background: #111b29; }
:root[data-theme="dark"] .operations-counter strong,
:root[data-theme="dark"] .operations-attention-copy strong { color: #dce5f2; }
:root[data-theme="dark"] .operations-counter span { color: #8290a4; }
:root[data-theme="dark"] .operations-section-head > span { color: #e4b45d; background: #352a1c; }
:root[data-theme="dark"] .operations-reason { color: #93b9e4; background: #1c3046; }
:root[data-theme="dark"] .operations-reason.reason-overdue { color: #ff8c98; background: #3a2028; }
:root[data-theme="dark"] .operations-reason.reason-preparation-not-ready { color: #efbd69; background: #382b1b; }
:root[data-theme="dark"] .operations-empty { color: #a5b1c1; }
:root[data-theme="dark"] .operations-empty .icon { color: #78aee7; }
:root[data-theme="dark"] .engineering-operations-panel .text-button { color: var(--amber); }
:root[data-theme="dark"] .engineering-operations-panel .text-button:hover { color: #ffd875; }

:root[data-theme="dark"] th { color: #8795a8; background: #111a27; }
:root[data-theme="dark"] td { border-color: #253245; }
:root[data-theme="dark"] tbody tr:hover { background: #192536; }
:root[data-theme="dark"] .role-badge { color: #b8c4d3; border-color: #354255; background: #1b2737; }
:root[data-theme="dark"] .panel-count { color: #93b9e4; background: #1c3046; }

:root[data-theme="dark"] .modal-backdrop { background: rgba(3, 8, 15, .76); }
:root[data-theme="dark"] .modal-header h2,
:root[data-theme="dark"] .credential-modal h2,
:root[data-theme="dark"] .delete-account-modal h2,
:root[data-theme="dark"] .reset-password-modal h2 { color: #e1e8f2; }
:root[data-theme="dark"] .reset-password-button { color: #a7c9ed; }
:root[data-theme="dark"] .reset-password-button:hover { color: #dcecff; background: #1b3047; }
:root[data-theme="dark"] .reset-password-modal .delete-account-identity { border-color: #334156; background: #111b28; }
:root[data-theme="dark"] .reset-password-modal .account-name { color: #dce5f2; }
:root[data-theme="dark"] .reset-password-modal .account-email { color: #91a0b3; }
:root[data-theme="dark"] .modal-icon { color: #91b9e4; background: #1c3046; }
:root[data-theme="dark"] .settings-tabs { border-color: #2d3a4d; background: #101925; }
:root[data-theme="dark"] .settings-tabs button { color: #91a0b3; }
:root[data-theme="dark"] .settings-tabs button.is-active { color: #e5ecf5; background: #233145; }
:root[data-theme="dark"] .field-group label,
:root[data-theme="dark"] .label-row label { color: #c5d0df; }
:root[data-theme="dark"] .input-wrap input,
:root[data-theme="dark"] .field-group > input,
:root[data-theme="dark"] .field-group select,
:root[data-theme="dark"] .request-form-modal textarea,
:root[data-theme="dark"] .detail-side-card textarea,
:root[data-theme="dark"] .detail-side-card select,
:root[data-theme="dark"] .detail-side-card input {
  color: #e2e9f2;
  border-color: #344257;
  background: #111b28;
}
:root[data-theme="dark"] .field-group > input.is-derived { color: #a9bfd8; background: #172536; }
:root[data-theme="dark"] .field-group small { color: #8f9caf; }
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #68778c; }
:root[data-theme="dark"] .modal-actions,
:root[data-theme="dark"] .request-form-header,
:root[data-theme="dark"] .request-detail-header { border-color: #2a3749; }

:root[data-theme="dark"] .form-stepper { border-color: #2a3749; background: #111a27; }
:root[data-theme="dark"] .form-stepper button { color: #8290a4; }
:root[data-theme="dark"] .form-stepper button strong { background: #111a27; }
:root[data-theme="dark"] .form-stepper button:not(:last-child)::after { background: #344155; }
:root[data-theme="dark"] .form-stepper button span { border-color: #3a485c; background: #182434; }
:root[data-theme="dark"] .form-stepper button.is-active { color: var(--amber); }
:root[data-theme="dark"] .form-stepper button.is-active span {
  color: var(--navy-950);
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 197, 77, .12);
}
:root[data-theme="dark"] .form-section-heading:not(:first-child) { border-color: #293649; }
:root[data-theme="dark"] .form-section-heading > span { color: #9fc4ed; background: #1b3047; }
:root[data-theme="dark"] .check-card { color: #a9b5c5; border-color: #334156; background: #131e2c; }
:root[data-theme="dark"] .check-card:has(input:checked) { color: #b9d5f2; border-color: #527da8; background: #1a3149; }
:root[data-theme="dark"] .attachment-queue { border-color: #405b78; background: #142438; }
:root[data-theme="dark"] .attachment-queue-heading strong,
:root[data-theme="dark"] .attachment-detail-heading h3,
:root[data-theme="dark"] .attachment-queue-item strong,
:root[data-theme="dark"] .attachment-detail-copy strong { color: #d5e0ee; }
:root[data-theme="dark"] .attachment-queue-heading span,
:root[data-theme="dark"] .attachment-detail-heading p,
:root[data-theme="dark"] .attachment-queue-item span,
:root[data-theme="dark"] .attachment-empty,
:root[data-theme="dark"] .attachment-detail-status,
:root[data-theme="dark"] .attachment-detail-copy span,
:root[data-theme="dark"] .attachment-detail-copy small { color: #91a0b3; }
:root[data-theme="dark"] .attachment-queue-item,
:root[data-theme="dark"] .attachment-detail-item { border-color: #334156; background: #111b29; }
:root[data-theme="dark"] .request-form-actions { border-color: #2a3749; background: rgba(21,31,45,.96); }

:root[data-theme="dark"] .request-type-card { color: #a1afc1; border-color: #334156; background: #121d2b; }
:root[data-theme="dark"] .request-type-card strong { color: #d3dce8; }
:root[data-theme="dark"] .request-type-card small { color: #8997aa; }
:root[data-theme="dark"] .request-type-card:has(input:checked) { color: #bdd7f3; border-color: #557fa9; background: #183049; }
:root[data-theme="dark"] .request-type-card .type-symbol { color: #a9c9ec; background: #21354b; }
:root[data-theme="dark"] .repeat-card { border-color: #334156; background: #121c2a; }
:root[data-theme="dark"] .repeat-card > header { border-color: #334156; background: #1a2636; }
:root[data-theme="dark"] .repeat-card > header strong { color: #d6dfeb; }
:root[data-theme="dark"] .repeat-section-intro strong { color: #d6dfeb; }
:root[data-theme="dark"] .repeat-section-intro span { color: #8997aa; }
:root[data-theme="dark"] .sku-combobox-control input { color: #e2e9f2; border-color: #344257; background: #111b28; }
:root[data-theme="dark"] .sku-suggestions { border-color: #3a485c; background: #152131; box-shadow: 0 18px 38px rgba(0,0,0,.38); }
:root[data-theme="dark"] .sku-suggestion { color: #dce5f0; }
:root[data-theme="dark"] .sku-suggestion:hover,
:root[data-theme="dark"] .sku-suggestion:focus { background: #21344a; }
:root[data-theme="dark"] .sku-suggestion small,
:root[data-theme="dark"] .sku-suggestion-more,
:root[data-theme="dark"] .sku-suggestion-empty { color: #91a0b3; }
:root[data-theme="dark"] .vendor-toggle { color: #d2b882; border-color: #55452a; background: #2a2318; }
:root[data-theme="dark"] .vendor-toggle strong { color: #f1cd89; }
:root[data-theme="dark"] .vendor-toggle small { color: #bda475; }
:root[data-theme="dark"] .vendor-fields { border-color: #55452a; background: #211d17; }
:root[data-theme="dark"] .request-number strong { color: #82b3e7; }
:root[data-theme="dark"] .request-metric strong { color: #fff; }
:root[data-theme="dark"] .request-number span,
:root[data-theme="dark"] .request-project span { color: #8492a6; }
:root[data-theme="dark"] .request-engineer { color: #acb9ca; }
:root[data-theme="dark"] .request-type-badge,
:root[data-theme="dark"] .request-type-pill { color: #f0c870; background: #382c18; }
:root[data-theme="dark"] .request-empty,
:root[data-theme="dark"] .feature-loader,
:root[data-theme="dark"] .feature-error { color: #8f9caf; }

:root[data-theme="dark"] .detail-main { border-color: #293649; }
:root[data-theme="dark"] .detail-sidebar { background: #101925; }
:root[data-theme="dark"] .detail-copy,
:root[data-theme="dark"] .closure-special { border-color: #303e52; background: #111b28; }
:root[data-theme="dark"] .status-form-section-heading > span { color: #f0c870; background: #382c18; }
:root[data-theme="dark"] .status-form-section-heading strong,
:root[data-theme="dark"] .status-form-subheading strong { color: #d6dfeb; }
:root[data-theme="dark"] .status-form-section-heading small,
:root[data-theme="dark"] .status-form-subheading small { color: #91a0b3; }
:root[data-theme="dark"] .closure-fields,
:root[data-theme="dark"] .closeout-section { border-color: #303e52; }
:root[data-theme="dark"] .status-check-field,
:root[data-theme="dark"] .status-form-subsection { color: #acb9ca; border-color: #303e52; background: #111b28; }
:root[data-theme="dark"] .activity-item:not(:last-child)::before { background: #354256; }
:root[data-theme="dark"] .activity-item p { color: #9caabc; }
:root[data-theme="dark"] .detail-empty-note { color: #91a0b3; }

:root[data-theme="dark"] .notification-popover { border-color: #334156; background: #151f2d; box-shadow: 0 24px 65px rgba(0,0,0,.5); }
:root[data-theme="dark"] .notification-popover > header { border-color: #2b384a; }
:root[data-theme="dark"] .notification-popover h2,
:root[data-theme="dark"] .notification-item strong,
:root[data-theme="dark"] .notification-empty strong { color: #dce5f1; }
:root[data-theme="dark"] .notification-popover header p,
:root[data-theme="dark"] .notification-item p,
:root[data-theme="dark"] .notification-item time { color: #91a0b3; }
:root[data-theme="dark"] .notification-item { border-color: #283548; background: #151f2d; }
:root[data-theme="dark"] .notification-item:hover { background: #1c293a; }
:root[data-theme="dark"] .notification-item.is-unread { background: #192a3d; }
:root[data-theme="dark"] .notification-item.is-unread > i { background: #f05a69; box-shadow: 0 0 0 4px #44232a; }
:root[data-theme="dark"] .notification-button.has-unread { color: #ff7180; border-color: #63313b; background: #321d24; }
:root[data-theme="dark"] .notification-button .notification-count { border-color: #101926; }
:root[data-theme="dark"] .toast { color: #d7e0ec; border-color: #334156; background: #182434; box-shadow: 0 15px 40px rgba(0,0,0,.4); }

@media (max-width: 1160px) {
  .login-panel { padding-inline: 7vw; }
  .request-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-toolbar { align-items: flex-start; flex-direction: column; }
  .request-filters { width: 100%; }
  .compact-search { flex: 1; }
}

@media (max-width: 820px) {
  .login-shell { display: block; background: white; }
  .login-story { min-height: 0; margin: 12px; padding: 24px; }
  .login-calendar { margin: 20px 0 0; }
  .project-calendar--login { margin: 0 auto; }
  .login-panel { min-height: 0; padding: 28px 24px 24px; }
  .login-card { margin: 0 auto; }
  .login-footer { margin-top: 55px; }

  .app-shell { display: block; }
  .main-content { min-width: 0; }
  .sidebar {
    width: 270px;
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 19; inset: 0; background: rgba(7,29,61,.5); backdrop-filter: blur(2px); }
  .sidebar-overlay.is-open { display: block; }
  .mobile-only { display: inline-grid; }
  .sidebar-head .mobile-only { color: rgba(255,255,255,.7); }
  .topbar { height: 63px; padding-inline: 18px; }
  .topbar > .mobile-only { margin-right: 8px; }
  .breadcrumbs { margin-right: auto; }
  .header-search,
  .topbar-divider,
  .profile-chip > span:nth-child(2),
  .profile-chip > .icon { display: none; }
  .notification-popover { position: fixed; top: 58px; right: 10px; left: 10px; width: auto; }
  .dashboard-body { padding: 28px 18px 20px; }
  .feature-view { padding: 28px 18px 20px; }
  .detail-layout { grid-template-columns: 1fr; }
  .request-detail-modal:has(#closure-fields:not([hidden])) .detail-layout { grid-template-columns: 1fr; }
  .detail-main { border-right: 0; }
  .detail-sidebar { border-top: 1px solid #e9edf2; }
  .request-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .login-story { padding: 18px; }
  .project-calendar { padding: 18px; }
  .project-calendar-day,
  .project-calendar-blank { height: 36px; }
  .topbar-actions { gap: 6px; }
  .breadcrumbs > span,
  .breadcrumbs > .icon { display: none; }
  .welcome-row { align-items: flex-start; flex-direction: column; }
  .requests-heading { align-items: flex-start; flex-direction: column; }
  .requests-heading .button { width: 100%; }
  .request-heading-actions { width: 100%; }
  .request-metrics { grid-template-columns: 1fr 1fr; }
  .request-filters { align-items: stretch; flex-direction: column; }
  .compact-search,
  .request-filters select { width: 100%; }
  .form-stepper { padding-inline: 18px; }
  .form-stepper button { justify-content: center; }
  .form-stepper button strong,
  .form-stepper button:not(:last-child)::after { display: none; }
  .request-form-header,
  .request-detail-header { padding-inline: 20px; }
  .request-form-step { padding-inline: 20px; }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-type-grid { grid-template-columns: 1fr; }
  .request-type-card { min-height: 112px; }
  .request-form-actions { grid-template-columns: 1fr 1fr; padding-inline: 20px; }
  .request-form-actions > div { display: none; }
  .request-form-actions .button { width: 100%; padding-inline: 10px; }
  .request-form-error { margin-inline: 20px; }
  .detail-main,
  .detail-sidebar { padding: 20px; }
  .detail-grid { grid-template-columns: 1fr; }
  .status-form-grid { grid-template-columns: 1fr; }
  .attachment-queue-heading,
  .attachment-detail-heading,
  .attachment-detail-item { align-items: stretch; flex-direction: column; }
  .attachment-select-button { width: 100%; }
  .attachment-detail-actions { width: 100%; }
  .attachment-detail-actions .button { flex: 1; }
  .welcome-row .button { width: 100%; }
  .security-banner { align-items: flex-start; flex-wrap: wrap; }
  .security-banner .button { margin-left: 49px; }
  .panel-header { padding-inline: 16px; }
  th, td { padding-inline: 13px; }
  .operations-body { padding-inline: 15px; }
  .operations-snapshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-attention-item { align-items: flex-start; flex-direction: column; }
  .operations-attention-copy,
  .operations-attention-copy span { width: 100%; max-width: none; }
  .operations-attention-meta { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .dashboard-footer { gap: 12px; flex-direction: column; }
  .modal-layer { padding: 10px; }
  .modal-card { max-height: calc(100vh - 20px); padding: 20px; border-radius: 15px; }
  .modal-header { grid-template-columns: 39px 1fr 34px; }
  .modal-actions .button { flex: 1; padding-inline: 12px; }
  .credential-box > div { align-items: flex-start; flex-direction: column; gap: 5px; }
}

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