:root {
  color-scheme: light;
  --bg-app: #eef2f5;
  --bg-panel: #ffffff;
  --bg-panel-muted: #f6f8fb;
  --bg-panel-strong: #f0f4f7;
  --bg-sidebar: #16212d;
  --bg-sidebar-active: #223847;
  --bg-sidebar-soft: #1f2d3a;
  --line: #dbe3ea;
  --line-strong: #c7d2dc;
  --text-main: #17212b;
  --text-muted: #677788;
  --text-soft: #8b99a8;
  --text-contrast: #f5f7fa;
  --accent: #c15f6c;
  --accent-strong: #a54a57;
  --accent-soft: #fbedef;
  --danger: #cf6a62;
  --danger-soft: #f8e7e5;
  --warning: #d08a25;
  --warning-soft: #fbf1df;
  --ok: #4f8c73;
  --ok-soft: #e8f4ee;
  --pending: #738397;
  --pending-soft: #edf1f5;
  --shadow-soft: 0 8px 24px rgba(24, 39, 54, 0.06);
  --shadow-panel: 0 18px 48px rgba(24, 39, 54, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-ui: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-feature-settings: "liga" 1, "kern" 1;
}

body.app-body {
  background: var(--bg-app);
}

body.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(180, 67, 80, 0.14), transparent 30%),
    linear-gradient(180deg, #eef2f5 0%, #e8edf2 100%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 14px;
  background: var(--bg-sidebar);
  color: var(--text-contrast);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.brand {
  display: grid;
  gap: 12px;
}

.brand--sidebar {
  padding: 4px 2px 2px;
}

.brand-logo {
  display: block;
  width: 188px;
  max-width: 100%;
  height: auto;
}

.brand-logo--auth {
  width: 228px;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy strong {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-copy small {
  color: rgba(245, 247, 250, 0.68);
  font-size: 0.8rem;
  line-height: 1.45;
}

.brand-kicker {
  font-size: 0.68rem;
  color: rgba(245, 247, 250, 0.46);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-group-label {
  margin: 4px 0 -4px;
  padding: 0 12px;
  color: rgba(245, 247, 250, 0.46);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  color: rgba(245, 247, 250, 0.78);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transform: translateX(2px);
}

.nav a.active {
  background: var(--bg-sidebar-active);
  color: #ffffff;
}

.sidebar-meta {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
}

.sidebar-card {
  padding: 12px;
  border-radius: 16px;
  background: var(--bg-sidebar-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-card__label,
.sidebar-card__meta {
  color: rgba(245, 247, 250, 0.68);
  font-size: 0.82rem;
}

.sidebar-card__value {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 700;
}

.sidebar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
}

.main {
  min-width: 0;
}

.content-shell {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(238, 242, 245, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(6px);
}

.topbar > div:first-child {
  min-width: 0;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.7vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.page-note {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  max-width: 72ch;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.chip,
.btn,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.chip {
  padding: 10px 14px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.72);
}

.btn {
  padding: 12px 16px;
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(193, 95, 108, 0.14), rgba(193, 95, 108, 0.08));
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(165, 74, 87, 0.24);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.72);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card.pad {
  padding: 20px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.stat-value {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  word-break: break-word;
}

.stat-foot {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.hero {
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 10%, rgba(193, 95, 108, 0.16), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(111, 150, 187, 0.14), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
  box-shadow: var(--shadow-panel);
}

.hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.hero p {
  margin: 12px 0 0;
  color: var(--text-muted);
  max-width: 70ch;
  line-height: 1.55;
}

.layout-two {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  align-items: start;
}

.dashboard-view {
  display: grid;
  gap: 18px;
}

.dashboard-filters-card {
  display: grid;
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(111, 150, 187, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 251, 0.94));
}

.dashboard-filters-form {
  display: grid;
  gap: 14px;
}

.dashboard-filters-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.dashboard-filters-field {
  min-width: 0;
}

.dashboard-filters-field > span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-date-input,
.dashboard-filters-field .flatpickr-input {
  min-height: 54px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.dashboard-date-input::placeholder,
.dashboard-filters-field .flatpickr-input::placeholder {
  color: var(--text-soft);
  font-weight: 600;
}

.dashboard-filters-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-filters-actions .btn {
  min-height: 54px;
}

.dashboard-filters-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.dashboard-range-summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(111, 150, 187, 0.18);
  background: rgba(111, 150, 187, 0.08);
  color: #466983;
  font-size: 0.84rem;
  font-weight: 700;
}

.dashboard-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-preset {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.dashboard-preset:hover,
.dashboard-preset:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(111, 150, 187, 0.24);
  color: var(--text-main);
}

.dashboard-preset--active {
  border-color: rgba(193, 95, 108, 0.22);
  background: rgba(193, 95, 108, 0.1);
  color: var(--accent-strong);
}

.dashboard-filters-note {
  margin: 0;
  max-width: none;
}

.flatpickr-calendar {
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-panel);
  background: rgba(255, 255, 255, 0.98);
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: var(--text-main);
  font-weight: 700;
}

.flatpickr-weekday {
  color: var(--text-muted);
  font-weight: 700;
}

.flatpickr-day {
  border-radius: 999px;
  color: var(--text-main);
  font-weight: 600;
}

.flatpickr-day.today {
  border-color: rgba(111, 150, 187, 0.4);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  border-color: rgba(193, 95, 108, 0.75);
  background: #c15f6c;
}

.flatpickr-day.inRange,
.flatpickr-day.nextMonthDay.inRange,
.flatpickr-day.prevMonthDay.inRange,
.flatpickr-day.today.inRange,
.flatpickr-day.nextMonthDay.today.inRange,
.flatpickr-day.prevMonthDay.today.inRange {
  border-color: rgba(193, 95, 108, 0.12);
  background: rgba(193, 95, 108, 0.12);
  box-shadow: none;
}

.dashboard-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-split {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.dashboard-section {
  display: grid;
  gap: 16px;
}

.dashboard-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-section__eyebrow,
.dashboard-lane__eyebrow,
.dashboard-section__subhead {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-section__subhead {
  margin-top: 4px;
}

.dashboard-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-lane {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-panel-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.dashboard-lane--success {
  background: linear-gradient(180deg, rgba(79, 140, 115, 0.09), rgba(255, 255, 255, 0.96));
}

.dashboard-lane--warning {
  background: linear-gradient(180deg, rgba(208, 138, 37, 0.1), rgba(255, 255, 255, 0.96));
}

.dashboard-lane--info {
  background: linear-gradient(180deg, rgba(111, 150, 187, 0.1), rgba(255, 255, 255, 0.96));
}

.dashboard-lane__value {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.dashboard-lane__label,
.dashboard-lane__note,
.dashboard-list-item__meta,
.dashboard-service-note,
.dashboard-mini-stat small {
  color: var(--text-muted);
}

.dashboard-lane__label {
  margin-top: 4px;
  font-size: 0.86rem;
}

.dashboard-lane__stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-lane__stat {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(219, 227, 234, 0.9);
}

.dashboard-lane__stat span,
.dashboard-mini-stat span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.dashboard-lane__stat strong,
.dashboard-mini-stat strong {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dashboard-lane__note {
  margin: 14px 0 0;
  line-height: 1.5;
}

.dashboard-callout {
  display: grid;
  gap: 6px;
}

.dashboard-callout p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.dashboard-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-mini-stat {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-panel-muted);
}

.dashboard-mini-stat small {
  line-height: 1.45;
}

.dashboard-bars {
  display: grid;
  gap: 12px;
}

.dashboard-bar {
  display: grid;
  gap: 8px;
}

.dashboard-bar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}

.dashboard-bar__top strong {
  font-size: 0.95rem;
}

.dashboard-bar__track {
  height: 10px;
  border-radius: 999px;
  background: var(--pending-soft);
  overflow: hidden;
}

.dashboard-bar__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(193, 95, 108, 0.82), rgba(111, 150, 187, 0.78));
}

.dashboard-list {
  gap: 12px;
}

.dashboard-list-item {
  display: grid;
  gap: 10px;
}

.dashboard-list-item__top,
.dashboard-list-item__facts,
.dashboard-service-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-list-item__facts {
  flex-wrap: wrap;
  font-size: 0.86rem;
}

.dashboard-order-link,
.dashboard-inline-link {
  color: var(--text-main);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.dashboard-order-link:hover,
.dashboard-inline-link:hover {
  color: var(--accent-strong);
  border-color: rgba(165, 74, 87, 0.3);
}

.dashboard-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dashboard-shortcut {
  gap: 8px;
}

.dashboard-service-note {
  flex-wrap: wrap;
  padding-top: 2px;
  font-size: 0.86rem;
}

.panel-title {
  margin: 0 0 14px;
  font-family: var(--font-ui);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  background: var(--bg-panel-muted);
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  color: var(--text-main);
  font-size: 0.92rem;
}

tbody tr:hover {
  background: rgba(193, 95, 108, 0.035);
}

table a:hover,
table a:focus-visible {
  color: var(--accent-strong);
}

.mono {
  font-family: var(--font-mono);
}

.badge {
  padding: 7px 10px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--pending-soft);
  color: var(--pending);
}

.badge.success {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.muted {
  color: var(--text-muted);
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-panel-muted);
}

.list-item strong {
  display: block;
  margin-bottom: 4px;
}

.callout {
  border-left: 4px solid transparent;
}

.callout.warning {
  border-left-color: var(--warning);
  background: linear-gradient(180deg, rgba(208, 138, 37, 0.08), rgba(255, 255, 255, 0.92));
}

.callout.success {
  border-left-color: var(--ok);
  background: linear-gradient(180deg, rgba(79, 140, 115, 0.08), rgba(255, 255, 255, 0.92));
}

.callout.info {
  border-left-color: #6f96bb;
  background: linear-gradient(180deg, rgba(111, 150, 187, 0.08), rgba(255, 255, 255, 0.92));
}

.callout-title {
  margin-top: 10px;
  font-size: 1.15rem;
  line-height: 1.45;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--text-main);
  border: 1px solid var(--line);
  background: #ffffff;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(193, 95, 108, 0.42);
  box-shadow: 0 0 0 3px rgba(193, 95, 108, 0.12);
}

.empty-state {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
  color: var(--text-muted);
  text-align: center;
  background: var(--bg-panel-muted);
}

.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(580px, 100%);
  display: grid;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow-panel);
}

.login-card__brand {
  display: grid;
  gap: 14px;
}

.login-card__header {
  display: grid;
  gap: 10px;
}

.login-card__header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.login-card__header p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.login-form {
  gap: 16px;
}

.login-error {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(207, 106, 98, 0.22);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.92rem;
}

.topbar--compact {
  padding: 10px 14px;
}

.toolbar--compact {
  gap: 8px;
}

.page-title--compact {
  font-size: clamp(1.9rem, 2.6vw, 2.55rem);
}

.page-note--compact {
  margin-top: 6px;
  font-size: 0.9rem;
}

.btn--compact,
.chip--soft {
  min-height: 40px;
  padding: 0 14px;
}

.chip--soft {
  background: rgba(255, 255, 255, 0.8);
}

.orders-view {
  min-height: calc(100vh - 40px);
  display: grid;
  gap: 14px;
}

.orders-card {
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.orders-filters-card {
  display: grid;
  gap: 12px;
}

.orders-filters-form {
  display: grid;
  gap: 12px;
}

.orders-filters-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.orders-filters-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(150px, 0.82fr)) minmax(170px, 0.9fr) minmax(240px, 1.1fr) auto;
  gap: 12px;
  align-items: end;
}

.orders-filters-field--range {
  min-width: 0;
}

.orders-filters-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.orders-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 0;
}

.orders-card__eyebrow {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.orders-card__hint {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.orders-table-wrap {
  height: calc(100vh - 200px);
  min-height: 440px;
  border-radius: 16px;
}

.orders-table {
  min-width: 1000px;
  table-layout: fixed;
}

.orders-table thead th {
  top: 0;
  padding: 11px 12px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.orders-table td {
  padding: 12px;
  font-size: 0.88rem;
  vertical-align: middle;
}

.orders-table tbody tr {
  transition: background-color 0.16s ease;
}

.orders-table tbody tr:nth-child(even) {
  background: rgba(246, 248, 251, 0.62);
}

.orders-table tbody tr:hover {
  background: rgba(193, 95, 108, 0.055);
}

.orders-table__col--order {
  width: 148px;
}

.orders-table__col--city {
  width: 108px;
}

.orders-table__col--install {
  width: 88px;
}

.orders-table__col--master {
  width: 198px;
}

.orders-table__col--timeline {
  width: 232px;
}

.orders-table__col--sla {
  width: 108px;
}

.orders-table__col--status {
  width: 164px;
}

.orders-table__col--subject {
  width: 336px;
}

.order-link {
  display: grid;
  gap: 2px;
}

.order-link__kicker {
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-link__primary {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
}

.order-link__secondary {
  color: var(--text-muted);
  font-size: 0.79rem;
}

.city-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-panel-muted);
  border: 1px solid var(--line);
  color: var(--text-main);
  font-size: 0.8rem;
  line-height: 1.2;
}

.stacked-cell {
  display: grid;
  gap: 3px;
}

.stacked-cell strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.9rem;
  line-height: 1.25;
}

.stacked-cell span {
  color: var(--text-muted);
  font-size: 0.79rem;
  line-height: 1.3;
}

.timeline-mini {
  display: grid;
  gap: 6px;
}

.timeline-mini__item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.timeline-mini__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--bg-panel-strong);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.timeline-mini__value {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  color: var(--text-main);
  font-size: 0.8rem;
  white-space: nowrap;
}

.compact-date {
  color: var(--text-main);
}

.compact-time {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.muted-dash {
  color: var(--text-soft);
}

.sla-stack {
  display: grid;
  gap: 6px;
}

.metric-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.metric-pill--ok {
  background: var(--ok-soft);
  border-color: rgba(79, 140, 115, 0.14);
  color: var(--ok);
}

.metric-pill--danger {
  background: var(--danger-soft);
  border-color: rgba(207, 106, 98, 0.14);
  color: var(--danger);
}

.metric-pill--muted {
  background: var(--pending-soft);
  border-color: rgba(115, 131, 151, 0.1);
  color: var(--pending);
}

.status-pill {
  justify-content: flex-start;
  min-height: 34px;
  padding-inline: 12px;
  font-family: var(--font-ui);
}

.orders-table__status-cell {
  padding-right: 16px;
}

.orders-table__subject-cell {
  padding-left: 18px;
}

.status-pill--success {
  background: linear-gradient(180deg, rgba(79, 140, 115, 0.13), rgba(79, 140, 115, 0.08));
  border-color: rgba(79, 140, 115, 0.14);
  color: var(--ok);
}

.status-pill--info {
  background: linear-gradient(180deg, rgba(111, 150, 187, 0.12), rgba(111, 150, 187, 0.08));
  border-color: rgba(111, 150, 187, 0.16);
  color: #466983;
}

.status-pill--warn {
  background: linear-gradient(180deg, rgba(208, 138, 37, 0.14), rgba(208, 138, 37, 0.08));
  border-color: rgba(208, 138, 37, 0.16);
  color: var(--warning);
}

.status-pill--danger {
  background: linear-gradient(180deg, rgba(207, 106, 98, 0.14), rgba(207, 106, 98, 0.08));
  border-color: rgba(207, 106, 98, 0.16);
  color: var(--danger);
}

.subject-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.subject-cell__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  max-width: 100%;
  word-break: break-word;
}

.subject-cell__hint {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.subject-cell__hint:hover {
  color: var(--text-main);
  border-color: rgba(31, 48, 70, 0.2);
}

.detail-view {
  display: grid;
  gap: 18px;
}

.detail-topbar {
  align-items: flex-start;
}

.detail-heading {
  display: grid;
  gap: 10px;
}

.detail-heading__eyebrow {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-heading__title {
  font-size: clamp(2.25rem, 3vw, 3rem);
}

.detail-heading__note {
  margin-top: 0;
  max-width: 90ch;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta__pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-action-form {
  display: inline-flex;
}

.detail-back {
  min-height: 42px;
}

.detail-callout {
  padding: 18px 20px;
}

.detail-callout--info {
  border-left: 4px solid #6f96bb;
  background: linear-gradient(180deg, rgba(111, 150, 187, 0.08), rgba(255, 255, 255, 0.94));
}

.detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.detail-kpi {
  padding: 18px 18px 20px;
  display: grid;
  gap: 12px;
}

.detail-kpi__label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-kpi__value {
  display: grid;
  gap: 4px;
}

.detail-kpi__date {
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.detail-kpi__time {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.detail-kpi__empty {
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 700;
}

.detail-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.detail-panel {
  display: grid;
  gap: 16px;
}

.detail-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-panel__hint {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.detail-summary {
  display: grid;
  gap: 10px;
}

.detail-summary__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.detail-summary__label {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.detail-summary__value {
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 800;
  text-align: right;
}

.message-stack {
  display: grid;
  gap: 10px;
}

.message-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.message-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.message-card__subject {
  font-size: 0.92rem;
  line-height: 1.42;
}

.message-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.message-card__dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}

.message-card__time {
  color: var(--text-main);
  font-weight: 700;
}

.detail-inline__date {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 800;
}

.detail-inline__time {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.detail-inline__empty {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.subtle-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.subtle-pill--info {
  background: rgba(111, 150, 187, 0.1);
  border-color: rgba(111, 150, 187, 0.18);
  color: #466983;
}

.subtle-pill--ok {
  background: rgba(79, 140, 115, 0.12);
  border-color: rgba(79, 140, 115, 0.18);
  color: var(--ok);
}

.subtle-pill--accent {
  background: rgba(193, 95, 108, 0.11);
  border-color: rgba(193, 95, 108, 0.18);
  color: var(--accent-strong);
}

.subtle-pill--muted {
  background: var(--pending-soft);
  border-color: rgba(115, 131, 151, 0.12);
  color: var(--pending);
}

@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .grid.kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-two {
    grid-template-columns: 1fr;
  }

  .dashboard-lanes,
  .dashboard-mini-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-filters-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-filters-meta,
  .dashboard-filters-actions {
    justify-content: flex-start;
  }

  .dashboard-lane__stats {
    grid-template-columns: 1fr;
  }

  .orders-table-wrap {
    height: auto;
    min-height: 0;
  }

  .orders-card__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .orders-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orders-filters-actions {
    justify-content: flex-start;
  }

  .orders-filters-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1500px) {
  .orders-table__col--subject,
  .orders-table th:last-child,
  .orders-table td:last-child {
    display: none;
  }
}

@media (max-width: 760px) {
  .content-shell {
    padding: 16px;
  }

  .topbar {
    position: static;
    padding: 14px;
  }

  .grid.kpis {
    grid-template-columns: 1fr;
  }

  .dashboard-list-item__top,
  .dashboard-list-item__facts,
  .dashboard-service-note,
  .dashboard-section__header,
  .orders-filters-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-pill-group {
    justify-content: flex-start;
  }

  .dashboard-range-summary {
    width: 100%;
    justify-content: center;
  }

  .detail-kpis {
    grid-template-columns: 1fr;
  }

  .orders-filters-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel__header,
  .message-card__top,
  .detail-summary__item {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-summary__value {
    text-align: left;
  }

  .toolbar {
    justify-content: flex-start;
  }

  table {
    min-width: 960px;
  }

  .login-card {
    padding: 22px;
  }
}

/* HoffixCall corporate alignment */

:root {
  --bg-app: #eef3f8;
  --bg-panel: #ffffff;
  --bg-panel-muted: #f7f9fc;
  --bg-panel-strong: #f1f5fa;
  --bg-sidebar: #101923;
  --bg-sidebar-active: rgba(72, 97, 179, 0.24);
  --bg-sidebar-soft: rgba(255, 255, 255, 0.045);
  --line: #dfe7ef;
  --line-strong: #cfd9e4;
  --text-main: #17212b;
  --text-muted: #6d7a89;
  --text-soft: #8a97a8;
  --text-contrast: #f6f8fb;
  --accent: #2447a8;
  --accent-strong: #1a3685;
  --accent-soft: #eef3ff;
  --danger: #c9645f;
  --danger-soft: #faece9;
  --warning: #d69a32;
  --warning-soft: #fbf2df;
  --ok: #54896d;
  --ok-soft: #e8f4ed;
  --pending: #738397;
  --pending-soft: #edf1f5;
  --shadow-soft: 0 18px 38px rgba(28, 42, 57, 0.08);
  --shadow-panel: 0 12px 30px rgba(34, 49, 68, 0.06);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-ui: "Segoe UI Variable", "Segoe UI", "IBM Plex Sans", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Manrope", "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

body {
  background:
    radial-gradient(circle at top left, rgba(36, 71, 168, 0.08), transparent 26%),
    linear-gradient(180deg, #f3f6fa 0%, #ecf1f6 100%);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-feature-settings: "liga" 1, "kern" 1;
}

body.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(180, 67, 80, 0.14), transparent 30%),
    linear-gradient(180deg, #eef2f5 0%, #e8edf2 100%);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px 18px;
  background:
    radial-gradient(circle at 22% 14%, rgba(194, 30, 52, 0.26), transparent 18%),
    radial-gradient(circle at 32% 82%, rgba(255, 255, 255, 0.06), transparent 16%),
    linear-gradient(180deg, #111a24 0%, #172332 100%);
  color: var(--text-contrast);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.brand {
  display: grid;
  gap: 12px;
  align-items: start;
}

.brand--sidebar {
  padding: 2px 2px 6px;
}

.brand-logo {
  display: block;
  width: 176px;
  max-width: 100%;
  height: auto;
}

.brand-logo--auth {
  width: 232px;
}

.brand-copy {
  display: grid;
  gap: 5px;
}

.brand-copy strong {
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-copy small {
  color: rgba(245, 247, 250, 0.72);
  font-size: 0.8rem;
  line-height: 1.45;
}

.brand-kicker {
  color: rgba(245, 247, 250, 0.46);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-group-label {
  margin: 14px 0 7px;
  padding: 0 12px;
  color: rgba(245, 247, 250, 0.44);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  color: rgba(245, 247, 250, 0.78);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transform: translateX(2px);
}

.nav a.active {
  background: linear-gradient(180deg, rgba(59, 89, 182, 0.26), rgba(53, 77, 148, 0.2));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(116, 145, 234, 0.12), 0 10px 22px rgba(19, 32, 66, 0.28);
}

.nav-link__icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: currentColor;
}

.nav-link__icon svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav a.active .nav-link__icon {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-meta {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
}

.sidebar-card {
  padding: 13px 14px;
  border-radius: 18px;
  background: var(--bg-sidebar-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.sidebar-card--muted {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-card__label,
.sidebar-card__meta {
  color: rgba(245, 247, 250, 0.68);
  font-size: 0.82rem;
}

.sidebar-card__value {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 700;
}

.sidebar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
}

.main {
  min-width: 0;
}

.content-shell {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px 24px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(243, 246, 250, 0.86);
  border: 1px solid rgba(215, 225, 235, 0.85);
  border-radius: 24px;
  backdrop-filter: blur(14px);
}

.topbar--compact {
  padding: 14px 20px 12px;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.7vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.page-title--compact {
  font-size: clamp(1.7rem, 2.2vw, 2.25rem);
}

.page-note {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  max-width: 72ch;
}

.page-note--compact {
  max-width: 66ch;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.chip,
.btn,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.chip {
  padding: 10px 14px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.72);
}

.chip--soft {
  background: rgba(255, 255, 255, 0.88);
}

.btn {
  padding: 12px 16px;
  color: var(--accent-strong);
  font-weight: 700;
  background: linear-gradient(180deg, rgba(36, 71, 168, 0.14), rgba(36, 71, 168, 0.08));
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(26, 54, 133, 0.24);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
}

.btn--compact {
  min-height: 42px;
  padding: 10px 14px;
}

.card,
.surface {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card.pad,
.surface {
  padding: 20px;
}

.surface--tight {
  display: grid;
  gap: 18px;
}

.surface__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.surface__header--compact {
  gap: 12px;
}

.surface__header--split {
  align-items: flex-start;
}

.surface__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.surface__eyebrow {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.surface__header p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 70ch;
}

.field label,
.dashboard-filters-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.dashboard-date-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.dashboard-date-input:focus {
  outline: none;
  border-color: rgba(36, 71, 168, 0.38);
  box-shadow: 0 0 0 4px rgba(36, 71, 168, 0.12);
}

.badge {
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.74);
}

.badge--neutral {
  color: var(--text-muted);
  background: var(--pending-soft);
}

.badge.success,
.metric-pill--ok {
  color: var(--ok);
  background: var(--ok-soft);
  border-color: rgba(84, 137, 109, 0.2);
}

.badge.warn,
.metric-pill--warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(214, 154, 50, 0.18);
}

.badge.danger,
.metric-pill--danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(201, 100, 95, 0.18);
}

.metric-pill--muted {
  color: var(--pending);
  background: var(--pending-soft);
  border-color: rgba(115, 131, 151, 0.16);
}

.table-shell,
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
}

.data-table,
.table-wrap table,
.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th,
.table-wrap thead th,
.orders-table thead th {
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  background: rgba(247, 250, 252, 0.92);
  border-bottom: 1px solid var(--line);
}

.data-table tbody td,
.table-wrap tbody td,
.orders-table tbody td {
  padding: 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table tbody tr:last-child td,
.table-wrap tbody tr:last-child td,
.orders-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover,
.table-wrap tbody tr:hover,
.orders-table tbody tr:hover {
  background: rgba(36, 71, 168, 0.026);
}

.empty-box,
.empty-state {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.96), rgba(243, 247, 251, 0.94));
  border: 1px dashed var(--line-strong);
  color: var(--text-muted);
}

.empty-box strong,
.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: 1rem;
}

.table-subject {
  min-width: 340px;
}

.table-recipients {
  min-width: 240px;
  color: var(--text-muted);
}

.mailbox-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mailbox-form-actions {
  margin-top: 18px;
}

.mailboxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.orders-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.orders-filters-field--range {
  grid-column: span 2;
}

.orders-filters-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.mailbox-card {
  display: grid;
  gap: 8px;
}

.mailbox-card__eyebrow {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mailbox-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.24rem;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.mailbox-card__meta,
.mailbox-card__sync {
  color: var(--text-muted);
  line-height: 1.5;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.login-card {
  width: min(100%, 540px);
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(36, 71, 168, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 251, 0.96));
  box-shadow: var(--shadow-panel);
}

.login-card__brand {
  margin: -28px -28px 24px;
  padding: 22px 28px 18px;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  background:
    radial-gradient(circle at 18% 24%, rgba(194, 30, 52, 0.24), transparent 18%),
    linear-gradient(180deg, #111a24 0%, #172332 100%);
}

.login-card__header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

.login-card__header p {
  margin: 10px 0 0;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.login-error {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(201, 100, 95, 0.18);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
}

.messages-view,
.mailboxes-view {
  gap: 20px;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
  }
}

@media (max-width: 860px) {
  .topbar,
  .surface__header,
  .toolbar,
  .surface__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .mailbox-form-grid {
    grid-template-columns: 1fr;
  }

  .orders-filters-grid {
    grid-template-columns: 1fr;
  }

  .orders-filters-field--range {
    grid-column: auto;
  }

  .orders-filters-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .content-shell {
    padding: 16px;
  }

  .topbar {
    position: static;
    padding: 14px 16px;
  }

  .surface,
  .card.pad {
    padding: 18px;
  }

  .login-card {
    padding: 24px;
  }

  .table-subject,
  .table-recipients {
    min-width: 220px;
  }
}
