:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-muted: #edf1f5;
  --surface-hover: #f4f7fb;
  --sidebar: #131c2b;
  --sidebar-strong: #0b1220;
  --border: #dfe4eb;
  --border-strong: #c5ced9;
  --text: #172033;
  --text-muted: #647084;
  --text-soft: #98a2b3;
  --text-inverse: #f8fafc;
  --accent: #315fba;
  --accent-strong: #254d9b;
  --accent-soft: #eaf0fb;
  --success: #18794e;
  --success-soft: #e9f6ef;
  --warning: #946200;
  --warning-soft: #fff7df;
  --danger: #b4233d;
  --danger-soft: #fdeff1;
  --info: #315fba;
  --info-soft: #edf2fc;
  --ring: rgba(49, 95, 186, 0.2);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.055);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, 0.12);
  --radius: 10px;
  --sidebar-width: 18rem;
  --page-max: 1440px;
  --font-sans: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "tnum";
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

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

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

button,
select {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.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;
}

.app-shell,
.app-layout {
  min-height: 100vh;
}

.app-layout {
  display: block;
}

.app-main {
  min-width: 0;
}

.page-content {
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding: 0.75rem;
}

.page-stack {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: min(88vw, var(--sidebar-width));
  color: var(--text-inverse);
  background:
    radial-gradient(circle at 20% 0%, rgba(73, 111, 186, 0.2), transparent 28rem),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-strong) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(-102%);
  transition: transform 180ms ease;
  overflow-y: auto;
  box-shadow: 16px 0 40px rgba(15, 23, 42, 0.24);
}

.app-shell.sidebar-open .app-sidebar {
  transform: translateX(0);
}

.app-shell.sidebar-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(15, 23, 42, 0.34);
}

.sidebar-inner {
  display: grid;
  gap: 1rem;
  min-height: 100%;
  padding: 1rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(145deg, #4674d0, #284f9d);
  box-shadow: 0 8px 20px rgba(18, 43, 92, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin: 0.125rem 0 0;
  color: #b8c7d9;
  font-size: 0.75rem;
}

.sidebar-section {
  display: grid;
  gap: 0.5rem;
}

.sidebar-section__label,
.eyebrow,
.metric-card__label,
.field-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.sidebar-section__label {
  color: #a8bad0;
}

.nav-list,
.content-list,
.danger-list,
.insight-list,
.checkbox-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list {
  display: grid;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  color: #d8e0ec;
  border: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-link svg {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.09);
  outline: none;
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(70, 116, 208, 0.42), rgba(70, 116, 208, 0.2));
  border-color: rgba(130, 165, 232, 0.3);
  box-shadow: inset 3px 0 0 #7fa2e6;
}

.nav-link__text {
  min-width: 0;
  display: grid;
  gap: 0.125rem;
}

.nav-link__label {
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-link__meta {
  color: #a8bad0;
  font-size: 0.75rem;
}

.sidebar-card {
  align-self: end;
  display: grid;
  gap: 0.5rem;
  padding: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: #d4e0ee;
  font-size: 0.75rem;
  font-weight: 800;
}

.sidebar-card__title,
.sidebar-card__meta,
.sidebar-card__row {
  margin: 0;
}

.sidebar-card__title {
  color: #ffffff;
  font-weight: 800;
}

.sidebar-card__meta,
.sidebar-card__row {
  color: #d4e0ee;
  font-size: 0.875rem;
}

.sidebar-card__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.status-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  background: currentColor;
}

.status-dot--success {
  color: #47d28b;
}

.status-dot--danger {
  color: #ff7585;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.025);
}

.topbar__meta {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.topbar__title {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.topbar__actions,
.page-actions,
.toolbar,
.button-row,
.pagination,
.pagination__controls,
.stacked-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.topbar__actions {
  justify-content: stretch;
}

.topbar__actions > form {
  flex: 1 1 7rem;
}

.topbar__pill,
.control-chip,
.lang-select,
.user-trigger,
.menu-toggle {
  min-height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.035);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.topbar__pill:hover,
.control-chip:hover,
.lang-select:hover,
.user-trigger:hover,
.menu-toggle:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.topbar__pill,
.control-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  flex: none;
}

.brand-block .menu-toggle {
  margin-left: auto;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.lang-select {
  width: 100%;
  padding: 0 2.25rem 0 0.75rem;
}

.user-menu {
  position: relative;
  flex: 1 1 14rem;
}

.user-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  width: 100%;
  padding: 0.25rem 0.625rem 0.25rem 0.25rem;
}

.avatar,
.entity-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  overflow: hidden;
}

.avatar {
  color: #ffffff;
  background: linear-gradient(145deg, #4674d0, #284f9d);
}

.user-menu__content {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.user-menu__summary {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.user-menu__logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  color: var(--danger);
}

.user-menu__logout:hover {
  background: var(--danger-soft);
}

.hero-card,
.panel,
.metric-card,
.form-card,
.auth-card,
.auth-side,
.alert-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  border-color: #d7dfec;
  background:
    radial-gradient(circle at 95% 10%, rgba(49, 95, 186, 0.1), transparent 24rem),
    linear-gradient(135deg, #ffffff 0%, #fbfcfe 100%);
}

.metric-card {
  border-color: #dfe4eb;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.metric-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.hero-card,
.panel,
.form-card,
.auth-card,
.auth-side,
.alert-card {
  padding: 1rem;
}

.hero-card__grid,
.page-header,
.panel__header {
  display: grid;
  gap: 1rem;
}

.hero-title,
.page-title,
.panel-title,
.auth-card__title,
.auth-side__title,
.sidebar-card__title {
  letter-spacing: -0.025em;
}

.hero-title,
.page-title {
  margin: 0;
  color: var(--text);
  font-size: 1.375rem;
  line-height: 1.25;
  font-weight: 800;
}

.hero-copy,
.page-subtitle,
.panel-subtitle,
.metric-card__meta,
.empty-state__text,
.form-note,
.auth-card__copy,
.auth-side__copy,
.sidebar-card__meta,
.entity-meta {
  color: var(--text-muted);
  line-height: 1.55;
}

.hero-copy,
.page-subtitle,
.panel-subtitle,
.metric-card__meta,
.empty-state__text,
.form-note,
.auth-card__copy,
.auth-side__copy,
.entity-meta {
  margin: 0.35rem 0 0;
}

.hero-stats,
.metrics-grid,
.grid-2,
.form-layout,
.form-grid,
.auth-shell__inner,
.auth-highlights,
.content-list,
.danger-list,
.insight-list {
  display: grid;
  gap: 1rem;
}

.hero-stat,
.auth-highlight,
.content-list__item,
.field-group--checkbox,
.checkbox-grid label,
.form-note {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.hero-stat,
.metric-card,
.auth-highlight {
  padding: 0.875rem;
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #4674d0, var(--accent-strong));
}

.hero-stat__value,
.metric-card__value {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-size: 1.625rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.metric-card__value--date {
  font-size: 1.25rem;
}

.panel--accent {
  border-color: #d6e0f2;
  background: linear-gradient(145deg, #f6f8fd, #eef3fb);
}

.panel--danger,
.alert-card {
  border-color: #f2c2cc;
  background: var(--danger-soft);
}

.panel__header {
  margin-bottom: 1rem;
}

.panel-title,
.auth-card__title {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
  -webkit-overflow-scrolling: touch;
}

.timesheet-wrap {
  max-width: 100%;
  overflow: auto;
}

.timesheet-table {
  width: max-content;
  min-width: 100%;
}

.timesheet-table th,
.timesheet-table td {
  padding: 0.5rem;
  text-align: center;
  white-space: nowrap;
}

.timesheet-table .timesheet-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 13rem;
  text-align: left;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}

.timesheet-table thead .timesheet-sticky {
  z-index: 4;
  background: var(--surface-muted);
}

.timesheet-day {
  min-width: 2.8rem;
}

.timesheet-day small {
  display: block;
  color: var(--text-muted);
}

.timesheet-state {
  display: inline-grid;
  place-items: center;
  min-width: 2.1rem;
  min-height: 2rem;
  padding: 0.25rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 800;
}

.timesheet-state--complete { color: var(--success); background: var(--success-soft); }
.timesheet-state--open { color: var(--info); background: var(--info-soft); }
.timesheet-state--absent,
.timesheet-state--offday { color: var(--warning); background: var(--warning-soft); }
.timesheet-state--anomaly,
.timesheet-state--unconfigured { color: var(--danger); background: var(--danger-soft); }
.timesheet-state--excluded,
.timesheet-state--scheduled { color: var(--text-muted); background: var(--surface-muted); }

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
}

details > summary {
  cursor: pointer;
}

.data-table {
  width: 100%;
  min-width: 56rem;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text-muted);
  background: #f6f8fa;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: var(--surface-hover);
}

.entity-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.entity-avatar {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.entity-avatar--image {
  object-fit: cover;
}

.entity-title {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.entity-meta {
  font-size: 0.875rem;
}

.event-details {
  min-width: 10rem;
}

.event-details .entity-meta + .entity-meta {
  margin-top: 0.2rem;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 0.625rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.chip--success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #b8e1c8;
}

.chip--warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #efd186;
}

.chip--danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #efbdc8;
}

.chip--info {
  color: var(--info);
  background: var(--info-soft);
  border-color: #c7daf8;
}

.chip--muted {
  color: var(--text-muted);
  background: var(--surface-muted);
  border-color: var(--border);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button--primary {
  color: #ffffff;
  background: linear-gradient(180deg, #3b6bc7 0%, var(--accent) 100%);
  border-color: #2c58ad;
  box-shadow: 0 5px 14px rgba(49, 95, 186, 0.2);
}

.button--primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(49, 95, 186, 0.24);
  transform: translateY(-1px);
}

.button--secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}

.button--secondary:hover {
  background: var(--surface-subtle);
}

.button--ghost,
.button--text {
  color: var(--accent-strong);
  background: transparent;
}

.button--ghost:hover,
.button--text:hover {
  background: var(--accent-soft);
}

.button--text {
  min-height: 2rem;
  padding: 0 0.25rem;
  border: 0;
}

.button--text-danger {
  color: var(--danger);
}

.button--danger {
  color: #ffffff;
  background: var(--danger);
}

.button--danger:hover {
  background: #961b31;
}

.button--block {
  width: 100%;
}

.toolbar {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f7f9fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.toolbar__grow {
  flex: 1 1 16rem;
  min-width: min(100%, 16rem);
}

.field-group {
  display: grid;
  gap: 0.375rem;
}

.field-group--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
}

.field-control,
.field-select,
.field-textarea,
.field-file {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field-control:hover,
.field-select:hover,
.field-textarea:hover,
.field-file:hover {
  border-color: var(--accent);
}

.field-control::placeholder,
.field-textarea::placeholder {
  color: var(--text-soft);
}

.field-select {
  padding-right: 2rem;
}

.field-textarea {
  min-height: 8rem;
  padding-top: 0.75rem;
  resize: vertical;
}

.field-file {
  padding: 0.55rem;
}

.field-file::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: var(--radius);
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 800;
}

.field-checkbox,
.checkbox-grid input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.field-help,
.field-error {
  margin: 0;
  font-size: 0.875rem;
}

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

.field-error {
  color: var(--danger);
}

.checkbox-grid {
  display: grid;
  gap: 0.5rem;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.checkbox-grid label:hover,
.content-list__item:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.form-section + .form-section {
  margin-top: 1.25rem;
}

.form-note {
  padding: 0.875rem;
}

.danger-list li,
.insight-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.danger-list__icon,
.insight-list__icon,
.empty-state__icon {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  font-weight: 800;
}

.danger-list__icon,
.insight-list__icon {
  width: 1.75rem;
  height: 1.75rem;
}

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

.insight-list__icon {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  text-align: center;
}

.empty-state__icon {
  width: 3rem;
  height: 3rem;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.empty-state__title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.message-stack {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.message {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.message__body {
  display: flex;
  gap: 0.625rem;
}

.message__close {
  border: 0;
  background: transparent;
  color: inherit;
}

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

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

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

.message--info {
  color: var(--info);
  background: var(--info-soft);
}

.pagination {
  justify-content: space-between;
}

.pagination__controls {
  width: 100%;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 15% 10%, rgba(49, 95, 186, 0.1), transparent 28rem),
    radial-gradient(circle at 90% 90%, rgba(49, 95, 186, 0.07), transparent 30rem),
    var(--bg);
}

.auth-card--compact {
  width: min(100%, 26rem);
  border-color: #d5dce6;
  box-shadow: var(--shadow-lg);
}

.auth-card__brand,
.auth-card__header {
  display: grid;
  gap: 0.75rem;
}

.auth-card__brand {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.auth-card__brand .brand-mark {
  color: var(--text-inverse);
}

.auth-card__header {
  margin-top: 1.125rem;
  gap: 0.375rem;
}

.auth-side {
  color: var(--text-inverse);
  background: var(--sidebar);
}

.auth-side .brand-block {
  margin-bottom: 1rem;
}

.auth-brand {
  padding-bottom: 0;
  border-bottom: 0;
}

.auth-side__title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
}

.auth-side__copy {
  color: #d4e0ee;
}

.auth-card__title {
  font-size: 1.375rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.125rem;
}

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

.strong {
  color: var(--text);
  font-weight: 700;
}

.content-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
}

.mt-sm {
  margin-top: 0.625rem;
}

.mt-md {
  margin-top: 1rem;
}

.mt-lg {
  margin-top: 1.75rem;
}

.justify-end {
  justify-content: flex-end;
}

.text-on-dark {
  color: #ffffff;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.field-control:focus,
.field-select:focus,
.field-textarea:focus,
.field-file:focus,
.lang-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

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

@media (min-width: 42rem) {
  .page-content {
    padding: 1rem;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding-inline: 1rem;
  }

  .topbar__actions {
    justify-content: flex-end;
  }

  .topbar__actions > form {
    flex: 0 0 auto;
  }

  .lang-select {
    width: auto;
  }

  .user-menu {
    flex: 0 0 auto;
  }

  .user-menu__content {
    left: auto;
    width: 18rem;
  }

  .hero-title,
  .page-title {
    font-size: 1.75rem;
  }

  .metrics-grid,
  .form-grid,
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pagination__controls {
    width: auto;
  }
}

@media (min-width: 64rem) {
  .app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    width: auto;
    height: 100vh;
    transform: none;
    box-shadow: none;
  }

  .brand-block .menu-toggle,
  .topbar [data-sidebar-toggle] {
    display: none;
  }

  .app-shell.sidebar-open::after {
    display: none;
  }

  .page-content {
    padding: 1.25rem;
  }

  .topbar {
    top: 0;
    padding: 0.875rem 1.25rem;
  }

  .hero-card__grid,
  .page-header,
  .panel__header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

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

  .grid-2,
  .form-layout,
  .auth-shell__inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(20rem, 0.8fr);
  }

  .hero-title {
    font-size: 2rem;
  }
}

@media (min-width: 80rem) {
  .page-content {
    padding: 1.5rem;
  }

  .hero-card,
  .panel,
  .form-card,
  .auth-card,
  .auth-side,
  .alert-card {
    padding: 1.25rem;
  }
}
