:root {
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-hover: #f8fafb;
  --muted-bg: #f1f4f6;
  --text: #19232e;
  --muted: #667586;
  --subtle: #7d8b99;
  --border: #e4e9ee;
  --strong-border: #d3dbe3;
  --accent: #0d6efd;
  --accent-hover: #0b5ed7;
  --accent-soft: #e8f0fe;
  --accent-text: #0958bd;
  --danger: #bb3c46;
  --danger-soft: #fff1f2;
  --focus: #0d6efd;
  --shadow: none;
  --action-blue: #1261b0;
  --action-blue-hover: #0b5096;
  --action-blue-soft: #eaf2fc;
  --action-blue-ink: #174e87;
  --action-blue-border: #b5cdeb;
  --action-green: #167347;
  --action-green-hover: #115b38;
  --action-green-soft: #eaf6ee;
  --action-green-ink: #145e3b;
  --action-green-border: #abd2ba;
  --action-amber: #9a6200;
  --action-amber-hover: #7d5000;
  --action-amber-soft: #fff6de;
  --action-amber-ink: #7c4e00;
  --action-amber-border: #e3ca8f;
  --action-teal: #087b80;
  --action-teal-hover: #056368;
  --action-teal-soft: #e6f5f5;
  --action-teal-ink: #08666c;
  --action-teal-border: #9fcfd1;
  --action-red: #b73143;
  --action-red-hover: #952538;
  --action-red-soft: #fff0f2;
  --action-red-ink: #a12539;
  --action-red-border: #e5b0b9;
  background: var(--bg);
  color: var(--text);
}
:root[data-theme='dark'] {
  --action-blue-soft: #1c3047;
  --action-blue-ink: #a4ccff;
  --action-blue-border: #3a597b;
  --action-green-soft: #1b3328;
  --action-green-ink: #92d9ae;
  --action-green-border: #395c48;
  --action-amber-soft: #392f1c;
  --action-amber-ink: #efcc7a;
  --action-amber-border: #695636;
  --action-teal-soft: #183438;
  --action-teal-ink: #8ed9dc;
  --action-teal-border: #365e62;
  --action-red-soft: #3a222b;
  --action-red-ink: #ffabb7;
  --action-red-border: #75404d;
  color-scheme: dark;
  --bg: #10151c;
  --surface: #171e27;
  --surface-hover: #1c2530;
  --muted-bg: #222c37;
  --text: #e5ebf1;
  --muted: #a1aebc;
  --subtle: #8999a9;
  --border: #293440;
  --strong-border: #3a4958;
  --accent: #0d6efd;
  --accent-hover: #3988fc;
  --accent-soft: #203451;
  --accent-text: #9dc4ff;
  --danger: #ff8b94;
  --danger-soft: #3a222b;
  --focus: #6ea8fe;
  --shadow: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
h1, h2, p { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; min-height: 38px; padding: 9px 14px; font-size: 12px; font-weight: 550; transition: background .15s, border-color .15s, box-shadow .15s; }
button svg { flex-shrink: 0; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 3px #0000000c; }
.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.secondary:hover:not(:disabled) { background: var(--muted-bg); border-color: var(--strong-border); }
.icon-button, .close-button { width: 34px; min-height: 34px; padding: 6px; background: transparent; color: var(--muted); }
.icon-button:hover, .close-button:hover { background: var(--muted-bg); color: var(--text); }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; font-weight: 750; font-size: 22px; letter-spacing: -.9px; }
.brand-icon { height: 34px; width: 34px; padding: 6px; color: #fff; background: #168468; border-radius: 10px; box-shadow: inset 0 1px 1px #ffffff30; display: grid; place-items: center; }
.brand-icon svg { width: 100%; height: 100%; }
.brand-period { color: #35b68c; }
.app { min-height: 100vh; }
.sidebar { width: 236px; position: fixed; inset: 0 auto 0 0; background: var(--surface); border-right: 1px solid var(--border); padding: 32px 18px 16px; display: flex; flex-direction: column; color: var(--muted); z-index: 5; }
.sidebar .brand { color: var(--text); padding: 0 12px; }
.sidebar-section { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--subtle); margin: 50px 12px 12px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; font-size: 12px; text-decoration: none; color: var(--muted); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); border: 1px solid color-mix(in srgb, var(--accent-text) 20%, transparent); }
.nav-count { font-size: 10px; padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); margin-left: auto; color: var(--accent-text); }
.sidebar-theme { margin-top: auto; padding: 20px 0; }
.theme-toggle { background: transparent; color: var(--muted); padding: 8px 10px; min-height: 36px; font-size: 11px; }
.theme-toggle:hover { background: var(--muted-bg); color: var(--text); }
.sidebar .theme-toggle { color: var(--muted); width: 100%; justify-content: flex-start; }
.sidebar .theme-toggle:hover { background: var(--muted-bg); color: var(--text); }
.sidebar-account { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 18px 4px 0; }
.sidebar-account .avatar { background: var(--accent-soft); color: var(--accent-text); min-width: 32px; height: 32px; font-size: 11px; }
.sidebar-account>div { min-width: 0; flex: 1; }
.sidebar-account strong { color: var(--text); display: block; font-size: 11px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account div>span { font-size: 10px; color: var(--muted); display: block; margin-top: 5px; }
.sidebar-account .icon-button { color: var(--muted); }
.sidebar-account .icon-button:hover { background: var(--muted-bg); }
.workspace-shell { margin-left: 236px; }
.topbar { min-height: 68px; border-bottom: 1px solid var(--border); background: var(--surface); padding: 12px 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.breadcrumb { display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--muted); }
.breadcrumb>span { color: var(--strong-border); }
.breadcrumb strong { font-weight: 500; color: var(--text); }
.account { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.account-dot { width: 6px; height: 6px; border-radius: 50%; background: #23a77d; }
.account .theme-toggle { display: none; }
main { max-width: 1440px; margin: 0 auto; padding: 42px 38px; }
h1 { font-size: 26px; letter-spacing: -.9px; font-weight: 650; line-height: 1.3; }
h2 { font-size: 14px; font-weight: 600; letter-spacing: -.25px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.title-row { display: flex; align-items: center; gap: 12px; }
.heading-icon { display: grid; place-items: center; height: 36px; width: 36px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; color: var(--muted); }
.count { font-size: 11px; font-weight: 500; border-radius: 6px; background: var(--muted-bg); border: 1px solid var(--border); padding: 3px 8px; color: var(--muted); }
.list-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 2px 4px #00000003; overflow: hidden; }
.list-toolbar { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.search-field { display: flex; align-items: center; position: relative; width: 300px; }
.search-field>svg { position: absolute; left: 12px; color: var(--subtle); pointer-events: none; }
input:not([type=checkbox]), select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--strong-border); background: var(--surface); color: var(--text); border-radius: 7px; outline: none; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--subtle); opacity: 1; }
input:focus, select:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 15%, transparent); }
.search-field input { height: 36px; padding-left: 38px; border-color: var(--border); background: var(--bg); }
select.role-filter { width: 160px; height: 36px; font-size: 11px; border-color: var(--border); cursor: pointer; }
.results-count { margin-left: auto; font-size: 10px; color: var(--muted); white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { font-size: 10px; font-weight: 550; color: var(--muted); padding: 13px 22px; background: var(--surface-hover); white-space: nowrap; }
td { border-top: 1px solid var(--border); padding: 18px 22px; font-size: 12px; color: var(--muted); }
tbody tr:hover { background: var(--surface-hover); }
th:last-child, td:last-child { text-align: right; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.avatar { height: 36px; min-width: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; }
.user-cell strong { display: block; color: var(--text); font-weight: 550; font-size: 12px; }
.user-cell div>span { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.page-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; font-size: 10px; font-weight: 500; border: 1px solid var(--border); border-radius: 6px; background: var(--muted-bg); color: var(--muted); white-space: nowrap; }
.page-badge>span { height: 5px; width: 5px; border-radius: 50%; background: currentColor; }
.role-admin { color: var(--accent-text); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent-text) 20%, transparent); }
.role-manager { color: #697cc6; background: color-mix(in srgb, #697cc6 10%, var(--surface)); border-color: color-mix(in srgb, #697cc6 25%, transparent); }
:root[data-theme='dark'] .role-manager { color: #b6bfff; }
.actions { display: flex; gap: 8px; justify-content: flex-end; }
td .actions button { min-height: 30px; font-size: 10px; padding: 6px 9px; border-color: transparent; background: transparent; }
td .actions button svg { width: 14px; height: 14px; }
td .actions .secondary { color: var(--muted); }
td .actions .secondary:hover { color: var(--text); background: var(--muted-bg); }
.delete-button { color: var(--danger); }
.delete-button:hover { background: var(--danger-soft); }
.empty { padding: 65px 24px; display: flex; flex-direction: column; align-items: center; gap: 15px; text-align: center; }
.empty-icon { width: 50px; height: 50px; background: var(--muted-bg); color: var(--subtle); border: 1px solid var(--border); border-radius: 14px; display: grid; place-items: center; margin-bottom: 5px; }
.empty-icon svg { height: 22px; width: 22px; }
.empty p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.empty>.primary { margin-top: 5px; }
.success { padding: 12px 16px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent-text) 20%, transparent); color: var(--accent-text); border-radius: 8px; font-size: 12px; margin-bottom: 20px; }
dialog { color: var(--text); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
dialog::backdrop { background: #08101c80; backdrop-filter: blur(5px); }
.user-modal { padding: 0; width: 640px; max-width: calc(100vw - 32px); max-height: 90dvh; border-radius: 16px; }
.modal-heading { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px; border-bottom: 1px solid var(--border); }
.modal-heading>div { display: flex; align-items: center; gap: 12px; }
.modal-icon, .login-symbol { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); border: 1px solid color-mix(in srgb, var(--accent-text) 15%, transparent); }
.modal-heading h2 { font-size: 17px; font-weight: 600; letter-spacing: -.5px; }
.user-modal fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.user-modal section { padding: 24px 28px; }
.user-modal section+section { border-top: 1px solid var(--border); }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.step { font-size: 9px; font-weight: 600; color: var(--subtle); background: var(--muted-bg); padding: 5px 6px; border-radius: 5px; }
.section-heading h2 { font-size: 12px; font-weight: 600; }
.section-heading p { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, label.field { color: var(--text); font-size: 11px; font-weight: 550; }
label.field input, label.field select, label.field textarea { font-weight: 400; }
input[aria-invalid=true] { border-color: var(--danger); }
.error { color: var(--danger); font-size: 10px; line-height: 1.7; }
.check { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); margin-top: 18px; cursor: pointer; }
.check input { width: 13px; height: 13px; accent-color: var(--accent); }
.form-footer { display: flex; justify-content: flex-end; padding: 18px 28px; background: var(--surface-hover); border-top: 1px solid var(--border); }
.notice { background: var(--danger-soft); color: var(--danger); padding: 12px 15px; margin: 0 28px 20px; border-radius: 7px; font-size: 11px; line-height: 1.7; }
.delete-modal { width: 420px; max-width: calc(100vw - 32px); padding: 28px; border-radius: 16px; }
.delete-icon { height: 42px; width: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--danger); background: var(--danger-soft); margin-bottom: 20px; }
.delete-modal h2 { font-size: 19px; letter-spacing: -.5px; }
.delete-modal p { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 12px 0 26px; overflow-wrap: anywhere; }
.delete-modal p.error { color: var(--danger); }
.danger { color: #fff; background: #bd3646; }
.danger:hover { background: #a62c3a; }
.login-layout { min-height: 100dvh; background: var(--bg); background-image: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 65%); }
.login-header { height: 92px; padding: 24px 42px; display: flex; align-items: center; justify-content: space-between; }
.login-main { min-height: calc(100dvh - 92px); padding: 24px 20px 90px; display: flex; justify-content: center; align-items: center; }
.login-form { width: 400px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); }
.login-symbol { width: 46px; height: 46px; border-radius: 13px; margin-bottom: 23px; }
.login-symbol svg { width: 23px; height: 23px; }
.login-form h1 { font-size: 24px; font-weight: 600; letter-spacing: -.8px; margin-bottom: 28px; }
.login-form .field { margin-bottom: 20px; }
.login-form input { height: 44px; }
.password-toggle { padding: 0; min-height: 25px; font-size: 10px; color: var(--muted); background: transparent; }
.password-toggle svg { width: 14px; height: 14px; }
.password-toggle:hover { color: var(--text); }
.login-submit { width: 100%; justify-content: space-between; height: 44px; margin-top: 24px; }
.login-help { font-size: 10px; line-height: 1.9; text-align: center; color: var(--muted); margin-top: 24px; padding-top: 21px; border-top: 1px solid var(--border); }
.login-error { background: var(--danger-soft); color: var(--danger); font-size: 11px; line-height: 1.7; padding: 12px; border-radius: 7px; margin: 16px 0; }
.login-error button { margin-top: 8px; }
.session-loading { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
@media(min-width:1600px) { .workspace-shell main { padding-top: 60px; } }
@media(max-width:1100px) { .sidebar { width: 210px; } .workspace-shell { margin-left: 210px; } .topbar { padding: 12px 24px; } main { padding: 32px 24px; } td, th { padding-left: 16px; padding-right: 16px; } }
@media(max-width:850px) { .sidebar { width: 72px; padding: 24px 12px 14px; align-items: center; } .sidebar .brand { padding: 0; } .sidebar .brand>span:last-child, .sidebar-section, .nav-count, .sidebar-account>div, .sidebar-account .avatar { display: none; } .sidebar nav { margin-top: 38px; } .nav-item { font-size: 0; padding: 13px; gap: 0; } .nav-item svg { height: 20px; width: 20px; } .sidebar-account { padding-top: 14px; } .sidebar .theme-toggle>span { display: none; } .sidebar-theme { padding-bottom: 14px; } .workspace-shell { margin-left: 72px; } td .actions button { font-size: 0; gap: 0; } td .actions button svg { width: 16px; height: 16px; } }
@media(max-width:768px) { .sidebar { display: none; } .workspace-shell { margin-left: 0; } .topbar { min-height: 58px; padding: 10px 16px; } .breadcrumb { font-size: 10px; gap: 8px; } .breadcrumb strong { display: none; } .breadcrumb>span { display: none; } .account { gap: 5px; font-size: 0; } .account-dot { display: none; } .account .theme-toggle { display: inline-flex; } .account .theme-toggle>span { display: none; } main { padding: 26px 16px; } .page-heading { margin-bottom: 20px; gap: 10px; } h1 { font-size: 23px; } .title-row { gap: 8px; } .heading-icon { display: none; } .page-heading .primary { font-size: 11px; padding: 9px 10px; } .list-toolbar { padding: 14px; gap: 10px; flex-wrap: wrap; } .search-field { width: 100%; } select.role-filter { width: 160px; } .results-count { font-size: 10px; } table { min-width: 570px; } th, td { padding: 15px; } .form-grid { grid-template-columns: 1fr; gap: 17px; } .user-modal section { padding: 20px; } .modal-heading { padding: 20px; } .modal-heading h2 { font-size: 16px; } .form-footer { padding: 16px 20px; } .notice { margin: 0 20px 20px; } .user-modal { max-height: 92dvh; } .login-header { padding: 20px; height: 80px; } .login-header .brand { font-size: 20px; } .login-header .theme-toggle>span { display: none; } .login-main { min-height: calc(100dvh - 80px); padding: 24px 20px 55px; } .login-form { padding: 28px 24px; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.profile-main { display: grid; place-items: center; min-height: calc(100dvh - 68px); }
.profile-card { width: 420px; max-width: 100%; padding: 36px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.profile-card>.avatar { width: 52px; height: 52px; font-size: 20px; margin-bottom: 22px; }
.profile-card h1 { font-size: 22px; overflow-wrap: anywhere; }
.profile-card>p { color: var(--muted); font-size: 12px; margin: 10px 0 20px; overflow-wrap: anywhere; }
.profile-note { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.profile-note svg { flex-shrink: 0; margin-top: 2px; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-navigation { display: none; }
.home-welcome { display: flex; align-items: center; gap: 18px; padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.home-welcome>.avatar { width: 48px; height: 48px; min-width: 48px; font-size: 18px; }
.home-welcome h2 { font-size: 20px; font-weight: 600; letter-spacing: -.6px; }
.home-welcome p { font-size: 12px; color: var(--muted); margin-top: 8px; overflow-wrap: anywhere; }
.home-welcome>div { min-width: 0; }
.home-welcome>.page-badge { margin-left: auto; }
.home-shortcuts { margin-top: 32px; }
.home-shortcuts>h2 { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.shortcut-card { display: flex; align-items: center; gap: 16px; padding: 22px; width: 360px; max-width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; text-decoration: none; color: var(--text); transition: border-color .15s, background .15s; }
.shortcut-card:hover { border-color: var(--focus); background: var(--surface-hover); }
.shortcut-card p { font-size: 11px; color: var(--muted); margin-top: 6px; }
.shortcut-card>svg { margin-left: auto; color: var(--muted); flex-shrink: 0; }
@media(max-width:768px) { .mobile-navigation { display: flex; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--surface); } .mobile-navigation .nav-item { font-size: 11px; padding: 8px 12px; gap: 8px; color: var(--muted); } .mobile-navigation .nav-item.active { color: var(--accent-text); background: var(--accent-soft); border-color: var(--border); } .mobile-navigation .nav-item svg { width: 16px; height: 16px; } .home-welcome { padding: 20px; flex-wrap: wrap; gap: 14px; } .home-welcome>.page-badge { margin-left: 62px; } .home-welcome h2 { font-size: 18px; } }
.header-navigation { display: flex; align-items: center; gap: 16px; }
.nav-item[href='#inicio'] { --menu-icon: #2475d0; }
.nav-item[href='#clientes'] { --menu-icon: #198754; }
.nav-item[href='#veiculos'] { --menu-icon: #cf6818; }
.nav-item[href='#planos'] { --menu-icon: #936b08; }
.nav-item[href='#contratos'] { --menu-icon: #8755ba; }
.nav-item[href='#contas-receber'] { --menu-icon: #07838c; }
.nav-item[href='#configuracoes'] { --menu-icon: #657080; }
.nav-item>svg { color: var(--menu-icon); }
:root[data-theme='dark'] .nav-item[href='#inicio'] { --menu-icon: #72adf2; }
:root[data-theme='dark'] .nav-item[href='#clientes'] { --menu-icon: #63c995; }
:root[data-theme='dark'] .nav-item[href='#veiculos'] { --menu-icon: #f5a364; }
:root[data-theme='dark'] .nav-item[href='#planos'] { --menu-icon: #e7be50; }
:root[data-theme='dark'] .nav-item[href='#contratos'] { --menu-icon: #bf96eb; }
:root[data-theme='dark'] .nav-item[href='#contas-receber'] { --menu-icon: #62c8ce; }
:root[data-theme='dark'] .nav-item[href='#configuracoes'] { --menu-icon: #b1bac6; }
.sidebar-toggle { color: var(--muted); }
.sidebar, .workspace-shell { transition: width .2s ease, margin-left .2s ease, transform .2s ease; }
.sidebar-collapsed .sidebar { width: 72px; padding: 24px 12px 14px; align-items: center; }
.sidebar-collapsed .workspace-shell { margin-left: 72px; }
.sidebar-collapsed .sidebar .brand { padding: 0; }
.sidebar-collapsed .sidebar .brand>span:last-child,
.sidebar-collapsed .sidebar-section,
.sidebar-collapsed .sidebar-account>div,
.sidebar-collapsed .sidebar-account .avatar,
.sidebar-collapsed .sidebar .theme-toggle>span { display: none; }
.sidebar-collapsed .sidebar nav { margin-top: 38px; }
.sidebar-collapsed .nav-item { font-size: 0; padding: 13px; gap: 0; }
.sidebar-collapsed .nav-item svg { height: 20px; width: 20px; }
.sidebar-collapsed .sidebar-account { padding-top: 14px; }
.sidebar-collapsed .sidebar-theme { padding-bottom: 14px; }
.sidebar-backdrop { display: none; }
@media(min-width:769px) and (max-width:850px) {
  .app:not(.sidebar-collapsed) .sidebar { width: 210px; padding: 32px 18px 16px; align-items: stretch; }
  .app:not(.sidebar-collapsed) .workspace-shell { margin-left: 210px; }
  .app:not(.sidebar-collapsed) .sidebar .brand { padding: 0 12px; }
  .app:not(.sidebar-collapsed) .sidebar .brand>span:last-child { display: inline; }
  .app:not(.sidebar-collapsed) .sidebar-section,
  .app:not(.sidebar-collapsed) .sidebar-account>div,
  .app:not(.sidebar-collapsed) .sidebar .theme-toggle>span { display: block; }
  .app:not(.sidebar-collapsed) .sidebar-account .avatar { display: grid; }
  .app:not(.sidebar-collapsed) .sidebar nav { margin-top: 0; }
  .app:not(.sidebar-collapsed) .nav-item { font-size: 12px; padding: 12px; gap: 12px; }
}
@media(max-width:768px) {
  .app .workspace-shell { margin-left: 0; }
  .header-navigation { gap: 10px; }
  .mobile-navigation { display: none; }
  .app .sidebar { display: flex; width: 236px; padding: 28px 18px 16px; align-items: stretch; transform: translateX(-100%); visibility: hidden; z-index: 30; }
  .sidebar-mobile-open .sidebar { transform: translateX(0); visibility: visible; }
  .app .sidebar .brand { padding: 0 12px; }
  .app .sidebar .brand>span:last-child { display: inline; }
  .app .sidebar-section, .app .sidebar-account>div, .app .sidebar .theme-toggle>span { display: block; }
  .app .sidebar-account .avatar { display: grid; }
  .app .sidebar nav { margin-top: 0; }
  .app .sidebar .nav-item { font-size: 12px; padding: 12px; gap: 12px; }
  .sidebar-mobile-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: #08101c80; border: 0; border-radius: 0; z-index: 20; padding: 0; }
}
.full-width { grid-column: 1 / -1; }
textarea { width: 100%; border: 1px solid var(--strong-border); background: var(--surface); color: var(--text); border-radius: 7px; padding: 12px; font: inherit; font-size: 12px; resize: vertical; outline: none; min-height: 82px; }
textarea::placeholder { color: var(--subtle); }
textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 15%, transparent); }
textarea[aria-invalid=true] { border-color: var(--danger); }
.search-field .customer-search { padding-left: 12px; }
.customer-contact { display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.customers-table .actions button { font-size: 11px; }
.shortcut-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.pagination { border-top: 1px solid var(--border); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); }
.pagination-summary, .pagination-summary label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.pagination-summary { gap: 20px; }
.pagination-summary select { width: 62px; height: 30px; font-size: 10px; border-color: var(--border); padding: 0 8px; }
.pagination-controls, .pagination-page { display: flex; align-items: center; gap: 5px; }
.pagination-controls button { min-width: 30px; min-height: 30px; padding: 5px 8px; font-size: 11px; }
.pagination-current { color: var(--accent-text); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent-text) 25%, transparent); }
.pagination-gap { color: var(--muted); padding: 0 4px; }
@media(max-width:768px) { .pagination { padding: 14px; flex-wrap: wrap; justify-content: center; gap: 14px; } .pagination-summary { width: 100%; justify-content: space-between; } }
.customer-modal { width: 760px; }
.customer-tabs { display: flex; gap: 4px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--surface-hover); }
.customer-tabs button { background: transparent; color: var(--muted); font-size: 11px; }
.customer-tabs .tab-active { background: var(--surface); border-color: var(--border); color: var(--accent-text); box-shadow: 0 1px 3px #00000008; }
.document-enable { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; margin-bottom: 20px; cursor: pointer; }
.document-enable input { accent-color: var(--accent); }
.document-card { border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: var(--surface); }
.document-card+.document-card { margin-top: 20px; }
.document-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.document-card-heading h2 { font-size: 16px; }
.document-values { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.document-values dt { font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.document-values dd { font-size: 12px; margin: 0; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.document-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.document-history { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; }
.document-history summary { font-size: 11px; color: var(--muted); cursor: pointer; line-height: 1.8; }
.document-version { margin-top: 12px; padding: 14px; background: var(--surface-hover); border: 1px solid var(--border); border-radius: 8px; }
.document-version summary>span { color: var(--text); font-weight: 500; }
.document-version time { display: block; font-size: 10px; margin-top: 4px; }
.document-author { font-size: 10px; color: var(--muted); }
.document-help { font-size: 11px; color: var(--muted); line-height: 1.8; margin: 16px 0 20px; }
.document-editor-actions { margin-top: 24px; }
.document-editor fieldset { border: 0; padding: 0; margin: 0; }
select[aria-invalid=true] { border-color: var(--danger); }
@media(max-width:768px) { .customer-tabs { padding: 10px 16px; } .document-card { padding: 16px; } .document-values { grid-template-columns: 1fr; } }
.document-type-selector { max-width: 260px; margin-bottom: 24px; }
.wizard-steps { display: flex; list-style: none; margin: 0; padding: 20px 28px; gap: 14px; border-bottom: 1px solid var(--border); background: var(--surface-hover); }
.wizard-steps li { flex: 1; }
.wizard-steps button { width: 100%; justify-content: flex-start; gap: 9px; padding: 0; background: transparent; color: var(--muted); font-size: 11px; }
.wizard-steps button:disabled { cursor: default; }
.wizard-steps button>span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); font-size: 11px; }
.wizard-steps .current button { color: var(--accent-text); font-weight: 600; }
.wizard-steps .current button>span { color: #fff; border-color: var(--accent); background: var(--accent); }
.wizard-steps .completed button>span { color: var(--accent-text); background: var(--accent-soft); }
.wizard-footer { position: sticky; bottom: 0; align-items: center; justify-content: space-between; z-index: 2; }
.wizard-progress { color: var(--muted); font-size: 10px; }
.review-heading { display: flex; align-items: center; justify-content: space-between; }
.review-heading button { font-size: 10px; min-height: 30px; padding: 6px 10px; }
.review-document { border: 1px solid var(--border); border-radius: 9px; padding: 18px; margin-top: 16px; }
.review-document>strong { font-size: 12px; }
.review-document .document-values { margin-bottom: 0; }
.document-drafts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.document-draft { display: inline-flex; border: 1px solid var(--border); background: var(--accent-soft); border-radius: 6px; }
.document-draft button { background: transparent; color: var(--accent-text); font-size: 10px; min-height: 28px; padding: 5px 10px; }
@media(max-width:768px) { .wizard-steps { padding: 16px 20px; gap: 8px; } .wizard-steps button { flex-direction: column; font-size: 10px; align-items: center; gap: 6px; } .wizard-footer { gap: 10px; } }
.document-add-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.document-collection>.section-heading { justify-content: space-between; }
.added-document-list { display: grid; gap: 10px; }
.added-document-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); background: var(--surface-hover); border-radius: 10px; }
.added-document-type { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 600; border-radius: 9px; }
.added-document-info { flex: 1; min-width: 0; }
.added-document-info strong { display: block; font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.added-document-info>span { display: block; font-size: 10px; color: var(--muted); line-height: 1.7; margin-top: 5px; }
.added-document-card button { font-size: 10px; min-height: 30px; padding: 6px 10px; }
.document-entry-panel { padding-top: 24px; }
.document-entry-panel .document-type-selector { max-width: none; }
.added-document-list:empty+.document-entry-panel { padding-top: 0; }
.document-add-actions { gap: 10px; }
@media(max-width:768px) { .added-document-card { flex-wrap: wrap; gap: 12px; } .added-document-card>.actions { width: 100%; padding-left: 54px; justify-content: flex-start; } }
.contact-fields { margin-top: 20px; }
.contact-checks { display: flex; flex-wrap: wrap; gap: 24px; }
.contact-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.contact-inactive { opacity: .75; }
.contacts-collection fieldset { border: 0; padding: 0; margin: 0; }
.contact-summary { border: 1px solid var(--border); padding: 16px; border-radius: 8px; margin: 12px 0 20px; }
.contact-summary strong { font-size: 12px; }
.contact-summary p { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
.record-viewer { width: 1020px; }
.record-view-content { padding: 24px; }
.view-card { padding: 22px; background: var(--surface-hover); border: 1px solid var(--border); border-radius: 12px; }
.view-card>h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.record-history-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; margin-top: 18px; }
.view-history-item { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; margin-top: 16px; }
.view-record-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.view-record-heading strong { font-size: 12px; overflow-wrap: anywhere; }
.view-history-item .document-values { margin-bottom: 0; }
.view-history-toggle { margin-top: 16px; }
.record-viewer>.form-footer { position: sticky; bottom: 0; }
.customer-tabs { flex-wrap: wrap; }
@media(max-width:768px) { .record-history-grid { grid-template-columns: 1fr; } .record-view-content { padding: 16px; } .view-card { padding: 16px; } }

.wizard-steps { flex-wrap: wrap; }
.wizard-steps li { min-width: 90px; }
.customer-modal [hidden] { display: none !important; }

.history-modal { width: 720px; max-height: min(720px, 90dvh); overflow: hidden; padding: 0; }
.history-modal[open] { display: flex; flex-direction: column; }
.history-modal .modal-heading, .history-modal .form-footer { flex-shrink: 0; }
.history-modal-body { padding: 20px; overflow-y: auto; min-height: 0; }
.history-search { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; }
.history-results { display: grid; gap: 8px; margin-top: 16px; }
.history-result { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; background: var(--surface-hover); color: var(--text); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.history-result:hover { border-color: var(--muted); }
.history-result>span:first-child { flex: 1; min-width: 0; }
.history-result strong, .history-result small { display: block; overflow-wrap: anywhere; }
.history-result small { margin-top: 6px; color: var(--muted); font-size: 11px; }
@media(max-width:768px) { .history-search { grid-template-columns: 1fr; } .history-modal-body { padding: 16px; } }

.vehicle-modal { width: 840px; }
.vehicle-detail-section + .vehicle-detail-section { margin-top: 24px; }
.vehicle-detail-section h2 { font-size: 15px; }

.catalog-search { margin-top: 24px; }
.catalog-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; overflow-wrap: anywhere; }
.catalog-row span { color: var(--muted); }
.catalog-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 16px; font-size: 12px; }
.catalog-form-help { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 24px 0; }

.settings-navigation { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.settings-navigation a { padding: 10px 14px; font-size: 12px; text-decoration: none; color: var(--muted); border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.settings-navigation a.active { color: var(--accent-text); background: var(--accent-soft); }
.catalog-page { padding: 24px; }
.catalog-page .customer-tabs { padding: 0 0 16px; margin-bottom: 20px; background: transparent; }
.catalog-page fieldset { border: 0; padding: 0; margin: 0; }
@media(max-width:768px) { .catalog-page { padding: 16px; } }

.catalog-toolbar { flex-wrap: wrap; }
.catalog-toolbar .search-field { flex: 1 1 240px; min-width: 0; }
.catalog-entry-modal { width: 480px; }
.catalog-entry-fields { display: grid; gap: 20px; }
.catalog-table { min-width: 360px; }

.sidebar .sidebar-toggle { position: absolute; top: 32px; right: 10px; width: 28px; min-height: 34px; padding: 5px; margin: 0; background: transparent; border: 0; }
.sidebar-toggle svg { transition: transform .2s ease; }
.sidebar-collapsed .sidebar .sidebar-toggle { position: static; margin-top: 16px; }
.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar-collapsed .sidebar .sidebar-toggle { align-self: center; }
.sidebar-mobile-trigger { display: none; }
@media(max-width:768px) {
 .sidebar-mobile-trigger { display: flex; position: fixed; left: 0; top: 72px; z-index: 10; background: var(--surface); border: 1px solid var(--border); border-radius: 0 8px 8px 0; box-shadow: var(--shadow); }
 .sidebar-mobile-open .sidebar-mobile-trigger { display: none; }
 .app .sidebar .sidebar-toggle { align-self: flex-end; }
}

/* Flat administrative surfaces and semantic colors. */
button, input:not([type=checkbox]), select, textarea,
.brand-icon, .nav-item, .nav-count, .heading-icon, .count,
.list-card, .avatar, .page-badge, .empty-icon, .success,
.user-modal, .delete-modal, .modal-icon, .login-symbol, .step,
.notice, .delete-icon, .login-form, .shortcut-card, .document-card,
.document-version, .review-document, .document-draft,
.added-document-card, .added-document-type, .contact-summary,
.view-card, .view-history-item, .history-result, .catalog-row,
.settings-navigation a, .sidebar-mobile-trigger, .home-welcome,
.profile-card, .login-error { border-radius: 0; }
.brand, h1, h2, .modal-heading h2, .delete-modal h2,
.home-welcome h2, .sidebar-section { letter-spacing: 0; }
.primary, .brand-icon, .list-card, .login-form, dialog,
.customer-tabs .tab-active, .sidebar-mobile-trigger { box-shadow: none; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  color: var(--muted);
}
.sidebar .brand { color: var(--text); padding-left: 8px; gap: 8px; font-size: 20px; }
.brand-icon { background: #198754; }
.brand-period { color: #198754; }
.sidebar .brand-period { color: #198754; }
.sidebar-section { color: var(--subtle); }
.sidebar .nav-item { color: var(--muted); border: 0; }
.sidebar .nav-item:hover { background: var(--muted-bg); color: var(--text); }
.sidebar .nav-item.active { background: var(--accent-soft); color: var(--accent-text); border-left: 3px solid var(--accent); padding-left: 9px; }
.sidebar .theme-toggle, .sidebar .sidebar-toggle,
.sidebar-account .icon-button { color: var(--muted); }
.sidebar .theme-toggle:hover, .sidebar .sidebar-toggle:hover,
.sidebar-account .icon-button:hover { background: var(--muted-bg); color: var(--text); }
.sidebar-account { border-color: var(--border); }
.sidebar-account strong { color: var(--text); }
.sidebar-account div>span { color: var(--muted); }
.sidebar-account .avatar { background: var(--muted-bg); color: var(--text); }
.avatar { width: 36px; overflow: hidden; flex-shrink: 0; }
.sidebar-account .profile-link .avatar { width: 32px; min-width: 32px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-link { flex: 1; min-width: 0; background: transparent; color: var(--text); justify-content: flex-start; padding: 4px; text-align: left; gap: 10px; }
.profile-link:hover { background: var(--muted-bg); }
.profile-label { min-width: 0; }
.profile-label>span { display: block; font-size: 10px; color: var(--muted); margin-top: 5px; }
.sidebar-collapsed .profile-label { display: none; }
.sidebar-collapsed .sidebar-account { flex-direction: column; gap: 8px; }
.sidebar-collapsed .sidebar-account .profile-link .avatar { display: grid; }
.profile-avatar-field { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.profile-avatar-field>.avatar { width: 72px; height: 72px; font-size: 26px; }
.profile-avatar-field>.field { flex: 1; }
.profile-avatar-field input[type=file] { padding: 8px; height: auto; }
@media(max-width:768px) {
  .app .sidebar-account .profile-label { display: block; }
  .app .sidebar-account { flex-direction: row; }
  .profile-avatar-field { gap: 12px; }
}
.topbar { min-height: 60px; }
main { padding-top: 30px; }
h1 { font-size: 28px; font-weight: 500; }
.page-heading { margin-bottom: 24px; }
.heading-icon { border: 0; background: transparent; color: var(--accent); }
.list-card { border: 0; }
.list-toolbar { background: var(--surface); }
th { background: var(--muted-bg); font-size: 11px; font-weight: 600; }
td { padding-top: 15px; padding-bottom: 15px; }
.avatar { background: #e8eef7; color: #365980; }
:root[data-theme='dark'] .avatar { background: #2d3d50; color: #c3d9f1; }
.role-admin { background: #0d6efd; color: #fff; border-color: transparent; }
.role-manager { background: #ffc107; color: #332800; border-color: transparent; }
:root[data-theme='dark'] .role-manager { color: #332800; }
.role-operator { background: #6c757d; color: #fff; border-color: transparent; }
.success { background: #d1e7dd; border: 0; border-left: 4px solid #198754; color: #0f5132; }
:root[data-theme='dark'] .success { background: #19372b; color: #a3cfbb; }
.login-layout { background-image: none; }
.login-form { border: 0; border-top: 3px solid var(--accent); }
dialog::backdrop { backdrop-filter: none; }
.home-welcome { background: transparent; border: 0; padding: 0 0 24px; border-bottom: 1px solid var(--border); }
.home-welcome>.avatar { border-radius: 0; }
.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.shortcut-card { --tile: #0d6efd; width: auto; min-height: 124px; background: var(--tile); border: 0; color: #fff; padding: 24px; }
.shortcut-card:nth-child(2) { --tile: #198754; }
.shortcut-card:nth-child(3) { --tile: #ffc107; color: #332800; }
.shortcut-card:hover { background: var(--tile); filter: brightness(.94); }
.shortcut-card .modal-icon { width: 42px; height: 42px; background: transparent; border: 0; color: inherit; flex-shrink: 0; }
.shortcut-card .modal-icon svg { width: 28px; height: 28px; }
.shortcut-card h2 { font-size: 18px; font-weight: 500; }
.shortcut-card p { color: inherit; line-height: 1.5; }
.shortcut-card>svg { color: inherit; }
.document-card, .view-card { border: 0; border-top: 2px solid var(--strong-border); }
.customer-tabs .tab-active { border-color: transparent; border-bottom: 2px solid var(--accent); }
.sidebar-collapsed .sidebar .nav-item.active { padding-left: 10px; }
@media(min-width:769px) and (max-width:1100px) {
  .app:not(.sidebar-collapsed) .sidebar .brand { padding-left: 0; font-size: 18px; gap: 6px; }
  .app:not(.sidebar-collapsed) .sidebar .sidebar-toggle { right: 4px; width: 24px; }
}
@media(max-width:768px) {
  .app .sidebar .sidebar-toggle { position: absolute; top: 28px; right: 10px; margin: 0; }
  .app .sidebar .sidebar-toggle svg { transform: none; }
  h1 { font-size: 23px; }
  .app .sidebar .nav-item.active { padding-left: 9px; }
  .home-welcome { padding: 0 0 20px; }
  .shortcut-card { min-height: 108px; padding: 20px; }
}

@media(max-width:768px) {
  .app .workspace-shell { min-width: 0; margin-left: 0; }
  .app .topbar { min-height: 60px; padding: 8px 12px; gap: 8px; }
  .header-navigation { min-width: 0; gap: 10px; }
  .topbar .sidebar-mobile-trigger { position: static; display: inline-flex; width: 44px; height: 44px; flex-shrink: 0; background: transparent; border: 0; }
  .breadcrumb { font-size: 13px; }
  .app .sidebar { width: min(280px, calc(100vw - 48px)); height: 100dvh; padding: 24px 16px max(16px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
  .app .sidebar .brand { font-size: 20px; gap: 10px; padding: 0 8px; flex-shrink: 0; }
  .app .sidebar .sidebar-toggle { top: 24px; right: 12px; width: 44px; min-height: 44px; }
  .app .sidebar-section { margin: 32px 12px 12px; }
  .app .sidebar nav { gap: 4px; margin-top: 0; }
  .app .sidebar .nav-item { min-height: 44px; flex-shrink: 0; font-size: 14px; }
  .app .sidebar-theme { padding: 16px 0 10px; }
  .app .sidebar .theme-toggle { min-height: 44px; font-size: 13px; }
  .app .sidebar-account { flex-shrink: 0; padding: 12px 0 0; gap: 8px; }
  .app .profile-link { min-height: 44px; }
  .app .profile-label { flex: 1; min-width: 0; }
  .app .sidebar-account strong { font-size: 12px; }
  .app .sidebar-account .icon-button { width: 44px; min-height: 44px; flex-shrink: 0; }
  .workspace-shell main { padding: 20px 12px; }
  .page-heading { flex-wrap: wrap; align-items: center; gap: 12px; }
  .title-row { min-width: 0; flex-wrap: wrap; }
  .page-heading h1 { font-size: 23px; overflow-wrap: anywhere; }
  .page-heading>.actions { flex-wrap: wrap; }
  .page-heading .primary { min-height: 44px; }
  .list-card, .table-scroll { max-width: 100%; min-width: 0; }
  .list-toolbar { gap: 12px; }
  .list-toolbar .search-field { width: 100%; flex: 1 1 100%; min-width: 0; }
  .list-toolbar select.role-filter { flex: 1 1 180px; width: auto; min-width: 0; height: 44px; font-size: 13px; }
  .search-field input { height: 44px; }
  input:not([type=checkbox]), select, textarea { font-size: 16px; }
  .results-count { font-size: 11px; }
  td .actions { gap: 6px; }
  td .actions button, .customers-table .actions button { min-height: 44px; font-size: 12px; padding: 8px; }
  td .actions button svg { width: 16px; height: 16px; }
  .pagination-summary { flex-wrap: wrap; gap: 12px; }
  .pagination-controls { flex-wrap: wrap; justify-content: center; }
  .pagination-controls button { min-width: 40px; min-height: 44px; }
  .home-welcome { gap: 12px; }
  .home-welcome>div { flex: 1; min-width: 0; }
  .home-welcome>.page-badge { margin-left: 0; }
  .user-modal { width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; overflow-x: hidden; }
  .modal-heading { gap: 12px; padding: 16px; }
  .modal-heading>div { min-width: 0; }
  .modal-heading h2 { overflow-wrap: anywhere; }
  .close-button { width: 44px; min-height: 44px; flex-shrink: 0; }
  .user-modal section { padding: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-footer { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .form-footer .actions { flex-wrap: wrap; width: 100%; }
  .form-footer button { min-height: 44px; flex: 1 1 110px; }
  .wizard-progress { width: 100%; }
  .wizard-steps { padding: 12px; gap: 8px; }
  .wizard-steps li { min-width: 0; flex: 1 1 80px; }
  .customer-tabs { padding: 8px; gap: 4px; }
  .customer-tabs button { min-height: 44px; flex: 1 1 80px; }
  .document-card-heading, .review-heading { flex-wrap: wrap; }
  .document-buttons, .document-add-actions, .document-editor-actions { flex-wrap: wrap; }
  .profile-avatar-field { align-items: flex-start; }
  .profile-avatar-field>.avatar { width: 56px; min-width: 56px; height: 56px; }
  .profile-avatar-field>.field { min-width: 0; }
  .delete-modal { padding: 20px; }
}

.plan-history-title { margin-top: 24px; margin-bottom: 16px; font-size: 15px; }
.plan-history-table { min-width: 500px; }

.plans-table .actions button { font-size: 11px; }

.plan-vehicles-modal { width: 800px; }
.plan-vehicles-summary { display: grid; gap: 6px; padding: 16px 20px; }
.plan-vehicles-toolbar { display: flex; gap: 12px; padding: 0 20px 16px; flex-wrap: wrap; }
.plan-vehicles-toolbar .search-field { flex: 1 1 250px; min-width: 0; }
.plan-vehicles-body { padding-top: 0; }
.plan-vehicles-page-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.plan-vehicle-list { display: grid; gap: 8px; }
.plan-vehicle-option { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.plan-vehicle-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.plan-vehicle-option>input { width: 18px; height: 18px; flex-shrink: 0; }
.plan-vehicle-option>span:nth-child(2) { flex: 1; min-width: 0; }
.plan-vehicle-option strong, .plan-vehicle-option small { display: block; overflow-wrap: anywhere; }
.plan-vehicle-option small { margin-top: 6px; font-size: 11px; color: var(--muted); }
.plan-vehicles-modal .pagination { flex-shrink: 0; }
.plan-vehicles-modal .form-footer { gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

.billing-section { margin-bottom: 24px; }
.billing-panel { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; }
.billing-panel .field { min-width: 220px; }
.billing-panel .primary { margin-bottom: 4px; }
.billing-totals { display: flex; flex-wrap: wrap; gap: 24px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.confirmation-modal { width: 520px; }
.contract-modal { width: 1020px; max-width: calc(100vw - 32px); }
.confirmation-symbol { color: #bd830b; flex-shrink: 0; }
:root[data-theme='dark'] .confirmation-symbol { color: #e7be50; }
.confirmation-message { padding: 24px 28px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.confirmation-message p+p { margin-top: 16px; }
.combobox-input { position: relative; }
.combobox-input input { padding-right: 36px; }
.combobox-input>svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.combobox-dropdown { border: 1px solid var(--strong-border); background: var(--surface); margin-top: -8px; }
.combobox-options { max-height: min(220px, 30dvh); overflow-y: auto; overscroll-behavior: contain; }
.combobox-option { padding: 12px; min-height: 44px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
.combobox-option.is-active, .combobox-option:hover, .combobox-option[aria-selected=true] { background: var(--accent-soft); color: var(--accent-text); }
.combobox-status { padding: 12px; font-size: 12px; color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.combobox-pagination { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

html:has(.app), body:has(.app) { height: 100%; overflow: hidden; }
.app { height: 100dvh; min-height: 0; overflow: hidden; }
.app .workspace-shell { height: 100%; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.app .topbar { flex-shrink: 0; }
.app .workspace-shell main { width: 100%; min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: auto; overscroll-behavior: contain; }
.app main>.page-heading, .app main>.success, .app main>.notice,
.app main>.billing-section, .app main>.home-welcome { flex-shrink: 0; }
.app main>.list-card { display: flex; flex-direction: column; min-width: 0; min-height: 160px; flex: 1; }
.app main>.list-card>.table-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.app main>.list-card>.empty { min-height: 0; overflow: auto; flex: 1; }
.list-toolbar, .pagination, .billing-totals { flex-shrink: 0; }
.list-toolbar { flex-wrap: wrap; }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; }
.app .sidebar { overflow-y: auto; overscroll-behavior: contain; }
.app .sidebar nav { flex-shrink: 0; }
.app .sidebar-account { flex-shrink: 0; }
.button-action-icon { width: 16px; height: 16px; flex-shrink: 0; }
.user-modal { overflow-y: auto; overscroll-behavior: contain; }
.user-modal>.modal-heading { position: sticky; top: 0; z-index: 3; background: var(--surface); }
.user-modal .form-footer { position: sticky; bottom: 0; z-index: 3; }
@media(max-width:768px) {
  .app main>.list-card { min-height: 200px; }
  .billing-panel .field { min-width: 0; flex: 1 1 180px; }
  .billing-totals { gap: 8px 16px; padding: 12px; font-size: 12px; }
  .app main>.billing-section { margin-bottom: 16px; }
  .app .workspace-shell main { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .form-footer button { overflow-wrap: anywhere; }
}

.finance-tabs { margin-bottom: 20px; }
.navigation-group { flex-shrink: 0; }
.navigation-group+.navigation-group { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.navigation-group-label { padding: 8px 12px 4px; font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--subtle); }
.app:not(.sidebar-collapsed) .sidebar .navigation-group .nav-item { min-height: 34px; padding-top: 8px; padding-bottom: 8px; }
.sidebar-collapsed .navigation-group-label { display: none; }
.sidebar nav { min-height: 0; flex: 1; margin-top: 24px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.app .sidebar nav { flex-shrink: 1; }
.sidebar-section { margin-top: 30px; }
.sidebar-theme { margin-top: 0; flex-shrink: 0; }
.nav-item[href='#recebimentos'] { --menu-icon: #198754; }
.nav-item[href='#despesas'] { --menu-icon: #936b08; }
.nav-item[href='#contas-pagar'] { --menu-icon: #b94c5a; }
.nav-item[href='#pagamentos'] { --menu-icon: #07838c; }
.nav-item[href='#multas'] { --menu-icon: #cf6818; }
:root[data-theme='dark'] .nav-item[href='#recebimentos'] { --menu-icon: #63c995; }
:root[data-theme='dark'] .nav-item[href='#despesas'] { --menu-icon: #e7be50; }
:root[data-theme='dark'] .nav-item[href='#contas-pagar'] { --menu-icon: #ef8996; }
:root[data-theme='dark'] .nav-item[href='#pagamentos'] { --menu-icon: #62c8ce; }
:root[data-theme='dark'] .nav-item[href='#multas'] { --menu-icon: #f5a364; }
.list-toolbar>.results-count { font-size: 11px; }
.list-card>.table-scroll>p, .list-card>p[role=status] { padding: 32px 20px; text-align: center; font-size: 13px; color: var(--muted); }
.billing-totals { font-size: 12px; line-height: 1.6; }
.user-modal .actions { flex-wrap: wrap; }
.user-modal .form-footer { gap: 12px; }
.user-modal .form-footer>button { min-height: 40px; }
.user-modal section>p, .user-modal section>details { font-size: 12px; line-height: 1.7; }
.user-modal section>p+p { margin-top: 8px; }
.expense-workspace .expense-file-preview { border-radius: 0; }
.expense-workspace section>h2 { margin: 20px 0 12px; }
.expense-workspace section>p { margin: 12px 0; }
.expense-selector+.form-grid { margin-top: 16px; }
.expense-options { border: 1px solid var(--border); padding: 6px; }
.expense-options button { justify-content: flex-start; text-align: left; width: 100%; }
@media(max-width:768px) {
  .app .navigation-group-label { display: block; }
  .app:not(.sidebar-collapsed) .sidebar .navigation-group .nav-item, .app.sidebar-collapsed .sidebar .navigation-group .nav-item { min-height: 44px; padding-top: 12px; padding-bottom: 12px; }
  .app .sidebar nav { flex: 1; min-height: 0; margin-top: 20px; overflow-y: auto; }
  .app .sidebar .sidebar-section { margin-top: 24px; }
  .page-heading>.actions { width: 100%; justify-content: flex-start; }
  .page-heading>.actions>button { flex: 1 1 140px; }
  .expense-workspace { padding: 0 16px; }
}
.expense-workspace{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:16px;padding:0 24px}.expense-workspace>div,.expense-workspace>aside{min-width:0}.expense-workspace section{padding:18px 0}.expense-workspace aside{position:sticky;top:0;align-self:start}.expense-file-preview{width:100%;height:430px;object-fit:contain;border:1px solid var(--border);border-radius:8px;margin-top:12px}.expense-item{border-top:1px solid var(--border)}.expense-options{display:flex;flex-wrap:wrap;gap:6px;max-height:150px;overflow:auto;margin:8px 0}.expense-selector .actions{flex-wrap:wrap}.expense-item details{margin-top:18px}.expense-item summary{cursor:pointer;font-weight:600;margin:12px 0}.expense-evidence .actions{flex-wrap:wrap;overflow-wrap:anywhere}.expense-evidence a{display:block;margin:12px 0}.finance-tabs{flex-wrap:wrap}.expense-workspace .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.expense-workspace input,.expense-workspace select{min-width:0;width:100%}
@media(max-width:900px){.expense-workspace{grid-template-columns:minmax(0,1fr)}.expense-workspace aside{position:static;order:-1}.expense-file-preview{height:250px}.expense-workspace .form-grid{grid-template-columns:minmax(0,1fr)}}
.km-due{color:#b42318;background:#fff0ec}.km-soon{color:#8a5700;background:#fff6df}.km-ok{color:#087547;background:#e9f8ef}.km-no_reference{color:#667085;background:#f2f4f7}

.catalog-inline-entry { padding: 12px; border: 1px solid var(--border); display: grid; gap: 12px; }
.catalog-inline-entry label { display: grid; gap: 8px; }

.expense-contract-toggle { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 40px; font-size: 13px; font-weight: 600; cursor: pointer; }
.expense-contract-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

.fine-form section > h2 { margin-bottom: 16px; }
.fine-form .fine-extra-fields { margin-top: 16px; }
.fine-form details > summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }

/* Financial row actions keep their contrast on the transparent table background. */
td .actions .primary { color: var(--accent-text); }
td .actions .primary:hover { color: var(--accent-hover); background: var(--accent-soft); }

/* Action colors follow the shared icon vocabulary; destructive classes take precedence. */
button:is(.primary,.secondary,.delete-button,.danger) {
  --button-solid: var(--action-blue);
  --button-hover: var(--action-blue-hover);
  --button-soft: var(--action-blue-soft);
  --button-ink: var(--action-blue-ink);
  --button-border: var(--action-blue-border);
}
button:has(>.button-action-icon:is([data-button-icon=save],[data-button-icon=check])) {
  --button-solid: var(--action-green); --button-hover: var(--action-green-hover);
  --button-soft: var(--action-green-soft); --button-ink: var(--action-green-ink); --button-border: var(--action-green-border);
}
button:has(>.button-action-icon[data-button-icon=edit]) {
  --button-solid: var(--action-amber); --button-hover: var(--action-amber-hover);
  --button-soft: var(--action-amber-soft); --button-ink: var(--action-amber-ink); --button-border: var(--action-amber-border);
}
button:has(>.button-action-icon:is([data-button-icon=receipt],[data-button-icon=car],[data-button-icon=calendar],[data-button-icon=link])) {
  --button-solid: var(--action-teal); --button-hover: var(--action-teal-hover);
  --button-soft: var(--action-teal-soft); --button-ink: var(--action-teal-ink); --button-border: var(--action-teal-border);
}
button:is(.danger,.delete-button), button:is(.danger,.delete-button):has(>.button-action-icon), button.secondary:has(>.button-action-icon[data-button-icon=trash]) {
  --button-solid: var(--action-red); --button-hover: var(--action-red-hover);
  --button-soft: var(--action-red-soft); --button-ink: var(--action-red-ink); --button-border: var(--action-red-border);
}
button.primary, button.danger { background: var(--button-solid); border-color: var(--button-solid); color: #fff; }
button.primary:hover:not(:disabled), button.danger:hover:not(:disabled) { background: var(--button-hover); border-color: var(--button-hover); }
button.secondary:has(>.button-action-icon):not(:has(>.button-action-icon:is([data-button-icon=close],[data-button-icon=back],[data-button-icon=next]))), button.delete-button {
  background: var(--button-soft); border-color: var(--button-border); color: var(--button-ink);
}
button.secondary:has(>.button-action-icon):not(:has(>.button-action-icon:is([data-button-icon=close],[data-button-icon=back],[data-button-icon=next]))):hover:not(:disabled), button.delete-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--button-ink) 12%, var(--button-soft)); border-color: var(--button-ink); color: var(--button-ink);
}
td .actions button.primary { background: var(--button-soft); border-color: var(--button-border); color: var(--button-ink); }
td .actions button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--button-ink) 12%, var(--button-soft)); color: var(--button-ink); border-color: var(--button-ink); }

@media(min-width:769px) {
  .app.sidebar-collapsed .sidebar { padding: 12px 12px 8px; overflow: hidden; }
  .app.sidebar-collapsed .sidebar>*, .app.sidebar-collapsed .sidebar-account>* { max-width: 100%; }
  .app.sidebar-collapsed .sidebar .brand, .app.sidebar-collapsed .sidebar .sidebar-toggle { flex-shrink: 0; }
  .app.sidebar-collapsed .sidebar .sidebar-toggle { margin-top: 6px; min-height: 28px; height: 28px; }
  .app.sidebar-collapsed .sidebar nav { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 2px; width: 100%; margin-top: 6px; overflow: visible; justify-items: center; }
  .app.sidebar-collapsed .sidebar .navigation-group { display: contents; }
  .app.sidebar-collapsed .sidebar .navigation-group-label { display: none; }
  .app.sidebar-collapsed .sidebar .nav-item { width: 44px; height: 100%; max-height: 40px; min-height: 0; padding: 0; justify-content: center; align-self: center; }
  .app.sidebar-collapsed .sidebar .nav-item svg { width: 18px; height: 18px; }
  .app.sidebar-collapsed .sidebar .navigation-group+.navigation-group>.nav-item:first-of-type { border-top: 1px solid var(--border); }
  .app.sidebar-collapsed .sidebar-theme { padding: 4px 0; }
  .app.sidebar-collapsed .sidebar .theme-toggle { min-height: 28px; height: 28px; padding: 4px 8px; }
  .app.sidebar-collapsed .sidebar-account { width: 100%; padding: 4px 0 0; gap: 2px; }
  .app.sidebar-collapsed .sidebar-account .profile-link { flex: none; height: 34px; min-height: 34px; padding: 0; justify-content: center; }
  .app.sidebar-collapsed .sidebar-account .icon-button { min-height: 28px; height: 28px; padding: 4px; }
}
