/* Archivo generado por private/bin/build-frontend.php. Edite private/resources/css/app/. */
[hidden] { display: none !important; }

.app { min-height: 100vh; }

.sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    color: #17325d;
    border-right: 1px solid #dce8f4;
    background: linear-gradient(165deg, #fff 0%, #f6faff 100%);
    box-shadow: 10px 0 34px rgba(28, 67, 107, .07);
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 10% 0, rgba(63, 142, 255, .08), transparent 34%);
}

.sidebar-top {
    position: relative;
    height: 88px;
    padding: 20px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5eef7;
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #102a57;
    text-decoration: none;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -.6px;
}

.brand-name > span, .brand > span:last-child > span { color: var(--blue-500); font-weight: 720; }

.brand-mark {
    width: 40px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #1c8cff;
}

.brand-mark svg { width: 38px; height: 42px; stroke-width: 1.8; }
.brand-custom-logo { width: auto; max-width: 190px; height: 48px; object-fit: contain; object-position: left center; }

.primary-nav {
    position: relative;
    min-height: 0;
    flex: 1;
    display: grid;
    align-content: start;
    gap: 2px;
    padding: 8px 12px 14px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c8d8e8 transparent;
}

.nav-section { display: grid; gap: 3px; }
.nav-section__label { margin: 0; padding: 14px 9px 5px; color: #7a8cab; font-size: 10px; font-weight: 780; letter-spacing: .09em; line-height: 1; text-transform: uppercase; }

.nav-item {
    width: 100%;
    min-height: 54px;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 11px;
    color: #17325d;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-item__copy { min-width: 0; display: grid; gap: 2px; line-height: 1.18; }
.nav-item__copy strong, .nav-item__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item__copy strong { font-size: 13.5px; font-weight: 680; }
.nav-item__copy small { color: #7a8cac; font-size: 11.5px; font-weight: 470; }
.nav-item svg { width: 21px; height: 21px; flex: 0 0 21px; stroke-width: 1.9; }
.nav-item:hover { color: #0d63d6; background: #edf5ff; transform: translateX(2px); }
.nav-item:hover .nav-item__copy small { color: #6180a8; }
.nav-item.active { color: #fff; background: linear-gradient(135deg, #3988ff, #176de9); box-shadow: 0 8px 20px rgba(31, 116, 239, .25); }
.nav-item.active .nav-item__copy small { color: #dcecff; }
.nav-item--collapse { min-height: 43px; margin-top: 12px; border-top: 1px solid #dfe9f3; border-radius: 0 0 9px 9px; color: #617899; }

.workspace { min-height: 100vh; margin-left: var(--sidebar-width); }

.sidebar, .workspace, .loading-state { transition: width .2s ease, margin-left .2s ease, left .2s ease; }
html.turbo-rendering .sidebar,
html.turbo-rendering .workspace,
html.turbo-rendering .loading-state { transition: none !important; }
body.sidebar-collapsed .sidebar { width: 82px; }
body.sidebar-collapsed .workspace { margin-left: 82px; }
body.sidebar-collapsed .loading-state { left: 82px; }
body.sidebar-collapsed .sidebar-top { justify-content: center; padding-inline: 10px; }
body.sidebar-collapsed .brand { gap: 0; }
body.sidebar-collapsed .brand-custom-logo { max-width: 46px; height: 46px; }
body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .nav-item__copy,
body.sidebar-collapsed .nav-section__label { display: none; }
body.sidebar-collapsed .nav-section { gap: 4px; }
body.sidebar-collapsed .primary-nav { padding-inline: 12px; }
body.sidebar-collapsed .nav-item { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .nav-item--collapse svg { transform: rotate(180deg); }
.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    height: 72px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #e6edf5;
    backdrop-filter: blur(14px);
}

.global-search, .search-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: #f9fbfe;
    color: var(--ink-500);
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.global-search { width: min(500px, 42vw); height: 44px; padding: 0 13px; }
.global-search:focus-within, .search-control:focus-within { border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 3px rgba(8,117,245,.11); }
.global-search input, .search-control input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink-900); }
.global-search input::placeholder, .search-control input::placeholder { color: #7c8ba5; opacity: 1; }
.global-search kbd { padding: 2px 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink-500); font-size: 12px; white-space: nowrap; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.company-switcher { min-width: 248px; height: 50px; padding: 0 13px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-900); background: #fff; text-align: left; }
.company-switcher:hover { border-color: #9ebce0; background: var(--blue-50); }
.company-switcher > svg:first-child { color: var(--blue-700); }
.company-switcher > span { min-width: 0; display: grid; line-height: 1.25; }
.company-switcher strong, .company-switcher small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-switcher strong { font-size: 14px; }
.company-switcher small { color: var(--ink-600); font-size: 13px; }
.company-switcher .chevron { margin-left: auto; width: 16px; }

.icon-button {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: var(--ink-700);
    background: transparent;
}
.icon-button:hover { color: var(--blue-700); background: var(--blue-100); }
.notification-button { position: relative; }
.notification-button > span { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--blue-500); }

.user-menu { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #0575ed, #174fc6); font-weight: 720; }
.user-copy { min-width: 110px; display: grid; line-height: 1.25; }
.user-copy strong { font-size: 14px; }
.user-copy small { color: var(--ink-600); font-size: 13px; }
.menu-button, .sidebar-close { display: none; }

.main-content { position: relative; max-width: 1700px; margin: 0 auto; padding: 22px 28px 34px; }
.view { animation: reveal .22s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.loading-state { position: fixed; z-index: 50; inset: 72px 0 0 var(--sidebar-width); display: flex; align-items: center; justify-content: center; gap: 14px; background: rgba(239,247,252,.92); color: var(--ink-700); }
.spinner { width: 25px; height: 25px; border: 3px solid #bfd8f2; border-top-color: var(--blue-600); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card { border: 1px solid #dfe9f3; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.form-card { margin-top: 17px; padding: 18px 20px 20px; }

.invoice-hero { min-height: 100px; padding: 17px 20px; display: flex; align-items: center; gap: 18px; }
.heading-icon { width: 56px; height: 64px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue-600); }
.heading-icon svg { width: 52px; height: 56px; stroke-width: 1.7; }
.invoice-hero-copy { min-width: 250px; }
.invoice-hero-copy .eyebrow { display: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 2px; font-size: clamp(25px, 2.2vw, 33px); line-height: 1.18; letter-spacing: -.7px; }
h2 { margin-bottom: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.25px; }
h3 { margin-bottom: 5px; font-size: 17px; }
.invoice-hero-copy p { margin-bottom: 0; color: #7180b0; font-size: 17px; }
.invoice-edit-error { margin-top: 14px; padding: 13px 15px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid #efb0b5; border-radius: 10px; color: #8f1f28; background: #fff5f5; }
.invoice-edit-error[hidden] { display: none; }
.invoice-edit-error > svg { width: 23px; height: 23px; flex: 0 0 auto; color: var(--danger); }
.invoice-edit-error strong { display: block; margin-bottom: 3px; color: #811b23; font-size: 14px; }
.invoice-edit-error p { margin: 0; color: #9d2932; font-size: 13px; line-height: 1.45; }
.hero-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.exchange-chip, .document-chip { min-height: 43px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border: 1px solid #c8daf0; border-radius: 9px; color: var(--ink-900); background: #f8fbff; font-weight: 650; white-space: nowrap; }
.exchange-chip output { min-width: 66px; padding: 4px 6px; border-bottom: 1px solid #9fc1ea; color: var(--blue-700); font-weight: 750; text-align: right; }
.exchange-chip small { padding-left: 1px; color: var(--ink-500); font-size: 11px; font-weight: 650; }
.exchange-chip.is-loading output { color: var(--ink-500); }
.exchange-chip.is-error { border-color: #ef9a9f; background: #fff8f8; }
.currency-circle { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue-600); font-size: 14px; }
.document-chip { color: var(--blue-700); background: var(--blue-100); border-color: transparent; font-size: 14px; }

.status-dot { width: 10px; height: 10px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--ink-500); }
.status-dot--success { background: #4dcc65; box-shadow: 0 0 0 4px rgba(77,204,101,.1); }
.status-dot--muted { background: #7c8aa1; }
.status-dot--warning { background: #e99a21; box-shadow: 0 0 0 4px rgba(233,154,33,.12); }
.status-dot--error { background: var(--danger); box-shadow: 0 0 0 4px rgba(213,43,54,.1); }

.section-heading { min-height: 34px; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--ink-900); }
.section-heading > svg { width: 28px; height: 28px; color: var(--blue-600); stroke-width: 2; }
.section-line { height: 1px; flex: 1; background: var(--line); }

.form-grid { display: grid; gap: 15px 16px; }
.form-grid--client { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; }
.form-grid--document { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.form-grid--invoice-meta { grid-template-columns: minmax(150px, 1.12fr) minmax(125px, .82fr) minmax(145px, 1fr) minmax(140px, .95fr) minmax(125px, .85fr) minmax(120px, .85fr); gap: 12px; }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field--span-2 { grid-column: span 2; }

.field { min-width: 0; display: grid; align-content: start; gap: 6px; color: var(--ink-700); }
.field > span:first-child { font-size: 14px; font-weight: 650; }
.field b { color: var(--danger); }
.field em { color: var(--ink-500); font-style: normal; font-weight: 500; }
.field input, .field select, .field textarea, .compact-select {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    outline: 0;
    color: #17346a;
    background: #fbfdff;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .compact-select:focus { border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 3px rgba(8,117,245,.1); }
.field input[readonly] { color: var(--ink-600); background: #f4f7fa; }
.field select:disabled { color: var(--ink-500); background: #f1f5f9; }
.field small { color: var(--blue-700); font-size: 13px; }
.field small input { width: 76px; min-height: 30px; margin: 0 5px; padding: 2px 7px; }
.form-grid--invoice-meta > .field { gap: 4px; }
.form-grid--invoice-meta > .field > span:first-child { font-size: 13px; }
.form-grid--invoice-meta > .field > input,
.form-grid--invoice-meta > .field > select { min-height: 38px; padding: 6px 9px; font-size: 14px; }
.credit-term-control { position: relative; display: block; }
.form-grid--invoice-meta .credit-term-control input { min-height: 38px; padding: 6px 42px 6px 9px; font-size: 14px; }
.credit-term-control small { position: absolute; top: 50%; right: 10px; color: var(--ink-600); transform: translateY(-50%); pointer-events: none; }
.input-with-action { display: flex; }
.input-with-action input { border-radius: 7px 0 0 7px; }
.square-button { width: 44px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--blue-500); border-left: 0; border-radius: 0 7px 7px 0; color: var(--blue-600); background: #fff; }
.square-button:hover { color: #fff; background: var(--blue-600); }
.phone-control { display: grid; grid-template-columns: 76px 1fr; gap: 8px; }
.field--checkbox { min-height: 43px; display: flex; align-items: center; gap: 10px; padding-top: 27px; }
.field--checkbox input { width: 19px; min-height: 19px; accent-color: var(--blue-600); }
.field--checkbox > span { display: grid; font-size: 14px; font-weight: 650; }
.field--checkbox small { color: var(--ink-500); font-weight: 400; }
.regulatory-charges { display: grid; gap: 9px; padding: 14px 16px; border: 1px solid #b9d7f7; border-radius: 9px; background: #f2f8ff; color: var(--ink-700); }
.regulatory-charges[hidden] { display: none; }
.regulatory-charges > strong { color: var(--ink-900); font-size: 14px; }
.regulatory-charges label { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 9px; font-size: 14px; }
.regulatory-charges input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue-600); opacity: 1; }
.regulatory-charges label b { color: var(--blue-700); }
.regulatory-charges small { color: var(--ink-600); }
.button {
    min-height: 41px;
    padding: 8px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 650;
    line-height: 1.2;
    transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button--primary { color: #fff; background: linear-gradient(135deg, #087cf7, #075ee0); box-shadow: 0 6px 15px rgba(7,100,225,.18); }
.button--primary:hover:not(:disabled) { box-shadow: 0 9px 20px rgba(7,100,225,.28); }
.button--outline { color: var(--blue-700); border-color: #99c3f0; background: #fff; }
.button--outline:hover:not(:disabled) { background: var(--blue-50); border-color: var(--blue-500); }
.button--soft { color: var(--blue-700); background: var(--blue-100); }
.button--quiet { color: #425b87; border-color: var(--line); background: #f9fbfe; }
.button--large { min-height: 52px; padding-inline: 20px; }
.button--block { width: 100%; }

.products-detail { padding-bottom: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; color: var(--ink-700); }
th, td { padding: 13px 14px; border-bottom: 1px solid #e2ebf4; text-align: left; vertical-align: middle; }
th { color: #314b78; background: #f4f8fc; font-size: 13px; font-weight: 750; white-space: nowrap; }
td { font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafdff; }
.invoice-lines-table { min-width: 1040px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.invoice-lines-table th, .invoice-lines-table td { padding: 10px 11px; border-right: 1px solid #e2ebf4; }
.invoice-lines-table th:last-child, .invoice-lines-table td:last-child { border-right: 0; }
.line-regulatory-charge { display: block; margin-top: 3px; color: #075fad; font-size: 11px; font-weight: 650; white-space: nowrap; }
.invoice-status-cell { display: grid; justify-items: start; gap: 5px; }
.invoice-status-detail { color: var(--ink-500); font-size: 11px; font-weight: 650; line-height: 1.2; }
.received-documents-table { min-width: 1120px; }
.received-documents-table th:first-child, .received-documents-table td:first-child { min-width: 235px; }
.received-documents-table th:nth-child(2), .received-documents-table td:nth-child(2) { min-width: 250px; }
.received-documents-table th:last-child, .received-documents-table td:last-child { min-width: 185px; }
.received-documents-table td:first-child code { white-space: nowrap; font-size: 13px; }
.align-right { text-align: right; }
.align-center { text-align: center; }
.empty-table { min-height: 190px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed #bcd1e8; border-radius: 9px; color: var(--ink-600); background: #fbfdff; }
.empty-table .empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 7px; border-radius: 50%; color: var(--blue-600); background: var(--blue-100); }
.empty-table p { margin: 2px 0 12px; }
.empty-table .button { min-height: 36px; }
.row-actions { display: flex; justify-content: center; gap: 6px; }
.table-action { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid #c8ddf2; border-radius: 7px; color: var(--blue-700); background: #eef7ff; }
.table-action:hover { background: #dceeff; }
.table-action--disabled, .table-action:disabled { cursor: not-allowed; opacity: .45; color: var(--ink-500); background: #f3f6f9; }
.table-action--danger { color: var(--danger); border-color: #f2bec3; background: var(--danger-bg); }
.table-action svg { width: 17px; height: 17px; }

.observations { position: relative; margin-top: 16px; }
.observations > span { display: flex; align-items: center; gap: 8px; color: var(--ink-900); font-size: 18px !important; }
.observations > span svg { color: var(--blue-600); }
.observations textarea { min-height: 75px; padding-right: 60px; }
.char-counter { position: absolute; right: 10px; bottom: 8px; color: var(--ink-500) !important; }

.invoice-totals { margin-top: 17px; padding: 14px 16px; display: flex; align-items: center; gap: 22px; }
.totals-list { display: flex; flex: 1; flex-wrap: wrap; align-items: stretch; row-gap: 8px; }
.totals-list > div { min-width: 135px; padding: 5px 20px; display: grid; border-right: 1px solid var(--line); }
.totals-list > div:first-child { padding-left: 5px; }
.totals-list small { color: #31507c; font-size: 13px; }
.totals-list strong { color: #102450; font-size: 22px; letter-spacing: -.25px; }
.totals-list .grand-total { min-width: 180px; border: 0; border-radius: 8px; background: linear-gradient(135deg, #e9f5ff, #d9eeff); }
.grand-total small, .grand-total strong { color: var(--blue-700); }
.grand-total strong { font-size: 26px; }
.invoice-actions { display: flex; gap: 10px; }
.eyebrow { margin-bottom: 5px; color: var(--blue-700); font-size: 13px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--ink-600); }
.page-heading { margin: 5px 0 20px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.page-heading h1 { margin-bottom: 5px; }
.page-heading p:last-child { margin-bottom: 0; color: var(--ink-600); font-size: 16px; }
.module-placeholder { min-height: 180px; padding: 30px; display: flex; align-items: center; gap: 20px; }
.module-placeholder__icon { width: 58px; height: 58px; flex: 0 0 58px; display: grid; place-items: center; border-radius: 14px; color: var(--blue-600); background: var(--blue-100); }
.module-placeholder__icon svg { width: 29px; height: 29px; }
.module-placeholder h2 { margin-bottom: 5px; font-size: 20px; }
.module-placeholder p { max-width: 720px; margin: 0; color: var(--ink-600); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stats-grid--reports { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card { min-height: 130px; padding: 19px; display: flex; align-items: center; gap: 15px; border: 1px solid #dfe9f3; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat-icon { width: 50px; height: 50px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; }
.stat-icon svg { width: 25px; height: 25px; }
.stat-icon--blue { color: var(--blue-700); background: var(--blue-100); }
.stat-icon--green { color: var(--success); background: var(--success-bg); }
.stat-icon--amber { color: var(--warning); background: var(--warning-bg); }
.stat-icon--violet { color: var(--violet); background: #f0eaff; }
.stat-card div { display: grid; }
.stat-card small { color: var(--ink-600); font-size: 14px; }
.stat-card strong { color: var(--ink-900); font-size: 27px; line-height: 1.25; }
.stat-card span:last-child { color: var(--ink-500); font-size: 13px; }
.card-header { min-height: 76px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.card-header p { margin: 3px 0 0; color: var(--ink-600); font-size: 14px; }
.list-card { overflow: hidden; }
.toolbar { padding: 15px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.search-control { width: min(500px, 100%); height: 43px; padding: 0 12px; }
.compact-select { width: auto; min-width: 190px; margin-left: auto; }
.record-count { margin-left: auto; color: var(--ink-600); font-size: 14px; font-weight: 650; }
.entity-cell { display: flex; align-items: center; gap: 11px; }
.entity-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--blue-700); background: var(--blue-100); font-weight: 750; }
.entity-cell div { min-width: 0; display: grid; }
.entity-cell strong { color: var(--ink-900); font-size: 14px; }
.entity-cell small { color: var(--ink-500); font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 9px; border-radius: 999px; color: var(--ink-700); background: #edf2f7; font-size: 12px; font-weight: 750; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--accepted, .badge--active { color: #087f4c; background: var(--success-bg); }
.badge--queued, .badge--submitting, .badge--processing, .badge--received, .badge--submission_unknown { color: #9a5a00; background: var(--warning-bg); }
.badge--rejected, .badge--error { color: var(--danger); background: var(--danger-bg); }
.badge--draft { color: #54657e; background: #edf2f7; }
.empty-row td { padding: 42px 16px; color: var(--ink-500); text-align: center; }
.badge--pending { color: #9a5a00; background: var(--warning-bg); }

turbo-frame#clients_module,
turbo-frame#products_module,
turbo-frame#quotes_module,
turbo-frame#collections_module,
turbo-frame#recurring_module,
turbo-frame#settings_module,
turbo-frame#invoice_composer { display: block; }
turbo-frame#resource_modal:empty { display: none; }
.resource-search { width: min(500px, 100%); }
.resource-search .search-control { width: 100%; }
.row-actions form { display: contents; }
.inline-alert { margin: 0 0 14px; padding: 11px 14px; display: flex; align-items: center; gap: 9px; border: 1px solid #b9d6f7; border-radius: 9px; color: var(--blue-700); background: #f2f8ff; font-size: 14px; font-weight: 650; }
.inline-alert svg { width: 19px; height: 19px; flex: 0 0 auto; }
.inline-alert--success { border-color: #9bd8bc; color: #0c7448; background: var(--success-bg); }
.inline-alert--error { border-color: #efb0b5; color: #ae1f29; background: var(--danger-bg); }
.quotes-heading { margin-bottom: 14px; }
.quote-stats-grid { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quote-stat-card { min-height: 96px; padding: 14px 16px; display: flex; align-items: center; gap: 15px; box-shadow: 0 7px 22px rgba(21, 66, 111, .07); }
.quote-stat-card__icon { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: var(--blue-700); background: #e7f2ff; }
.quote-stat-card__icon svg { width: 27px; height: 27px; }
.quote-stat-card__icon--green { color: #07975b; background: #def7ea; }
.quote-stat-card__icon--amber { color: #ce8500; background: #fff3cf; }
.quote-stat-card__copy { min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1px 10px; }
.quote-stat-card__copy small { grid-column: 1 / -1; color: var(--ink-600); font-size: 13px; }
.quote-stat-card__copy strong { color: var(--ink-900); font-size: 24px; line-height: 1.1; }
.quote-stat-card__copy span { color: var(--ink-500); font-size: 12px; }
.quote-list-card { overflow: hidden; }
.quote-filter-bar { padding: 14px; display: grid; grid-template-columns: minmax(310px, 1.3fr) 160px minmax(390px, 1fr) auto; align-items: end; gap: 12px; border-bottom: 1px solid var(--line); background: #fff; }
.quote-search { width: 100%; height: 43px; }
.quote-filter-status { gap: 5px; }
.quote-date-filter { height: 65px; padding: 5px 11px 9px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: #f9fbfe; }
.quote-date-filter legend { padding-inline: 4px; color: var(--ink-600); font-size: 12px; font-weight: 650; }
.quote-date-filter label { min-width: 0; display: flex; align-items: center; gap: 6px; }
.quote-date-filter label span { color: var(--ink-500); font-size: 12px; }
.quote-date-filter input { min-width: 125px; padding: 0; border: 0; outline: 0; color: var(--ink-800); background: transparent; }
.quote-filter-clear { min-height: 43px; }
.quotes-table th, .quotes-table td { white-space: nowrap; }
.quotes-table td:nth-child(2) { min-width: 190px; white-space: normal; }
.quote-number-cell { display: flex; align-items: center; gap: 11px; }
.quote-number-cell > span { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: var(--blue-600); background: #e8f3ff; }
.quote-number-cell svg { width: 19px; height: 19px; }
.quote-number-cell div, .quote-client-cell { display: grid; gap: 2px; }
.quote-number-cell strong { color: var(--blue-700); font-size: 13px; }
.quote-number-cell small, .quote-client-cell small { color: var(--ink-500); font-size: 12px; }
.quote-client-cell strong { color: var(--ink-800); font-size: 13px; }
.quote-total { color: var(--ink-900); font-weight: 720; }
.quote-status { width: fit-content; padding: 5px 9px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.quote-status svg { width: 14px; height: 14px; }
.quote-status--sent { color: #076bd8; background: #e0f0ff; }
.quote-status--accepted { color: #07804d; background: #def7ea; }
.quote-status--pending { color: #aa6b00; background: #fff2c9; }
.quote-status--draft { color: #5c6d86; background: #eaf0f7; }
.quote-status--rejected, .quote-status--expired { color: #c32c36; background: #ffe7e9; }
.quote-actions { flex-wrap: nowrap; }
.quote-pagination { min-height: 66px; padding: 12px 16px; display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); color: var(--ink-600); font-size: 13px; }
.quote-pagination > span { margin-right: auto; }
.quote-pagination nav { display: flex; gap: 5px; }
.quote-pagination nav a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink-700); background: #fff; text-decoration: none; }
.quote-pagination nav a.is-active { border-color: var(--blue-600); color: #fff; background: var(--blue-600); }
.quote-pagination > label { display: flex; align-items: center; gap: 9px; }
.quote-pagination select { width: 72px; min-height: 36px; padding: 5px 9px; }
.quote-pagination > form { display: none; }

.quote-composer { display: grid; gap: 16px; }
.quote-composer-hero { margin: 0; }
.quote-form { display: grid; gap: 16px; }
.quote-main-card, .quote-lines-card, .quote-notes-card { margin: 0; }
.quote-header-fields { grid-template-columns: minmax(280px, 2fr) repeat(5, minmax(135px, 1fr)); }
.quote-document-number { color: var(--blue-700); font-size: 13px; font-weight: 700; }
.quote-lines-card { overflow: hidden; }
.quote-lines-card .section-heading { margin: 0; padding: 18px; }
.quote-lines-card .table-wrap { border-top: 1px solid var(--line); }
.quote-lines-table { min-width: 1180px; }
.quote-lines-table th, .quote-lines-table td { padding: 9px 7px; }
.quote-lines-table th:nth-child(1) { min-width: 190px; }
.quote-lines-table th:nth-child(2) { min-width: 100px; }
.quote-lines-table th:nth-child(3) { min-width: 260px; }
.quote-lines-table th:nth-child(4) { width: 80px; }
.quote-lines-table th:nth-child(5) { width: 90px; }
.quote-lines-table th:nth-child(6) { width: 120px; }
.quote-lines-table th:nth-child(7), .quote-lines-table th:nth-child(8) { width: 85px; }
.quote-lines-table input, .quote-lines-table select { width: 100%; min-height: 37px; padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink-800); background: #fff; }
.quote-composer-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; }
.quote-notes-card textarea { resize: vertical; }
.quote-total-card { padding: 16px 0; overflow: hidden; }
.quote-total-card > div { padding: 7px 20px; display: flex; justify-content: space-between; gap: 20px; color: var(--ink-700); }
.quote-total-card .quote-grand-total { margin-top: 7px; padding-block: 15px; color: var(--ink-900); background: #e5f2ff; font-size: 18px; }
.quote-total-card .quote-grand-total strong { color: var(--blue-800); font-size: 22px; }
.quote-save-bar { position: sticky; z-index: 8; bottom: 12px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #c7dbee; border-radius: 11px; color: var(--ink-600); background: rgba(255,255,255,.96); box-shadow: 0 13px 36px rgba(16,55,95,.15); backdrop-filter: blur(12px); font-size: 13px; }
.quote-save-bar > div, .quote-preview-actions { display: flex; gap: 9px; }

.quote-preview-sheet { padding: 28px; }
.quote-preview-sheet > header { padding-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--line); }
.quote-preview-sheet header small { color: var(--ink-500); }
.quote-preview-sheet header h2 { margin: 4px 0; font-size: 23px; }
.quote-preview-sheet dl { min-width: 320px; margin: 0; display: grid; gap: 7px; }
.quote-preview-sheet dl div { display: flex; justify-content: space-between; gap: 20px; }
.quote-preview-sheet dt { color: var(--ink-600); }
.quote-preview-sheet dd { margin: 0; color: var(--ink-900); font-weight: 650; }
.quote-preview-sheet .table-wrap { margin-top: 22px; border: 1px solid var(--line); border-radius: 9px; }
.quote-preview-sheet > footer { margin-top: 22px; display: grid; grid-template-columns: 1fr 390px; gap: 30px; }
.quote-preview-notes p { color: var(--ink-600); line-height: 1.6; }
.quote-preview-totals { display: grid; gap: 5px; }
.quote-preview-totals div { padding: 6px 10px; display: flex; justify-content: space-between; }
.quote-preview-totals div:last-child { margin-top: 5px; padding-block: 13px; background: #e4f2ff; font-size: 18px; }

@media (max-width: 1320px) {
    .quote-filter-bar { grid-template-columns: 1fr 160px; }
    .quote-date-filter { grid-column: 1 / 2; }
    .quote-filter-clear { grid-column: 2 / 3; }
    .quote-header-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .quote-client-field { grid-column: span 2; }
}
@media (max-width: 980px) {
    .quote-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quote-header-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quote-composer-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .quote-stats-grid, .quote-filter-bar, .quote-header-fields { grid-template-columns: 1fr; }
    .quote-date-filter, .quote-filter-clear, .quote-client-field { grid-column: auto; }
    .quote-date-filter { height: auto; align-items: stretch; flex-direction: column; }
    .quote-pagination { align-items: flex-start; flex-direction: column; }
    .quote-pagination > span { margin: 0; }
    .quote-save-bar { align-items: stretch; flex-direction: column; }
    .quote-save-bar > div { display: grid; grid-template-columns: 1fr 1fr; }
    .quote-preview-sheet { padding: 18px; }
    .quote-preview-sheet > header, .quote-preview-sheet > footer { grid-template-columns: 1fr; display: grid; }
    .quote-preview-sheet dl { min-width: 0; }
    .quote-preview-actions { width: 100%; display: grid; }
}
.collection-heading { margin-bottom: 14px; }
.collection-stats-grid { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.collection-stat-card { min-height: 103px; padding: 15px 17px; display: flex; align-items: center; gap: 15px; box-shadow: 0 8px 24px rgba(21, 66, 111, .07); }
.collection-stat-icon { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; }
.collection-stat-icon svg { width: 28px; height: 28px; }
.collection-stat-icon--blue { color: #086ce0; background: #e3f1ff; }
.collection-stat-icon--green { color: #07975b; background: #def7ea; }
.collection-stat-icon--red { color: #e02c38; background: #ffe6e8; }
.collection-stat-icon--violet { color: #6f3cdb; background: #eee8ff; }
.collection-stat-card > div { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: end; }
.collection-stat-card > div > small:first-child { grid-column: 1 / -1; color: var(--ink-600); font-size: 13px; }
.collection-stat-card strong { grid-column: 1 / -1; color: var(--ink-900); font-size: clamp(18px, 1.45vw, 23px); line-height: 1.25; white-space: nowrap; }
.collection-stat-card span { display: flex; align-items: center; gap: 8px; color: var(--ink-500); font-size: 12px; }
.collection-stat-card span small { padding: 2px 7px; border-radius: 999px; color: var(--ink-600); background: #edf3f8; font-size: 11px; }
.collection-list-card { overflow: hidden; container-type: inline-size; }
.collection-tabs { height: 54px; display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); border-bottom: 1px solid var(--line); }
.collection-tabs a { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-600); text-decoration: none; font-weight: 650; }
.collection-tabs a::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; content: ""; }
.collection-tabs a.is-active { color: var(--blue-700); }
.collection-tabs a.is-active::after { background: var(--blue-600); }
.collection-tabs svg { width: 21px; height: 21px; }
.collection-filter-bar { padding: 12px; display: grid; align-items: end; gap: 11px; border-bottom: 1px solid var(--line); background: #fff; }
.collection-filter-bar--pending { grid-template-columns: minmax(235px, 1.2fr) 140px minmax(175px, .7fr) minmax(405px, 1.15fr) max-content; }
.collection-filter-bar--payments { grid-template-columns: minmax(260px, 1.25fr) minmax(190px, .75fr) minmax(405px, 1.15fr) max-content; }
.collection-filter-bar--statements { grid-template-columns: minmax(280px, 1fr) minmax(230px, .7fr) max-content; }
.collection-search { width: 100%; height: 43px; }
.collection-status-filter, .collection-client-filter { gap: 5px; }
.collection-date-filter { width: 100%; min-width: 0; min-height: 64px; padding: 4px 10px 8px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: #f9fbfe; }
.collection-date-filter legend { padding-inline: 4px; color: var(--ink-600); font-size: 12px; font-weight: 650; }
.collection-date-filter label { min-width: 0; display: flex; flex: 1 1 0; align-items: center; gap: 6px; }
.collection-date-filter label span { color: var(--ink-500); font-size: 12px; }
.collection-date-filter input { width: 100%; min-width: 112px; padding: 0; border: 0; outline: 0; background: transparent; }
.collection-clear { min-height: 43px; justify-self: end; white-space: nowrap; }
.collection-table th, .collection-table td { white-space: nowrap; }
.collection-receivables-table { min-width: 1220px; }
.collection-document-cell { display: flex; align-items: center; gap: 10px; }
.collection-document-cell > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: var(--blue-600); background: #e7f2ff; }
.collection-document-cell svg { width: 18px; height: 18px; }
.collection-document-cell div, .collection-client-cell { min-width: 0; display: grid; gap: 2px; }
.collection-document-cell strong { color: var(--blue-700); font-size: 12px; }
.collection-document-cell small, .collection-client-cell small { color: var(--ink-500); font-size: 11.5px; }
.collection-client-cell strong { max-width: 240px; overflow: hidden; color: var(--ink-800); font-size: 12.5px; text-overflow: ellipsis; }
.collection-amount { color: var(--ink-900); font-weight: 750; }
.collection-amount--received { color: #087e50; font-weight: 720; }
.collection-amount--overdue { color: #c72e38; font-weight: 720; }
.collection-status { width: fit-content; padding: 5px 9px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.collection-status svg { width: 14px; height: 14px; }
.collection-status--pending { color: #aa6b00; background: #fff2c9; }
.collection-status--partial { color: #076bd8; background: #e0f0ff; }
.collection-status--paid { color: #07804d; background: #def7ea; }
.collection-status--overdue { color: #c32c36; background: #ffe7e9; }
.collection-actions { flex-wrap: nowrap; }
.collection-currency { padding: 4px 8px; border-radius: 6px; color: var(--blue-800); background: #e8f3ff; font-size: 12px; font-weight: 750; }
.collection-pagination { min-height: 65px; padding: 12px 16px; display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); color: var(--ink-600); font-size: 13px; }
.collection-pagination > span { margin-right: auto; }
.collection-pagination nav { display: flex; gap: 5px; }
.collection-pagination nav a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink-700); background: #fff; text-decoration: none; }
.collection-pagination nav a.is-active { border-color: var(--blue-600); color: #fff; background: var(--blue-600); }
.collection-pagination > label { display: flex; align-items: center; gap: 9px; }
.collection-pagination select { width: 72px; min-height: 36px; padding: 5px 9px; }
.collection-pagination > form { display: none; }

.payment-composer { display: grid; gap: 16px; }
.collection-payment-hero { margin: 0; }
.collection-payment-form { display: grid; gap: 16px; }
.collection-payment-grid { grid-template-columns: minmax(320px, 2fr) minmax(180px, .7fr) minmax(200px, .8fr); }
.collection-money-input { display: grid; grid-template-columns: auto 1fr; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.collection-money-input b { height: 100%; padding-inline: 12px; display: grid; place-items: center; color: var(--blue-700); background: #eaf4ff; font-size: 12px; }
.collection-money-input input { border: 0; }
.collection-balance-preview { margin-top: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #c9ddf0; border-radius: 9px; color: var(--ink-600); background: #f5faff; font-size: 13px; }
.collection-balance-preview span { display: grid; gap: 2px; }
.collection-balance-preview span:last-child { text-align: right; }
.collection-balance-preview strong { color: var(--blue-800); font-size: 18px; }
.collection-payment-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.collection-payment-notes { grid-column: 1 / -1; }
.collection-payment-notes textarea { resize: vertical; }
.collection-empty-payment { min-height: 180px; padding: 30px; display: flex; align-items: center; gap: 20px; }
.collection-empty-payment > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 15px; color: #07804d; background: #def7ea; }
.collection-empty-payment svg { width: 30px; height: 30px; }

@container (max-width: 1160px) {
    .collection-filter-bar--pending { grid-template-columns: minmax(250px, 1fr) 140px minmax(190px, .75fr) max-content; }
    .collection-filter-bar--pending .collection-date-filter { grid-row: 2; grid-column: 1 / 4; }
    .collection-filter-bar--pending .collection-clear { grid-row: 2; grid-column: 4 / 5; }
}
@container (max-width: 900px) {
    .collection-filter-bar--payments { grid-template-columns: minmax(250px, 1fr) minmax(190px, .75fr) max-content; }
    .collection-filter-bar--payments .collection-date-filter { grid-row: 2; grid-column: 1 / 3; }
    .collection-filter-bar--payments .collection-clear { grid-row: 2; grid-column: 3 / 4; }
}
@media (max-width: 1050px) {
    .collection-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .collection-payment-grid { grid-template-columns: 1fr 1fr; }
    .collection-invoice-field { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .collection-stats-grid, .collection-filter-bar, .collection-filter-bar--pending, .collection-filter-bar--payments, .collection-filter-bar--statements, .collection-payment-grid, .collection-payment-detail-grid { grid-template-columns: 1fr; }
    .collection-filter-bar--pending .collection-date-filter,
    .collection-filter-bar--pending .collection-clear,
    .collection-filter-bar--payments .collection-date-filter,
    .collection-filter-bar--payments .collection-clear,
    .collection-date-filter, .collection-clear, .collection-invoice-field, .collection-payment-notes { grid-row: auto; grid-column: auto; }
    .collection-tabs { height: auto; grid-template-columns: 1fr; }
    .collection-tabs a { min-height: 48px; }
    .collection-date-filter { align-items: stretch; flex-direction: column; }
    .collection-pagination { align-items: flex-start; flex-direction: column; }
    .collection-pagination > span { margin: 0; }
    .collection-balance-preview { align-items: flex-start; flex-direction: column; }
    .collection-balance-preview span:last-child { text-align: left; }
}
.reception-guide { margin-bottom: 17px; padding: 16px 19px; display: flex; align-items: center; gap: 14px; border-color: #b9d6f7; background: linear-gradient(120deg, #f4f9ff, #fff); }
.reception-guide__icon { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--blue-700); background: var(--blue-100); }
.reception-guide__icon svg { width: 23px; height: 23px; }
.reception-guide strong { display: block; color: var(--ink-900); font-size: 16px; }
.reception-guide p { margin: 2px 0 0; color: var(--ink-600); font-size: 14px; }

.modal.cabys-picker-modal { width: min(860px, calc(100vw - 28px)); }
.cabys-picker-intro { margin: 0 0 17px; color: var(--ink-600); font-size: 15px; }
.cabys-picker-search { max-width: none; display: flex; gap: 10px; }
.cabys-picker-search .search-control { width: auto; min-height: 46px; flex: 1; }
.cabys-picker-summary { min-height: 25px; margin-top: 13px; color: var(--ink-600); font-size: 14px; font-weight: 600; }
.cabys-picker-results { max-height: min(430px, 48vh); margin-top: 20px; padding-right: 3px; display: grid; gap: 8px; overflow-y: auto; }
.cabys-picker-result { width: 100%; padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-900); background: #fff; text-align: left; transition: border-color .15s, box-shadow .15s, background .15s; }
.cabys-picker-result:hover, .cabys-picker-result:focus-visible { border-color: var(--blue-500); outline: 0; background: var(--blue-50); box-shadow: 0 0 0 3px rgba(8,117,245,.1); }
.cabys-picker-result__copy { min-width: 0; display: grid; gap: 5px; }
.cabys-picker-result__copy code { width: fit-content; padding: 3px 7px; border-radius: 5px; color: var(--blue-700); background: var(--blue-100); font-size: 14px; font-weight: 800; letter-spacing: .2px; }
.cabys-picker-result__copy strong { color: var(--ink-700); font-size: 15px; line-height: 1.4; }
.cabys-picker-result__action { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--blue-700); font-size: 14px; font-weight: 750; }
.cabys-picker-result__action svg { width: 18px; height: 18px; }
.cabys-picker-loading, .cabys-picker-empty { min-height: 125px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--ink-600); background: #fbfdff; font-size: 14px; }
.cabys-picker-empty { flex-direction: column; text-align: center; }
.cabys-picker-empty > svg { width: 31px; height: 31px; color: var(--blue-600); }
.cabys-picker-empty strong { color: var(--ink-900); font-size: 16px; }
.cabys-picker-empty--error > svg, .cabys-picker-empty--error strong { color: var(--danger); }
.reference-selection-status { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border: 1px solid #b9d6f7; border-radius: 8px; color: var(--blue-700); background: var(--blue-50); font-size: 14px; font-weight: 650; }
.reference-picker-modal { width: min(880px, calc(100vw - 28px)); }
.reference-picker-intro { margin: 0 0 16px; color: var(--ink-600); font-size: 15px; }
.reference-picker-results { max-height: min(470px, 55vh); display: grid; gap: 9px; overflow-y: auto; }
.reference-picker-result { width: 100%; padding: 14px 15px; display: grid; grid-template-columns: minmax(180px, 1.25fr) minmax(130px, .8fr) minmax(120px, .65fr) auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-700); background: #fff; text-align: left; cursor: pointer; }
.reference-picker-result:hover, .reference-picker-result:focus-visible { border-color: var(--blue-500); outline: 0; background: var(--blue-50); box-shadow: 0 0 0 3px rgba(8,117,245,.1); }
.reference-picker-result span { min-width: 0; display: grid; gap: 3px; }
.reference-picker-result small { color: var(--ink-500); font-size: 12px; }
.reference-picker-result strong, .reference-picker-result code { overflow: hidden; color: var(--ink-900); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.reference-picker-result__action { color: var(--blue-700); font-weight: 750; }
.reference-picker-empty { min-height: 150px; padding: 22px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--ink-600); background: #fbfdff; text-align: center; }
.status-bars { padding: 24px; display: grid; gap: 16px; }
.status-bar-label { margin-bottom: 6px; display: flex; justify-content: space-between; color: var(--ink-700); font-size: 14px; font-weight: 650; }
.status-bar-track { height: 11px; overflow: hidden; border-radius: 999px; background: #e9eff6; }
.status-bar-fill { height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), #46a8ff); }
.settings-grid { width: 100%; display: grid; gap: 17px; }
.settings-grid .form-card { margin-top: 0; }
.settings-module-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.settings-module-card { min-height: 128px; padding: 17px; display: grid; grid-template-columns: 46px minmax(0, 1fr) 18px; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-700); background: #fff; box-shadow: var(--shadow); text-decoration: none; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease; }
.settings-module-card:hover { border-color: #94bce8; background: #f8fbff; box-shadow: 0 13px 30px rgba(20, 66, 114, .12); transform: translateY(-2px); }
.settings-module-card__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 11px; color: var(--blue-700); background: var(--blue-100); }
.settings-module-card__icon svg { width: 24px; height: 24px; }
.settings-module-card__copy { min-width: 0; display: grid; gap: 5px; }
.settings-module-card__copy strong { color: var(--ink-900); font-size: 16px; }
.settings-module-card__copy small { color: var(--ink-600); font-size: 13px; line-height: 1.35; }
.settings-module-card__arrow { width: 17px; height: 17px; color: var(--ink-500); transform: rotate(-90deg); }
.settings-detail-heading { margin-bottom: 20px; display: grid; gap: 14px; }
.settings-detail-heading__back { width: max-content; display: inline-flex; align-items: center; gap: 7px; color: var(--blue-700); font-size: 14px; font-weight: 700; text-decoration: none; }
.settings-detail-heading__back:hover { color: var(--blue-800); text-decoration: underline; }
.settings-detail-heading__back svg { width: 17px; height: 17px; transform: rotate(90deg); }
.settings-detail-heading__title { display: flex; align-items: center; gap: 14px; }
.settings-detail-heading__title h1 { margin: 1px 0 3px; color: var(--ink-900); font-size: 30px; letter-spacing: -.025em; }
.settings-detail-heading__title p:not(.eyebrow) { margin: 0; color: var(--ink-600); font-size: 15px; }
.settings-user-module { margin-top: 0; }
.tenant-users-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .65fr); align-items: start; gap: 17px; }
.tenant-users-card, .tenant-user-create { margin: 0; padding: 20px; }
.tenant-users-table { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; }
.tenant-users-table table { min-width: 650px; }
.tenant-user-identity { min-width: 210px; display: flex; align-items: center; gap: 10px; }
.tenant-user-identity > i { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--blue-700); background: var(--blue-100); font-style: normal; font-weight: 800; }
.tenant-user-identity > span { min-width: 0; display: grid; }
.tenant-user-identity strong { color: var(--ink-900); }
.tenant-user-identity small { color: var(--ink-500); }
.role-chip { width: fit-content; padding: 5px 8px; display: inline-flex; border-radius: 999px; color: var(--ink-700); background: #edf3f9; font-size: 11px; font-weight: 700; white-space: nowrap; }
.role-chip--owner { color: #6d38bf; background: #f0e8ff; }
.role-chip--admin { color: var(--blue-700); background: var(--blue-100); }
.role-chip--billing { color: #087852; background: #e0f7ed; }
.tenant-user-create > header { margin-bottom: 18px; display: flex; align-items: flex-start; gap: 11px; }
.tenant-user-create > header > span { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--blue-700); background: var(--blue-100); }
.tenant-user-create > header svg { width: 22px; height: 22px; }
.tenant-user-create h2 { margin: 0 0 3px; font-size: 18px; }
.tenant-user-create p { margin: 0; color: var(--ink-600); font-size: 12px; line-height: 1.4; }
.tenant-user-create__fields { display: grid; gap: 13px; }
.tenant-user-create__fields .field > small { margin-top: 4px; color: var(--ink-500); font-size: 11px; }
.tenant-user-create > .button { width: 100%; margin-top: 17px; }
.company-fiscal-card { overflow: visible; }
.fiscal-validation-summary { margin: 0 0 18px; padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; border: 1px solid #efb0b5; border-radius: 11px; color: #8f1f28; background: #fff5f5; }
.fiscal-validation-summary > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #bc2732; background: #ffe2e5; }
.fiscal-validation-summary svg { width: 20px; height: 20px; }
.fiscal-validation-summary strong { color: #811b23; font-size: 14px; }
.fiscal-validation-summary ul { margin: 7px 0 0; padding-left: 19px; display: grid; gap: 4px; font-size: 13px; line-height: 1.42; }
.field--invalid > input, .field--invalid > select, .field--invalid > textarea, .field--invalid > .input-with-action input { border-color: #d52b36; background: #fff9f9; box-shadow: 0 0 0 3px rgba(213,43,54,.08); }
.field-validation-message { margin-top: 5px; display: block; color: #b4232d !important; font-size: 11px; font-weight: 650; line-height: 1.35; }
.fiscal-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.fiscal-settings-block { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdff; }
.fiscal-settings-block > header { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 11px; }
.fiscal-settings-block > header > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--blue-700); background: var(--blue-100); }
.fiscal-settings-block > header svg { width: 20px; height: 20px; }
.fiscal-settings-block h3, .fiscal-environment-card h3 { margin: 0 0 3px; color: var(--ink-900); font-size: 16px; }
.fiscal-settings-block header p { margin: 0; color: var(--ink-600); font-size: 12px; line-height: 1.4; }
.form-grid--fiscal-identity, .form-grid--fiscal-address, .form-grid--fiscal-contact, .form-grid--fiscal-terminal, .form-grid--fiscal-credentials { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.fiscal-environments-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.fiscal-environment-card { padding: 18px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fbfdff; }
.fiscal-environment-card > header { margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.fiscal-environment-card .eyebrow { margin: 0 0 2px; font-size: 10px; }
.fiscal-environment-card__updated { margin-top: 12px; display: block; color: var(--ink-500); font-size: 11px; }
.fiscal-sequences-table { border: 1px solid var(--line); border-radius: 10px; }
.fiscal-sequences-table table { min-width: 720px; }
.fiscal-sequences-table th:nth-child(2), .fiscal-sequences-table td:nth-child(2) { width: 80px; text-align: center; }
.fiscal-sequences-table th:nth-child(3), .fiscal-sequences-table th:nth-child(4), .fiscal-sequences-table td:nth-child(3), .fiscal-sequences-table td:nth-child(4) { width: 180px; }
.fiscal-sequences-table input { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink-800); background: #fff; font: inherit; font-size: 13px; }
.fiscal-sequences-table input:focus { border-color: var(--blue-500); outline: 3px solid rgba(8,117,245,.1); }
.form-grid--company, .form-grid--smtp { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 15px 14px; }
.company-field--name { grid-column: span 4; }
.company-field--email { grid-column: span 5; }
.company-field--phone { grid-column: span 3; }
.company-field--address { grid-column: span 5; }
.company-field--website { grid-column: span 3; }
.company-field--tagline { grid-column: span 4; }
.company-taxpayer-status { margin-top: 4px; display: block; color: var(--ink-500); font-size: 11px; line-height: 1.35; }
.company-taxpayer-status--loading { color: #8b5700; }
.company-taxpayer-status--success { color: #0c7448; }
.company-taxpayer-status--error { color: var(--danger); }
.form-grid--company .company-logo-setting { grid-column: 1 / -1; }
.smtp-field--active { grid-column: 1 / -1; }
.smtp-field--host { grid-column: span 3; }
.smtp-field--port { grid-column: span 1; }
.smtp-field--encryption { grid-column: span 2; }
.smtp-field--user, .smtp-field--password { grid-column: span 3; }
.smtp-field--tls, .smtp-field--from-name, .smtp-field--from-email, .smtp-field--reply { grid-column: span 3; }
.settings-description { margin: -3px 0 18px; color: var(--ink-600); font-size: 15px; }
.recurring-schedule-card { border-color: #a9cdf5; background: linear-gradient(135deg, #fff 0%, #f3f9ff 100%); }
.company-logo-setting { min-height: 88px; padding: 12px; display: grid; grid-template-columns: 120px minmax(180px, 1fr) auto auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfe; }
.company-logo-preview { width: 120px; height: 62px; padding: 6px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #afc9e5; border-radius: 8px; color: var(--ink-500); background: #fff; font-size: 12px; }
.company-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.company-logo-copy { display: grid; gap: 3px; }
.company-logo-copy strong { color: var(--ink-900); font-size: 15px; }
.company-logo-copy small { color: var(--ink-600); font-size: 13px; }
.company-logo-select { cursor: pointer; }
.company-logo-select input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.pdf-template-usage { margin-bottom: 14px; padding: 13px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfe; }
.pdf-template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.pdf-template-option { position: relative; }
.pdf-template-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pdf-template-card { position: relative; min-height: 190px; padding: 14px 14px 54px; display: grid; grid-template-columns: 72px 1fr; gap: 11px 13px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--ink-700); background: #fbfdff; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.pdf-template-card > span:nth-child(2) { align-self: center; display: grid; gap: 5px; }
.pdf-template-card strong { color: var(--ink-900); font-size: 16px; }
.pdf-template-card small { color: var(--ink-600); font-size: 13px; line-height: 1.4; }
.pdf-template-card > svg { position: absolute; width: 21px; height: 21px; right: 13px; top: 13px; color: transparent; }
.pdf-template-option:hover .pdf-template-card { border-color: #87b9f0; background: var(--blue-50); }
.pdf-template-option > input:focus-visible + .pdf-template-card { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(8,117,245,.12); }
.pdf-template-option > input:checked + .pdf-template-card { border-color: var(--blue-500); background: var(--blue-50); box-shadow: 0 0 0 2px rgba(8,117,245,.1); }
.pdf-template-option > input:checked + .pdf-template-card > svg { color: var(--blue-600); }
.pdf-template-view { position: absolute; z-index: 1; left: 99px; bottom: 14px; min-height: 32px; padding: 5px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #9fc5ee; border-radius: 7px; color: var(--blue-700); background: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pdf-template-view:hover { border-color: var(--blue-500); background: #eaf5ff; }
.pdf-template-view:focus-visible { outline: 3px solid rgba(8,117,245,.18); outline-offset: 2px; }
.pdf-template-view svg { width: 17px; height: 17px; }
.pdf-preview { width: 72px; height: 96px; padding: 9px 7px; display: grid; align-content: start; gap: 7px; grid-row: span 2; border: 1px solid #cbd8e8; border-radius: 4px; background: #fff; box-shadow: 0 5px 13px rgba(25,59,94,.09); }
.pdf-preview i { display: block; height: 5px; border-radius: 2px; background: #c7d5e5; }
.pdf-preview i:first-child { width: 62%; height: 10px; background: var(--blue-600); }
.pdf-preview i:nth-child(3) { height: 24px; background: repeating-linear-gradient(#dbe5ef 0 1px, transparent 1px 7px); }
.pdf-preview--classic i:first-child { width: 100%; background: var(--navy-900); }
.pdf-preview--classic { border-top: 4px solid var(--navy-900); }
.pdf-preview--modern { background: linear-gradient(160deg, #f3f8ff, #fff 60%); }
.pdf-preview--compact { gap: 4px; }
.pdf-preview--compact i:nth-child(3) { height: 37px; }
.pdf-preview--interphone-letter { border-top: 4px solid var(--blue-600); background: linear-gradient(145deg, #fff, #eef8ff); }
.pdf-preview--interphone-letter i:first-child { width: 74%; background: var(--navy-900); }
.pdf-preview--interphone-letter i:nth-child(3) { height: 30px; border: 1px solid #a8cff4; background: repeating-linear-gradient(#e9f5ff 0 6px, #b9daf8 6px 7px); }
.connection-badge { display: flex; align-items: center; gap: 7px; color: var(--ink-600); font-size: 13px; font-weight: 650; }
.form-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 10px; }
.security-note { padding: 17px 20px; display: flex; gap: 14px; color: var(--ink-700); background: #f8fbff; }
.security-note > svg { width: 28px; height: 28px; flex: 0 0 auto; color: var(--success); }
.security-note p { margin: 0; }
.settings-save-bar { position: sticky; z-index: 8; bottom: 14px; padding: 14px 16px; display: flex; align-items: center; justify-content: flex-end; gap: 18px; border: 1px solid #c8daee; border-radius: 11px; color: var(--ink-600); background: rgba(255,255,255,.96); box-shadow: 0 12px 35px rgba(16,55,95,.14); backdrop-filter: blur(12px); font-size: 14px; }
.modal {
    width: min(780px, calc(100vw - 28px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 15px;
    background: transparent;
    box-shadow: 0 28px 80px rgba(5, 26, 52, .3);
}
.modal::backdrop { background: rgba(5, 24, 48, .54); backdrop-filter: blur(3px); }
.modal-card { max-height: calc(100vh - 32px); overflow: auto; border-radius: 15px; background: #fff; }
.modal-header { position: sticky; z-index: 2; top: 0; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
.modal-header .eyebrow { margin-bottom: 2px; }
.modal-body { padding: 20px; }
.client-lookup-panel { margin-bottom: 22px; padding: 17px; border: 1px solid #b9d6f7; border-radius: 11px; background: linear-gradient(145deg, #f5faff, #fff); }
.form-subheading { margin: 22px 0 14px; padding-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); color: var(--ink-900); }
.form-subheading--first { margin-top: 0; }
.form-subheading > div { display: flex; align-items: center; gap: 10px; }
.form-subheading strong { font-size: 16px; }
.form-subheading small { color: var(--ink-600); font-size: 13px; text-align: right; }
.step-number { width: 27px; height: 27px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--blue-600); font-size: 14px; font-weight: 750; }
.lookup-status { min-height: 42px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-600); background: #fff; font-size: 14px; }
.lookup-status--success { border-color: #9bd8bc; color: #0c7448; background: var(--success-bg); }
.lookup-status--loading { border-color: #f0cc89; color: #8b5700; background: var(--warning-bg); }
.lookup-status--error { border-color: #efb0b5; color: #ae1f29; background: var(--danger-bg); }
.modal-footer { position: sticky; z-index: 2; bottom: 0; padding: 14px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); background: #fff; }
.modal--small { width: min(520px, calc(100vw - 28px)); }
.xml-upload-control { min-height: 145px; padding: 24px; display: flex; align-items: center; justify-content: center; gap: 16px; border: 2px dashed #9ec6ee; border-radius: 12px; color: var(--ink-700); background: #f5faff; cursor: pointer; text-align: left; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.xml-upload-control:hover, .xml-upload-control:focus-within { border-color: var(--blue-600); background: #edf7ff; }
.xml-upload-control.is-dragover { border-color: var(--blue-600); background: #e5f3ff; box-shadow: 0 0 0 4px rgba(8,117,245,.12); transform: scale(1.01); }
.xml-upload-control.is-file-selected { border-style: solid; border-color: #6db3f7; background: #eef8ff; }
.xml-upload-control.is-file-selected .xml-upload-control__icon { color: #fff; background: var(--blue-600); }
.xml-upload-control input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.xml-upload-control__icon { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--blue-700); background: #fff; box-shadow: 0 5px 18px rgba(20, 91, 168, .13); }
.xml-upload-control__icon svg { width: 27px; height: 27px; }
.xml-upload-control strong { display: block; color: var(--ink-900); font-size: 17px; }
.xml-upload-control small { display: block; margin-top: 4px; color: var(--ink-600); font-size: 14px; overflow-wrap: anywhere; }
.received-summary { margin-bottom: 20px; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 20px; border: 1px solid #bdd7f0; border-radius: 10px; background: #f5faff; }
.received-summary div { min-width: 0; }
.received-summary small { display: block; color: var(--ink-600); font-size: 13px; }
.received-summary strong { display: block; margin-top: 2px; color: var(--ink-900); font-size: 15px; overflow-wrap: anywhere; }
.received-summary .received-summary__wide { grid-column: 1 / -1; }
.receiver-warning { margin-top: 19px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #f0cc89; border-radius: 8px; color: #7f5100; background: var(--warning-bg); font-size: 14px; }
.receiver-warning svg { flex: 0 0 auto; }
.pdf-template-preview-modal { width: min(980px, calc(100vw - 28px)); height: calc(100vh - 32px); }
.pdf-template-preview-modal .modal-card { height: 100%; max-height: none; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.pdf-template-preview-modal .modal-header, .pdf-template-preview-modal .modal-footer { position: relative; }
.pdf-template-preview-body { min-height: 0; padding: 18px; overflow: auto; background: #eaf1f7; }
.pdf-template-preview-note { margin: 0 auto 14px; padding: 10px 13px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #c9d9e8; border-radius: 8px; color: var(--ink-600); background: rgba(255,255,255,.86); font-size: 14px; }
.pdf-template-preview-note svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--blue-600); }
.pdf-template-preview-stage { padding: 5px; display: flex; justify-content: center; overflow: auto; }
.pdf-demo-sheet { position: relative; width: 760px; min-width: 700px; min-height: 720px; padding: 38px; overflow: hidden; color: #203751; background: #fff; box-shadow: 0 10px 32px rgba(17,48,78,.2); font-family: Arial, sans-serif; font-size: 12px; line-height: 1.45; }
.pdf-demo-watermark { position: absolute; right: 18px; top: 12px; padding: 4px 8px; border-radius: 999px; color: #6b8098; background: #eef3f7; font-size: 9px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.pdf-demo-header { margin-bottom: 24px; padding-bottom: 18px; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 24px; border-bottom: 2px solid #0b315f; }
.pdf-demo-brand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; }
.pdf-demo-brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: #0b315f; font-size: 17px; font-weight: 800; }
.pdf-demo-brand-logo { width: 86px; height: 48px; object-fit: contain; }
.pdf-demo-brand strong { display: block; color: #102f55; font-size: 17px; line-height: 1.2; }
.pdf-demo-brand small, .pdf-demo-title small { display: block; margin-top: 3px; color: #62768d; }
.pdf-demo-brand > div { min-width: 0; }
.pdf-demo-brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-demo-title { text-align: right; }
.pdf-demo-title span { display: block; color: #147bec; font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.pdf-demo-title strong { display: block; margin-top: 3px; color: #102f55; font-size: 18px; }
.pdf-demo-parties { margin-bottom: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pdf-demo-party { padding: 13px 15px; border: 1px solid #cfdae5; border-radius: 7px; }
.pdf-demo-party h4 { margin: 0 0 7px; color: #147bec; font-size: 10px; letter-spacing: .8px; text-transform: uppercase; }
.pdf-demo-party strong { display: block; margin-bottom: 4px; color: #173452; font-size: 13px; }
.pdf-demo-party span { display: block; color: #5d7289; }
.pdf-demo-lines { width: 100%; border-collapse: collapse; }
.pdf-demo-lines th { padding: 10px 8px; color: #fff; background: #0b315f; font-size: 10px; text-align: left; text-transform: uppercase; }
.pdf-demo-lines th:nth-child(n+3), .pdf-demo-lines td:nth-child(n+3) { text-align: right; }
.pdf-demo-lines td { padding: 11px 8px; border-bottom: 1px solid #d9e2eb; color: #314b67; }
.pdf-demo-lines td:first-child { color: #147bec; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pdf-demo-bottom { margin-top: 22px; display: grid; grid-template-columns: 1fr 260px; align-items: start; gap: 24px; }
.pdf-demo-note { padding: 12px; border-left: 3px solid #9bbfe3; color: #64788e; background: #f6f9fc; }
.pdf-demo-note strong { display: block; margin-bottom: 4px; color: #264766; }
.pdf-demo-totals { margin: 0; }
.pdf-demo-totals div { padding: 6px 9px; display: flex; justify-content: space-between; gap: 20px; }
.pdf-demo-totals dt, .pdf-demo-totals dd { margin: 0; }
.pdf-demo-totals div:last-child { margin-top: 5px; padding: 11px 10px; color: #fff; background: #147bec; font-size: 15px; font-weight: 800; }
.pdf-demo-footer { position: absolute; left: 38px; right: 38px; bottom: 24px; padding-top: 10px; display: flex; justify-content: space-between; border-top: 1px solid #d4dee8; color: #718399; font-size: 10px; }
.pdf-demo-thanks { display: none; }
.pdf-demo-sheet--modern { border-radius: 5px; }
.pdf-demo-sheet--modern .pdf-demo-header { margin: -38px -38px 25px; padding: 36px 38px 23px; border: 0; color: #fff; background: linear-gradient(125deg, #082e60, #0b7df2); }
.pdf-demo-sheet--modern .pdf-demo-brand-mark { color: #0b6fd8; background: #fff; }
.pdf-demo-sheet--modern .pdf-demo-brand strong, .pdf-demo-sheet--modern .pdf-demo-title strong { color: #fff; }
.pdf-demo-sheet--modern .pdf-demo-brand small, .pdf-demo-sheet--modern .pdf-demo-title small, .pdf-demo-sheet--modern .pdf-demo-title span { color: #d7eaff; }
.pdf-demo-sheet--modern .pdf-demo-party { border: 0; background: #f2f7fc; }
.pdf-demo-sheet--modern .pdf-demo-lines th { background: #147bec; }
.pdf-demo-sheet--classic { border-top: 8px solid #0b315f; color: #222; font-family: Georgia, 'Times New Roman', serif; }
.pdf-demo-sheet--classic .pdf-demo-watermark { font-family: Arial, sans-serif; }
.pdf-demo-sheet--classic .pdf-demo-header { border-color: #222; }
.pdf-demo-sheet--classic .pdf-demo-brand-mark { border-radius: 0; background: #222; }
.pdf-demo-sheet--classic .pdf-demo-title span, .pdf-demo-sheet--classic .pdf-demo-party h4 { color: #222; }
.pdf-demo-sheet--classic .pdf-demo-parties { gap: 0; border: 1px solid #777; }
.pdf-demo-sheet--classic .pdf-demo-party { border: 0; border-radius: 0; }
.pdf-demo-sheet--classic .pdf-demo-party + .pdf-demo-party { border-left: 1px solid #aaa; }
.pdf-demo-sheet--classic .pdf-demo-lines th { border: 1px solid #666; color: #111; background: #e6e6e6; }
.pdf-demo-sheet--classic .pdf-demo-lines td { border: 1px solid #aaa; }
.pdf-demo-sheet--classic .pdf-demo-totals div:last-child { color: #fff; background: #222; }
.pdf-demo-sheet--compact { min-height: 610px; padding: 24px 28px; font-size: 11px; }
.pdf-demo-sheet--compact .pdf-demo-watermark { top: 6px; }
.pdf-demo-sheet--compact .pdf-demo-header { margin-bottom: 13px; padding-bottom: 10px; grid-template-columns: 1.45fr 1fr; }
.pdf-demo-sheet--compact .pdf-demo-brand-mark { width: 34px; height: 34px; font-size: 13px; }
.pdf-demo-sheet--compact .pdf-demo-brand strong { font-size: 14px; }
.pdf-demo-sheet--compact .pdf-demo-title strong { font-size: 14px; }
.pdf-demo-sheet--compact .pdf-demo-parties { margin-bottom: 12px; gap: 8px; }
.pdf-demo-sheet--compact .pdf-demo-party { padding: 8px 10px; border-radius: 3px; }
.pdf-demo-sheet--compact .pdf-demo-party h4 { margin-bottom: 3px; }
.pdf-demo-sheet--compact .pdf-demo-lines th, .pdf-demo-sheet--compact .pdf-demo-lines td { padding: 6px; }
.pdf-demo-sheet--compact .pdf-demo-bottom { margin-top: 12px; grid-template-columns: 1fr 235px; gap: 15px; }
.pdf-demo-sheet--compact .pdf-demo-note { padding: 8px 10px; }
.pdf-demo-sheet--compact .pdf-demo-totals div { padding-block: 4px; }
.pdf-demo-sheet--compact .pdf-demo-totals div:last-child { padding: 7px 9px; }
.pdf-demo-sheet--compact .pdf-demo-footer { left: 28px; right: 28px; bottom: 14px; }
.pdf-demo-sheet--interphone_letter { min-height: 984px; border-top: 4px solid #0875e8; color: #082f67; background: linear-gradient(135deg, #fff 78%, #f4fbff); }
.pdf-demo-sheet--interphone_letter .pdf-demo-header { padding-bottom: 15px; border-bottom-color: #12aeca; }
.pdf-demo-sheet--interphone_letter .pdf-demo-title span, .pdf-demo-sheet--interphone_letter .pdf-demo-party h4 { color: #0875e8; }
.pdf-demo-sheet--interphone_letter .pdf-demo-parties { grid-template-columns: 1fr; }
.pdf-demo-sheet--interphone_letter .pdf-demo-party:first-child { display: none; }
.pdf-demo-sheet--interphone_letter .pdf-demo-party { background: #f3f9ff; border-color: #8bc6f5; }
.pdf-demo-sheet--interphone_letter .pdf-demo-lines th { color: #07336f; background: #e7f4ff; border: 1px solid #9fcff4; }
.pdf-demo-sheet--interphone_letter .pdf-demo-lines td { border: 1px solid #c4e0f6; }
.pdf-demo-sheet--interphone_letter .pdf-demo-totals div:last-child { color: #07336f; background: #dcefff; }
.pdf-demo-sheet--interphone_letter .pdf-demo-thanks { position: absolute; right: 44px; bottom: 63px; width: 190px; display: grid; justify-items: center; }
.pdf-demo-sheet--interphone_letter .pdf-demo-thanks img:first-child { width: 175px; height: 70px; object-fit: contain; }
.pdf-demo-sheet--interphone_letter .pdf-demo-thanks img:last-child { width: 150px; height: 8px; object-fit: fill; }
.smtp-test-intro { margin: 0 0 18px; color: var(--ink-600); font-size: 15px; line-height: 1.55; }
.toast-region { position: fixed; z-index: 120; top: 88px; right: 22px; width: min(430px, calc(100vw - 30px)); display: grid; gap: 11px; pointer-events: none; }
.toast-region[popover] { inset: 88px 22px auto auto; margin: 0; padding: 0; overflow: visible; border: 0; color: inherit; background: transparent; }
.toast { position: relative; min-height: 66px; padding: 14px 46px 16px 15px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 12px; overflow: hidden; border: 1px solid #c9dced; border-radius: 16px; color: var(--ink-900); background: rgba(255,255,255,.98); box-shadow: 0 18px 48px rgba(7,40,78,.2), 0 4px 12px rgba(7,40,78,.08); pointer-events: auto; animation: toast-in .24s cubic-bezier(.2,.8,.2,1); backdrop-filter: blur(12px); }
.toast::before { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: var(--success); content: ""; }
.toast__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #087d50; background: #dff7eb; }
.toast__icon svg { width: 20px; height: 20px; }
.toast__message { min-width: 0; font-size: 14px; font-weight: 680; line-height: 1.42; overflow-wrap: anywhere; }
.toast__close { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--ink-500); background: transparent; cursor: pointer; }
.toast__close:hover { color: var(--ink-900); background: var(--blue-50); }
.toast__close svg { width: 16px; height: 16px; }
.toast__progress { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--success); transform-origin: left; animation: toast-progress 5.2s linear forwards; }
.toast--error { border-color: #efc6ca; }
.toast--error::before, .toast--error .toast__progress { background: var(--danger); }
.toast--error .toast__icon { color: #bc2732; background: #ffe7e9; }
.toast--info::before, .toast--info .toast__progress { background: var(--blue-600); }
.toast--info .toast__icon { color: var(--blue-700); background: var(--blue-50); }
.toast.is-leaving { animation: toast-out .18s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px) scale(.98); } }
@keyframes toast-progress { to { transform: scaleX(0); } }

@media (max-width: 600px) {
    .toast-region, .toast-region[popover] { inset: 74px 12px auto 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .toast, .toast.is-leaving, .toast__progress { animation: none; }
}
.login-page { min-height: 100vh; background: #fff; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, .95fr) minmax(480px, 1.05fr); }
.login-brand { position: relative; overflow: hidden; padding: 55px clamp(40px, 7vw, 110px); display: flex; flex-direction: column; color: #fff; background: linear-gradient(155deg, #0d3f75, #071c37 72%); }
.login-brand::before, .login-brand::after { content: ""; position: absolute; border-radius: 50%; background: rgba(20,129,245,.16); }
.login-brand::before { width: 460px; height: 460px; right: -180px; bottom: -120px; }
.login-brand::after { width: 300px; height: 300px; left: -170px; top: 24%; }
.login-copy { z-index: 1; margin: auto 0; max-width: 580px; }
.login-copy .eyebrow { color: #7dbbff; }
.login-copy h1 { max-width: 560px; margin-bottom: 20px; font-size: clamp(38px, 4vw, 62px); line-height: 1.08; letter-spacing: -1.7px; }
.login-copy > p:last-child { color: #c8d9ec; font-size: 18px; line-height: 1.7; }
.login-feature { z-index: 1; display: flex; align-items: center; gap: 11px; color: #bcd3ec; font-size: 14px; }
.login-feature svg { color: #51d899; }
.login-panel { padding: 45px; display: grid; place-items: center; background: linear-gradient(145deg, #f7fbff, #edf6fc); }
.login-card { width: min(440px, 100%); padding: 18px 38px 28px; border: 1px solid #d9e6f2; border-radius: 18px; background: #fff; box-shadow: 0 24px 65px rgba(33, 74, 111, .12); }
.login-card-brand { min-height: 72px; margin-bottom: 12px; padding-bottom: 8px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #e6edf5; }
.login-card-logo { display: block; width: auto; max-width: 245px; max-height: 80px; object-fit: contain; object-position: center; }
.login-card-brand__fallback { color: var(--navy-900); }
.login-card > .eyebrow { margin-bottom: 4px; font-size: 15px; letter-spacing: .09em; }
.login-card h2 { margin-bottom: 6px; font-size: 28px; }
.login-card > .muted { margin-bottom: 18px; }
.login-card .field { margin-top: 13px; }
.login-card .button { margin-top: 18px; min-height: 50px; }
.input-with-icon { position: relative; display: block; }
.input-with-icon > svg { position: absolute; z-index: 1; left: 13px; top: 12px; color: #6d83a3; }
.input-with-icon input { padding-left: 43px; }
.alert { margin: 16px 0 4px; padding: 11px 13px; border-radius: 8px; font-size: 14px; }
.alert--danger { color: #a71d2a; border: 1px solid #efbbc0; background: var(--danger-bg); }
.login-help { margin: 18px 0 0; color: var(--ink-500); font-size: 13px; text-align: center; }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; text-align: center; background: var(--background); }
.error-page main { max-width: 650px; padding: 40px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.error-page .button { margin-top: 20px; }

.company-selector-page { min-height: 100vh; padding: 36px 24px; display: grid; place-items: center; background: radial-gradient(circle at 80% 5%, rgba(21,132,248,.12), transparent 34%), linear-gradient(145deg, #f7fbff, #eaf4fb); }
.company-selector-shell { width: min(1020px, 100%); }
.company-selector-heading { margin-bottom: 22px; display: flex; align-items: center; gap: 16px; }
.company-selector-heading .brand-mark { width: 58px; height: 58px; flex: 0 0 auto; }
.company-selector-heading h1 { margin: 2px 0 4px; color: var(--ink-900); font-size: clamp(25px, 4vw, 36px); letter-spacing: -.03em; }
.company-selector-heading p:last-child { margin: 0; color: var(--ink-600); }
.company-selector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.company-selector-card { min-width: 0; padding: 18px; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 13px; border: 1px solid #d5e3f0; border-radius: 15px; background: #fff; box-shadow: 0 14px 34px rgba(25,67,104,.08); }
.company-selector-card__avatar { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--blue-600), var(--navy-900)); font-weight: 800; }
.company-selector-card > span:nth-child(4) { min-width: 0; display: grid; gap: 4px; }
.company-selector-card strong { overflow: hidden; color: var(--ink-900); text-overflow: ellipsis; white-space: nowrap; }
.company-selector-card small { color: var(--ink-500); }
.company-selector-card .button { min-height: 38px; padding-inline: 13px; }
.company-selector-empty { padding: 40px; border: 1px solid #d5e3f0; border-radius: 16px; text-align: center; background: #fff; box-shadow: var(--shadow); }
.company-selector-empty h2 { margin-bottom: 6px; }
.company-selector-empty p { margin: 0; color: var(--ink-600); }
.company-selector-logout { margin-top: 18px; display: flex; justify-content: center; }
@media (max-width: 720px) {
    .company-selector-grid { grid-template-columns: 1fr; }
    .company-selector-card { grid-template-columns: 44px minmax(0, 1fr); }
    .company-selector-card__avatar { width: 44px; height: 44px; }
    .company-selector-card .button { grid-column: 1 / -1; width: 100%; }
}

.sidebar-scrim { display: none; }
@media (max-width: 1400px) {
    .invoice-totals { align-items: stretch; flex-direction: column; }
    .invoice-actions { justify-content: flex-end; }
}

@media (max-width: 1250px) {
    :root { --sidebar-width: 232px; }
    .topbar { padding-inline: 20px; }
    .main-content { padding-inline: 20px; }
    .company-switcher { min-width: 200px; }
    .user-copy { display: none; }
    .form-grid--client, .form-grid--document { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid--company, .form-grid--smtp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid--company > *, .form-grid--smtp > * { grid-column: span 1; }
    .form-grid--company .company-logo-setting, .smtp-field--active { grid-column: 1 / -1; }
    .totals-list > div { min-width: 118px; padding-inline: 13px; }
    .pdf-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .settings-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    :root { --sidebar-width: 266px; }
    .sidebar { transform: translateX(-102%); transition: transform .22s ease; }
    body.sidebar-collapsed .sidebar { width: var(--sidebar-width); }
    body.sidebar-collapsed .brand-name,
    body.sidebar-collapsed .nav-item__copy { display: grid; }
    body.sidebar-collapsed .nav-section__label { display: block; }
    body.sidebar-collapsed .sidebar-top { justify-content: flex-start; padding-inline: 20px; }
    body.sidebar-collapsed .brand { gap: 11px; }
    body.sidebar-collapsed .nav-item { justify-content: flex-start; padding-inline: 15px; }
    body.sidebar-collapsed .nav-item--collapse svg { transform: none; }
    body.menu-open .sidebar { transform: translateX(0); }
    .sidebar-scrim { position: fixed; z-index: 29; inset: 0; display: block; pointer-events: none; opacity: 0; background: rgba(4,23,45,.48); transition: opacity .22s; }
    body.menu-open .sidebar-scrim { pointer-events: auto; opacity: 1; }
    .sidebar-close { display: inline-grid; margin-left: auto; color: #17325d; }
    .workspace, body.sidebar-collapsed .workspace { margin-left: 0; }
    .menu-button { display: inline-grid; flex: 0 0 auto; }
    .loading-state, body.sidebar-collapsed .loading-state { left: 0; }
    .global-search { width: min(420px, 48vw); }
    .company-switcher { display: none; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tenant-users-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .topbar { height: 64px; padding: 0 12px; gap: 8px; }
    .global-search { width: auto; flex: 1; min-width: 0; }
    .global-search kbd, .notification-button, .user-copy { display: none; }
    .user-menu { gap: 2px; padding-left: 4px; border: 0; }
    .avatar { width: 36px; height: 36px; }
    .main-content { padding: 14px 12px 25px; }
    .loading-state { top: 64px; }
    .invoice-hero { padding: 15px; align-items: flex-start; flex-wrap: wrap; }
    .heading-icon { width: 45px; height: 49px; }
    .heading-icon svg { width: 43px; height: 47px; }
    .invoice-hero-copy { min-width: 0; flex: 1; }
    .invoice-hero-copy h1 { font-size: 23px; }
    .invoice-hero-copy p { font-size: 15px; }
    .hero-tools { width: 100%; margin: 4px 0 0; }
    .exchange-chip { flex: 1; }
    .document-chip { display: none; }
    .form-card { padding: 15px; }
    .section-heading { flex-wrap: wrap; }
    .section-heading .section-line { min-width: 20px; }
    .section-heading .button { margin-left: auto; }
    .form-grid--client, .form-grid--document, .form-grid--two, .form-grid--company, .form-grid--smtp { grid-template-columns: 1fr; }
    .form-grid--company > *, .form-grid--smtp > *, .form-grid--company .company-logo-setting, .smtp-field--active { grid-column: auto; }
    .field--span-2 { grid-column: span 1; }
    .invoice-totals { position: relative; padding: 12px; }
    .totals-list { display: grid; grid-template-columns: repeat(2, 1fr); }
    .totals-list > div, .totals-list > div:first-child { min-width: 0; padding: 9px 10px; border: 0; }
    .totals-list .grand-total { min-width: 0; grid-column: span 2; padding: 11px 13px; }
    .invoice-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .invoice-actions .button { padding-inline: 10px; }
    .invoice-actions .button--primary { grid-column: span 2; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading > .button { width: 100%; }
    .stats-grid, .stats-grid--reports { grid-template-columns: 1fr; }
    .stat-card { min-height: 105px; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .compact-select { width: 100%; margin: 0; }
    .record-count { margin: 0; }
    .cabys-picker-search { flex-direction: column; }
    .cabys-picker-search .button { width: 100%; }
    .cabys-picker-result { align-items: flex-start; flex-direction: column; gap: 10px; }
    .cabys-picker-result__action { align-self: flex-end; }
    .reference-picker-result { grid-template-columns: 1fr 1fr; }
    .reference-picker-result__action { justify-self: end; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .pdf-template-grid { grid-template-columns: 1fr; }
    .settings-module-grid { grid-template-columns: 1fr; }
    .settings-module-card { min-height: 98px; }
    .settings-detail-heading__title { align-items: flex-start; }
    .settings-detail-heading__title h1 { font-size: 26px; }
    .fiscal-settings-grid, .fiscal-environments-grid { grid-template-columns: 1fr; }
    .form-grid--fiscal-identity, .form-grid--fiscal-address, .form-grid--fiscal-contact, .form-grid--fiscal-terminal, .form-grid--fiscal-credentials { grid-template-columns: 1fr; }
    .form-grid--fiscal-identity .field--span-2, .form-grid--fiscal-address .field--span-2, .form-grid--fiscal-contact .field--span-2 { grid-column: auto; }
    .pdf-template-usage { grid-template-columns: 1fr; }
    .pdf-template-card { min-height: 160px; }
    .pdf-template-preview-body { padding: 11px; }
    .pdf-template-preview-modal { height: calc(100vh - 14px); }
    .pdf-template-preview-note { align-items: flex-start; justify-content: flex-start; }
    .pdf-template-preview-stage { justify-content: flex-start; }
    .settings-save-bar { align-items: stretch; flex-direction: column; gap: 9px; }
    .settings-save-bar .button { width: 100%; }
    .company-logo-setting { grid-template-columns: 90px minmax(0, 1fr); }
    .company-logo-preview { width: 90px; }
    .company-logo-setting .button { width: 100%; }
    .modal { max-height: calc(100vh - 14px); }
    .modal-card { max-height: calc(100vh - 14px); }
    .modal-body { padding: 16px; }
    .modal-header, .modal-footer { padding-inline: 16px; }
    .client-lookup-panel { padding: 14px; }
    .reception-guide { align-items: flex-start; }
    .received-summary { grid-template-columns: 1fr; }
    .received-summary .received-summary__wide { grid-column: auto; }
    .xml-upload-control { padding: 20px 15px; align-items: flex-start; flex-direction: column; }
    .form-subheading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .form-subheading small { padding-left: 37px; text-align: left; }
    .login-shell { display: block; min-height: 100vh; }
    .login-brand { display: none; }
    .login-panel { min-height: 100vh; padding: 20px; }
    .login-card { padding: 17px 22px 24px; }
    .login-card-brand { min-height: 62px; margin-bottom: 12px; padding-bottom: 8px; }
    .login-card-logo { max-width: 215px; max-height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
