:root {
    --blue-950: #071b33;
    --blue-900: #0b2d52;
    --blue-700: #145ea8;
    --blue-100: #eaf3ff;
    --line: #d9e3ef;
    --text: #10243d;
    --muted: #63748a;
    --white: #fff;
    --green: #1f9d64;
    --orange: #d97706;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: #f5f8fc;
}
body.sidebar-collapsed .sidebar { width: 86px; padding-inline: 14px; }
body.sidebar-collapsed .main { margin-left: 86px; }
body.sidebar-collapsed .nav-text { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
body.sidebar-collapsed .brand { justify-content: center; }
body.sidebar-collapsed .brand-mark { margin: 0; }
body.sidebar-collapsed .sidebar a,
body.sidebar-collapsed .sidebar .nav-logout-form button { justify-content: center; padding-inline: 10px; }
body.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }
a { color: inherit; text-decoration: none; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    background: var(--blue-950);
    color: var(--white);
    padding: 28px 20px;
    transition: width .2s ease, padding .2s ease;
}
.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 28px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 20px;
    font-weight: 800;
}
.brand-mark, .nav-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .03em;
}
.brand-mark {
    background: var(--blue-700);
}
.nav-text {
    white-space: nowrap;
    transition: opacity .15s ease, width .15s ease;
}
.sidebar-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    transition: transform .2s ease;
}
.sidebar nav { display: grid; gap: 8px; }
.sidebar a,
.sidebar .nav-logout-form button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #d8e8ff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.nav-logout-form { display: block; margin: 0; }
.sidebar a:hover,
.sidebar .nav-logout-form button:hover { background: rgba(255,255,255,.08); color: #fff; }
.main { margin-left: 260px; padding: 34px; transition: margin-left .2s ease; }
.auth-main {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue-950), var(--blue-700));
}
.login-card {
    width: min(430px, calc(100vw - 28px));
    background: var(--white);
    padding: 34px;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
}
h1, h2 { margin: 0; }
p { color: var(--muted); line-height: 1.55; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 700; }
label small { color: var(--muted); font-weight: 600; }
label.has-error input,
label.has-error select,
label.has-error textarea {
    border-color: #dc2626;
    background: #fff7f7;
}
.field-error {
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 13px;
    font: inherit;
}
input.is-loading { background: #fff8e6; }
button, .button {
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    background: var(--blue-700);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
button.small {
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 12px;
}
.button.secondary { background: var(--blue-100); color: var(--blue-900); }
.alert {
    padding: 12px;
    border-radius: 10px;
    background: #fff1f1;
    color: #9f1239;
}
.notice {
    padding: 12px;
    border-radius: 10px;
    background: #e9f9f1;
    color: #166534;
    margin-bottom: 16px;
    font-weight: 700;
}
.page-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 26px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.autofill-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.report-export-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.eyebrow {
    color: var(--blue-700);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12px;
    font-weight: 900;
}
.page-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 16px;
    max-width: 760px;
}
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.card, .panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(16,36,61,.06);
}
.card { padding: 16px 18px; }
.card span { color: var(--muted); font-weight: 700; }
.card strong { display: block; margin-top: 8px; font-size: 28px; }
.card strong.card-text { font-size: 20px; line-height: 1.2; }
.panel { padding: 22px; margin-bottom: 20px; }
.billing-page-section {
    margin-bottom: 26px;
}
.billing-page-section.table-wrap {
    padding-top: 2px;
}
.billing-page-section + .billing-page-section {
    margin-top: 4px;
}
.compact-panel { padding: 16px; }
.form-panel { max-width: 980px; }
.company-form-panel { max-width: 1120px; }
.tenant-form-panel,
.tenant-onboarding-panel { max-width: 1120px; }
.tenant-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}
.tenant-form-actions button {
    min-width: 150px;
}
.tenant-linked-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.tenant-linked-grid h2 {
    font-size: 18px;
    margin-bottom: 12px;
}
.mini-table {
    display: grid;
    gap: 8px;
}
.mini-table div {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfdff;
}
.mini-table strong,
.mini-table span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mini-table span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.help-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.help-index {
    position: sticky;
    top: 18px;
}
.help-index h2 {
    font-size: 18px;
    margin-bottom: 12px;
}
.help-index nav {
    display: grid;
    gap: 8px;
}
.help-index a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    padding: 9px 10px;
    border-radius: 10px;
    background: #f4f8ff;
    border: 1px solid var(--line);
}
.help-index a:hover {
    background: #e8f2ff;
    color: var(--blue-700);
}
.help-content {
    display: grid;
    gap: 16px;
}
.help-section {
    margin-bottom: 0;
}
.help-section h2 {
    margin-bottom: 12px;
    font-size: 22px;
}
.help-section ul {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
}
.help-section li {
    line-height: 1.5;
}
.company-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}
.company-form-grid label {
    min-width: 0;
}
.billing-help {
    grid-column: 1 / -1;
    border: 1px solid #c7ddf8;
    border-radius: 12px;
    background: #f7fbff;
    padding: 10px 12px;
}
.billing-help summary {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--blue-100);
    color: var(--blue-900);
    cursor: pointer;
    font-weight: 900;
}
.billing-help summary::marker {
    color: var(--blue-700);
}
.billing-help div {
    margin-top: 12px;
    color: var(--muted);
    font-weight: 600;
}
.billing-help p {
    margin: 0 0 8px;
}
.billing-help ul {
    margin: 0 0 8px 18px;
    padding: 0;
}
.billing-help li {
    margin: 5px 0;
}
.billing-help strong {
    color: var(--blue-900);
}
.company-yards-field {
    grid-row: span 2;
}
.company-form-actions {
    align-self: end;
}
.company-form-actions button {
    width: auto;
    min-width: 160px;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(7,27,51,.55);
}
.modal-backdrop.is-open { display: grid; }
.modal-card {
    width: min(940px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 28px 80px rgba(7,27,51,.28);
    padding: 22px;
}
.modal-full { grid-column: 1 / -1; }
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.compact-heading {
    margin-bottom: 12px;
}
.stack-form { gap: 22px; }
.form-section {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    background: #fbfdff;
}
.form-section h3 {
    margin: 0 0 14px;
    color: var(--blue-900);
}
.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.filters {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
.ops-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 14px;
    background: #334155;
    color: #fff;
    border-radius: 12px;
}
.ops-toolbar strong {
    font-size: 24px;
}
.ops-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.ops-search {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ops-search input,
.ops-search select {
    min-width: 260px;
    height: 34px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}
.ops-search select {
    min-width: 76px;
    background: #fff;
}
.ops-search button,
.ops-search-clear {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}
.ops-search-clear {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .24);
}
.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 10px;
    padding: 7px 9px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.status-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text);
    font-weight: 700;
    font-size: 12px;
}
.legend-dot {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    display: inline-block;
    background: var(--blue-100);
}
.legend-dot.cadastrado { background: #d9df42; }
.legend-dot.agendado { background: #dbeafe; }
.legend-dot.dentro_patio { background: #d8dbe0; }
.legend-dot.liberacao_solicitada { background: #60bdf8; }
.legend-dot.em_transito { background: #fb7185; }
.legend-dot.baixado { background: #0b8f18; }
.legend-dot.cancelado { background: #ef4444; }
.report-filters { grid-template-columns: repeat(7, minmax(130px, 1fr)) auto; }
.audit-filters { grid-template-columns: repeat(6, minmax(135px, 1fr)) auto; }
.filter-field {
    display: grid;
    gap: 6px;
    font-weight: 700;
    align-self: end;
}
.filter-field > span {
    display: block;
}
.filter-field small {
    display: none;
}
.filter-dropdown {
    position: relative;
}
.filter-dropdown summary {
    width: 100%;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 13px;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
}
.filter-dropdown summary::after {
    content: "▾";
    color: var(--muted);
    font-size: 12px;
}
.filter-dropdown[open] summary {
    border-color: #b7d3f5;
    box-shadow: 0 0 0 3px rgba(20,94,168,.08);
}
.filter-dropdown-menu {
    position: absolute;
    z-index: 20;
    inset: calc(100% + 6px) 0 auto 0;
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(16,36,61,.16);
}
.filter-dropdown-menu .checkline {
    align-self: auto;
    padding: 6px 8px;
    border-radius: 8px;
}
.filter-clear {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    background: var(--blue-100);
    color: var(--blue-900);
    text-align: left;
    font-size: 13px;
}
.filter-dropdown-menu .checkline:hover,
.filter-clear:hover {
    background: var(--blue-100);
}
.filter-actions {
    display: flex;
    gap: 8px;
}
.checkline {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: end;
}
.checkline input { width: auto; }
.small-link {
    display: inline-block;
    padding: 7px 10px;
    font-size: 12px;
}
.small-link.is-disabled {
    pointer-events: none;
    opacity: .55;
}
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-weight: 800;
}
.pagination-bar div {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.page-summary-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-weight: 800;
}
.page-summary-bar strong {
    color: var(--blue-900);
}
.page-summary-bar span {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--blue-100);
    color: var(--blue-900);
    font-size: 13px;
}
.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.profile-grid div, .mfa-secret {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fbfdff;
}
.profile-grid span, .mfa-secret span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}
.mfa-secret strong { font-size: 20px; letter-spacing: .08em; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.billing-help,
.billing-methods {
    grid-column: 1 / -1;
}
.billing-help {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fbfdff;
}
.billing-help summary {
    cursor: pointer;
    font-weight: 900;
    color: var(--blue-900);
}
.billing-help p,
.billing-help li {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.billing-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
}
.billing-methods-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 4px;
}
.billing-methods-title strong {
    color: var(--blue-900);
    font-size: 15px;
    font-weight: 900;
}
.billing-methods-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}
.billing-method-picker {
    display: grid;
    grid-template-columns: minmax(260px, 420px) auto;
    gap: 10px;
    align-items: end;
    padding-bottom: 4px;
}
.billing-method-picker button {
    min-height: 45px;
}
.billing-method {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.billing-method.is-enabled {
    border-color: #7eb6ea;
    background: #f4f9ff;
    box-shadow: 0 10px 24px rgba(12, 84, 160, .08);
}
.billing-method-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    margin: 0;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 900;
    color: var(--blue-900);
}
.billing-method-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.billing-method.is-enabled .billing-method-toggle {
    color: #fff;
    background: var(--blue-700);
}
.billing-method-toggle span {
    flex: 1;
}
.billing-method-toggle button {
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 8px;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}
.billing-method-body {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 4px 2px;
}
select[multiple] {
    min-height: 86px;
    padding: 8px 10px;
}
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}
tr.row-danger td {
    background: #fee2e2;
    color: #7f1d1d;
}
td small {
    display: block;
    margin-top: 3px;
    color: inherit;
    opacity: .78;
    font-weight: 700;
}
.ops-table th,
.ops-table td {
    padding: 12px 10px;
    font-size: 12px;
    border-right: 1px solid rgba(255,255,255,.65);
    vertical-align: middle;
    line-height: 1.35;
    text-align: center;
}
.ops-table {
    table-layout: fixed;
    min-width: 1320px;
}
.appointments-table {
    min-width: 920px;
}
.ops-table th {
    background: #dce8f7;
    color: #062246;
    font-size: 12px;
    font-weight: 900;
}
.ops-table .col-actions { width: 64px; }
.ops-table .col-status { width: 112px; }
.ops-table .col-plate { width: 86px; }
.ops-table .col-trailer { width: 86px; }
.ops-table .col-bitrem { width: 70px; }
.ops-table .col-company { width: 145px; }
.ops-table .col-yard { width: 90px; }
.ops-table .col-driver { width: 150px; }
.ops-table .col-phone { width: 120px; }
.ops-table .col-date { width: 140px; }
.ops-table .col-movement { width: 145px; }
.ops-table .col-arrival-forecast { width: 160px; }
.ops-table .col-authorized-at { width: 145px; }
.appointments-table .col-status { width: 120px; }
.appointments-table .col-plate { width: 120px; }
.appointments-table .col-trailer { width: 110px; }
.appointments-table .col-bitrem { width: 80px; }
.appointments-table .col-company { width: 150px; }
.appointments-table .col-yard { width: 110px; }
.appointments-table .col-date { width: 170px; }
.appointments-table .col-actions { width: 120px; }
.companies-table {
    table-layout: fixed;
    min-width: 1950px;
}
.companies-table .col-company-name { width: 150px; }
.companies-table .col-tenant { width: 160px; }
.companies-table .col-document { width: 155px; }
.companies-table .col-rule { width: 170px; }
.companies-table .col-money { width: 115px; }
.companies-table .col-quota { width: 115px; }
.companies-table .col-company-status { width: 145px; }
.companies-table .col-actions { width: 95px; }
.tenants-table {
    table-layout: fixed;
    min-width: 1540px;
}
.tenants-table .col-tenant-name { width: 170px; }
.tenants-table .col-document { width: 145px; }
.tenants-table .col-billing-email { width: 210px; }
.tenants-table .col-address { width: 260px; }
.tenants-table .col-count { width: 80px; }
.tenants-table .col-admins { width: 200px; }
.tenants-table .col-status { width: 110px; }
.tenants-table .col-reason { width: 145px; }
.tenants-table .col-actions { width: 95px; }
.users-table {
    table-layout: fixed;
    min-width: 1280px;
}
.users-table .col-user-name { width: 170px; }
.users-table .col-username { width: 130px; }
.users-table .col-user-email { width: 220px; }
.users-table .col-role { width: 160px; }
.users-table .col-tenant { width: 160px; }
.users-table .col-company { width: 150px; }
.users-table .col-yards { width: 180px; }
.users-table .col-mfa { width: 95px; }
.users-table .col-actions { width: 95px; }
.yards-table {
    table-layout: fixed;
    min-width: 1040px;
}
.yards-table .col-yard-name { width: 170px; }
.yards-table .col-tenant { width: 170px; }
.yards-table .col-capacity { width: 110px; }
.yards-table .col-address { width: 320px; }
.yards-table .col-cancel-rule { width: 170px; }
.yards-table .col-status { width: 110px; }
.yards-table .col-actions { width: 95px; }
.vehicles-table {
    table-layout: fixed;
    min-width: 1340px;
}
.vehicles-table .col-plate { width: 120px; }
.vehicles-table .col-trailer { width: 115px; }
.vehicles-table .col-bitrem { width: 80px; }
.vehicles-table .col-company { width: 160px; }
.vehicles-table .col-transport { width: 190px; }
.vehicles-table .col-driver { width: 180px; }
.vehicles-table .col-phone { width: 150px; }
.vehicles-table .col-status { width: 115px; }
.vehicles-table .col-reason { width: 190px; }
.vehicles-table .col-actions { width: 95px; }
.reports-table {
    table-layout: fixed;
    min-width: 2105px;
}
.billing-summary-table {
    table-layout: fixed;
    min-width: 2345px;
}
.billing-summary-table .col-company { width: 190px; }
.billing-summary-table .col-small { width: 105px; }
.billing-summary-table .col-money { width: 140px; }
.billing-conference-table {
    table-layout: fixed;
    min-width: 1120px;
}
.billing-conference-table th,
.billing-conference-table td {
    padding: 9px 8px;
    font-size: 11px;
}
.billing-conference-table th:nth-child(1),
.billing-conference-table td:nth-child(1) { width: 98px; }
.billing-conference-table th:nth-child(2),
.billing-conference-table td:nth-child(2) { width: 88px; }
.billing-conference-table th:nth-child(3),
.billing-conference-table td:nth-child(3) { width: 80px; }
.billing-conference-table th:nth-child(4),
.billing-conference-table td:nth-child(4),
.billing-conference-table th:nth-child(5),
.billing-conference-table td:nth-child(5) { width: 122px; }
.billing-conference-table th:nth-child(6),
.billing-conference-table td:nth-child(6),
.billing-conference-table th:nth-child(7),
.billing-conference-table td:nth-child(7),
.billing-conference-table th:nth-child(8),
.billing-conference-table td:nth-child(8) { width: 86px; }
.billing-conference-table th:nth-child(9),
.billing-conference-table td:nth-child(9) { width: 110px; }
.billing-conference-table th:nth-child(10),
.billing-conference-table td:nth-child(10) { width: 120px; }
.billing-conference-table th:nth-child(11),
.billing-conference-table td:nth-child(11) { width: 140px; }
.billing-conference-table .actions {
    white-space: normal;
}
.billing-conference-table .actions form {
    margin: 0 3px 4px 0;
}
.billing-conference-table .small-link {
    padding: 6px 8px;
    font-size: 11px;
}
.billing-conference-table tbody tr:nth-child(odd) td {
    background: #fff;
}
.billing-conference-table tbody tr:nth-child(even) td {
    background: #eef7ff;
}
.reports-table .col-status { width: 145px; }
.reports-table .col-company { width: 170px; }
.reports-table .col-yard { width: 130px; }
.reports-table .col-plate { width: 115px; }
.reports-table .col-trailer { width: 115px; }
.reports-table .col-bitrem { width: 85px; }
.reports-table .col-transport { width: 180px; }
.reports-table .col-driver { width: 170px; }
.reports-table .col-phone { width: 140px; }
.reports-table .col-date { width: 145px; }
.reports-table .col-billable-days { width: 115px; }
.reports-table .col-duration { width: 175px; }
.audit-table {
    table-layout: fixed;
    min-width: 1180px;
}
.audit-table .col-date { width: 150px; }
.audit-table .col-user { width: 170px; }
.audit-table .col-tenant { width: 170px; }
.audit-table .col-action { width: 150px; }
.audit-table .col-module { width: 150px; }
.audit-table .col-record { width: 100px; }
.audit-table .col-details { width: 250px; }
.audit-table .col-ip { width: 140px; }
.ops-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}
.ops-table td {
    font-variant-numeric: tabular-nums;
}
.row-status.cadastrado td { background: #dfe247; }
.row-status.agendado td { background: #dbeafe; }
.row-status.dentro_patio td { background: #e5e7eb; }
.row-status.liberacao_solicitada td { background: #b9e5ff; }
.row-status.em_transito td { background: #fecdd3; }
.row-status.baixado td { background: #c9f7d2; }
.row-status.cancelado td { background: #fee2e2; }
.row-status:hover td { filter: brightness(.98); }
th, td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}
th { background: var(--blue-100); color: var(--blue-900); font-size: 13px; }
.status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: var(--blue-100);
    color: var(--blue-900);
}
.status.cadastrado { background: #eef2ff; color: #3730a3; }
.status.dentro_patio, .status.liberacao_solicitada { background: #fff7ed; color: var(--orange); }
.status.baixado { background: #e9f9f1; color: var(--green); }
.actions { white-space: nowrap; text-align: center; }
.actions form { display: inline-flex; margin: 0; }
.action-placeholder {
    width: 30px;
    height: 30px;
    display: inline-flex;
    visibility: hidden;
}
.action-btn {
    min-width: 0;
    padding: 8px 9px;
    border-radius: 7px;
    font-size: 11px;
}
.action-btn.icon-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}
.action-btn.entry { background: #64748b; }
.action-btn.authorize { background: #3b82f6; }
.action-btn.exit { background: #f97316; }
.action-btn.checkout { background: #22c55e; }
.action-btn.cancel { background: #ef4444; }
.action-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: .55;
}
.action-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-top: 12px;
}
.action-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
}
.billing-approval-note {
    display: grid;
    gap: 6px;
}
.billing-approval-note strong {
    color: var(--blue-900);
    font-size: 14px;
}
.billing-approval-note span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}
.billing-approval-note span strong {
    font-size: inherit;
}
.billing-bitrem-mark {
    display: inline-block;
    margin-left: 4px;
    color: #d97706;
    font-weight: 900;
}
.billing-table-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.billing-table-note strong {
    color: #d97706;
}
.billing-action-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.billing-action-legend strong {
    color: var(--blue-900);
}
.billing-action-legend span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.billing-action-legend b {
    color: var(--text);
}
.panel-note {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 700;
}
.notice.error { background: #fff1f1; color: #9f1239; }
.flow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.flow span, .flow a {
    padding: 10px 14px;
    background: var(--blue-100);
    border: 1px solid #c7ddf8;
    border-radius: 999px;
    font-weight: 800;
}
.flow a.active {
    background: var(--blue-700);
    border-color: var(--blue-700);
    color: #fff;
}
.flow strong { margin-left: 6px; }
.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
}
.settings-grid .checkline {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfdff;
}
.settings-actions {
    grid-column: 1 / -1;
}
.settings-tenant-filter {
    margin-bottom: 18px;
}
@media (max-width: 900px) {
    .sidebar, body.sidebar-collapsed .sidebar { position: static; width: auto; padding: 20px; }
    .main, body.sidebar-collapsed .main { margin-left: 0; padding: 20px; }
    body.sidebar-collapsed .nav-text { opacity: 1; width: auto; pointer-events: auto; }
    body.sidebar-collapsed .sidebar a,
    body.sidebar-collapsed .sidebar .nav-logout-form button { justify-content: flex-start; padding-inline: 14px; }
    .sidebar-toggle { display: none; }
    .cards, .grid-2, .grid-3, .company-form-grid, .tenant-form-grid, .tenant-linked-grid, .filters, .report-filters, .audit-filters, .profile-grid, .settings-grid, .billing-methods, .billing-method-picker, .billing-method-body, .help-layout { grid-template-columns: 1fr; }
    .help-index { position: static; }
    .page-header { display: grid; }
}
