@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/poppins-semibold-c939806f.ttf") format("truetype");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/poppins-bold-4cbe866d.ttf") format("truetype");
}

:root {
  --color-brand: #047857;
  --color-brand-dark: #065f46;
  --color-primary: #065f46;
  --color-primary-soft: #047857;
  --color-accent: #047857;
  --color-accent-dark: #065f46;
  --color-text: #202839;
  --color-muted: #687386;
  --color-border: #dce1e8;
  --color-border-strong: #cbd2dc;
  --color-surface: #ffffff;
  --color-surface-muted: #f8f9fb;
  --color-surface-subtle: #f1f3f6;
  --color-background: #ffffff;
  --color-success: #087f5b;
  --color-success-soft: #e8f7f1;
  --color-danger: #b42318;
  --color-danger-soft: #fff0ee;
  --shadow-xs: 0 1px 2px rgba(31, 40, 57, 0.06);
  --shadow-sm: 0 1px 3px rgba(31, 40, 57, 0.1), 0 1px 2px rgba(31, 40, 57, 0.06);
  --shadow-md: 0 12px 28px rgba(31, 40, 57, 0.14);
  --shadow-panel: var(--shadow-xs);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --content-width: 1280px;
  --nav-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--color-background);
  color: var(--color-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }

.app-shell { width: min(var(--content-width), calc(100% - 48px)); margin: 0 auto; padding: 32px 0 72px; }
.app-nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; min-height: var(--nav-height);
  padding: 0 max(24px, calc((100vw - var(--content-width)) / 2));
  border-bottom: 1px solid #e5e7eb; color: #111827; background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04); transition: box-shadow .2s ease;
}
.app-nav--scrolled,
.app-nav--menu-open {
  background: #fff; box-shadow: 0 8px 24px rgba(17, 24, 39, .08);
}
.app-nav__brand { display: flex; align-items: center; flex: none; padding-right: 34px; text-decoration: none; }
.app-nav__brand-symbol { display: block; width: 38px; height: 34px; flex: none; object-fit: contain; }
.app-nav__menu { display: flex; align-items: center; width: 100%; min-width: 0; gap: 24px; }
.app-nav__links { display: flex; align-items: stretch; gap: 24px; min-width: 0; min-height: var(--nav-height); }
.app-nav__link { position: relative; display: flex; align-items: center; gap: 7px; min-height: var(--nav-height); padding: 0; border-radius: 0; color: #4b5563; font-size: .875rem; font-weight: 650; text-decoration: none; transition: color .15s ease; }
.app-nav__link i { color: #6b7280; font-size: .78rem; }
.app-nav__link--active i, .app-nav__link:hover i { color: var(--color-brand); }
.app-nav__link:hover, .app-nav__link:focus-visible { color: #111827; background: transparent; }
.app-nav__link--active, .app-nav__link--active:hover, .app-nav__link--active:focus-visible { color: #111827; background: transparent; }
.app-nav__link--active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--color-brand); content: ""; }
.app-nav__search { display: grid; grid-template-columns: 36px minmax(120px, 220px); align-items: center; min-width: 0; margin-left: auto; overflow: hidden; border: 1px solid #d1d5db; border-radius: 7px; color: #6b7280; background: #fff; box-shadow: 0 1px 2px rgba(17, 24, 39, .05); }
.app-nav__search > i { justify-self: end; font-size: .82rem; }
.app-nav__search input { min-width: 0; padding: 8px 12px 8px 9px; border: 0; outline: 0; color: #111827; background: transparent; }
.app-nav__search input::placeholder { color: #9ca3af; }
.app-nav__search:focus-within { border-color: #6b7280; box-shadow: 0 0 0 1px #6b7280; }
.app-nav__utilities { display: flex; align-items: center; gap: 6px; flex: none; }
.app-nav__toggle { display: none; width: 40px; height: 40px; margin-left: auto; padding: 9px; border: 0; border-radius: 7px; color: #111827; background: #fff; cursor: pointer; }
.app-nav__toggle:hover { background: #f3f4f6; }
.app-nav__toggle span { display: block; width: 100%; height: 2px; margin: 5px 0; background: #374151; }

@media (prefers-reduced-motion: reduce) {
  .app-nav { transition: none; }
}

.header-stack { position: relative; margin-bottom: 24px; }
.header-stack > .page-header,
.header-stack > .listing-panel,
.header-stack > .form-page { position: relative; z-index: 2; margin-bottom: 0; }
.breadcrumbs { min-width: 0; margin: 0 0 18px; }
.breadcrumbs__list { display: flex; align-items: center; min-width: 0; margin: 0; padding: 0; overflow-x: auto; list-style: none; scrollbar-width: none; }
.breadcrumbs__list::-webkit-scrollbar { display: none; }
.breadcrumbs__item { display: flex; align-items: center; min-width: 0; color: var(--color-muted); font-size: .875rem; line-height: 1.35; white-space: nowrap; }
.breadcrumbs__home, .breadcrumbs__link { color: var(--color-muted); text-decoration: none; transition: color .15s ease; }
.breadcrumbs__home { display: grid; flex: none; width: 24px; height: 24px; place-items: center; font-size: .8rem; }
.breadcrumbs__home:hover, .breadcrumbs__link:hover { color: var(--color-brand); }
.breadcrumbs__separator { flex: none; margin: 0 13px; color: var(--color-border-strong); font-size: .62rem; }
.breadcrumbs__link, .breadcrumbs__current { display: block; min-width: 0; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs__current { color: var(--color-text); font-weight: 650; }

.page-header { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; padding: 0 0 22px; border-bottom: 1px solid var(--color-border); }
.page-header__content { order: -1; min-width: 0; margin-right: auto; text-align: left; }
.page-header h1 { margin: 0; color: var(--color-text); font-size: clamp(1.65rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.025em; }
.page-header p { max-width: 720px; margin: 6px 0 0; color: var(--color-muted); }
.page-header__metadata { line-height: 1.45; }
.page-header__actions, .button-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-header__actions--primary { flex-wrap: nowrap; }
.page-header__actions--secondary { justify-content: flex-end; }
.page-header__side { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); color: var(--color-text); background: var(--color-surface); box-shadow: var(--shadow-xs); cursor: pointer; font-size: .875rem; font-weight: 700; line-height: 1.2; text-decoration: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.button:hover { border-color: #aeb7c5; background: var(--color-surface-muted); box-shadow: var(--shadow-sm); }
.button--primary, .button--dark { border-color: var(--color-primary); color: white; background: var(--color-primary); }
.button--primary:hover, .button--primary:focus, .button--primary:active,
.button--dark:hover, .button--dark:focus, .button--dark:active {
  border-color: var(--color-primary-soft);
  color: white;
  background: var(--color-primary-soft);
  box-shadow: var(--shadow-sm);
}
.button--create,
.button--create:focus,
.button--create:active {
  border-color: var(--color-brand);
  color: white;
  background: var(--color-brand);
}
.button--create:hover {
  border-color: var(--color-brand-dark);
  color: white;
  background: var(--color-brand-dark);
}
.button--danger { border-color: #f1b8b2; color: var(--color-danger); background: white; }
.button--ghost { box-shadow: none; background: transparent; }
.button--icon { width: 42px; padding: 8px; }
.action-menu { position: relative; flex: none; }
.action-menu > summary { list-style: none; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu__trigger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; overflow: hidden; border: 1px solid var(--color-border-strong); border-radius: 50%; color: var(--color-text); background: var(--color-surface); box-shadow: var(--shadow-xs); cursor: pointer; }
.action-menu[open] .action-menu__trigger,
.action-menu__trigger:hover { border-color: #aeb7c5; background: #fafbfc; }
.action-menu__panel { position: absolute; z-index: 40; top: calc(100% + 9px); right: 0; display: grid; min-width: 235px; padding: 7px; border: 1px solid var(--color-border); border-radius: 12px; background: white; box-shadow: 0 18px 45px rgba(31,40,57,.2); }
.action-menu__item { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 40px; padding: 9px 11px; border: 0; border-radius: 8px; color: var(--color-text); background: transparent; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 700; text-align: left; text-decoration: none; }
.action-menu__item:hover,
.action-menu__item:focus-visible { background: #f1f2f4; }
.action-menu__item i { width: 18px; color: var(--color-primary-soft); text-align: center; }
.action-menu__item--danger { color: var(--color-danger); }
.action-menu__item--danger i { color: inherit; }
.action-menu__panel form { margin: 0; }
.account-menu { margin-left: 0; }
.account-menu__trigger { color: var(--color-text); border-color: var(--color-border-strong); background: var(--color-surface); box-shadow: none; }
.account-menu__trigger .profile-avatar { width: 32px; height: 32px; }
.account-menu[open] .account-menu__trigger,
.account-menu__trigger:hover { color: var(--color-text); border-color: #aeb7c5; background: var(--color-surface-muted); }
.notification-menu__trigger { position: relative; border: 0; color: #4b5563; background: transparent; box-shadow: none; }
.notification-menu__trigger:hover,
.notification-menu[open] .notification-menu__trigger { border-color: transparent; color: #111827; background: #f3f4f6; }
.notification-menu__badge { position: absolute; top: 1px; right: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid #fff; border-radius: 999px; color: #fff; background: #dc2626; font-size: .62rem; font-weight: 800; line-height: 1; }
.notification-menu__panel { display: block; width: min(390px, calc(100vw - 32px)); padding: 0; overflow: hidden; }
.notification-menu__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 16px; border-bottom: 1px solid #e5e7eb; }
.notification-menu__header > div { display: grid; }
.notification-menu__header strong { color: #111827; font-size: .9rem; }
.notification-menu__header span { color: #6b7280; font-size: .72rem; }
.notification-menu__read-all { padding: 4px 0; border: 0; color: #374151; background: transparent; cursor: pointer; font-size: .72rem; font-weight: 700; }
.notification-menu__read-all:hover { color: #111827; text-decoration: underline; }
.notification-menu__list { max-height: min(420px, calc(100dvh - 170px)); overflow-y: auto; }
.notification-menu__form { margin: 0; }
.notification-menu__item { display: grid; grid-template-columns: 36px minmax(0, 1fr) 8px; align-items: start; gap: 11px; width: 100%; padding: 13px 16px; border: 0; border-bottom: 1px solid #f3f4f6; color: #111827; background: #fff; cursor: pointer; text-align: left; }
.notification-menu__item:hover,
.notification-menu__item:focus-visible { background: #f9fafb; }
.notification-menu__item--unread { background: #f5f8fc; }
.notification-menu__icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #374151; background: #e5e7eb; }
.notification-menu__content { display: grid; min-width: 0; gap: 2px; }
.notification-menu__content strong { font-size: .82rem; line-height: 1.35; }
.notification-menu__content span { display: -webkit-box; overflow: hidden; color: #4b5563; font-size: .77rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notification-menu__content small { color: #6b7280; font-size: .69rem; }
.notification-menu__dot { align-self: center; width: 7px; height: 7px; border-radius: 50%; background: #2563eb; }
.notification-menu__empty { display: grid; justify-items: center; gap: 4px; padding: 34px 20px; color: #6b7280; text-align: center; }
.notification-menu__empty i { margin-bottom: 6px; font-size: 1.25rem; }
.notification-menu__empty strong { color: #374151; font-size: .86rem; }
.notification-menu__empty span { font-size: .78rem; }
.notification-menu__footer { padding: 10px 16px; text-align: center; }
.notification-menu__footer a { color: #374151; font-size: .78rem; font-weight: 700; text-decoration: none; }
.notification-menu__footer a:hover { color: #111827; text-decoration: underline; }
.header-icon-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.icon-action { position: relative; flex: 0 0 42px !important; height: 42px; border-radius: 50%; }
.icon-action::after {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 20;
  padding: 6px 9px;
  border-radius: 6px;
  color: white;
  background: var(--color-primary);
  box-shadow: 0 4px 12px rgba(31, 40, 57, .16);
  content: attr(data-tooltip);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
}
.icon-action:hover::after, .icon-action:focus-visible::after { opacity: 1; transform: translateY(0); }
.button-pair { display: inline-flex; align-items: stretch; filter: drop-shadow(0 3px 4px rgba(31, 40, 57, .13)); }
.button-pair .button { position: relative; border-radius: 0; box-shadow: none; }
.button-pair .button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.button-pair .button:last-child { margin-left: -1px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.button-pair .button:only-child { margin-left: 0; border-radius: var(--radius-sm); }
.button-pair .button:hover { z-index: 1; border-color: #aeb7c5; box-shadow: none; }
.creation-popover { position: relative; }
.creation-popover > summary { list-style: none; }
.creation-popover > summary::-webkit-details-marker { display: none; }
.creation-popover[open] > summary { border-color: #aeb7c5; background: #fafbfc; box-shadow: 0 5px 11px rgba(31,40,57,.18); }
.creation-popover__panel { position: absolute; z-index: 16; top: calc(100% + 12px); left: 0; display: grid; width: 290px; padding: 7px; border: 1px solid var(--color-border); border-radius: 13px; background: white; box-shadow: 0 18px 45px rgba(31, 40, 57, .2); }
.creation-popover__panel--right { right: 0; left: auto; }
.creation-popover__option { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 11px; padding: 10px; border-radius: 9px; color: var(--color-text); text-decoration: none; }
.creation-popover__option:hover { background: #f1f2f4; }
.creation-popover__option:focus-visible { outline-offset: -2px; }
.creation-popover__icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; color: var(--color-primary-soft); background: #eef0f3; }
.creation-popover__option strong,
.creation-popover__option small { display: block; }
.creation-popover__option strong { font-size: .9rem; }
.creation-popover__option small { margin-top: 1px; color: var(--color-muted); font-size: .76rem; }

.listing-panel { position: relative; overflow: visible; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-panel); }
.listing-toolbar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 88px; padding: 22px 24px; border-bottom: 1px solid var(--color-border); }
.listing-toolbar__actions { grid-column: 2; display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.listing-toolbar__title { grid-column: 1; grid-row: 1; text-align: left; }
.listing-toolbar__title h1, .listing-toolbar__title h2 { margin: 0; color: var(--color-text); font-size: clamp(1.65rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.025em; }
.listing-toolbar__title p { margin: 5px 0 0; color: var(--color-muted); font-size: .875rem; }
.listing-toolbar__secondary-actions { display: flex; align-items: center; justify-self: stretch; justify-content: flex-end; gap: 10px; width: 100%; min-width: 0; }
.listing-toolbar__side { display: none; }
.listing-panel__content { overflow: hidden; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.filter-popover { position: relative; justify-self: end; }
.has-filter-drawer { overflow: hidden; }
.filter-popover > summary { min-width: 126px; color: var(--color-muted); list-style: none; }
.filter-popover > summary::-webkit-details-marker { display: none; }
.filter-popover[open] > summary { border-color: #aeb7c5; color: var(--color-primary); }
.filter-popover__chevron { margin-left: auto; color: var(--color-muted); font-size: .72rem; transition: transform .18s ease; }
.filter-popover[open] .filter-popover__chevron { transform: rotate(180deg); }
.filter-popover__panel { position: absolute; z-index: 15; top: calc(100% + 12px); right: 0; width: min(920px, calc(100vw - 80px)); padding: 22px; border: 1px solid var(--color-border); border-radius: 14px; background: white; box-shadow: 0 18px 45px rgba(31, 40, 57, .2); }
.filter-popover__mobile-header { display: none; align-items: center; justify-content: space-between; gap: 16px; margin: -4px -4px 18px; padding-bottom: 14px; border-bottom: 1px solid var(--color-border); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 28px; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-panel); }
.metric-card { min-width: 0; min-height: 132px; padding: 22px 24px; border-left: 1px solid var(--color-border); background: var(--color-surface); }
.metric-card:first-child { border-left: 0; }
.metric-card__label { margin: 0; color: var(--color-muted); font-size: .75rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.metric-card__value { margin: 10px 0 2px; overflow-wrap: anywhere; color: var(--color-text); font-size: clamp(1.55rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.15; letter-spacing: -.025em; }
.metric-card__value--compact { font-size: 1.4rem; }
.metric-card__hint { margin: 7px 0 0; color: var(--color-muted); font-size: .82rem; }
.content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; gap: 24px; }
.content-grid--equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-panel); }
.card__header { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); }
.card__header h2, .card__header h3 { margin: 0; color: var(--color-text); font-size: 1rem; font-weight: 750; }
.card__body { padding: 20px; }
.card--spaced { margin-top: 24px; }
.card__body--flush { padding: 0; }
.quick-actions { display: grid; gap: 10px; }
.quick-actions .button { justify-content: flex-start; width: 100%; }
.quick-actions--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-action { display: flex; align-items: center; flex-direction: column; justify-content: center; width: 100%; min-width: 0; min-height: 96px; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text); background: var(--color-surface-muted); text-align: center; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.quick-action:hover { border-color: #aeb7c5; background: var(--color-surface); box-shadow: var(--shadow-sm); }
.quick-action__icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: var(--color-primary-soft); background: #eef0f3; font-size: 1rem; }
.quick-action__add { margin-top: 4px; color: var(--color-muted); font-size: 1rem; font-weight: 700; line-height: 1; }

.record-list { margin: 0; padding: 0; list-style: none; }
.record-list__item { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; padding: 14px 20px; border-bottom: 1px solid var(--color-border); }
.record-list__item:last-child { border-bottom: 0; }
.record-list__main { min-width: 0; }
.record-list__main a { font-weight: 700; text-decoration: none; }
.record-list__main a:hover { text-decoration: underline; }
.record-list__meta { margin-top: 3px; color: var(--color-muted); font-size: .88rem; }
.record-list__value { flex: none; font-weight: 700; text-align: right; }

.home-screen { margin-top: -32px; background: var(--color-surface); }
.home-toolbar { background: var(--color-surface); }
.hub-navigation { margin-top: -32px; margin-bottom: 16px; }
.store-settings-content { padding-top: 16px; }
.store-settings-content .settings-heading h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.025em; }
.home-periods__link--active { box-shadow: inset 0 -2px var(--color-brand); }
.home-toolbar__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 72px; }
.home-toolbar__navigation { display: flex; align-items: center; min-width: 0; }
.home-toolbar__title { flex: none; padding-right: 24px; border-right: 1px solid var(--color-border); }
.home-toolbar__title span { display: block; color: var(--color-muted); font-size: .7rem; font-weight: 650; line-height: 1.2; }
.home-toolbar h1 { margin: 2px 0 0; font-size: 1rem; line-height: 1.35; }
.home-periods { display: flex; align-items: center; min-width: 0; gap: 6px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.home-periods::-webkit-scrollbar { display: none; }
.home-periods__link { flex: none; padding: 9px 14px; border-radius: 0; color: var(--color-muted); font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.home-periods__link:hover { color: var(--color-text); background: var(--color-surface-muted); }
.home-periods__link--active { color: var(--color-brand); }
.home-toolbar__action { display: flex; align-items: center; min-height: 40px; }
.home-toolbar__action .button { min-height: 40px; white-space: nowrap; }
.home-toolbar__action .button-pair { filter: none; }
.listing-panel:has(h2) .listing-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
.listing-panel:has(h2) .listing-toolbar__secondary-actions { grid-column: 2; grid-row: 1; }

.metrics-grid--home { margin-top: 16px; margin-bottom: 0; border-width: 1px 0 1px 0; border-radius: 0; box-shadow: none; background: radial-gradient(circle at 72% 100%, rgba(4, 120, 87, .08), transparent 36%), var(--color-surface); }
.metrics-grid--home .metric-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; min-height: 152px; padding: 32px; background: transparent; }
.metrics-grid--home .metric-card__label { align-self: center; font-size: .875rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.metrics-grid--home .metric-card__hint { grid-column: 2; grid-row: 1; align-self: center; margin: 0; color: var(--color-muted); font-size: .78rem; font-weight: 600; }
.metrics-grid--home .metric-card__value { grid-column: 1 / -1; margin: 9px 0 0; font-size: clamp(1.8rem, 3vw, 2.25rem); font-weight: 500; letter-spacing: -.045em; }

.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.home-section-heading h2 { margin: 0; font-size: 1rem; }
.home-section-heading a { color: var(--color-brand); font-size: .875rem; font-weight: 700; text-decoration: none; }
.home-section-heading a:hover { text-decoration: underline; }
.home-activity { margin-top: 58px; }
.activity-list { border-bottom: 1px solid var(--color-border); }
.activity-list__date { margin: 0; padding: 9px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); background: var(--color-surface-muted); font-size: .875rem; }
.activity-row { display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 1fr) minmax(180px, .8fr); align-items: center; gap: 28px; min-height: 88px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.activity-row:last-child { border-bottom: 0; }
.activity-row__amount { display: flex; align-items: center; gap: 18px; min-width: 0; }
.activity-row__icon { display: grid; flex: 0 0 18px; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #fff; background: #a6afbd; font-size: .56rem; }
.activity-row__primary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 750; }
.activity-row__secondary,
.activity-row__subject span,
.activity-row__details span { display: block; margin-top: 4px; color: var(--color-muted); font-size: .8rem; }
.activity-row__subject { min-width: 0; }
.activity-row__subject strong,
.activity-row__subject span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row__subject strong { display: block; font-size: .9rem; font-weight: 600; }
.activity-row__details { min-width: 0; text-align: right; }
.activity-row__details a { color: var(--color-brand); font-size: .875rem; font-weight: 650; text-decoration: none; }
.activity-row__details a:hover { text-decoration: underline; }

.home-clients { margin-top: 64px; }
.recent-client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 14px; }
.recent-client-card { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.recent-client-card__header { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 96px; padding: 20px 22px; border-bottom: 1px solid var(--color-border); }
.recent-client-card__icon { display: grid; width: 50px; height: 50px; place-items: center; border: 1px solid var(--color-border); border-radius: 9px; color: var(--color-brand); background: var(--color-surface); font-size: 1.1rem; }
.recent-client-card__header a { overflow: hidden; font-weight: 700; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.recent-client-card__header a:hover { text-decoration: underline; }
.recent-client-card__more { color: #9aa4b2; font-size: .9rem; letter-spacing: .08em; }
.recent-client-card__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 17px 22px; gap: 20px; }
.recent-client-card__details div:last-child { text-align: right; }
.recent-client-card__details div:only-child { grid-column: 1 / -1; text-align: left; }
.recent-client-card__details dt { color: var(--color-muted); font-size: .78rem; }
.recent-client-card__details dd { margin: 4px 0 0; font-size: .875rem; font-weight: 650; }

.filter-panel { margin-bottom: 22px; padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-panel); }
.filter-panel__title { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; font-size: 1rem; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); align-items: end; gap: 14px; }
.filter-grid__wide { grid-column: span 2; }
.filter-actions { display: flex; gap: 9px; }

.field { min-width: 0; }
.field label, .field__label { display: block; margin-bottom: 7px; color: var(--color-text); font-size: .9rem; font-weight: 750; }
.required::after { content: " *"; color: var(--color-danger); }
.input, .select, .textarea { width: 100%; border: 1px solid #cbd2dc; border-radius: 9px; color: var(--color-text); background: white; transition: border-color .15s, box-shadow .15s; }
.input, .select { min-height: 43px; padding: 9px 11px; }
.textarea { min-height: 112px; padding: 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--color-primary-soft); outline: 0; box-shadow: 0 0 0 3px rgba(4,120,87,.13); }
.field__help { margin: 6px 0 0; color: var(--color-muted); font-size: .8rem; }
.field__error { margin: 6px 0 0; color: var(--color-danger); font-size: .82rem; font-weight: 700; }
.field_with_errors { display: contents; }
.field_with_errors .input, .field_with_errors .select, .field_with_errors .textarea { border-color: var(--color-danger); }
.choice-group { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: 9px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--color-primary-soft); background: #f1f3f6; }
.switch { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); cursor: pointer; font-size: .875rem; font-weight: 650; }
.switch__input { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; }
.switch__track { position: relative; display: inline-flex; flex: 0 0 38px; width: 38px; height: 22px; padding: 2px; border-radius: 999px; background: #cbd2dc; transition: background-color .16s ease; }
.switch__thumb { width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(17, 24, 39, .25); transition: transform .16s ease; }
.switch__input:checked + .switch__track { background: var(--color-brand); }
.switch__input:checked + .switch__track .switch__thumb { transform: translateX(16px); }
.switch__input:focus-visible + .switch__track { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.switch__input:disabled + .switch__track, .switch__input:disabled ~ .switch__label { opacity: .5; cursor: not-allowed; }
.switch-form { display: flex; align-items: center; gap: 12px; }
.segmented-selector { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 100%; padding: 3px; border: 1px solid #dfe2e7; border-radius: 10px; background: #f0f1f3; }
.segmented-selector__option { position: relative; display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; min-width: 104px; min-height: 36px; margin: 0 !important; padding: 7px 12px; border: 0; border-radius: 7px; color: var(--color-primary-soft) !important; background: transparent; cursor: pointer; transition: color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.segmented-selector__option input { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; pointer-events: none; }
.segmented-selector__option:hover { color: var(--color-text) !important; background: #e7e9ec; }
.segmented-selector__option:has(input:checked) { z-index: 1; color: var(--color-text) !important; background: white; box-shadow: 0 1px 4px rgba(31,40,57,.18); }
.segmented-selector__option:has(input:focus-visible) { outline: 3px solid rgba(49,57,74,.24); outline-offset: 2px; }
.combobox { position: relative; }
.combobox__control { position: relative; }
.combobox__input { padding-right: 42px; }
.combobox__toggle { position: absolute; top: 1px; right: 1px; display: grid; width: 40px; height: 41px; place-items: center; border: 0; border-radius: 0 8px 8px 0; color: var(--color-muted); background: transparent; cursor: pointer; }
.combobox__toggle:hover { color: var(--color-text); background: rgba(49,57,74,.06); }
.combobox__list { position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; left: 0; max-height: 260px; margin: 0; padding: 5px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: 10px; background: white; box-shadow: var(--shadow-panel); list-style: none; }
.combobox__option { padding: 9px 10px; border-radius: 7px; cursor: pointer; }
.combobox__option:hover, .combobox__option--active { background: #edf0f4; }
.combobox__option[aria-selected="true"] { font-weight: 750; }
.combobox__status { margin: 6px 0 0; color: var(--color-muted); font-size: .82rem; }
.combobox__status:empty { display: none; }

.form-layout-screen { min-height: calc(100vh - var(--nav-height)); margin-top: -32px; padding: 52px 0 84px; background: var(--color-surface); box-shadow: 0 0 0 100vmax var(--color-surface); clip-path: inset(0 -100vmax); }
.form-layout-heading, .form-page-stack, .form-page { width: 100%; max-width: 1180px; margin-right: auto; margin-left: auto; }
.form-layout-heading { margin-bottom: 34px; }
.form-layout-heading h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -.035em; }
.form-layout-heading p { max-width: 680px; margin: 10px 0 0; color: var(--color-muted); font-size: .9rem; line-height: 1.55; }
.form-page-stack { padding-bottom: 70px; }
.form-page { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.form-page--compact { max-width: 980px; }
.form-page > .page-header { margin: 0 0 32px; padding: 0 0 24px; border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; background: transparent; box-shadow: none; }
.form-page > .form-errors, .form-layout-screen .form-errors { margin: 0 0 24px calc(34% + 16px); }
.unified-form { margin: 0; }
.unified-form:has(.form-card) { display: grid; gap: 34px; }
.unified-form:has(.form-card) .form-card { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(0, 2fr); align-items: start; gap: 48px; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.form-card__header { padding: 5px 0 0; border: 0; }
.form-card__header h2 { margin: 0; font-size: 1rem; }
.form-card__header p { margin: 7px 0 0; color: var(--color-muted); font-size: .84rem; line-height: 1.5; }
.form-card__body { min-width: 0; padding: 26px; border: 1px solid var(--color-border); border-radius: 11px; background: var(--color-surface); box-shadow: var(--shadow-xs); }
.unified-form:has(.form-card) .form-card:not(:has(.form-card__header))::before { content: ""; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.form-grid__full { grid-column: 1 / -1; }
.municipality-fields { display: contents; }
.unified-form:has(.form-card) .form-actions { position: static; display: flex; justify-content: flex-end; gap: 10px; margin: -34px 0 0 calc(33.333% + 32px); padding: 18px 24px; border: 1px solid var(--color-border); border-top: 0; border-radius: 0 0 11px 11px; background: var(--color-surface-muted); box-shadow: var(--shadow-xs); }
.unified-form:has(.form-card) .form-card:has(+ .form-actions) .form-card__body { border-radius: 11px 11px 0 0; }
.form-secondary-action { display: flex; justify-content: flex-end; padding: 14px 24px; border-top: 1px solid var(--color-border); }
.form-hint { margin: 0; padding: 14px 24px; color: var(--color-muted); border-bottom: 1px solid var(--color-border); font-size: .87rem; }

.table-card { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-panel); }
.table-summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--color-border); color: var(--color-muted); background: var(--color-surface-muted); font-size: .82rem; }
.table-scroll { overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; min-width: 780px; border-collapse: collapse; }
.data-table th { padding: 11px 16px; color: var(--color-muted); background: var(--color-surface-muted); font-size: .7rem; letter-spacing: .055em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-top: 1px solid var(--color-border); font-size: .9rem; vertical-align: middle; }
.data-table tbody tr:hover { background: var(--color-surface-muted); }
.data-table__clickable-row { cursor: pointer; transition: background-color .15s ease; }
.data-table__clickable-row:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(49, 57, 74, .24); outline-offset: -3px; background: #fafbfc; }
.record-link { display: inline-flex; align-items: center; gap: 9px; color: var(--color-text); font-weight: 800; text-decoration: none; }
.record-link:hover { color: var(--color-primary); text-decoration: underline; }
.label-with-icon { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-weight: 800; }
.label-with-icon__icon { display: inline-flex; flex: 0 0 34px; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; color: var(--color-primary-soft); background: #eef0f3; }
.label-with-icon__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.label-with-icon--individual .label-with-icon__icon { color: #365f8d; background: #e8f1fb; }
.label-with-icon--company .label-with-icon__icon { color: #6d4b84; background: #f1eafa; }
.label-with-icon--car .label-with-icon__icon { color: #355f64; background: #e4f2f1; }
.label-with-icon--motorcycle .label-with-icon__icon { color: #7a5526; background: #f8eedf; }
.label-with-icon--purchase .label-with-icon__icon { color: #27674f; background: #e4f3ed; }
.label-with-icon--sale .label-with-icon__icon { color: #8a4a34; background: #faeae4; }
.row-actions { display: grid; grid-template-columns: repeat(3, 42px); justify-content: end; gap: 7px; white-space: nowrap; }
.row-actions__start, .row-actions__middle, .row-actions__end { display: flex; align-items: center; justify-content: center; min-width: 42px; }
.row-actions--wide { grid-template-columns: 42px auto 42px; }
.row-actions--wide .row-actions__middle { gap: 7px; }
.row-actions form { display: inline; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.detail-list { margin: 0; }
.detail-list__row { display: grid; grid-template-columns: minmax(130px, .8fr) 1.5fr; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.detail-list__row:last-child { border-bottom: 0; }
.detail-list dt { color: var(--color-muted); font-size: .85rem; font-weight: 750; }
.detail-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }

.detail-screen { min-height: calc(100vh - var(--nav-height)); margin-top: -32px; padding-bottom: 72px; background: var(--color-surface); box-shadow: 0 0 0 100vmax var(--color-surface); clip-path: inset(0 -100vmax); }
.detail-hero { border-bottom: 1px solid var(--color-border); background: radial-gradient(circle at 72% 100%, rgba(4, 120, 87, .09), transparent 38%), var(--color-surface); }
.detail-hero__content { padding-top: 24px; }
.detail-hero__content > .breadcrumbs { margin-bottom: 0; }
.detail-hero__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 120px; }
.detail-hero__identity { display: flex; align-items: center; gap: 20px; min-width: 0; }
.detail-hero__icon { display: grid; flex: 0 0 64px; width: 64px; height: 64px; place-items: center; border: 1px solid var(--color-border); border-radius: 50%; color: var(--color-brand); background: var(--color-surface); font-size: 1.35rem; box-shadow: var(--shadow-xs); }
.detail-hero__title { min-width: 0; }
.detail-hero h1 { margin: 0; overflow-wrap: anywhere; font-size: clamp(1.25rem, 2.2vw, 1.65rem); line-height: 1.25; letter-spacing: -.025em; }
.detail-hero__metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; color: var(--color-muted); font-size: .85rem; }
.detail-hero__actions { display: flex; flex: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.detail-hero__actions form { display: inline-flex; margin: 0; }
.detail-layout,
.detail-screen > .detail-grid,
.form-detail-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); align-items: start; gap: 30px; padding-top: 64px; }
.detail-main { min-width: 0; }
.detail-sidebar { position: sticky; top: calc(var(--nav-height) + 24px); display: grid; gap: 28px; min-width: 0; }
.detail-screen .card { border-radius: var(--radius-md); box-shadow: none; }
.detail-screen .card__header { min-height: 66px; padding-inline: 24px; }
.detail-screen .card__body { padding: 24px; }
.detail-screen .detail-list__row { padding: 14px 0; }
.detail-summary { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-muted); }
.detail-summary__primary { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 24px; border-bottom: 1px solid var(--color-border); }
.detail-summary__primary span:first-child { display: block; color: var(--color-muted); font-size: .8rem; font-weight: 700; }
.detail-summary__primary strong { display: block; margin-top: 5px; font-size: 1.35rem; }
.detail-summary__list { margin: 0; padding: 12px 24px; }
.detail-summary__list div { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 10px; padding: 10px 0; }
.detail-summary__list dt { color: #a3adbb; text-align: center; }
.detail-summary__list dd { margin: 0; font-size: .875rem; font-weight: 650; }
.detail-summary__footer { padding: 18px 24px; border-top: 1px solid var(--color-border); }
.detail-summary__footer a { color: var(--color-brand); font-size: .875rem; font-weight: 700; text-decoration: none; }

.form-detail-layout { grid-template-columns: minmax(0, 2.2fr) minmax(260px, .8fr); }
.detail-screen--form .form-page { width: 100%; max-width: none; margin: 0; box-shadow: none; }
.detail-screen--form .unified-form .form-card:last-of-type { border-bottom: 0; }
.detail-screen--form .unified-form .form-actions { padding: 20px 24px; }
.form-guide { position: sticky; top: calc(var(--nav-height) + 24px); padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-muted); }
.form-guide h2 { margin: 0; font-size: 1rem; }
.form-guide p { margin: 9px 0 20px; color: var(--color-muted); font-size: .875rem; }
.form-guide__note { display: flex; align-items: flex-start; gap: 10px; padding: 14px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); color: var(--color-muted); font-size: .82rem; }
.form-guide__note i { margin-top: 3px; color: var(--color-brand); }
.form-guide__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--color-text); font-size: .85rem; font-weight: 700; text-decoration: none; }
.form-guide__back:hover { color: var(--color-brand); }
.detail-document { padding-top: 64px; }
.detail-document .contract-document-page { margin-bottom: 0; }

.alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; margin-bottom: 20px; padding: 14px 16px; border: 1px solid; border-radius: var(--radius-md); }
.alert--success { color: var(--color-success); border-color: #a7dfcc; background: var(--color-success-soft); }
.alert--danger { color: var(--color-danger); border-color: #f2bab4; background: var(--color-danger-soft); }
.alert__icon { margin-top: 3px; }
.alert__content strong, .alert__content h2 { display: block; margin: 0 0 2px; color: currentColor; font-size: .9rem; }
.alert__content p { margin: 0; color: var(--color-text); font-size: .875rem; }
.alert__dismiss { display: grid; width: 28px; height: 28px; margin: -5px -6px 0 0; place-items: center; border: 0; border-radius: var(--radius-sm); color: currentColor; background: transparent; cursor: pointer; }
.alert__dismiss:hover { background: rgba(255, 255, 255, .55); }
.confirmation-dialog { width: min(460px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: 0 24px 70px rgba(17, 24, 39, .28); }
.confirmation-dialog::backdrop { background: rgba(17, 24, 39, .52); backdrop-filter: blur(2px); }
.confirmation-dialog__panel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 24px; }
.confirmation-dialog__icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--color-danger); background: var(--color-danger-soft); }
.confirmation-dialog h2 { margin: 1px 0 6px; font-size: 1rem; }
.confirmation-dialog p { margin: 0; color: var(--color-muted); font-size: .875rem; }
.confirmation-dialog__actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.auth-page { background: #f3f4f6; }
.auth-page .app-shell { width: min(100% - 32px, 980px); padding-top: 0; }
.auth-page:has(.app-nav) .auth-frame { min-height: calc(100vh - var(--nav-height)); }
.auth-frame { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 48px 0 64px; }
.auth-frame--wide { width: min(100%, 900px); margin-inline: auto; }
.auth-brand { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 22px; color: var(--color-brand); text-decoration: none; }
.auth-brand__logo { display: block; width: 72px; height: auto; }
.auth-card { width: min(100%, 440px); margin: 0 auto; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: white; box-shadow: 0 10px 28px rgba(31, 40, 57, .08); }
.auth-card--wide { width: min(100%, 840px); }
.auth-card--login { width: min(100%, 442px); padding: 30px; }
.auth-card--enrollment { width: min(100%, 860px); }
.auth-card h1 { margin-top: 0; }
.auth-card__header { padding: 30px 32px 0; text-align: center; }
.auth-card__body { padding: 26px 32px 32px; }
.auth-card__footer { padding: 18px 32px; border-top: 1px solid var(--color-border); color: var(--color-muted); background: var(--color-surface-muted); font-size: .875rem; text-align: center; }
.auth-card__footer a { color: var(--color-brand); font-weight: 750; }
.auth-card__header h1 { margin-bottom: 8px; color: var(--color-text); font-size: 1.5rem; line-height: 1.25; letter-spacing: -.025em; }
.auth-card--login .auth-card__header h1 { margin-bottom: 0; font-size: 1.4rem; letter-spacing: -.02em; }
.auth-card__header p { margin: 0; color: var(--color-muted); }
.auth-card__header--left { text-align: left; }
.auth-card__header--left h1 { text-align: center; }
.auth-card .field { margin-bottom: 20px; }
.auth-card .field label { display: block; margin-bottom: 7px; font-weight: 750; }
.auth-card .input { min-height: 50px; padding: 12px 14px; font-size: 1rem; }
.auth-submit { width: 100%; min-height: 50px; margin-top: 4px; border-radius: 10px; box-shadow: none; font-size: 1rem; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 22px; color: var(--color-text); font-size: .86rem; text-align: center; }
.auth-links a, .auth-link-button { color: var(--color-primary); font-weight: 700; }
.auth-link-button { padding: 0; border: 0; background: none; cursor: pointer; text-decoration: underline; }
.auth-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 50%; color: var(--color-brand); background: var(--color-success-soft); font-size: 1.1rem; }
.auth-code-input { text-align: center; letter-spacing: .18em; }
.auth-note { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: .82rem; }
.auth-note strong { color: var(--color-text); }
.auth-frame--signup { justify-content: center; padding-block: 54px; }
.auth-frame--signup .auth-brand { margin-bottom: 22px; }
.auth-frame--signup .auth-brand__logo { width: 78px; }
.signup-panel { width: min(100%, 570px); }
.signup-panel__header { margin-bottom: 32px; text-align: center; }
.signup-panel__header h1 { margin: 0; color: var(--color-primary); font-size: clamp(1.8rem, 4vw, 2.15rem); letter-spacing: -.035em; }
.signup-panel__header p { margin: 8px 0 0; color: var(--color-muted); }
.signup-form { display: grid; gap: 18px; }
.signup-actions { display: flex; justify-content: flex-end; padding-top: 6px; }
.signup-submit { min-height: 58px; padding-inline: 26px; border-radius: 8px; font-size: 1.08rem; }
.signup-login-link { margin: 30px 0 0; color: var(--color-muted); text-align: center; }
.signup-login-link a { color: var(--color-primary); font-weight: 750; }
.manual-key { margin-bottom: 22px; padding: 13px 15px; border: 1px solid var(--color-border); border-radius: 10px; background: #f8f9fb; }
.manual-key span { display: block; margin-bottom: 4px; color: var(--color-muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.manual-key code { overflow-wrap: anywhere; font-size: .92rem; }
.qr-code { display: flex; justify-content: center; margin: 24px 0; }
.qr-code img, .qr-code svg { width: min(280px, 100%); height: auto; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 16px; background: #f5f6f8; }
.store-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.store-card { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; min-height: 120px; padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-panel); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.store-card:hover { border-color: #b6beca; background: var(--color-surface-muted); box-shadow: var(--shadow-sm); }
.store-card--current { border-color: #9fb9b1; box-shadow: inset 4px 0 0 var(--color-success), var(--shadow-panel); }
.store-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 14px; color: var(--color-primary); background: #edf0f4; font-size: 1.25rem; }
.store-card__content { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.store-card__content strong { font-size: 1.1rem; }
.store-card__content small { max-width: 100%; margin: 3px 0 10px; overflow: hidden; color: var(--color-muted); text-overflow: ellipsis; white-space: nowrap; }
.store-card__current { position: absolute; top: 14px; right: 16px; display: inline-flex; align-items: center; gap: 5px; color: var(--color-success); font-size: .75rem; font-weight: 800; }
.store-card__arrow { color: #929cab; }
.sensitive-reveal { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sensitive-reveal .input--compact { width: 190px; min-height: 34px; padding: 5px 8px; }
.sensitive-reveal .button { min-height: 34px; padding: 5px 10px; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.button--compact { min-height: 34px; padding: 6px 11px; font-size: .82rem; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.select--compact { min-height: 36px; padding-block: 5px; }
.profile-avatar { flex: none; border-radius: 50%; object-fit: cover; background: #e7eaf0; }
.profile-avatar--initials { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; color: var(--color-primary); font-size: .76rem; font-weight: 800; }
.profile-avatar-editor { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.theme-switcher { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-switcher .button[aria-pressed="true"] { color: white; border-color: var(--color-primary); background: var(--color-primary); }
.account-person { display: flex; min-width: 0; align-items: center; gap: 12px; }
.profile-summary .card__body { display: flex; align-items: center; gap: 22px; }
.profile-summary h2, .profile-summary p { margin: 0 0 6px; }
.danger-zone { border-color: #efb4ae; }
.danger-zone__action { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.danger-zone__action:last-child { border-bottom: 0; }
.danger-zone__action p { margin: 4px 0 0; color: var(--color-muted); }
.notification-store-preferences { border-top: 1px solid var(--color-border); }
.search-panel { margin-bottom: 22px; }
.search-result h2 a { text-decoration: none; }
.search-result h2 a:hover { text-decoration: underline; }
.input-with-action { display: flex; gap: 8px; }
.danger-dialog summary { list-style: none; }
.danger-dialog__body { margin-top: 12px; padding: 14px; border: 1px solid #efb4ae; border-radius: 10px; background: var(--color-surface); }
.action-menu__identity { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; }
.action-menu__identity strong, .action-menu__identity small { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-menu__identity small, .action-menu__label { color: var(--color-muted); font-size: .74rem; }
.action-menu__divider { height: 1px; margin: 5px 4px; background: var(--color-border); }
.action-menu__label { margin: 5px 11px 2px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.action-menu__check { margin-left: auto; color: var(--color-success) !important; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 999px; color: white; background: var(--color-brand); font-size: .72rem; }
.notifications-list { width: 100%; overflow: hidden; }
.notification-row__form { margin: 0; }
.notification-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 12px; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--color-border); color: var(--color-text); background: var(--color-surface); cursor: pointer; text-align: left; }
.notification-row:hover { background: #f7f8fa; }
.notification-row--unread { background: #f1f5fb; }
.notification-row__icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--color-primary); background: #e5eaf2; }
.notification-row__content { display: grid; min-width: 0; }
.notification-row__content span, .notification-row__content small { color: var(--color-muted); }
.notification-row__content small { margin-top: 3px; }
.notification-row__dot { width: 9px; height: 9px; border-radius: 50%; background: #2c73ca; }
.stack { display: grid; gap: 16px; }

/* Settings screens follow the stacked Tailwind Plus page example using native CSS. */
.settings-screen { min-height: calc(100vh - var(--nav-height)); margin-top: -32px; padding: 64px 0 88px; background: var(--color-surface); box-shadow: 0 0 0 100vmax var(--color-surface); clip-path: inset(0 -100vmax); }
.settings-heading { padding-bottom: 32px; border-bottom: 1px solid var(--color-border); }
.settings-heading__eyebrow { margin: 0 0 8px; color: var(--color-muted); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.settings-heading__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.settings-heading h1 { margin: 0; color: var(--color-text); font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -.035em; }
.settings-heading p:not(.settings-heading__eyebrow) { max-width: 680px; margin: 10px 0 0; color: var(--color-muted); line-height: 1.55; }
.settings-heading__actions { display: flex; flex: none; gap: 10px; }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 64px; }
.settings-sidebar { min-width: 0; }
.settings-nav { position: sticky; top: calc(var(--nav-height) + 24px); display: grid; gap: 5px; }
.settings-nav__link { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 8px 12px; border-radius: 7px; color: var(--color-muted); font-size: .9rem; font-weight: 700; text-decoration: none; transition: color .15s ease, background .15s ease; }
.settings-nav__link i { width: 18px; color: inherit; text-align: center; }
.settings-nav__link:hover, .settings-nav__link:focus-visible { color: var(--color-text); background: var(--color-surface-muted); }
.settings-nav__link--active, .settings-nav__link--active:hover { color: var(--color-primary); background: var(--color-surface-muted); }
.settings-content { min-width: 0; }
.settings-content > .breadcrumbs { margin-bottom: 20px; }
.settings-section { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); gap: 48px; padding: 36px 0; border-bottom: 1px solid var(--color-border); }
.settings-section__header h2 { margin: 0; color: var(--color-text); font-size: .95rem; font-weight: 800; }
.settings-section__header p { margin: 7px 0 0; color: var(--color-muted); font-size: .84rem; line-height: 1.55; }
.settings-section__body { min-width: 0; }
.settings-section__body > p:first-child { margin-top: 0; }
.settings-section__toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 14px; }
.settings-section .detail-list__row { padding: 12px 0; }
.settings-section .detail-list__row:first-child { padding-top: 0; }
.settings-section .record-list { border-top: 1px solid var(--color-border); }
.settings-section .record-list__item { padding-inline: 0; }
.settings-section .empty-state { padding: 26px 0; }
.settings-section .empty-state--compact { justify-items: start; text-align: left; }
.settings-section--danger .settings-section__header h2 { color: var(--color-danger); }
.settings-section--danger .danger-zone__action { padding-top: 0; }
.settings-profile { display: flex; align-items: center; gap: 20px; }
.settings-profile > div { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.settings-profile strong { font-size: 1.05rem; }
.settings-profile a { color: var(--color-muted); overflow-wrap: anywhere; }
.settings-disclosure { margin-top: 16px; }
.settings-disclosure summary { list-style: none; }
.settings-inline-form { display: grid; max-width: 520px; gap: 16px; justify-items: start; }
.settings-content > .form-errors { margin-top: 24px; }
.settings-content > .unified-form { display: block; }
.settings-content > .unified-form .form-card { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); gap: 48px; margin: 0; padding: 36px 0; border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; background: transparent; box-shadow: none; }
.settings-content > .unified-form .form-card__header { padding: 0; border: 0; }
.settings-content > .unified-form .form-card__header h2 { font-size: .95rem; }
.settings-content > .unified-form .form-card__header p { font-size: .84rem; line-height: 1.55; }
.settings-content > .unified-form .form-card__body, .settings-content > .unified-form .form-card:has(+ .form-actions) .form-card__body { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.settings-content > .unified-form .form-actions { margin: 0; padding: 24px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.settings-content > .form-secondary-action { display: flex; justify-content: flex-end; margin-top: 14px; }

html[data-theme="dark"] {
  color-scheme: dark;
  --color-brand: #34d399;
  --color-brand-dark: #6ee7b7;
  --color-primary: #6ee7b7;
  --color-primary-soft: #34d399;
  --color-accent: #34d399;
  --color-accent-dark: #10b981;
  --color-text: #eef1f5;
  --color-muted: #aab4c2;
  --color-border: #394353;
  --color-border-strong: #4a5669;
  --color-surface: #202733;
  --color-surface-muted: #262f3d;
  --color-surface-subtle: #2b3544;
  --color-background: #151a22;
  --color-danger-soft: #382326;
  --shadow-panel: 0 0 0 1px rgba(255, 255, 255, .035), 0 .4em 1.2em rgba(0, 0, 0, .2);
}
html[data-theme="dark"] .card, html[data-theme="dark"] .action-menu__panel, html[data-theme="dark"] .filter-popover__panel, html[data-theme="dark"] .form-page, html[data-theme="dark"] .form-card, html[data-theme="dark"] .table-card, html[data-theme="dark"] .filter-panel, html[data-theme="dark"] .input, html[data-theme="dark"] .select, html[data-theme="dark"] .textarea { color: var(--color-text); background: var(--color-surface); }
html[data-theme="dark"] .app-nav,
html[data-theme="dark"] .app-nav--scrolled,
html[data-theme="dark"] .app-nav--menu-open { color: var(--color-text); border-bottom-color: var(--color-border); background: var(--color-surface); }
html[data-theme="dark"] .app-nav__brand-symbol { filter: brightness(1.65); }
html[data-theme="dark"] .app-nav__link:hover,
html[data-theme="dark"] .app-nav__link:focus-visible,
html[data-theme="dark"] .app-nav__link--active,
html[data-theme="dark"] .app-nav__link--active:hover,
html[data-theme="dark"] .app-nav__link--active:focus-visible { color: var(--color-text); background: transparent; }
html[data-theme="dark"] .app-nav__link--active::after { background: var(--color-brand); }
html[data-theme="dark"] .app-nav__link--active i,
html[data-theme="dark"] .app-nav__link:hover i { color: var(--color-brand); }
html[data-theme="dark"] .app-nav__search { color: var(--color-muted); border-color: var(--color-border-strong); background: var(--color-surface); }
html[data-theme="dark"] .app-nav__search input { color: var(--color-text); }
html[data-theme="dark"] .app-nav .action-menu__panel { color: var(--color-text); border-color: var(--color-border); background: var(--color-surface); }
html[data-theme="dark"] .app-nav .action-menu__item:hover,
html[data-theme="dark"] .app-nav .action-menu__item:focus-visible { background: var(--color-surface-subtle); }
html[data-theme="dark"] .app-nav .action-menu__identity strong,
html[data-theme="dark"] .app-nav .action-menu__item { color: var(--color-text); }
html[data-theme="dark"] .app-nav .action-menu__item--danger { color: #ff9b92; }
html[data-theme="dark"] .app-nav .action-menu__divider { background: var(--color-border); }
html[data-theme="dark"] .app-nav .notification-menu__item { color: var(--color-text); background: var(--color-surface); }
html[data-theme="dark"] .app-nav .notification-menu__item--unread { background: var(--color-surface-subtle); }
html[data-theme="dark"] .app-nav .notification-menu__item:hover,
html[data-theme="dark"] .app-nav .notification-menu__item:focus-visible { background: var(--color-surface-muted); }
html[data-theme="dark"] .app-nav__link,
html[data-theme="dark"] .app-nav__link i,
html[data-theme="dark"] .app-nav__search input::placeholder,
html[data-theme="dark"] .app-nav .notification-menu__trigger,
html[data-theme="dark"] .app-nav .notification-menu__header span,
html[data-theme="dark"] .app-nav .notification-menu__content span,
html[data-theme="dark"] .app-nav .notification-menu__content small,
html[data-theme="dark"] .app-nav .notification-menu__empty { color: var(--color-muted); }
html[data-theme="dark"] .app-nav .notification-menu__header strong,
html[data-theme="dark"] .app-nav .notification-menu__read-all,
html[data-theme="dark"] .app-nav .notification-menu__empty strong,
html[data-theme="dark"] .app-nav .notification-menu__footer a { color: var(--color-text); }
html[data-theme="dark"] .app-nav__toggle { color: var(--color-text); background: var(--color-surface); }
html[data-theme="dark"] .app-nav__toggle span { background: var(--color-text); }
html[data-theme="dark"] .app-nav__toggle:hover,
html[data-theme="dark"] .app-nav .notification-menu__trigger:hover,
html[data-theme="dark"] .app-nav .notification-menu[open] > .notification-menu__trigger { color: var(--color-text); background: var(--color-surface-subtle); }
html[data-theme="dark"] .app-nav .notification-menu__icon { color: var(--color-text); background: var(--color-surface-subtle); }
html[data-theme="dark"] .app-nav .notification-menu__header,
html[data-theme="dark"] .app-nav .notification-menu__item,
html[data-theme="dark"] .app-nav__utilities { border-color: var(--color-border); }
html[data-theme="dark"] .app-nav .notification-menu__badge { border-color: var(--color-surface); }
html[data-theme="dark"] .app-nav__link--active,
html[data-theme="dark"] .app-nav__link:hover { color: var(--color-text); }
html[data-theme="dark"] .app-nav__link--active i,
html[data-theme="dark"] .app-nav__link:hover i { color: var(--color-brand); }
html[data-theme="dark"] .app-nav__search:focus-within { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); }
html[data-theme="dark"] .button { color: var(--color-text); border-color: #465267; background: #262f3d; }
html[data-theme="dark"] .button:hover { background: #303b4c; }
html[data-theme="dark"] .button--primary, html[data-theme="dark"] .button--dark { color: #fff; border-color: #047857; background: #047857; }
html[data-theme="dark"] .button--primary:hover, html[data-theme="dark"] .button--dark:hover { color: #fff; border-color: #065f46; background: #065f46; }
html[data-theme="dark"] .button--ghost { background: transparent; }
html[data-theme="dark"] .quick-action { background: #262f3d; }
html[data-theme="dark"] .quick-action:hover { border-color: #5a687e; background: #303b4c; }
html[data-theme="dark"] .quick-action__icon { background: #354052; }
html[data-theme="dark"] .button--create, html[data-theme="dark"] .button--create:focus, html[data-theme="dark"] .button--create:active { color: #fff; border-color: #047857; background: #047857; }
html[data-theme="dark"] .button--danger { color: #ff9b92; border-color: #75433f; background: #352629; }
html[data-theme="dark"] .badge { color: #dce4ef; background: #354052; }
html[data-theme="dark"] .unified-form .form-actions { background: #1b222c; }
html[data-theme="dark"] .data-table th { background: #1b222c; }
html[data-theme="dark"] .data-table tbody tr:hover { background: #27303e; }
html[data-theme="dark"] .choice:has(input:checked) { background: #2b3544; }
html[data-theme="dark"] .combobox__list { background: var(--color-surface); }
html[data-theme="dark"] .combobox__toggle:hover, html[data-theme="dark"] .combobox__option:hover, html[data-theme="dark"] .combobox__option--active { background: #2b3544; }
html[data-theme="dark"] .theme-switcher .button[aria-pressed="true"] { color: #fff; border-color: #047857; background: #047857; }
html[data-theme="dark"] .notification-row:hover { background: #283140; }
html[data-theme="dark"] .notification-row--unread { background: #253248; }
html[data-theme="dark"] .settings-screen { background: var(--color-surface); }
html[data-theme="dark"] .settings-nav__link:hover, html[data-theme="dark"] .settings-nav__link:focus-visible, html[data-theme="dark"] .settings-nav__link--active { background: var(--color-surface-muted); }
html[data-theme="dark"] .confirmation-dialog { color: var(--color-text); background: var(--color-surface); }
.form-errors h2 { margin: 0 0 8px; font-size: 1rem; }
.form-errors ul { margin: 0; padding-left: 20px; }
.empty-state { display: grid; justify-items: center; gap: 16px; padding: 48px 24px; color: var(--color-muted); text-align: center; }
.empty-state--outlined { margin: 20px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); }
.empty-state--compact { grid-template-columns: auto minmax(0, 1fr); justify-items: start; gap: 14px; padding: 20px; text-align: left; }
.empty-state__icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: var(--color-brand); background: var(--color-success-soft); }
.empty-state__icon i { display: inline; margin: 0; color: inherit; font-size: 1.1rem; }
.empty-state__content h2 { margin: 0; color: var(--color-text); font-size: 1rem; }
.empty-state__content p { max-width: 520px; margin: 6px 0 0; font-size: .875rem; }
.empty-state__action { margin-top: 2px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: .82rem; }
.pagination__summary { margin: 0; }
.pagination__controls { display: flex; align-items: center; gap: 10px; }
.pagination__page { padding-inline: 4px; white-space: nowrap; }
.button--disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; color: var(--color-primary); background: #e9edf3; font-size: .78rem; font-weight: 800; }
.badge--success { color: #17653a; background: #dff5e8; }
.badge--warning { color: #805400; background: #fff0c7; }
.badge--ongoing { color: #315f85; background: #e3f0fb; }
.badge--accepted { color: #17653a; background: #dff5e8; }
.badge--denied { color: #8b3030; background: #fbe5e5; }
.badge--cancelled { color: #596273; background: #e8ebef; }
.label-with-icon--consignment .label-with-icon__icon { color: #725a20; background: #f7efcf; }
.checklist { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 9px; color: var(--color-text-muted); }
.checklist i { color: #bd8414; }
.muted { color: var(--color-muted); }
.text-right { text-align: right; }
.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; }
.print-document { max-width: 820px; margin: 0 auto; padding: 36px; color: #111; font-family: Georgia, "Times New Roman", serif; font-size: 12pt; line-height: 1.45; }
.print-document h1 { margin-bottom: 32px; font-size: 18pt; }
.print-section-title { margin: 28px 0 12px; font-size: 12pt; }
.print-justified { text-align: justify; }
.print-center { text-align: center; }
.print-watermark { position: fixed; inset: 42% auto auto 12%; z-index: -1; color: rgba(120, 20, 20, .12); font: 800 76pt/1 sans-serif; transform: rotate(-28deg); }
.print-vehicle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0; border: 1px solid #aaa; }
.print-vehicle div { display: grid; grid-template-columns: 86px 1fr; border-bottom: 1px solid #ccc; }
.print-vehicle div:nth-child(even) { border-right: 1px solid #ccc; }
.print-vehicle div:nth-last-child(-n + 2) { border-bottom: 0; }
.print-vehicle .print-vehicle__name { grid-column: 1 / -1; border-right: 0; }
.print-vehicle dt, .print-vehicle dd { margin: 0; padding: 7px 9px; }
.print-vehicle dt { font-weight: 700; background: #f3f3f3; }
.print-date { margin-top: 42px; text-align: right; }
.print-signatures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 60px; margin-top: 70px; text-align: center; }
.print-digest { margin-top: 55px; color: #555; font: 8pt/1.4 monospace; overflow-wrap: anywhere; }
.contract-document-page { margin-bottom: 40px; border: 1px solid var(--color-border); background: white; box-shadow: var(--shadow-panel); }
.contract-dialog { width: min(1100px, calc(100vw - 40px)); max-width: none; height: min(92vh, 1100px); max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 1em; background: var(--color-surface); box-shadow: 0 28px 90px rgba(0, 0, 0, .35); }
.contract-dialog::backdrop { background: rgba(15, 20, 28, .7); backdrop-filter: blur(3px); }
.contract-dialog__panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.contract-dialog__header, .contract-dialog__footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: var(--color-surface); }
.contract-dialog__header { border-bottom: 1px solid var(--color-border); }
.contract-dialog__header h2, .contract-dialog__eyebrow { margin: 0; }
.contract-dialog__eyebrow { color: var(--color-muted); font-size: .75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.contract-dialog__footer { border-top: 1px solid var(--color-border); }
.contract-dialog__preview { min-height: 0; padding: 28px; overflow: auto; background: #dfe3e8; }
.contract-dialog__preview .print-document { min-height: 1120px; background: white; box-shadow: 0 8px 30px rgba(31, 40, 57, .18); }
.contract-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

@media (max-width: 1050px) {
  .settings-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 36px; }
  .settings-section, .settings-content > .unified-form .form-card { grid-template-columns: 170px minmax(0, 1fr); gap: 30px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { border-left: 0; }
  .metric-card:nth-child(even) { border-left: 1px solid var(--color-border); }
  .metric-card:nth-child(n + 3) { border-top: 1px solid var(--color-border); }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-nav__toggle { display: block; }
  .app-nav { padding: 0 24px; }
  .app-nav__menu { position: absolute; top: calc(100% + 1px); right: 16px; left: 16px; display: none; align-items: stretch; flex-direction: column; gap: 12px; width: auto; max-height: calc(100dvh - var(--nav-height) - 18px); padding: 12px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 0 0 var(--radius-md) var(--radius-md); color: #111827; background: #fff; box-shadow: var(--shadow-md); }
  .app-nav__menu--open { display: flex; }
  .app-nav__links { align-items: stretch; flex: none; flex-direction: column; gap: 0; min-height: 0; }
  .app-nav__link { min-height: 46px; padding: 0 12px; border: 0; }
  .app-nav__link--active::after { top: 9px; right: auto; bottom: 9px; left: 0; width: 2px; height: auto; }
  .app-nav__search { grid-template-columns: 36px 1fr; width: 100%; margin: 4px 0; }
  .app-nav__utilities { flex-wrap: wrap; justify-content: flex-end; width: 100%; padding-top: 12px; border-top: 1px solid #e5e7eb; }
  .notification-menu[open] { width: 100%; }
  .notification-menu[open] .notification-menu__trigger { display: flex; margin-left: auto; }
  .notification-menu__panel { position: static; width: 100%; margin-top: 8px; }
  .account-menu { margin: 0; }
  html[data-theme="dark"] .app-nav__menu { color: var(--color-text); border-color: var(--color-border); background: var(--color-surface); }
}

@media (max-width: 760px) {
  .hub-navigation { margin-top: -26px; margin-bottom: 16px; }
  .app-shell { width: min(100% - 28px, var(--content-width)); padding-top: 26px; }
  .form-layout-screen { margin-top: -26px; padding: 32px 0 56px; }
  .form-layout-heading { margin-bottom: 26px; }
  .form-page > .form-errors, .form-layout-screen .form-errors { margin-left: 0; }
  .unified-form:has(.form-card) { gap: 26px; }
  .unified-form:has(.form-card) .form-card { grid-template-columns: 1fr; gap: 15px; }
  .unified-form:has(.form-card) .form-card:not(:has(.form-card__header))::before { display: none; }
  .unified-form:has(.form-card) .form-actions, .settings-content > .unified-form .form-actions { margin: -26px 0 0; padding: 16px 18px; }
  .unified-form:has(.form-card) .form-card:has(+ .form-actions) .form-card__body { border-radius: 11px 11px 0 0; }
  .settings-screen { margin-top: -26px; padding: 34px 0 56px; }
  .settings-heading { padding-bottom: 24px; }
  .settings-heading__row { align-items: stretch; flex-direction: column; }
  .settings-heading__actions { align-self: flex-start; }
  .settings-layout { display: block; padding-top: 0; }
  .settings-sidebar { margin-inline: -14px; padding: 15px 14px; overflow-x: auto; border-bottom: 1px solid var(--color-border); }
  .settings-nav { position: static; display: flex; width: max-content; min-width: 100%; gap: 4px; }
  .settings-nav__link { gap: 6px; padding-inline: 8px; font-size: .8rem; white-space: nowrap; }
  .settings-content { border-top: 0; }
  .settings-content > .breadcrumbs { margin-bottom: 18px; padding-top: 28px; }
  .settings-content > .breadcrumbs + .settings-heading { padding-top: 0; }
  .settings-section { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; }
  .settings-content > .unified-form { padding-top: 0; }
  .settings-content > .unified-form .form-card { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; }
  .settings-content > .unified-form .form-actions { margin: 0; padding: 20px 0 0; }
  .settings-section__toolbar { justify-content: flex-start; }
  .settings-section .record-list__item { gap: 12px; }
  .detail-screen { margin-top: -26px; padding-bottom: 48px; }
  .detail-hero__content { padding-top: 22px; }
  .detail-hero__inner { align-items: flex-start; flex-direction: column; gap: 22px; min-height: 0; padding: 22px 0 28px; }
  .detail-hero__identity { align-items: flex-start; gap: 14px; }
  .detail-hero__icon { flex-basis: 48px; width: 48px; height: 48px; font-size: 1rem; }
  .detail-hero__actions { justify-content: flex-start; width: 100%; }
  .detail-layout, .detail-screen > .detail-grid, .form-detail-layout { grid-template-columns: 1fr; gap: 22px; padding-top: 32px; }
  .detail-document { padding-top: 32px; }
  .detail-sidebar, .form-guide { position: static; }
  .home-screen { margin-top: -26px; }
  .home-toolbar__inner { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 0 0; }
  .home-toolbar__navigation { align-items: flex-start; flex-direction: column; gap: 10px; }
  .home-toolbar__title { padding: 0; border: 0; }
  .home-periods { flex-wrap: nowrap; width: 100%; margin: 0; gap: 20px; }
  .home-periods__link { flex: none; padding-inline: 0; }
  .home-toolbar__action { min-height: 40px; }
  .store-settings-content { padding-top: 16px; }
  .store-settings-content > .breadcrumbs { padding-top: 0; }
  .creation-popover__panel--right { right: auto; left: 0; }
  .metrics-grid--home .metric-card { min-height: 126px; padding: 24px; }
  .home-activity { margin-top: 40px; }
  .activity-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; padding: 18px 0; }
  .activity-row__amount { align-self: start; }
  .activity-row__subject { grid-column: 1; padding-left: 36px; }
  .activity-row__details { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .home-clients { margin-top: 44px; }
  .recent-client-grid { grid-template-columns: 1fr; gap: 14px; }
  .breadcrumbs { margin-bottom: 14px; }
  .breadcrumbs__separator { margin-inline: 10px; }
  .breadcrumbs__link, .breadcrumbs__current { max-width: 210px; }
  .page-header { align-items: flex-start; flex-direction: column; padding: 0 0 20px; }
  .page-header__content { order: -1; width: 100%; text-align: left; }
  .page-header__content p { margin-left: 0; }
  .page-header__side { display: none; }
  .listing-toolbar { grid-template-columns: 1fr auto; gap: 18px; min-height: 0; padding: 22px; }
  .listing-toolbar__title { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .listing-toolbar__actions { grid-column: 1; grid-row: 2; }
  .listing-toolbar__secondary-actions { grid-column: 2; grid-row: 2; }
  .listing-panel:has(h2) .listing-toolbar__title { grid-column: 1; }
  .filter-popover__panel { width: calc(100vw - 40px); }
  .filter-popover--enhanced[open] { z-index: 60; }
  .filter-popover--enhanced .filter-popover__panel { position: fixed; top: 82px; right: 14px; left: 14px; width: auto; max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; }
  .filter-popover--enhanced[open]::before { position: fixed; z-index: 14; inset: 0; background: rgba(17, 24, 39, .42); content: ""; }
  .filter-popover--enhanced .filter-popover__mobile-header { display: flex; }
  .page-header__actions { width: 100%; }
  .page-header__actions--primary { flex-wrap: wrap; }
  .page-header__actions .button { flex: 1; }
  .page-header--split { display: flex; }
  .page-header--split > .page-header__actions--primary { width: auto; }
  .page-header--split > .page-header__actions--secondary { align-self: flex-end; justify-content: flex-end; width: auto; }
  .page-header__actions--secondary .button { flex: none; }
  .content-grid, .content-grid--equal, .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .data-table { min-width: 100%; }
  .data-table .data-table__secondary { display: none; }
  .quick-actions--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .contract-dialog__header, .contract-dialog__footer { padding: 12px 14px; }
  .contract-dialog__preview { padding: 12px; }
  .contract-dialog__preview .print-document { min-height: 0; padding: 22px 18px; font-size: 10pt; }
  .contract-dialog__preview .print-vehicle { grid-template-columns: 1fr; }
  .contract-dialog__preview .print-vehicle div { border-right: 0; border-bottom: 1px solid #ccc; }
  .contract-dialog__preview .print-vehicle div:last-child { border-bottom: 0; }
  .contract-dialog__preview .print-signatures { grid-template-columns: 1fr; gap: 70px; }
  .contract-dialog__footer { align-items: stretch; flex-direction: column-reverse; }
  .contract-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-actions .button { justify-content: center; }
  .form-grid__full { grid-column: auto; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-grid__wide { grid-column: auto; }
  .detail-list__row { grid-template-columns: 1fr; gap: 3px; }
  .form-card__body { padding: 18px; }
  .form-actions { position: static; flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .store-grid { grid-template-columns: 1fr; }
  .auth-frame { justify-content: flex-start; padding-top: 32px; }
  .auth-card--login, .auth-card--enrollment { padding: 28px 22px; }
  .auth-frame--signup { justify-content: flex-start; padding-top: 42px; }
  .signup-panel__header { margin-bottom: 24px; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination__controls { display: grid; grid-template-columns: 1fr auto 1fr; }
  .pagination__controls .button { min-width: 0; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 0; border-left: 0 !important; }
  .metric-card + .metric-card { border-top: 1px solid var(--color-border); }
  .metrics-grid--home .metric-card { min-height: 112px; }
  .activity-row { grid-template-columns: 1fr; }
  .activity-row__details { grid-column: 1; grid-row: auto; padding-left: 36px; text-align: left; }
  .app-nav { padding-inline: 14px; }
  .record-list__item { align-items: flex-start; flex-direction: column; }
  .record-list__value { text-align: left; }
  .listing-toolbar { padding: 18px; }
  .listing-toolbar__actions .button { padding-inline: 12px; font-size: .88rem; }
  .listing-toolbar__actions .button-pair { max-width: 100%; }
  .filter-popover > summary { min-width: 44px; padding-inline: 13px; }
  .filter-popover > summary span { display: none; }
  .store-card { grid-template-columns: auto 1fr; min-height: 0; padding: 20px 18px; }
  .store-card__arrow { display: none; }
  .recovery-codes { grid-template-columns: 1fr; }
  .profile-summary .card__body, .danger-zone__action { align-items: flex-start; flex-direction: column; }
  .input-with-action { flex-direction: column; }
  .pagination__page { font-size: .75rem; text-align: center; }
  .pagination__controls .button span { display: none; }
}

.has-form-modal { overflow: hidden; }
.form-modal { width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; box-shadow: 0 24px 80px rgb(0 0 0 / .25); }
.form-modal::backdrop { background: rgb(17 24 39 / .5); }
.form-modal__close { position: sticky; z-index: 5; top: 12px; float: right; margin: 12px 12px 0 0; background: var(--color-surface); }
.form-modal__content { padding: 28px; }
.form-modal .breadcrumbs, .form-modal .settings-sidebar { display: none; }
.form-modal .form-layout-screen, .form-modal .settings-screen, .form-modal .form-page-stack { min-height: 0; margin: 0; padding: 0; box-shadow: none; clip-path: none; }
.form-modal .settings-layout { display: block; }
.form-modal .form-layout-heading, .form-modal .settings-heading, .form-modal .form-page > .page-header { margin: 0 0 24px; padding: 0 30px 0 0; border: 0; }
.form-modal h1 { margin-top: 0; font-size: 1.5rem; }
.form-modal .unified-form:has(.form-card) { display: grid; gap: 20px; }
.form-modal .unified-form:has(.form-card) .form-card { display: block; padding: 0; border: 0; }
.form-modal .form-card__header { padding: 0 0 16px; }
.form-modal .unified-form .form-card .form-card__body { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.form-modal .unified-form:has(.form-card) .form-actions { margin: 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--color-border); border-radius: 0; background: transparent; box-shadow: none; }
.form-modal .form-errors { margin: 0 0 20px; }
.form-modal .form-page > .form-card { margin-top: 24px; }
.form-modal .combobox__list { max-height: 200px; }
@media (max-width: 480px) {
  .form-modal { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .form-modal__content { padding: 20px; }
  .form-modal .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .app-nav, .breadcrumbs, .page-header__actions, .form-actions, .button, .filter-panel { display: none !important; }
  body { background: white; }
  .app-shell { width: 100%; padding: 0; }
  .header-stack { padding-top: 0; margin-bottom: 0; }
  .card, .table-card { box-shadow: none; }
  .print-document { max-width: none; padding: 0; font-size: 10.5pt; line-height: 1.35; }
  .print-document h1 { margin-bottom: 20px; font-size: 16pt; }
  .print-section-title { margin: 18px 0 8px; font-size: 10.5pt; }
  .print-vehicle { margin: 11px 0; }
  .print-vehicle dt, .print-vehicle dd { padding: 5px 7px; }
  .print-date { margin-top: 28px; }
  .print-signatures { gap: 45px; margin-top: 48px; }
  .print-digest { margin-top: 32px; }
  .print-section-title { break-after: avoid; }
  .print-vehicle, .print-signatures { break-inside: avoid; }
}
