:root {
    --ink: #101828;
    --ink-2: #243330;
    --muted: #667085;
    --soft: #98a2b3;
    --line: #e4e7ec;
    --line-2: #eef0f3;
    --paper: #f6f5f1;
    --card: #ffffff;
    --accent: #0f766e;
    --accent-dark: #0b5d57;
    --accent-soft: #e7f5ef;
    --amber: #b45309;
    --amber-soft: #fff4e5;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --sidebar: #0b1f21;
    --sidebar-2: #123033;
    --sidebar-text: #c7d4d1;
    --sidebar-muted: #7f9793;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 30px -18px rgba(16, 24, 40, .25);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--paper);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 24px; letter-spacing: -.5px; font-weight: 760; }
h2 { font-size: 18px; letter-spacing: -.25px; font-weight: 720; }
h3 { font-size: 15px; font-weight: 700; }
small { font-size: 12px; }

.shell { min-height: 100vh; display: flex; }

.sidebar {
    width: 254px;
    flex: 0 0 254px;
    background: var(--sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 22px 22px 18px;
    color: #fff;
}

.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand strong { display: block; font-size: 16px; letter-spacing: -.2px; }
.brand span { display: block; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sidebar-muted); margin-top: 2px; }

.nav { padding: 8px 12px 18px; overflow-y: auto; flex: 1; }
.nav-label { padding: 14px 10px 6px; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--sidebar-muted); font-weight: 700; }
.nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 550;
    margin-bottom: 2px;
}
.nav a svg { width: 17px; height: 17px; opacity: .78; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(45, 212, 191, .14); color: #d9fbf4; }
.nav a.active svg { opacity: 1; color: #5eead4; }

.sidebar-foot { padding: 14px 16px 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.user-card { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--sidebar-2); color: #d9fbf4;
    display: grid; place-items: center; font-weight: 700; font-size: 12px;
    flex: 0 0 32px;
}
.user-card strong { display: block; color: #fff; font-size: 12.5px; line-height: 1.25; }
.user-card span { display: griddo ; color: var(--sidebar-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.logout { background: none; border: 0; color: var(--sidebar-muted); font: inherit; font-size: 11.5px; cursor: pointer; padding: 0; }
.logout:hover { color: #fff; }

.page { min-width: 0; flex: 1; display: flex; flex-direction: column; }

.topbar {
    min-height: 76px;
    padding: 14px 30px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(246, 245, 241, .88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-title { margin-right: auto; min-width: 0; }
.eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.company-switch { display: flex; align-items: center; gap: 8px; }
.company-switch select {
    appearance: none;
    background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 8px 30px 8px 11px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
    max-width: 230px;
}

.mobile-toggle { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 9px; width: 36px; height: 36px; align-items: center; justify-content: center; cursor: pointer; }

.main { padding: 26px 30px 54px; flex: 1; }
.main > * { max-width: 1240px; margin-left: auto; margin-right: auto; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 20px 22px; }
.card-head { padding: 17px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.card-head h2 { margin-right: auto; }

.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)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 18px; align-items: start; }

.stack { display: grid; gap: 15px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
.nowrap { white-space: nowrap; }

.icon { width: 17px; height: 17px; flex: 0 0 auto; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink-2);
    border-radius: 9px;
    padding: 8px 13px;
    font: inherit; font-size: 12.5px; font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: #cfd4dc; background: #fbfbfa; color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: #fecdca; background: var(--danger-soft); }
.btn-danger:hover { background: #fee4e2; color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { padding: 5px 9px; font-size: 11.5px; border-radius: 7px; }
.btn-icon { width: 32px; height: 32px; padding: 0; }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 8px; border-radius: 999px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .15px;
    background: #f2f4f7; color: #475467; white-space: nowrap;
}
.badge-ok { background: var(--accent-soft); color: var(--accent-dark); }
.badge-info { background: #eff8ff; color: #175cd3; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--amber-soft); color: var(--amber); }
.badge-muted { background: #f2f4f7; color: #667085; }

.traffic-light {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    vertical-align: middle;
}
.traffic-light-green { background: #12b76a; box-shadow: 0 0 0 3px rgba(18, 183, 106, .14); }
.traffic-light-red { background: #f04438; box-shadow: 0 0 0 3px rgba(240, 68, 56, .14); }

.stat { padding: 18px 20px; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 27px; font-weight: 780; letter-spacing: -.8px; margin-top: 7px; }
.stat-foot { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.stat-sm { padding: 13px 15px; }
.stat-sm .stat-label { font-size: 10px; letter-spacing: .9px; }
.stat-sm .stat-value { font-size: 19px; letter-spacing: -.4px; margin-top: 5px; }
.stat-sm .stat-foot { font-size: 10.5px; margin-top: 3px; }
.stat.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.stat.accent .stat-label, .stat.accent .stat-foot { color: #b7e7df; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    padding: 20px 14px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    background: #fbfbfa;
    white-space: nowrap;
}
th:first-child { border-top-left-radius: 14px; }
th:last-child { border-top-right-radius: 14px; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfcfb; }
.td-main { font-weight: 650; color: var(--ink); }
.td-sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.email-sent{display:flex !important; color:var(--accent-dark);}
.email-sent .icon{margin-right: 3px;color:#F90}
.td-right, th.right { text-align: right; }
.generated-status { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.td-actions { text-align: right; white-space: nowrap; vertical-align: middle; }
.td-actions form { display: inline-flex !important; margin: 0; vertical-align: middle; }
.td-actions .btn, .td-actions > a { vertical-align: middle; }
.td-actions .btn + form, .td-actions form + .btn, .td-actions form + a { margin-left: 6px; }
.table-empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.table-empty strong { display: block; color: var(--ink-2); margin-bottom: 3px; }

.flash { padding: 11px 14px; border-radius: 10px; border: 1px solid; margin-bottom: 16px; font-size: 12.5px; font-weight: 550; }
.flash-success { background: var(--accent-soft); border-color: #b7e7df; color: var(--accent-dark); }
.flash-error { background: var(--danger-soft); border-color: #fecdca; color: var(--danger); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { /*display: grid; */gap: 5px; min-width: 0; }
.field > label, .label { font-size: 11px; font-weight: 700; color: #475467; text-transform: uppercase; letter-spacing: .8px; }
.label .req { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=file], select, textarea {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    min-height: 37px;
    height: fit-content;
}
textarea { min-height: 80px; resize: vertical; }
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Espacio para que el texto no toque la flecha */
    padding-right: 40px !important; 

    /* Flecha en Base64 (Color gris oscuro/negro) */
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMzMzMzMzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSI2IDkgMTIgMTUgMTggOSI+PC9wb2x5bGluZT48L3N2Zz4=") !important;
    
    background-repeat: no-repeat !important;
    
    /* Controla la distancia desde la derecha (10px) */
    background-position: right 10px center !important; 
    
    /* Tamaño de la flecha */
    background-size: 14px !important; 
}
.readonly-value { display: flex; align-items: center; gap: 6px; min-height: 37px; border: 1px solid #d0d5dd; border-radius: 8px; background: #f9fafb; padding: 8px 10px; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .12); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.table-batch {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 15px 15px 0px 30px;
}
.table-batch .btn { margin-left: auto; }
.table-batch-count { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.check-col { width: 24px; padding-left: 30px; padding-right: 2px; text-align: center; }
th.check-col { font-size: 9px; letter-spacing: 0; }
.check-col input { margin: 0; }
.col-number { width: 170px; }
.col-total { width: 115px; white-space: nowrap; }
.col-pending { width: 95px; white-space: nowrap; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.help { font-size: 11px; color: var(--muted); }
.error { font-size: 11.5px; color: var(--danger); }
.section-title { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 750; margin-bottom: 10px; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin-right: auto; }
.page-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.searchbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tasks-search { flex-wrap: nowrap; }
.searchbar input[type=text] { max-width: 300px; }

.pagination { padding: 13px 18px; border-top: 1px solid var(--line-2); }
.pagination svg { width: 15px; height: 15px; }
.pagination nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pagination .text-sm { font-size: 11.5px; color: var(--muted); }
.pagination .pg-nums { display: inline-flex; align-items: center; gap: 4px; }
.pagination nav a.pg-num,
.pagination nav span.pg-num { border: 1px solid var(--line); border-radius: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; }
.pagination .pg-num.is-current { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.pagination .pg-dots { color: var(--muted); padding: 0 4px; }

.tabs { display: flex; gap: 4px; background: #ecebe6; padding: 3px; border-radius: 9px; width: max-content; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 6px 11px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tabs a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }

.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--paper); }
.auth-art {
    background: var(--sidebar);
    color: #fff;
    padding: 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-art::before {
    content: ""; position: absolute; width: 430px; height: 430px; border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, .22), transparent 65%);
    right: -140px; top: -110px;
}
.auth-art h2 { font-size: 38px; line-height: 1.08; letter-spacing: -1.5px; max-width: 430px; position: relative; }
.auth-art p { color: #9fb4b0; max-width: 390px; margin-top: 14px; font-size: 14px; position: relative; }
.auth-art-foot { position: relative; display: flex; gap: 18px; color: #7f9793; font-size: 11.5px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 38px; }
.auth-box { width: 100%; max-width: 370px; }
.auth-box h1 { font-size: 26px; margin-bottom: 4px; }
.auth-box .muted { margin-bottom: 22px; font-size: 12.5px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; font-weight: 750; }
.auth-brand img { width: 34px; height: 34px; border-radius: 9px; }

.invoice-lines { width: 100%; border-collapse: collapse; }
.invoice-lines th { background: #fbfbfa; }
.invoice-lines td { padding: 9px 8px; }
.invoice-lines input, .invoice-lines select { min-height: 33px; padding: 5px 15px 5px 8px; font-size: 12px; }
.invoice-lines select { appearance: none; -webkit-appearance: none; }
.line-desc { min-width: 210px; }
.line-num { width: 80px; }
.line-price { width: 110px; }
.line-discount { width: 84px; }
.line-del { width: 38px; text-align: center; }

.tax-picker { position: relative; }
.tax-picker summary {
    list-style: none; cursor: pointer; border: 1px solid #d0d5dd; border-radius: 8px;
    padding: 6px 8px; font-size: 11.5px; background: #fff; min-height: 33px;
    display: flex; align-items: center; justify-content: space-between; gap: 5px;
}
.tax-picker summary::-webkit-details-marker { display: none; }
.tax-picker summary::after { content: "▾"; color: var(--muted); font-size: 10px; }
.tax-menu {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 40;
    background: #fff; border: 1px solid var(--line); border-radius: 9px;
    box-shadow: 0 12px 30px -10px rgba(16, 24, 40, .25);
    padding: 8px; min-width: 190px; display: grid; gap: 5px;
}
.tax-menu label { display: flex; align-items: center; gap: 7px; font-size: 11.5px; white-space: nowrap; }

.totals { width: 100%; max-width: 320px; margin-left: auto; }
.totals div { display: flex; justify-content: space-between; gap: 18px; padding: 5px 0; font-size: 12.5px; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 11px; font-size: 18px; font-weight: 780; }

.detail-list { display: grid; gap: 13px; }
.detail-list div { display: flex; justify-content: space-between; gap: 18px; font-size: 12.5px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 650; text-align: right; }

.empty-state { text-align: center; padding: 54px 22px; }
.empty-state h2 { margin-bottom: 5px; }
.empty-state p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }

.chart { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding: 8px 2px 0; }
.chart-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.chart-bar span { width: 100%; max-width: 44px; border-radius: 7px 7px 3px 3px; background: #d7e3e0; min-height: 4px; }
.chart-bar:last-child span { background: var(--accent); }
.chart-bar small { color: var(--muted); font-size: 10.5px; }

.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.list-clean li:last-child { border-bottom: 0; }
.list-clean .grow { flex: 1; min-width: 0; }
.list-clean strong { display: block; font-size: 12.5px; }
.list-clean small { color: var(--muted); font-size: 11px; }
.date-chip { width: 38px; height: 38px; border-radius: 9px; background: #f2f4f7; display: grid; place-items: center; text-align: center; flex: 0 0 38px; }
.date-chip b { display: block; font-size: 13px; line-height: 1; }
.date-chip small { font-size: 9px; text-transform: uppercase; }

.tbai-box { border: 1px solid #b7e7df; background: #f5fdfa; border-radius: 12px; padding: 15px; }
.tbai-box.warn { border-color: #fedf89; background: #fffcf5; }
.tbai-box h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.qr { background: #fff; padding: 7px; border-radius: 8px; border: 1px solid var(--line); display: inline-block; }
.qr svg { display: block; width: 110px; height: 110px; }
.qr-sm svg { width: 55px; height: 55px; }

.print-page { background: #fff; color: #101828; max-width: 820px; margin: 24px auto; padding: 46px 50px; box-shadow: var(--shadow); }
.print-head { display: flex; justify-content: space-between; gap: 26px; border-bottom: 2px solid var(--ink); padding-bottom: 18px; }
.print-head img { width: 44px; height: 44px; border-radius: 11px; }
.print-title { font-size: 25px; font-weight: 800; letter-spacing: -.6px; }
.print-table th { background: #f7f7f5; }
.print-table .col-base { width: 15%; min-width: 118px; white-space: nowrap; }
.print-table th:last-child, .print-table td:last-child { width: 15%; min-width: 118px; white-space: nowrap; }
.print-foot { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 10.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; }

.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.segmented label {
    border: 1px solid var(--line); background: #fff; border-radius: 9px;
    padding: 8px 11px; font-size: 12px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
}
.segmented input { width: 14px; height: 14px; }

.note { border-left: 3px solid #b7e7df; background: #f8fdfb; padding: 10px 13px; border-radius: 0 8px 8px 0; font-size: 12px; color: #475467; }

@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0, 0, 0, .25); }
    .sidebar.open { transform: none; }
    .mobile-toggle { display: inline-flex; }
    .topbar { padding: 12px 16px; }
    .main { padding: 20px 16px 44px; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .auth-panel { padding: 24px; }
    .form-grid { grid-template-columns: 1fr; }
    h1 { font-size: 21px; }
}

@media (max-width: 560px) {
    .grid-4 { grid-template-columns: 1fr; }
    .grid-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar-actions .company-switch { display: none; }
    .topbar-actions .btn span { display: none; }
    .page-head { flex-direction: column; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .print-page { margin: 0; padding: 24px 18px; }
    .print-head { flex-direction: column; }
}

@media print {
    .sidebar, .topbar, .flash, .no-print { display: none !important; }
    .shell { display: block; }
    .main { padding: 0; }
    .print-page { box-shadow: none; margin: 0; max-width: none; padding: 0; }
    body { background: #fff; }
}

.tax-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; min-width: 176px; max-width: 240px; }
.tax-inline label { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: #475467; white-space: nowrap; cursor: pointer; }
.tax-inline input { width: 13px; height: 13px; flex: 0 0 13px; }

.od-overlay {
    position: fixed; inset: 0; z-index: 1400;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(11, 31, 33, 0.5); backdrop-filter: blur(2px);
    opacity: 0; visibility: hidden; transition: opacity 180ms ease;
}
.od-overlay.open { opacity: 1; visibility: visible; }
.od-modal {
    width: min(400px, 100%);
    background: var(--card); border: 1px solid var(--line);
    border-radius: 16px; box-shadow: 0 24px 60px -24px rgba(11, 31, 33, 0.55);
    padding: 22px; transform: translateY(12px); transition: transform 180ms ease;
}
.od-overlay.open .od-modal { transform: none; }
.od-modal-title { font-size: 16px; font-weight: 720; letter-spacing: -0.2px; color: var(--ink); }
.od-modal-message { margin-top: 8px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.od-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.od-modal-cancel { flex: 1; }
.od-modal-confirm { flex: 1; }
@media (prefers-reduced-motion: reduce) {
    .od-overlay, .od-modal { transition: none; }
}
