:root {
    --bg: #071112;
    --panel: #0e1a1f;
    --panel-2: #12242a;
    --text: #edf7f5;
    --muted: #8aa2a5;
    --line: rgba(255, 255, 255, .1);
    --primary: #00d4aa;
    --primary-2: #48a6ff;
    --danger: #ff5c7c;
    --warning: #f7c948;
    --radius: 8px;
    --shadow: 0 24px 70px rgba(0, 0, 0, .34);
    --shadow-soft: 0 14px 32px rgba(0, 0, 0, .18);
}

.row-actions {
    gap: 8px;
    flex-wrap: wrap;
}

.inline-status-form {
    margin: 0;
}

.inline-status-form select.status {
    width: 100%;
    min-width: 118px;
    padding-right: 34px;
    cursor: pointer;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.quote-form-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.quote-form-toolbar h2 {
    margin: 4px 0 0;
    font-size: 22px;
}

.quote-submit-actions {
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

body[data-theme="light"] .inline-status-form select.status {
    background-color: rgba(255, 255, 255, .92);
}

@media (max-width: 860px) {
    .quote-form-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .inline-status-form select.status {
        min-width: 100px;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(0, 212, 170, .16), transparent 28%),
        radial-gradient(circle at 90% 10%, rgba(72, 166, 255, .14), transparent 30%),
        var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="light"] {
    background:
        radial-gradient(circle at 20% 0%, rgba(0, 145, 120, .08), transparent 28%),
        radial-gradient(circle at 90% 10%, rgba(72, 166, 255, .08), transparent 30%),
        #edf4f5;
    color: #132629;
    --text: #132629;
    --muted: #5f7579;
    --line: rgba(12, 34, 39, .12);
    --shadow: 0 24px 60px rgba(16, 30, 34, .08);
}

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

.shell {
    display: grid;
    grid-template-columns: 296px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(7, 18, 21, .98), rgba(8, 20, 24, .92));
    padding: 26px 22px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    max-width: 100%;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
}

.brand-logo {
    display: block;
    width: 96px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand-copy strong {
    font-size: 18px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.eyebrow,
.muted {
    color: var(--muted);
}

.nav-group {
    display: grid;
    gap: 12px;
}

.nav-label {
    margin: 0;
    padding: 0 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nav {
    display: grid;
    gap: 8px;
}

.nav a {
    padding: 14px 15px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #c4d5d7;
    font-weight: 600;
    transition: .18s ease;
}

.nav a:hover,
.nav a.active {
    border-color: rgba(0, 212, 170, .32);
    background: rgba(0, 212, 170, .1);
    color: var(--text);
    transform: translateX(2px);
}

.sidebar-panel {
    margin-top: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
}

.sidebar-panel span,
.sidebar-panel strong,
.sidebar-panel small {
    display: block;
}

.sidebar-panel span {
    color: var(--muted);
    font-size: 13px;
}

.sidebar-panel strong {
    margin-top: 4px;
}

.sidebar-panel small {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.45;
}

.main {
    padding: 34px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.topbar-copy {
    max-width: 760px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    cursor: pointer;
}

.theme-toggle-track {
    position: relative;
    width: 56px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(16, 32, 37, .9), rgba(12, 24, 28, .95));
    border: 1px solid rgba(255, 255, 255, .08);
    transition: .2s ease;
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #cfdcde);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .28);
    transition: .2s ease;
}

.theme-toggle-text {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

body[data-theme="light"] .theme-toggle-track {
    background: linear-gradient(135deg, #dfe5e7, #c7d0d3);
}

body[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(26px);
    background: linear-gradient(135deg, #fff7c8, #ffd35a);
}

.topbar h1 {
    margin: 6px 0 0;
    font-size: clamp(27px, 4vw, 42px);
    letter-spacing: 0;
}

.page-subtitle {
    margin: 10px 0 0;
    max-width: 680px;
    color: var(--muted);
    line-height: 1.6;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

.card,
.table-wrap,
.form-panel {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(18, 36, 42, .96), rgba(10, 22, 26, .96));
    box-shadow: var(--shadow-soft);
}

.card {
    padding: 24px;
}

.metric {
    min-height: 136px;
}

.metric span {
    color: var(--muted);
    font-weight: 700;
}

.metric strong {
    display: block;
    margin-top: 16px;
    font-size: 34px;
}

.metric small {
    color: var(--primary);
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
}

.btn-primary {
    border-color: rgba(0, 212, 170, .5);
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #031111;
    box-shadow: 0 12px 22px rgba(0, 212, 170, .18);
}

.btn-primary:hover {
    border-color: rgba(0, 212, 170, .72);
    background: linear-gradient(135deg, #18ddb6, #5cb5ff);
}

.btn-danger {
    border-color: rgba(255, 92, 124, .45);
    color: #ffdce4;
}

.btn-small {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 12px;
}

td .actions {
    gap: 6px;
}

td .btn-small {
    min-height: 26px;
    padding: 4px 7px;
    font-size: 11px;
    line-height: 1;
}

.icon-btn {
    width: 30px;
    min-width: 30px;
    padding: 0;
}

.icon-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 212, 170, .24);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(0, 212, 170, .12), rgba(0, 212, 170, .06));
}

.auth-body {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 10%, rgba(0, 212, 170, .16), transparent 24%),
        radial-gradient(circle at 85% 18%, rgba(72, 166, 255, .14), transparent 28%),
        linear-gradient(180deg, rgba(4, 13, 15, .95), rgba(6, 19, 22, 1));
}

.auth-wrap {
    width: min(100%, 460px);
}

.auth-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(21, 39, 45, .98), rgba(8, 21, 24, .98));
    box-shadow: var(--shadow);
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 170, .08), transparent 35%, rgba(72, 166, 255, .08));
    pointer-events: none;
}

.auth-head,
.auth-form,
.auth-foot,
.auth-card h1,
.auth-copy,
.auth-card .alert {
    position: relative;
    z-index: 1;
}

.auth-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-side {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.auth-theme-toggle {
    min-width: 0;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.auth-logo {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    flex: 0 0 auto;
}

.auth-brand strong,
.auth-brand small {
    display: block;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.05;
}

.auth-copy {
    margin: 0;
    color: #a9c0c3;
    line-height: 1.5;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 212, 170, .28);
    border-radius: 999px;
    background: rgba(0, 212, 170, .08);
    color: #b9ece0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.auth-submit {
    width: 100%;
}

.auth-foot {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #88a2a6;
    font-size: 12px;
}

.table-wrap {
    overflow: auto;
    border-radius: 16px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .95fr);
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-hero-copy {
    padding: 28px;
}

.dashboard-hero-copy h2 {
    margin: 10px 0 12px;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.08;
}

.dashboard-hero-copy p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    max-width: 58ch;
}

.status-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.status-chip {
    min-width: 130px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
}

.status-chip strong,
.status-chip small {
    display: block;
}

.status-chip strong {
    font-size: 26px;
}

.status-chip small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.hero-finance-grid {
    display: grid;
    gap: 18px;
}

.finance-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(18, 36, 42, .96), rgba(10, 22, 26, .96));
    box-shadow: var(--shadow);
    padding: 22px;
}

.finance-card-primary {
    background: linear-gradient(135deg, rgba(0, 212, 170, .18), rgba(72, 166, 255, .2));
    border-color: rgba(0, 212, 170, .28);
}

.finance-card span,
.finance-card strong,
.finance-card small {
    display: block;
}

.finance-card span {
    color: var(--muted);
    font-weight: 700;
}

.finance-card strong {
    margin-top: 14px;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.1;
}

.finance-card small {
    margin-top: 8px;
    color: var(--muted);
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-stat {
    min-height: 0;
    padding: 20px 22px;
}

.dashboard-stat span {
    color: var(--muted);
    font-weight: 700;
}

.dashboard-stat strong {
    display: block;
    margin-top: 16px;
    font-size: 34px;
}

.dashboard-stat small {
    display: block;
    margin-top: 8px;
    color: var(--primary);
}

.dashboard-table-card {
    padding: 0;
    overflow: hidden;
}

.dashboard-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 24px 24px 18px;
}

.dashboard-table-head h2 {
    margin: 8px 0 0;
    font-size: 24px;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px 24px;
    border-top: 1px solid var(--line);
}

.btn-disabled {
    opacity: .45;
    pointer-events: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 16px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: #a7bdc0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: rgba(255, 255, 255, .02);
}

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

tbody tr {
    transition: background .14s ease;
}

tbody tr:hover td {
    background: rgba(255, 255, 255, .03);
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(72, 166, 255, .14);
    color: #b9dcff;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(72, 166, 255, .18);
}

.status-aberto {
    background: rgba(72, 166, 255, .12);
    color: #b9dcff;
    border-color: rgba(72, 166, 255, .2);
}

.status-fechado {
    background: rgba(247, 201, 72, .12);
    color: #f6db8a;
    border-color: rgba(247, 201, 72, .2);
}

.status-pago {
    background: rgba(0, 212, 170, .12);
    color: #9ff0dc;
    border-color: rgba(0, 212, 170, .2);
}

.profit-positive {
    color: var(--primary);
    font-weight: 800;
}

.profit-negative {
    color: var(--danger);
    font-weight: 800;
}

.quote-actions-summary {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.mini-metric {
    min-width: 220px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 212, 170, .32);
    border-radius: var(--radius);
    background: rgba(0, 212, 170, .08);
    text-align: right;
}

.mini-metric span,
.mini-metric strong {
    display: block;
}

.mini-metric span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.mini-metric strong {
    margin-top: 4px;
    font-size: 22px;
}

.form-panel {
    padding: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    color: #bad0d2;
    font-weight: 700;
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    background: rgba(0, 0, 0, .22);
    color: var(--text);
    padding: 11px 12px;
    font: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(0, 212, 170, .42);
    box-shadow: 0 0 0 4px rgba(0, 212, 170, .08);
    background: rgba(0, 0, 0, .28);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.quote-item {
    display: grid;
    grid-template-columns: 130px minmax(320px, 1fr) 90px 130px 95px 30px;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
    margin-bottom: 12px;
}

.quote-item .field {
    min-width: 0;
}

.quote-item .btn-danger {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    align-self: end;
    font-size: 14px;
    line-height: 1;
}

.line-total {
    min-height: 44px;
    display: flex;
    align-items: center;
    color: var(--primary);
    font-weight: 800;
    font-size: 15px;
}

.totals {
    margin-left: auto;
    max-width: 360px;
    display: grid;
    gap: 10px;
}

.totals div {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.totals strong {
    font-size: 24px;
    color: var(--primary);
}

.print-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 22px;
}

body.print-body .print-page {
    max-width: 820px;
}

.print-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

.budget-print-document {
    background: #f7f7f7;
    border: 2px solid #222;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
    padding: 14px;
    outline: 1px solid #777;
    outline-offset: -8px;
}

.budget-company {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 112px;
    border: 1px solid #555;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.budget-logo img {
    display: block;
    width: 265px;
    max-height: 72px;
    height: auto;
    object-fit: contain;
}

.budget-company-data {
    display: grid;
    gap: 2px;
    text-align: right;
    font-size: 12px;
    line-height: 1.2;
    border-left: 1px solid #888;
    padding-left: 14px;
}

.budget-company-data strong {
    font-size: 14px;
}

.budget-meta,
.budget-client,
.budget-items,
.budget-totals-row {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    color: #111;
    font-size: 11px;
    table-layout: fixed;
    border: 1px solid #555;
}

.budget-meta {
    margin-bottom: 8px;
}

.budget-meta td,
.budget-client td,
.budget-client th,
.budget-items td,
.budget-items th,
.budget-totals-row td,
.budget-totals-row th {
    border: 1px solid #555;
    padding: 3px 5px;
}

.budget-meta tr,
.budget-client tr,
.budget-items tr,
.budget-totals-row tr {
    border-right: 1px solid #555;
}

.budget-meta td:last-child,
.budget-meta th:last-child,
.budget-client td:last-child,
.budget-client th:last-child,
.budget-items td:last-child,
.budget-items th:last-child,
.budget-totals-row td:last-child,
.budget-totals-row th:last-child {
    border-right: 1px solid #555;
}

.budget-meta td {
    text-align: center;
    background: #f1f1f1;
}

.budget-number {
    color: #c51c2f;
    letter-spacing: 1px;
}

.budget-client {
    margin-bottom: 8px;
}

.budget-client th,
.budget-items th,
.budget-totals-row th {
    background: #ededed;
    text-align: center;
    font-weight: 800;
}

.budget-client .label {
    width: 82px;
    background: #efefef;
    font-weight: 800;
}

.budget-items th:first-child,
.budget-items td:first-child {
    text-align: center;
}

.budget-items .col-item {
    width: 6%;
}

.budget-items .col-description {
    width: 62%;
}

.budget-items .col-qty {
    width: 7%;
}

.budget-items .col-unit,
.budget-items .col-total {
    width: 12.5%;
}

.budget-items th:nth-child(2),
.budget-items td:nth-child(2) {
    border-left: 2px solid #555;
    border-right: 2px solid #555;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.budget-items thead th:nth-child(2) {
    text-align: center;
}

.budget-items th:nth-child(3),
.budget-items td:nth-child(3) {
    text-align: center;
}

.budget-items th:nth-child(4),
.budget-items td:nth-child(4),
.budget-items th:nth-child(5),
.budget-items td:nth-child(5) {
    text-align: right;
}

.budget-items tbody td {
    height: 22px;
    border-top: 1px solid #777;
    border-bottom: 1px solid #777;
    vertical-align: top;
}

.budget-items .blank-row td {
    color: transparent;
}

.budget-totals-row {
    margin-top: 8px;
}

.budget-totals-row td {
    text-align: center;
    font-size: 12px;
}

.budget-observations {
    min-height: 110px;
    margin-top: 10px;
    border: 1px solid #888;
    padding: 8px 16px;
    color: #111;
}

.budget-observations h2 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 12px;
}

.budget-observations p {
    margin: 6px 0;
    font-size: 11px;
}

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .grid-2,
    .grid-3,
    .form-grid,
    .dashboard-stat-grid,
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .quote-item {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-table-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions,
    .auth-side {
        width: 100%;
    }

    .theme-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .budget-company {
        grid-template-columns: 220px minmax(0, 1fr);
        text-align: initial;
    }

    .budget-logo img {
        margin: 0;
        width: 210px;
        max-height: 62px;
    }

    .budget-company-data {
        text-align: right;
    }
}

body[data-theme="light"] .sidebar {
    background: rgba(241, 248, 249, .96);
    border-right-color: rgba(12, 34, 39, .1);
}

body[data-theme="light"] .brand,
body[data-theme="light"] .sidebar-panel,
body[data-theme="light"] .status-chip {
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 250, 250, .96));
    border-color: rgba(12, 34, 39, .08);
}

body[data-theme="light"] .nav a {
    color: #375156;
}

body[data-theme="light"] .nav a:hover,
body[data-theme="light"] .nav a.active {
    background: rgba(0, 145, 120, .08);
    color: #132629;
}

body[data-theme="light"] .card,
body[data-theme="light"] .table-wrap,
body[data-theme="light"] .form-panel,
body[data-theme="light"] .auth-card,
body[data-theme="light"] .sidebar-panel,
body[data-theme="light"] .mini-metric,
body[data-theme="light"] .finance-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(245, 249, 249, .98));
    color: #132629;
}

body[data-theme="light"] .finance-card-primary {
    background: linear-gradient(135deg, rgba(0, 145, 120, .12), rgba(72, 166, 255, .12));
    border-color: rgba(0, 145, 120, .22);
}

body[data-theme="light"] .btn {
    background: rgba(12, 34, 39, .03);
    color: #132629;
}

body[data-theme="light"] .btn:hover {
    background: rgba(12, 34, 39, .06);
    border-color: rgba(12, 34, 39, .18);
}

body[data-theme="light"] .theme-toggle {
    background: rgba(12, 34, 39, .04);
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
    background: rgba(255, 255, 255, .96);
    color: #132629;
    border-color: rgba(12, 34, 39, .14);
}

body[data-theme="light"] th {
    color: #5d7579;
    background: rgba(12, 34, 39, .025);
}

body[data-theme="light"] .muted,
body[data-theme="light"] .auth-copy,
body[data-theme="light"] .auth-foot,
body[data-theme="light"] .theme-switch span,
body[data-theme="light"] .sidebar-panel span {
    color: #5f7579;
}

body[data-theme="light"] .status {
    color: #0d5ea8;
}

body[data-theme="light"] .status-aberto {
    background: rgba(72, 166, 255, .1);
    color: #0d5ea8;
}

body[data-theme="light"] .status-fechado {
    background: rgba(247, 201, 72, .12);
    color: #8a6400;
}

body[data-theme="light"] .status-pago {
    background: rgba(0, 145, 120, .12);
    color: #0b7b65;
}

body[data-theme="light"] .quote-item {
    background: rgba(12, 34, 39, .03);
}

body[data-theme="light"] tbody tr:hover td {
    background: rgba(12, 34, 39, .025);
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: #ffffff;
    }

    body.print-body {
        margin: 0;
        background: #ffffff;
    }

    .no-print {
        display: none !important;
    }

    .sidebar,
    .topbar,
    .alert {
        display: none !important;
    }

    .shell {
        display: block;
        min-height: 0;
    }

    .main {
        padding: 0;
    }

    .print-page {
        max-width: none;
        padding: 0;
    }

    body.print-body .print-page {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .budget-print-document {
        box-shadow: none;
        border: 2px solid #222;
        padding: 10px;
        outline: 1px solid #777;
        outline-offset: -6px;
    }

    .budget-company {
        break-inside: avoid;
        grid-template-columns: 250px 1fr;
    }

    .budget-logo img {
        width: 235px;
    }

    body.print-layout * {
        visibility: hidden !important;
    }

    body.print-layout .budget-print-document,
    body.print-layout .budget-print-document * {
        visibility: visible !important;
    }

    body.print-layout .sidebar,
    body.print-layout .topbar,
    body.print-layout .print-actions,
    body.print-layout .alert {
        display: none !important;
    }

    body.print-layout .shell,
    body.print-layout .main,
    body.print-layout .print-page {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
    }

    body.print-layout .budget-print-document {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0 !important;
    }
}
