/* Titanium Rental Car — chrome azul-marinho (T Solutions) + área principal clara */
@import url("tokens.css");
@import url("polish.css");

:root {
  /* Barra lateral / topbar — tom próximo ao dashboard Titanium */
  --chrome-bg: #152238;
  --chrome-bg-hover: #1c2d4a;
  --chrome-border: rgba(255, 255, 255, 0.1);
  --chrome-text: #f8fafc;
  --chrome-text-muted: rgba(248, 250, 252, 0.72);
  --chrome-active: rgba(255, 255, 255, 0.1);

  --page-bg: #eceef2;
  --content-bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f6f7f9;
  --border: #dfe3ea;
  --border-strong: #c8ced8;
  --text: #111827;
  --text-muted: #5c6578;
  --text-faint: #8b95a5;

  --accent: #152238;
  --accent-hover: #1c2d4a;
  --accent-bright: #1a3a6c;
  --accent-muted: rgba(21, 34, 56, 0.06);
  --accent-line: #152238;

  --success: #15803d;
  --success-bg: rgba(21, 128, 61, 0.1);
  --warning: #b45309;
  --warning-bg: rgba(180, 83, 9, 0.1);
  --danger: #b91c1c;
  --danger-bg: rgba(185, 28, 28, 0.08);
  --danger-text: #991b1b;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 4px 16px rgba(17, 24, 39, 0.07);
  --font-sans: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --topbar-h: 56px;
  --sidebar-w: 260px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.theme-titanium {
  margin: 0;
  min-height: 100vh;
  background-color: var(--page-bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--chrome-bg);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  text-decoration: none;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0 0;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-actions .btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.pagination-page {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.content a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.12s ease;
}

.content a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.content a.btn,
.content a.btn:hover {
  text-decoration: none;
}

.content a.btn-primary,
.content a.btn-primary:hover {
  color: #fff;
}

.content a.btn-secondary,
.content a.btn-secondary:hover {
  color: var(--text);
}

.content a.btn-ghost,
.content a.btn-ghost:hover {
  color: var(--text);
}

.content a.btn-danger,
.content a.btn-danger:hover {
  color: var(--danger-text);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.app-shell--nav-drawer {
  grid-template-columns: 1fr;
}

.app-shell--nav-drawer .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(var(--sidebar-w), 88vw);
  max-width: 100%;
  transform: translateX(-102%);
  transition: transform 0.24s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
}

.app-shell--nav-drawer .sidebar.open {
  transform: translateX(0);
}

.app-shell--nav-drawer .sidebar-toggle {
  display: inline-flex;
}

.app-shell--nav-drawer .topbar-brand {
  display: flex;
}

.app-shell.sidebar-open {
  overflow: hidden;
}

.app-shell.sidebar-open .main-wrap {
  overflow: hidden;
}

body.nav-drawer-open {
  overflow: hidden;
}

.main-wrap-full {
  grid-column: 1 / -1;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 24;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.app-shell.sidebar-open .sidebar-backdrop {
  display: block;
}

.sidebar {
  background: var(--chrome-bg);
  border-right: 1px solid var(--chrome-border);
  padding: 0;
  display: flex;
  flex-direction: column;
  z-index: 30;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
}

.brand {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid var(--chrome-border);
  background: rgba(0, 0, 0, 0.06);
}

.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  color: var(--chrome-text);
  line-height: 1.25;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--chrome-text-muted);
  font-weight: 400;
  margin-top: 0.125rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.75rem 0.65rem 1.25rem;
  flex: 1;
  overflow-y: auto;
}

.nav-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--chrome-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--chrome-text);
  text-decoration: none;
}

.nav-link.active {
  background: var(--chrome-active);
  color: var(--chrome-text);
  border-color: transparent;
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.main-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--page-bg);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--topbar-h);
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--chrome-border);
  background: var(--chrome-bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-spacer {
  flex: 1;
}

.topbar-fx {
  display: none;
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
  white-space: nowrap;
  margin-right: 0.35rem;
}

@media (min-width: 900px) {
  .topbar-fx {
    display: inline;
  }
}

.topbar-brand {
  display: none;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  margin-right: 0.25rem;
}

.topbar-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  border: 0;
  background: transparent;
}

.topbar-brand-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--chrome-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.sidebar-toggle {
  display: none;
  flex-shrink: 0;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
  height: 20px;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
}

.sidebar-toggle.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.sidebar-toggle.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.sidebar-toggle.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.topbar .lang-switch {
  border: 1px solid var(--chrome-border);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.topbar .lang-btn {
  color: var(--chrome-text-muted);
  border-right-color: var(--chrome-border);
}

.topbar .lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--chrome-text);
}

.topbar .lang-btn.active {
  background: var(--chrome-active);
  color: var(--chrome-text);
}

a.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-btn {
  padding: 0.35rem 0.65rem;
  border: 0;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.lang-btn:last-child {
  border-right: 0;
}

.lang-btn:hover {
  text-decoration: none;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--chrome-border);
}

.user-name {
  color: var(--chrome-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .btn-ghost {
  color: var(--chrome-text);
  border-color: var(--chrome-border);
  background: rgba(255, 255, 255, 0.06);
}

.topbar .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--chrome-text);
}

.topbar .user-avatar {
  background: rgba(255, 255, 255, 0.18);
  color: var(--chrome-text);
  border: 1px solid rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
}

.content {
  padding: 1.5rem 1.5rem 2rem;
  flex: 1;
  background: var(--page-bg);
}

.footer {
  padding: 0.875rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.footer-legal {
  display: flex;
  gap: 1rem;
}

.footer-legal a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--font-sans);
  font-weight: 600;
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.card.card--interactive:hover,
a.card:hover {
  border-color: var(--border-strong);
}

.card-title {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.two > .span-full {
  grid-column: 1 / -1;
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.kpis {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.mt {
  margin-top: 1rem;
}

.grid.kpis .card.kpi {
  padding: 1rem 1.15rem;
}

.kpi-label {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.375rem;
  letter-spacing: -0.02em;
}

.kpi-inline {
  font-size: 1.125rem;
  color: var(--accent);
  margin-top: 0.35rem;
  font-weight: 600;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-sm);
  margin: 0 -0.15rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th,
.table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-muted);
}

.table-wrap .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--surface-muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.muted {
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  border-color: #152d52;
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn-danger {
  background: var(--danger-bg);
  border-color: rgba(185, 28, 28, 0.35);
  color: var(--danger-text);
}

.btn-danger:hover {
  background: rgba(185, 28, 28, 0.15);
  color: #7f1d1d;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
}

.btn-block {
  width: 100%;
}

.input {
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

textarea.input {
  min-height: 88px;
  resize: vertical;
}

.input:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

select.input {
  cursor: pointer;
  appearance: auto;
}

.label {
  display: block;
  margin: 0.5rem 0 0.35rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 900px;
}

.monthly-costs-block {
  margin-top: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.field-fx {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  line-height: 1.3;
}

.form-section-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.form-section-hint {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
}

.monthly-total-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.monthly-total-label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.monthly-total-live {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.page-lead {
  margin: 0 0 1rem;
  max-width: 52rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.monthly-fleet-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.monthly-fleet-total-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.filters.card {
  padding: 1rem 1.15rem;
}

.inline-form {
  display: inline;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  vertical-align: middle;
  margin-right: 0.35rem;
}

.badge {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
}

.st-pending {
  background: var(--warning-bg);
  border-color: rgba(180, 83, 9, 0.35);
  color: var(--warning);
}

.st-confirmed {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}

.st-active {
  background: var(--success-bg);
  border-color: rgba(21, 128, 61, 0.35);
  color: var(--success);
}

.st-completed {
  background: #f1f5f9;
  color: var(--text-muted);
}

.st-cancelled {
  background: var(--danger-bg);
  border-color: rgba(185, 28, 28, 0.3);
  color: var(--danger-text);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  padding-top: 0.5rem;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.bar-col .bar {
  width: 100%;
}

.bar-label {
  font-size: 0.625rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.bar-value {
  font-size: 0.625rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.bar {
  flex: 1;
  background: var(--surface-muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  height: 130px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(26, 58, 108, 0.25) 100%);
  border-radius: 0 0 2px 2px;
}

.list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-plain li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.dl {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 0.4rem 1rem;
}

.dl dt {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.dl dd {
  margin: 0;
}

.th-thumb,
.th-swatch {
  width: 1%;
  white-space: nowrap;
}

.td-thumb {
  vertical-align: middle;
}

.td-swatch {
  vertical-align: middle;
}

.car-thumb-link {
  display: inline-block;
  line-height: 0;
  border-radius: var(--radius-sm);
  transition: opacity 0.12s ease, box-shadow 0.12s ease;
}

.car-thumb-link:hover {
  opacity: 0.92;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.car-thumb {
  display: block;
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.car-thumb--empty {
  width: 72px;
  height: 54px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: repeating-linear-gradient(
    -45deg,
    var(--surface-muted),
    var(--surface-muted) 4px,
    #e2e8f0 4px,
    #e2e8f0 5px
  );
}

.car-photo {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.car-preview {
  margin-top: 0.35rem;
  font-size: 0.875rem;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
}

.toast-success {
  background: var(--success-bg);
  border-color: rgba(15, 107, 69, 0.25);
  color: #0f6b45;
}

.toast-error {
  background: var(--danger-bg);
  border-color: rgba(185, 28, 28, 0.35);
  color: var(--danger-text);
}

/* ——— Login / auth ——— */
.auth-page {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 520px);
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  min-height: 100vh;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(155deg, #1a3a6c 0%, #0f2447 48%, #152d52 100%);
  color: #fff;
  overflow: hidden;
}

.auth-aside-glow {
  position: absolute;
  inset: -40% -20% auto -30%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(100, 180, 255, 0.22) 0%, transparent 65%);
  pointer-events: none;
}

.auth-aside-grid {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.auth-aside-logo-wrap {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  padding-inline: clamp(0.75rem, 3vw, 2rem);
}

.auth-aside-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(720px, 92%);
  max-width: 100%;
  padding: clamp(2.75rem, 7vw, 5.5rem) clamp(3rem, 9vw, 6.5rem);
  margin-inline: auto;
  border-radius: clamp(20px, 4vw, 32px);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@supports not (backdrop-filter: blur(1px)) {
  .auth-aside-logo-panel {
    background: rgba(255, 255, 255, 0.1);
  }
}

.auth-aside-brand {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  line-height: 0;
  text-decoration: none;
  color: inherit;
}

.auth-aside-logo {
  display: block;
  width: auto;
  height: clamp(14rem, 36vw, 22rem);
  max-width: min(360px, 72vw);
  margin-inline: auto;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.42));
}

.auth-aside-content {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  max-width: 28rem;
  padding-bottom: 0.5rem;
  text-align: left;
  flex-shrink: 0;
}

.auth-aside-headline {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #fff;
}

.auth-aside-tagline {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 22rem;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(180deg, #f8fafc 0%, var(--page-bg) 45%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 20px 50px -20px rgba(15, 23, 42, 0.12);
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-logo-frame {
  display: inline-flex;
  padding: 0.35rem;
  border-radius: 16px;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 1rem;
}

.auth-logo {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: contain;
  object-position: center;
}

.auth-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.625rem;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.2;
}

.auth-lead {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: center;
}

.auth-form {
  margin-top: 0;
  gap: 0.15rem;
}

.auth-field {
  margin-bottom: 1.1rem;
}

.auth-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.auth-input-field {
  padding-left: 2.75rem !important;
  min-height: 48px;
  border-radius: 10px;
  border-color: var(--border-strong);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input-field:hover {
  border-color: #94a3b8;
}

.auth-input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(26, 58, 108, 0.12);
}

.auth-input-field::placeholder {
  color: var(--text-faint);
}

.auth-submit {
  margin-top: 0.35rem;
  min-height: 48px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.auth-back-site {
  margin: 0.65rem 0 0;
}

.auth-back-site .btn {
  min-height: 44px;
  font-size: 0.875rem;
  border-radius: 10px;
}

.auth-footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.auth-footer .lang-switch {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.auth-footer .lang-btn.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    min-height: 200px;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    padding: 2rem 1.5rem;
  }

  .auth-aside-logo-wrap {
    flex: 0 0 auto;
    min-height: 0;
    padding-inline: 1rem;
  }

  .auth-aside-logo-panel {
    width: min(640px, 96%);
    padding: clamp(2rem, 8vw, 3.5rem) clamp(1.75rem, 6vw, 3rem);
    border-radius: 22px;
  }

  .auth-aside-content {
    align-self: center;
    padding-bottom: 0;
    max-width: none;
    text-align: center;
  }

  .auth-aside-logo {
    max-width: min(320px, 88vw);
    height: clamp(9rem, 36vw, 14rem);
  }

  .auth-aside-tagline {
    margin-left: auto;
    margin-right: auto;
    max-width: 22rem;
  }

  .auth-panel {
    padding: 1.25rem 1rem 2rem;
  }

  .auth-card {
    border-radius: 14px;
  }
}

.icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--chrome-border);
  color: var(--chrome-text);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.icon-btn svg {
  display: block;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tab {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.tab:hover {
  color: var(--text);
  background: #e2e8f0;
}

.tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(26, 58, 108, 0.08);
}

a.tab {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.calendar-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.calendar-root {
  min-height: 380px;
}

.cal-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-dow {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.35rem;
}

.cal-cell {
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  background: var(--surface-muted);
}

.cal-daynum {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.cal-event {
  font-size: 0.6875rem;
  padding: 3px 5px;
  border-radius: 4px;
  margin-top: 3px;
  cursor: pointer;
  border-left: 3px solid var(--accent-bright);
  background: var(--accent-muted);
}

.cal-event.st-pending {
  border-left-color: var(--warning);
  background: var(--warning-bg);
}

.cal-event.st-confirmed {
  border-left-color: var(--accent-bright);
}

.cal-event.st-active {
  border-left-color: var(--success);
  background: var(--success-bg);
}

.cal-event.st-completed {
  border-left-color: #64748b;
  background: #f1f5f9;
}

.cal-event.st-cancelled {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.week-grid {
  display: grid;
  grid-template-columns: 72px repeat(7, 1fr);
  gap: 4px;
  font-size: 0.78rem;
}

.week-hour {
  color: var(--text-muted);
  padding: 0.25rem;
}

.week-cell {
  border: 1px solid var(--border);
  min-height: 28px;
  border-radius: 4px;
  background: var(--surface-muted);
}

.day-list .day-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--surface-muted);
}

.gantt {
  overflow: auto;
}

.gantt-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.gantt-track {
  position: relative;
  height: 28px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.gantt-bar {
  position: absolute;
  top: 3px;
  height: 22px;
  border-radius: 4px;
  background: rgba(26, 58, 108, 0.25);
  border: 1px solid var(--accent);
  font-size: 0.7rem;
  padding: 2px 6px;
  overflow: hidden;
  white-space: nowrap;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  width: min(440px, 92vw);
  box-shadow: var(--shadow-md);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.suggest {
  position: relative;
}

#custSuggest {
  margin-top: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  max-height: 200px;
  overflow: auto;
  display: none;
}

.suggest-item {
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.suggest-item:hover {
  background: var(--surface-muted);
}

.hidden {
  display: none !important;
}

/* Fallback: mostra nome do hotel sem depender do JS em cache */
.field:has(#pickup_location_id option:checked[data-is-hotel="1"]) #pickup_hotel_wrap,
.field:has(#return_location_id option:checked[data-is-hotel="1"]) #return_hotel_wrap {
  display: block !important;
}

.actions {
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state .page-title {
  margin-bottom: 0.5rem;
}

/* Páginas sem login: barra superior navy + conteúdo branco */
.main-wrap-full .topbar {
  background: var(--chrome-bg);
  border-bottom-color: var(--chrome-border);
}

.main-wrap-full .content {
  background: var(--content-bg);
}

@media (max-width: 960px) {
  .app-shell:not(.app-shell--nav-drawer) {
    grid-template-columns: 1fr;
  }

  .app-shell:not(.app-shell--nav-drawer) .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(var(--sidebar-w), 88vw);
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-md);
  }

  .app-shell:not(.app-shell--nav-drawer) .sidebar.open {
    transform: translateX(0);
  }

  .content {
    padding: 1.125rem 1rem 1.5rem;
  }
}

/* LGPD / páginas legais */
.legal-wrap {
  max-width: 46rem;
}

.legal-title {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.legal-updated {
  margin: 0 0 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.legal-doc section {
  margin-bottom: 1.5rem;
}

.legal-doc h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text);
}

.legal-doc p,
.legal-doc li {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.legal-doc ul {
  padding-left: 1.25rem;
}

.legal-lang-note {
  padding: 0.75rem 1rem;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.875rem;
}

/* Aviso de cookies */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.94);
  color: #e2e8f0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.cookie-notice.cookie-notice--visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-notice-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.cookie-notice-title {
  margin: 0;
  width: 100%;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
}

.cookie-notice-text {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.cookie-notice-text a {
  color: #93c5fd;
  font-weight: 600;
}

.cookie-notice-btn {
  flex-shrink: 0;
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.cookie-notice-btn:hover {
  filter: brightness(1.08);
}

/* Login — LGPD */
.auth-privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-privacy-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.auth-privacy-check a {
  color: var(--accent);
  font-weight: 600;
}

.auth-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.auth-legal-links a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}

.auth-legal-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.auth-legal-sep {
  color: var(--text-faint);
  user-select: none;
}

.car-available {
  background: var(--success-bg);
  border-color: rgba(21, 128, 61, 0.35);
  color: var(--success);
}

.car-rented {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}

.car-maintenance {
  background: var(--warning-bg);
  border-color: rgba(180, 83, 9, 0.35);
  color: var(--warning);
}

.car-inactive {
  background: #f1f5f9;
  color: var(--text-muted);
}

.pay-unpaid {
  background: var(--danger-bg);
  border-color: rgba(185, 28, 28, 0.3);
  color: var(--danger-text);
}

.pay-partial {
  background: var(--warning-bg);
  border-color: rgba(180, 83, 9, 0.35);
  color: var(--warning);
}

.pay-paid {
  background: var(--success-bg);
  border-color: rgba(21, 128, 61, 0.35);
  color: var(--success);
}

.status-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.status-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.status-step.is-done {
  color: var(--text);
}

.status-step.is-current .status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 58, 108, 0.15);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.status-step.is-done .status-dot {
  background: var(--success);
}

.global-search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
  margin: 0 0.75rem;
}

.global-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  min-height: 38px;
}

.global-search-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.global-search-input:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 50;
  max-height: 280px;
  overflow: auto;
}

.search-item {
  display: block;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.search-item:hover {
  background: var(--surface-muted);
}

.search-type {
  display: inline-block;
  min-width: 4.5rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-right: 0.35rem;
}

.search-empty {
  padding: 0.75rem;
  font-size: 0.875rem;
}

.kpi-delta {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--success);
  font-weight: 600;
}

.empty-state-icon::before {
  content: '';
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--surface-muted);
  border: 1px dashed var(--border-strong);
}

.empty-state-title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  color: var(--text);
}

.empty-state-lead {
  max-width: 28rem;
  margin: 0 auto 1rem;
}

.week-grid-full {
  grid-template-columns: 48px repeat(7, 1fr);
}

.gantt-bar {
  cursor: pointer;
}

.gantt-bar-click:hover {
  filter: brightness(1.05);
}

.week-event {
  font-size: 0.6875rem;
  margin-bottom: 2px;
  cursor: pointer;
}

.week-more {
  font-size: 0.6875rem;
}

.setup-secret {
  word-break: break-all;
  padding: 0.75rem;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}

.quota-highlight {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.input-sm {
  max-width: 6rem;
  padding: 0.35rem 0.5rem;
}

/* ——— UI enhancements ——— */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.help-text {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.form-error {
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--danger-text);
  background: var(--danger-bg);
  border: 1px solid rgba(185, 28, 28, 0.25);
  border-radius: var(--radius-sm);
}

.form-section {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.form-section .form-section-title {
  margin: 0 0 0.85rem;
  padding: 0 0 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field .label {
  margin: 0;
}

.color-field-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.color-field-row input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 2px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
}

.badge-active {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(21, 128, 61, 0.25);
}

.badge-inactive {
  background: var(--surface-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.quick-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.kpi-icon svg {
  display: block;
}

.toast-dismiss {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.cal-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cal-cell--today {
  background: var(--accent-muted);
  outline: 2px solid var(--accent-bright);
  outline-offset: -2px;
}

.cal-loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-bright);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 0.35rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.calendar-root[aria-busy="true"] {
  opacity: 0.65;
  pointer-events: none;
}

.auth-otp-input {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 1.35rem;
  padding: 0.65rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .auth-input-field {
  padding-right: 2.5rem;
}

.auth-foot {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
}

.empty-state-icon--cars::before,
.empty-state-icon--calendar::before,
.empty-state-icon--users::before {
  border: 0;
  background: var(--accent-muted);
  mask-size: 28px;
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: var(--accent);
}

.empty-state-icon--cars::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Cpath d='M7 17h10M5 11l1-4h12l1 4M6 11h12v6H6z'/%3E%3C/svg%3E");
}

.empty-state-icon--calendar::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
}

.empty-state-icon--users::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.search-toggle-btn {
  display: none;
}

@media (max-width: 960px) {
  .user-name {
    display: none;
  }

  .search-toggle-btn {
    display: inline-flex;
  }

  .global-search-wrap:not(.is-open) .global-search-input,
  .global-search-wrap:not(.is-open) .global-search-results {
    display: none;
  }

  .global-search-wrap.is-open {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: calc(var(--topbar-h) + 4px);
    z-index: 50;
  }

  .global-search-wrap.is-open .global-search-input {
    width: 100%;
    box-shadow: var(--shadow-md);
  }

  .topbar {
    position: relative;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .table--responsive tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .table--responsive thead {
    display: none;
  }

  .table--responsive tbody td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    border: 0;
  }

  .table--responsive tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    flex-shrink: 0;
  }

  .table--responsive tbody td:last-child {
    justify-content: flex-end;
    padding-top: 0.5rem;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-muted) 25%, var(--border) 50%, var(--surface-muted) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s ease-in-out infinite;
  border-radius: var(--radius-sm);
  min-height: 1rem;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.breadcrumbs {
  margin-bottom: 1rem;
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breadcrumbs-item:not(:last-child)::after {
  content: '/';
  margin-left: 0.35rem;
  opacity: 0.5;
}

.breadcrumbs-item a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs-item a:hover {
  color: var(--primary);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--danger, #dc2626);
  color: #fff;
  vertical-align: middle;
}

.lead-prefill-banner {
  margin-bottom: 1rem;
}

.lead-prefill-banner p {
  margin: 0.35rem 0 0;
}

.btn.is-loading {
  opacity: 0.85;
  cursor: wait;
}

.btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.4em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.65s linear infinite;
  vertical-align: -0.08em;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}


.filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.user-menu {
  position: relative;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 12rem;
  padding: 0.75rem;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 40;
}

.user-menu-panel .user-name {
  color: var(--chrome-text);
  max-width: none;
}

.user-menu-toggle {
  padding: 0;
  background: transparent;
  border: none;
}

@media (min-width: 961px) {
  .user-menu-panel {
    position: static;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }

  .user-menu-panel[hidden] {
    display: flex !important;
  }

  .user-menu-toggle {
    display: none;
  }
}

/* ——— Dashboard ——— */
.dashboard-page {
  max-width: none;
  width: 100%;
}

.page-head--dashboard {
  align-items: flex-end;
  margin-bottom: 1.5rem;
  padding: 0 0 1.25rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-head--dashboard .page-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.dashboard-subtitle {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.quick-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-head--dashboard .btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.dashboard-alerts {
  margin-bottom: 1.5rem;
}

.dashboard-alerts .alert-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-bright);
  box-shadow: none;
}

.alert-banner--info {
  color: var(--text);
}

.alert-banner-body {
  flex: 1;
  min-width: 12rem;
}

.alert-banner-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 400;
}

.alert-banner-cta {
  margin-left: auto;
}

.alert-card--warn {
  border-left: 3px solid var(--warning);
}

.alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.alert-list li + li {
  border-top: 1px solid var(--border);
}

.alert-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  color: var(--text);
  text-decoration: none;
}

.alert-list a:hover {
  color: var(--accent-bright);
  text-decoration: none;
}

.alert-list-meta,
.alert-list-amount {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: right;
}

.alert-list-amount {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
}

.grid.kpis .card.kpi {
  border-top: 0;
  padding: 1rem 1.15rem;
}

.kpi-label {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 600;
  font-family: var(--font-sans);
}

.kpi--warn .kpi-value {
  color: var(--warning);
}

.bar-fill {
  background: var(--accent-bright);
  border-radius: 2px 2px 0 0;
}

.category-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.category-list li:last-child {
  border-bottom: 0;
}

.category-amount {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
}

.content .btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.content .btn-ghost:hover {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--text);
}

@media (max-width: 768px) {
  .page-head--dashboard {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-actions-bar .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .alert-banner-cta {
    margin-left: 0;
    width: 100%;
  }
}
