:root {
    --primary: #9e1c1d;
    --primary-dark: #6f1213;
    --primary-light: #ca3a34;
    --accent-blue: #1f6aff;
    --accent-green: #14ae5c;
    --accent-red: #d13e3a;
    --accent-yellow: #e6a100;

    --bg-light: #f4f6fb;
    --bg-white: #ffffff;
    --bg-deep: #0f1422;
    --bg-deep-soft: #182033;

    --text-dark: #121a2a;
    --text-muted: #73809a;
    --text-soft: #96a4be;
    --border-color: #e8edf5;

    --success: #14ae5c;
    --warning: #e6a100;
    --danger: #d13e3a;

    --shadow: 0 10px 30px rgba(18, 26, 42, 0.08);
    --shadow-lg: 0 16px 40px rgba(18, 26, 42, 0.16);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: Manrope, Poppins, "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--text-dark);
    background:
        radial-gradient(circle at 12% 8%, #ffffff 0%, transparent 42%),
        radial-gradient(circle at 84% 2%, #e6ecfb 0%, transparent 38%),
        var(--bg-light);
    line-height: 1.6;
}

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

tr th,
tr td {
    border: 1px solid #e6e6e6;
}

tr th {
    background-color: #f5f5f5;
}

#app,
.page {
    min-height: 100vh;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background:
        linear-gradient(140deg, #8f1719 0%, #4f0e10 70%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 55%);
    padding: 16px;
    box-sizing: border-box;
}

.login-box {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
    width: 100%;
    max-width: 420px;
    padding: 26px 30px 22px;
    box-sizing: border-box;
    transition: max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), padding 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-section {
    text-align: center;
    margin-bottom: 16px;
}

.logo-section .logo {
    max-width: 54px;
    height: auto;
    margin-bottom: 5px;
}

.logo-section h1 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 3px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.logo-section .tagline {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.35;
    max-width: 320px;
    margin: 0 auto;
}

.form {
    width: 100%;
}

.form h2 {
    color: var(--text-dark);
    font-size: 21px;
    margin-bottom: 16px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.form h2 .ti {
    font-size: 1.35rem;
    color: var(--primary);
}

.form-group {
    margin-bottom: 13px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-weight: 600;
    color: #1e293b;
    font-size: 13.5px;
}

.form-group label .ti {
    font-size: 1.05rem;
    color: #64748b;
}

.form-group .optional-pill {
    font-size: 11px;
    padding: 2px 7px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 9999px;
    font-weight: 500;
    margin-left: auto;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 13px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    font-size: 14px;
    transition: all 0.18s ease;
    font-family: inherit;
    background: #fbfcff;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(158, 28, 29, 0.08);
}

/* Password Input & Eye Toggle */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrap input {
    padding-right: 42px !important;
}

.password-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    padding: 6px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
    z-index: 2;
}

.password-toggle-btn:hover {
    color: var(--primary);
    background-color: rgba(158, 28, 29, 0.08);
}

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 1px;
}

.password-toggle-btn .ti {
    font-size: 1.2rem;
    line-height: 1;
    pointer-events: none;
}

.form-footer {
    font-size: 14.5px;
    color: #64748b;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
}

.form-footer a {
    color: var(--primary);
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: underline;
}

.form-help {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.btn {
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: #f6f8fd;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #edf2fb;
}

.btn-warning {
    background: linear-gradient(180deg, #f0c55f 0%, #d99d1f 100%);
    color: #1f2433;
    border: 1px solid rgba(146, 102, 18, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(180deg, #efba45 0%, #d19211 100%);
}

.btn-text {
    background: none;
    color: var(--text-dark);
    padding: 8px 12px;
}

.btn-text:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #b83231;
    box-shadow: var(--shadow);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 14px 30px;
    font-size: 15px;
}

.btn.active {
    background-color: var(--accent-green);
    color: white;
}

.icon {
    font-size: 16px;
}

.error-box {
    background-color: #fff2f2;
    border: 1px solid #ffd5d5;
    color: var(--danger);
    padding: 12px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 14px;
}

.status-box {
    background-color: #effcf3;
    border: 1px solid #c9efd7;
    color: var(--success);
    padding: 12px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 14px;
}

.status-box.is-warning {
    background-color: #fff8e8;
    border-color: #f3d995;
    color: #7f5a00;
}

.result-box {
    background-color: #f3f6ff;
    border: 1px solid #d6e2ff;
    color: #20325f;
    padding: 16px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 14px;
}

.guidance-box {
    background: #f8fbff;
    border: 1px solid #dfe9f6;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 16px;
    color: #334155;
    font-size: 13px;
}

.guidance-box strong {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
}

.guidance-box ul {
    margin: 0;
    padding-left: 18px;
}

.guidance-box li + li {
    margin-top: 6px;
}

.guidance-box code {
    background: #eef4ff;
    padding: 2px 6px;
    border-radius: 6px;
    font-family: Consolas, monospace;
    font-size: 12px;
}

.navbar {
    background: #ffffff;
    color: var(--text-dark);
    padding: 14px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 0 rgba(18, 26, 42, 0.04);
    position: sticky;
    top: 0;
    z-index: 20;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 18px;
    font-weight: 700;
}

.page-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-eyebrow {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

.page-copy strong {
    color: var(--text-dark);
    font-size: 30px;
    line-height: 1.1;
}

    .receipts-screen {
        display: grid;
        gap: 18px;
    }

    .receipts-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 4px;
    }

    .receipts-page-title {
        font-size: 29px;
        margin: 0;
        font-weight: 700;
    }

    .receipts-hero-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 18px;
        background: linear-gradient(120deg, #160f15 0%, #3b1616 40%, #9a2a1f 100%);
        border-radius: 16px;
        padding: 24px 26px;
        color: white;
        box-shadow: 0 12px 28px rgba(48, 18, 20, 0.18);
    }

    .receipts-hero-copy h3 {
        margin: 0 0 6px;
        font-size: 30px;
        line-height: 1.1;
    }

    .receipts-hero-copy p {
        margin: 0;
        font-size: 18px;
        color: rgba(255,255,255,0.8);
    }

    .receipts-hero-stats {
        display: flex;
        align-items: center;
        gap: 18px;
    }

    .receipts-badge {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.12);
        border: 1px solid rgba(255,255,255,0.25);
        border-radius: 12px;
        min-width: 86px;
        min-height: 66px;
        padding: 8px 12px;
    }

    .receipts-total {
        font-size: 28px;
        font-weight: 800;
        line-height: 1;
    }

    .receipts-badge small {
        font-size: 10px;
        letter-spacing: 0.14em;
        opacity: 0.8;
    }

    .receipts-export-btn {
        min-width: 150px;
    }

    .receipts-toolbar-card {
        border: 1px solid #e7ebf3;
        background: #f3f4f7;
        border-radius: 14px;
        padding: 16px;
        display: grid;
        gap: 16px;
    }

    .receipts-filter-row {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .receipts-search,
    .receipts-select,
    .receipts-date {
        border: 1px solid #d0d7e4;
        background: #fff;
        border-radius: 10px;
        height: 42px;
        padding: 0 14px;
        font-size: 14px;
        color: #222;
        min-width: 150px;
    }

    .receipts-search {
        flex: 1 1 250px;
        min-width: 230px;
    }

    .receipts-date-wrap {
        display: flex;
        align-items: center;
        background: #fff;
        border: 1px solid #d0d7e4;
        border-radius: 10px;
        height: 42px;
        padding: 0 12px;
    }

    .receipts-date {
        border: none;
        background: transparent;
        padding: 0;
        min-width: 130px;
        height: 100%;
    }

    .receipts-refresh-btn {
        min-width: 100px;
    }

    .receipts-action-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding-top: 4px;
    }

    .receipts-primary-btn {
        background: linear-gradient(180deg, #b368d6, #a15fcf);
        color: white;
        border-radius: 10px;
        padding: 12px 18px;
        min-width: 210px;
        justify-content: center;
    }

    .receipts-secondary-btn {
        min-width: 140px;
        justify-content: center;
    }

    .receipts-table-card {
        background: #f5f6f8;
        border: 1px solid #e7ebf3;
        border-radius: 14px;
        overflow: hidden;
    }

    .receipts-table {
        width: 100%;
        border-collapse: collapse;
        background: white;
    }

    .receipts-table th,
    .receipts-table td {
        padding: 14px 16px;
        text-align: left;
        border-bottom: 1px solid #eceef2;
        font-size: 13px;
        color: #49576d;
    }

    .receipts-table thead th {
        background: #f8f9fb;
        color: #667189;
        font-size: 12px;
        letter-spacing: 0.1em;
        font-weight: 700;
        text-transform: uppercase;
    }

    .row-check {
        width: 28px;
    }

    .receipts-empty {
        text-align: center;
        color: #6d7a8e;
        padding: 42px 16px;
        font-size: 16px;
    }

    .receipts-footer-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        background: #f9fafb;
        color: #5f6f85;
        padding: 13px 18px;
        border-top: 1px solid #eceef2;
        font-size: 13px;
    }

    .receipts-pager {
        display: flex;
        gap: 8px;
    }

    .pager-btn {
        border: 1px solid #dfe5ef;
        background: white;
        color: #4c5c72;
        border-radius: 8px;
        padding: 7px 10px;
        font-size: 13px;
        cursor: pointer;
    }

    .receipts-modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.22);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

    .receipts-modal {
        width: min(560px, calc(100vw - 32px));
        background: rgba(255,255,255,0.96);
        border-radius: 18px;
        box-shadow: 0 26px 65px rgba(15, 23, 42, 0.18);
        padding: 26px 28px 22px;
        text-align: center;
        border: 1px solid rgba(212, 215, 223, 0.9);
    }

    .receipts-modal h3 {
        margin: 0 0 14px;
        font-size: 30px;
        line-height: 1.2;
        color: #1d2433;
        font-weight: 800;
    }

    .receipts-modal p {
        margin: 0 auto 26px;
        max-width: 420px;
        color: #52607a;
        font-size: 18px;
        line-height: 1.4;
    }

    .receipts-modal-actions {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 16px;
    }

    .receipts-modal-cancel {
        min-width: 120px;
    }

    .receipts-modal-confirm {
        min-width: 180px;
        background: linear-gradient(180deg, #d12d2d, #b51e1e);
        border-radius: 10px;
        padding: 14px 24px;
        font-size: 15px;
    }

    .connection-pill {
        border: 1px solid #dfe7f5;
        border-radius: 999px;
        background: #fff;
        color: #4d5f7c;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .connection-pill .dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #d4a432;
        display: inline-block;
    }

.navbar-logo {
    max-width: 30px;
    height: auto;
    display: block;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-pill {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
}

.user-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: #5f6d86;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

#logout-btn {
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    background: #fbfcff;
    border-radius: 10px;
}

#logout-btn:hover {
    background: #f6f8fd;
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 73px);
}

.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #0f1524 0%, #0b1020 100%);
    padding: 14px 12px 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px 12px;
    margin: 0 0 14px;
    border: none;
    border-bottom: 1px solid rgba(150, 164, 190, 0.25);
    border-radius: 0;
    background: transparent;
    color: white;
}

.sidebar-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(158, 28, 29, 0.9) 0%, rgba(92, 16, 18, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.sidebar-logo {
    max-width: 22px;
    height: auto;
    display: block;
}

.nav-menu {
    list-style: none;
    padding: 0;
}

.nav-section {
    color: var(--text-soft);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 12px 6px;
    font-weight: 700;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #cfdaee;
    border-radius: 10px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    font-size: 15px;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    color: #ffcf55;
    background: rgba(255, 191, 73, 0.09);
    border-left-color: #ffbf49;
}

.main-content {
    flex: 1;
    padding: 18px 26px 30px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.tab-header h2 {
    color: var(--text-dark);
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.tab-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 2px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 22px rgba(17, 24, 39, 0.06);
    text-align: left;
    border: 1px solid var(--border-color);
}

.card-value {
    font-size: 40px;
    font-weight: 800;
    color: #6f2aa3;
    margin-bottom: 2px;
    line-height: 1;
}

.card-label {
    font-size: 14px;
    color: #6b7388;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
}

.reports-table-container,
.queue-table-container {
    background: var(--bg-white);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
    margin: 0 0 18px;
}

.analytics-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.analytics-card h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.pipeline-row {
    display: grid;
    grid-template-columns: 90px 1fr 44px;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pipeline-row span {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.pipeline-track {
    height: 10px;
    border-radius: 999px;
    background: #edf2fb;
    overflow: hidden;
}

.pipeline-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
}

.pipeline-fill.is-submitted {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.pipeline-fill.is-pending {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.pipeline-fill.is-failed {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.pipeline-row strong {
    text-align: right;
    color: var(--text-dark);
    font-size: 13px;
}

.odoo-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.mini-label {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.mini-value {
    color: var(--text-dark);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.mini-note {
    color: #5f6d86;
    font-size: 12px;
}

.reports-screen {
    display: grid;
    gap: 14px;
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.reports-header h2 {
    font-size: 34px;
    line-height: 1.05;
    margin: 0;
}

.reports-header p {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 4px;
}

.reports-connection-pill {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    color: #4f5f7d;
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.reports-connection-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d4b35f;
}

.reports-hero {
    border-radius: 16px;
    padding: 22px 24px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: linear-gradient(115deg, #8a470f 0%, #5c1216 55%, #1f315f 100%);
}

.reports-hero h3 {
    font-size: 32px;
    line-height: 1.05;
    margin: 0 0 4px;
}

.reports-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 22px;
}

.reports-hero-tags {
    display: flex;
    gap: 8px;
}

.reports-hero-tags span {
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 11px;
    letter-spacing: 0.4px;
    color: rgba(240, 244, 255, 0.95);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.dashboard-screen {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0 4px;
}

.dashboard-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff8e8;
    color: #7f5a00;
    font-weight: 700;
    font-size: 12px;
}

.dashboard-setup-card {
    background: linear-gradient(135deg, #621111 0%, #471212 100%);
    border-radius: 16px;
    padding: 22px;
    color: #fff;
    box-shadow: 0 12px 30px rgba(58, 10, 10, 0.32);
}

.dashboard-setup-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.dashboard-setup-top h3 {
    margin-bottom: 4px;
    font-size: 30px;
    color: #fff;
}

.dashboard-setup-top p {
    color: rgba(255, 236, 236, 0.9);
}

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

.setup-progress-bar {
    width: 140px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.setup-progress-bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd05a 0%, #ffae2e 100%);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.setup-progress-wrap strong {
    font-size: 13px;
    color: #ffe9ae;
}

.setup-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.setup-step-card {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.setup-step-card strong {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.setup-step-card span {
    color: rgba(255, 222, 222, 0.72);
    font-size: 12px;
}

.setup-step-card.is-done {
    background: rgba(79, 195, 130, 0.22);
    border-color: rgba(96, 230, 154, 0.6);
}

.setup-step-card.is-done strong {
    color: #e4ffe8;
}

.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-metric-card {
    background: #fff;
    border: 1px solid #edf0f7;
    border-radius: 14px;
    padding: 14px;
    min-height: 98px;
}

.metric-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.65px;
    color: #95a2b8;
    margin-bottom: 8px;
}

.dashboard-metric-card strong {
    font-size: 36px;
    color: #132039;
    line-height: 1;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.dashboard-left-column,
.dashboard-right-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-card {
    background: #fff;
    border: 1px solid #edf0f7;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(16, 22, 36, 0.04);
}

.dash-panel h3 {
    font-size: 28px;
    margin-bottom: 8px;
}

.dash-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.dash-link-btn {
    background: none;
    border: none;
    color: #8f1719;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

.dash-muted {
    color: #8a95a9;
    font-size: 14px;
}

.dash-empty-state,
.dash-ready-state {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 28px 12px;
    text-align: center;
    border: 1px dashed #d8dfec;
    border-radius: 14px;
    background: #fbfdff;
}

.dash-empty-state p,
.dash-ready-state p {
    color: #1d2b47;
    font-size: 26px;
    margin: 0;
}

.dash-empty-state span,
.dash-ready-state span {
    color: #8a95a9;
    margin-bottom: 8px;
}

.dash-highlight-card {
    background: linear-gradient(135deg, #d8a102 0%, #c88f00 100%);
    border-color: #d19b16;
    color: #291a00;
}

.dash-highlight-card h3 {
    color: #2f1a00;
    margin-bottom: 4px;
}

.dash-highlight-card p {
    color: rgba(47, 26, 0, 0.76);
    margin-bottom: 14px;
}

.dash-highlight-card .btn-primary {
    background: #8f1719;
}

.dash-highlight-card .btn-primary:hover {
    background: #6f1213;
}

.dash-quick-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.dash-quick-links button {
    border: 1px solid #e4eaf5;
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: #2a3752;
    cursor: pointer;
}

.dash-quick-links button:hover {
    background: #f7f9ff;
}

.dash-recent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-recent-row {
    border: 1px solid #eef2f8;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.dash-recent-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-recent-meta strong {
    color: #17253f;
    font-size: 13px;
}

.dash-recent-meta span {
    color: #8a95a9;
    font-size: 12px;
}

.dash-recent-status {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f4f6fb;
    color: #53627e;
    font-weight: 700;
}

.dash-recent-status.is-accepted {
    background: #ebfaef;
    color: #127740;
}

.dash-recent-status.is-failed {
    background: #fff2f2;
    color: #af3131;
}

.dash-recent-status.is-pending {
    background: #fff8e8;
    color: #8a6400;
}

.dashboard-card p {
    margin: 0;
}

@media (max-width: 1200px) {
    .setup-steps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

.reports-toolbar {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.reports-date-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.reports-date-row label {
    color: #5c6881;
    font-size: 13px;
}

.reports-date-row input[type="date"] {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    color: var(--text-dark);
    font-family: inherit;
}

.reports-range-pill {
    border: none;
    background: transparent;
    color: #5f6f8a;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
}

.reports-range-pill.active {
    background: #fdeeee;
    color: #a52a2a;
}

.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.reports-kpi-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 14px 12px;
}

.reports-kpi-card .card-label {
    color: #7e8aa1;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    margin-bottom: 6px;
}

.reports-kpi-card .card-value {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.reports-kpi-total { color: #111f3a; }
.reports-kpi-accepted { color: #0eab53; }
.reports-kpi-rejected { color: #e02222; }
.reports-kpi-pending { color: #cc7d04; }

.reports-kpi-money {
    font-size: 46px;
    line-height: 1;
    font-weight: 900;
    color: #0f1f3b;
}

.reports-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.reports-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
    padding: 16px;
}

.reports-panel h3 {
    font-size: 28px;
    margin: 0 0 14px;
}

.reports-empty-chart {
    border-radius: 12px;
    height: 220px;
    border: 1px dashed #dbe4f2;
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
    color: #b2bdd1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.status-row {
    display: grid;
    grid-template-columns: 88px 1fr 30px;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.status-row span,
.status-row strong {
    font-size: 25px;
}

.status-row span {
    color: #2b3853;
}

.status-row strong {
    color: #1f2940;
    text-align: right;
}

.pipeline-fill.is-neutral {
    background: linear-gradient(90deg, #64748b, #94a3b8);
}

.reports-status-panel h4 {
    margin: 16px 0 8px;
    color: #394862;
    font-size: 15px;
}

.reports-source-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.reports-zreports-panel {
    margin-top: 8px;
}

.reports-zreports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.reports-zreports-header h3 {
    margin: 0;
    font-size: 32px;
}

.reports-zreports-header select {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
    min-width: 180px;
    font-family: inherit;
}

.fi-auto-print-control {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    color: #43516d;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.fi-auto-print-control input {
    accent-color: #9e1c1d;
}

.fi-receipt-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fi-icon-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #dce3ef;
    border-radius: 7px;
    background: #fff;
    color: #273550;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.fi-icon-btn:hover {
    border-color: #9e1c1d;
    color: #9e1c1d;
    background: #fff8f8;
}

.fi-thermal-btn {
    color: #a97800;
}

.queue-table-container {
    margin-top: 20px;
}

.table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 13px;
}

.table thead {
    background-color: #fbfcff;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    padding: 14px 14px;
    text-align: left;
    font-weight: 700;
    color: #6f2aa3;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-color);
    color: #2e3a52;
}

.table tbody tr:hover {
    background-color: #fafcff;
}

.table-sm {
    font-size: 12px;
}

.table-sm th,
.table-sm td {
    padding: 9px 10px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-submitted {
    background-color: rgba(20, 174, 92, 0.14);
    color: var(--success);
}

.status-fiscalised,
.status-accepted {
    background-color: rgba(20, 174, 92, 0.18);
    color: var(--success);
    border: 1px solid rgba(20, 174, 92, 0.35);
}

.status-fiscalised-offline {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.status-pending {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.status-rejected,
.status-failed {
    background-color: #ffe4e6;
    color: #e11d48;
    border: 1px solid #fecdd3;
}

.status-error {
    background-color: #fecdd3;
    color: #9f1239;
    border: 1px solid #fda4af;
}

/* Invoice Audit Timeline */
.inv-timeline {
    position: relative;
    padding-left: 24px;
}
.inv-timeline::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 8px;
    width: 2px;
    background: #e2e8f0;
}
.inv-timeline-item {
    position: relative;
    margin-bottom: 16px;
}
.inv-timeline-item:last-child {
    margin-bottom: 0;
}
.inv-timeline-marker {
    position: absolute;
    left: -24px;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #94a3b8;
    box-sizing: border-box;
}
.inv-timeline-marker.is-info { border-color: #0284c7; }
.inv-timeline-marker.is-warning { border-color: #f59e0b; background: #fffbeb; }
.inv-timeline-marker.is-success { border-color: #10b981; background: #ecfdf5; }
.inv-timeline-marker.is-danger { border-color: #ef4444; background: #fef2f2; }

.inv-timeline-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
}
.inv-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.inv-timeline-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
}
.inv-timeline-time {
    font-size: 0.75rem;
    color: #64748b;
}
.inv-timeline-desc {
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.45;
}

.settings-box,
.fiscalization-box,
.device-card {
    background: var(--bg-white);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.fiscal-profile-shell {
    max-width: 1280px;
}

.fiscal-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0 18px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    margin-bottom: 26px;
}

.fiscal-profile-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 28px;
    line-height: 1.2;
}

.fiscal-profile-header p {
    margin: 4px 0 0;
    color: #7a879a;
    font-size: 13px;
}

.connection-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: #2c4a3f;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.18);
    font-weight: 700;
}

.connection-dot,
.status-dot,
.icon-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.status-dot--danger {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.fiscal-profile-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 26px 28px;
    border-radius: 18px;
    background: linear-gradient(90deg, rgba(44, 17, 19, 0.96) 0%, rgba(106, 34, 29, 0.95) 34%, rgba(148, 52, 43, 0.92) 100%);
    box-shadow: 0 15px 30px rgba(87, 24, 23, 0.18);
    margin-bottom: 22px;
}

.fiscal-profile-hero h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 34px;
    line-height: 1.1;
}

.fiscal-profile-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin: 0;
}

.fiscal-profile-hero__actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-small {
    padding: 10px 16px;
    font-size: 13px;
}

.check-connection-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.check-connection-btn .icon-dot {
    background: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.14);
}

.fiscal-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr);
    gap: 22px;
    align-items: start;
}

.fiscal-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
    overflow: hidden;
}

.fiscal-card--details {
    padding: 0;
}

.fiscal-card--status {
    padding: 18px 18px 16px;
}

.fiscal-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

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

.section-title-wrap .section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(35, 47, 66, 0.06);
    color: #1f2937;
    font-size: 13px;
}

.fiscal-card__header h3,
.fiscal-card--status h3,
.registered-devices-panel h3 {
    margin: 0;
    color: #1f2937;
    font-size: 17px;
    letter-spacing: 0.02em;
}

.fiscal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

.fiscal-badge--pending {
    background: #f5e7b8;
    color: #7a5c12;
    border: 1px solid #e6d19a;
}

.fiscal-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 22px;
    padding: 22px;
}

.fiscal-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fiscal-detail--full {
    grid-column: 1 / -1;
}

.fiscal-detail label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #697689;
    text-transform: uppercase;
}

.fiscal-detail strong {
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.fiscal-card--status h3 {
    margin-bottom: 14px;
    font-size: 14px;
    letter-spacing: 0.06em;
}

.status-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0;
    color: #3a465c;
    font-size: 15px;
}

.status-label {
    color: #526073;
    font-weight: 600;
}

.status-value {
    color: #111827;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.status-value.is-warning {
    color: #bb3d2a;
}

.status-value--muted {
    color: #65748a;
    font-weight: 600;
}

.ping-trigger {
    width: 100%;
    justify-content: center;
    background: #eef2f7;
    color: #222c3a;
    border: 1px solid #dfe6f0;
}

.registration-status {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.registration-status h3 {
    margin-bottom: 12px;
    color: #2b3545;
    font-size: 14px;
    letter-spacing: 0.06em;
}

.registration-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 10px;
    background: #f6f7f9;
    color: #111827;
    font-weight: 700;
    border: 1px solid #ebedf1;
}

.registered-devices-panel {
    margin-top: 26px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
    padding: 18px 20px 22px;
}

.registered-devices-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 16px 12px;
    text-align: center;
    color: #697689;
    min-height: 160px;
}

.registered-devices-empty p {
    margin: 0 0 12px;
    font-size: 18px;
    color: #5a6475;
}

.btn-link {
    background: transparent;
    border: none;
    color: #d15b4d;
    font-size: 15px;
    font-weight: 700;
    padding: 0;
}

.profile-hidden-form {
    display: none;
}

.settings-box,
.fiscalization-box {
    max-width: 760px;
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.integration-grid .settings-box {
    max-width: none;
}

.integration-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: linear-gradient(120deg, #f8fbff 0%, #fdf7f3 100%);
}

.integration-overview h3 {
    font-size: 19px;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.integration-overview p {
    color: var(--text-muted);
    font-size: 13px;
}

.integration-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.integration-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.integration-badge.is-connected {
    background: rgba(20, 174, 92, 0.14);
    color: #0f7a44;
    border-color: rgba(20, 174, 92, 0.32);
}

.integration-badge.is-disconnected {
    background: rgba(209, 62, 58, 0.12);
    color: #a12e2b;
    border-color: rgba(209, 62, 58, 0.28);
}

.integration-badge.is-pending {
    background: rgba(230, 161, 0, 0.14);
    color: #8a6400;
    border-color: rgba(230, 161, 0, 0.26);
}

.integration-status-bar {
    margin-top: 0;
    margin-bottom: 14px;
}

.integration-card {
    position: relative;
    overflow: hidden;
}

.integration-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.integration-card-odoo:before {
    background: linear-gradient(90deg, #7c2d12 0%, #d97706 100%);
}

.integration-card-bc:before {
    background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
}

.integration-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.integration-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #7e8aa1;
    margin-bottom: 2px;
    font-weight: 700;
}

.integration-title {
    font-size: 21px;
    margin-bottom: 0;
    color: var(--text-dark);
    letter-spacing: -0.2px;
}

.integration-chip {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #3f4f6e;
    border: 1px solid #d9e3f7;
    background: #f7faff;
}

.integration-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.fiscalization-box ul {
    list-style: none;
    margin: 18px 0;
    padding-left: 18px;
}

.fiscalization-box li {
    margin: 8px 0;
    color: var(--text-muted);
    position: relative;
    padding-left: 18px;
}

.fiscalization-box li:before {
    content: "+";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.device-section,
.fiscal-day-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tab-subtitle {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.fiscal-days-hero {
    margin-bottom: 4px;
}

.fiscal-days-hero h3 {
    font-size: 34px;
}

.fiscal-days-hero p {
    font-size: 24px;
}

.fiscal-day-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.fiscal-action-card h4 {
    margin: 0 0 8px;
    font-size: 21px;
}

.fiscal-action-card p {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
}

.fiscal-action-card .btn {
    width: 100%;
    justify-content: center;
}

.fiscal-action-card .btn + .btn {
    margin-top: 8px;
}

.fiscal-day-mini-details {
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    display: grid;
    gap: 6px;
}

.fiscal-day-mini-details div {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.fiscal-day-mini-details strong {
    color: var(--text-dark);
}

.fiscal-history-table th,
.fiscal-history-table td {
    text-align: left;
}

.fiscal-history-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 36px 10px !important;
}

.fiscal-help-card h4 {
    margin: 0 0 8px;
    font-size: 17px;
}

.fiscal-help-card ul {
    margin: 0;
    padding-left: 18px;
}

.fiscal-help-card li {
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.device-hero {
    background: linear-gradient(120deg, #250f24 0%, #571414 46%, #121a2b 100%);
    border-radius: 16px;
    padding: 22px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.device-hero h3 {
    font-size: 34px;
    line-height: 1.1;
    margin-bottom: 4px;
}

.device-hero p {
    color: rgba(233, 240, 255, 0.82);
    font-size: 22px;
}

.quick-submit-hero h3 {
    font-size: 32px;
}

.quick-submit-hero p {
    font-size: 16px;
}

.quick-submit-layout {
    display: grid;
    gap: 16px;
}

.quick-device-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.quick-device-row .btn {
    white-space: nowrap;
}

.quick-lines-table {
    min-width: 720px;
}

.quick-lines-table-wrap {
    overflow-x: auto;
}

.quick-lines-table input,
.quick-lines-table select {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    background: #fbfcff;
}

.quick-lines-table .line-total {
    font-weight: 700;
    color: var(--text-dark);
}

.quick-lines-table .line-remove {
    background: transparent;
    border: none;
    color: var(--danger);
    font-weight: 700;
    cursor: pointer;
}

.quick-totals {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    align-items: baseline;
}

.quick-totals span {
    color: var(--text-muted);
    font-weight: 600;
}

.quick-totals strong {
    color: var(--text-dark);
    font-size: 22px;
}

.quick-submit-actions {
    display: flex;
    justify-content: flex-end;
}

.quick-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 14px;
    margin-bottom: 12px;
}

.quick-result-grid p {
    margin: 0;
    color: var(--text-dark);
    font-size: 13px;
}

.quick-result-grid p span {
    color: var(--text-muted);
    font-weight: 700;
    margin-right: 6px;
}

.quick-result-json {
    background: #0f1524;
    color: #dce4f8;
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
    overflow-x: auto;
}

.quick-qr-link {
    color: #1f4fd6;
    text-decoration: underline;
    word-break: break-all;
}

.quick-qr-check {
    margin: 10px 0 12px;
    font-size: 13px;
    font-weight: 600;
}

.quick-qr-check.ok {
    color: #0c6b3a;
}

.quick-qr-check.warn {
    color: #8a4c00;
}

.fi-valid-result {
    background: #ffffff;
    border: 1px solid #b7e4c7;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(22, 101, 52, 0.12);
}

.fi-valid-mark {
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dcfce7;
    color: #15803d;
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
}

.fi-valid-result h3 {
    margin: 0;
    color: #18212b;
    font-size: 30px;
    font-weight: 700;
}

.fi-valid-message {
    margin: 8px 0 20px;
    color: #4b5563;
}

.fi-valid-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    text-align: left;
}

.fi-valid-details div {
    min-width: 0;
    padding: 11px 13px;
    border-radius: 8px;
    background: #f3f4f6;
}

.fi-valid-details span {
    display: block;
    margin-bottom: 4px;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
}

.fi-valid-details strong {
    display: block;
    color: #111827;
    overflow-wrap: anywhere;
}

.fi-pending-status {
    color: #9a6700 !important;
}

.fi-status-valid {
    color: #15803d !important;
}

.fi-status-accepted {
    color: #2563eb !important;
}

@media (max-width: 600px) {
    .fi-valid-details {
        grid-template-columns: 1fr;
    }
}

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

.device-count-pill {
    min-width: 74px;
    text-align: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.device-count-pill strong {
    display: block;
    font-size: 32px;
    line-height: 1;
}

.device-count-pill span {
    text-transform: uppercase;
    font-size: 10px;
    color: rgba(233, 240, 255, 0.74);
    letter-spacing: 0.7px;
}

#toggle-register-device-btn {
    background: #e4aa13;
    color: #1b1200;
}

#toggle-register-device-btn:hover {
    background: #f0b717;
}

.device-empty-card {
    background: var(--bg-white);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 52px 26px;
    text-align: center;
}

.empty-device-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    border: 2px dashed #d6deec;
    margin: 0 auto 14px;
    color: #cad3e2;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-empty-card h3 {
    font-size: 30px;
    margin-bottom: 6px;
}

.device-empty-card p {
    color: var(--text-muted);
    font-size: 22px;
    margin-bottom: 16px;
}

.register-title {
    font-size: 22px;
    margin-bottom: 12px;
}

.register-step {
    border-radius: 12px;
    border: 1px solid #efe4cb;
    padding: 16px;
    margin-bottom: 16px;
}

.register-step-accent {
    background: #fff9ee;
}

.register-step h4,
.register-step-title {
    font-size: 18px;
    margin-bottom: 6px;
}

.register-step p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.register-flags {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin: 8px 0 16px;
}

.register-flags label {
    color: var(--text-dark);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.register-flags input {
    accent-color: #1f6aff;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 18px;
}

.device-details,
.fiscal-day-details {
    margin: 14px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 700;
    color: var(--text-dark);
    min-width: 160px;
}

.detail-value {
    color: var(--text-muted);
    text-align: right;
    flex: 1;
}

.device-actions,
.fiscal-day-actions,
.queue-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.device-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 14px;
    margin-bottom: 10px;
}

.device-config-grid p {
    margin: 0;
    color: var(--text-dark);
    font-size: 13px;
}

.device-config-grid p span {
    color: var(--text-muted);
    font-weight: 700;
    margin-right: 6px;
}

.device-config-tax h4 {
    margin: 4px 0 6px;
    font-size: 14px;
}

.device-config-tax ul {
    margin: 0 0 10px;
    padding-left: 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.device-actions,
.fiscal-day-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.device-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background-color: rgba(20, 174, 92, 0.12);
    border: 1px solid rgba(20, 174, 92, 0.3);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #157445;
}

.status-indicator {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background-color: var(--success);
    box-shadow: 0 0 0 2px rgba(20, 174, 92, 0.24);
}

.status-indicator.offline {
    background-color: var(--danger);
    box-shadow: 0 0 0 2px rgba(209, 62, 58, 0.24);
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }
}

.fiscal-day-status-badge.open {
    background-color: rgba(20, 174, 92, 0.12);
    color: var(--success);
}

.fiscal-day-status-badge.closed {
    background-color: rgba(209, 62, 58, 0.12);
    color: var(--danger);
}

.scheduler-controls {
    background-color: #f7f9fd;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 20px 0;
}

.control-group {
    margin-bottom: 14px;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.control-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.control-group select {
    padding: 10px 11px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    max-width: 260px;
}

.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 12000;
    pointer-events: none;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid #7c8ba5;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.16);
    color: var(--text-dark);
    font-size: 13px;
    pointer-events: auto;
    animation: toastIn 0.25s ease;
}

.toast.is-success {
    border-left-color: var(--success);
}

.toast.is-error {
    border-left-color: var(--danger);
}

.toast.is-info {
    border-left-color: var(--accent-blue);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e8ecf5;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@media (max-width: 980px) {
    .main-content {
        padding: 20px;
    }

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

    .reports-main-grid {
        grid-template-columns: 1fr;
    }

    .reports-kpi-money,
    .reports-kpi-card .card-value {
        font-size: 34px;
    }

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

    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .navbar {
        padding: 12px 14px;
    }

    .navbar-brand {
        gap: 8px;
    }

    .page-copy strong {
        font-size: 24px;
    }

    .nav-subtitle {
        font-size: 12px;
    }

    .navbar-right {
        gap: 8px;
    }

    .user-pill {
        display: none;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        padding: 10px 0;
        overflow-x: auto;
    }

    .sidebar-brand {
        display: none;
    }

    .nav-menu {
        display: flex;
        gap: 6px;
        padding: 0 8px;
        width: max-content;
        min-width: 100%;
    }

    .nav-section {
        display: none;
    }

    .nav-link {
        white-space: nowrap;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 8px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .nav-link.active {
        border-left: none;
        border-bottom-color: #ffbf49;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dashboard-setup-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-setup-top h3 {
        font-size: 24px;
    }

    .setup-steps-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-metric-card strong {
        font-size: 28px;
    }

    .dash-panel h3 {
        font-size: 22px;
    }

    .dash-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

    .reports-hero h3 {
        font-size: 26px;
    }

    .reports-hero p {
        font-size: 18px;
    }

    .reports-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .reports-date-row {
        width: 100%;
    }

    .reports-date-row input[type="date"] {
        flex: 1;
        min-width: 140px;
    }

    .status-row span,
    .status-row strong {
        font-size: 15px;
    }

    .reports-empty-chart {
        height: 170px;
        font-size: 20px;
    }

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

    .tab-header h2 {
        font-size: 30px;
    }

    .device-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .device-hero h3 {
        font-size: 26px;
    }

    .device-hero p,
    .device-empty-card p {
        font-size: 16px;
    }

    .quick-submit-actions {
        justify-content: stretch;
    }

    .quick-submit-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .device-empty-card h3 {
        font-size: 24px;
    }

    .register-grid {
        grid-template-columns: 1fr;
    }

    .fiscal-day-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        flex-direction: column;
        gap: 2px;
    }

    .detail-value {
        text-align: left;
    }

    .settings-box,
    .fiscalization-box,
    .device-card {
        padding: 18px;
    }

    .integration-grid {
        grid-template-columns: 1fr;
    }

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

    .integration-badges {
        justify-content: flex-start;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 10px 8px;
    }

    .tab-header .btn,
    .queue-controls .btn,
    .device-actions .btn,
    .fiscal-day-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .reports-table-container,
    .queue-table-container {
        overflow-x: auto;
    }

    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .toast {
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .fi-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    .fi-form-col,
    .fi-preview-col {
        overflow: visible;
    }
    .fi-form-col {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .fi-preview-col {
        padding-top: 12px;
    }
    .fi-drawer-panel {
        width: 100vw;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 26px 18px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .reports-kpi-grid {
        grid-template-columns: 1fr;
    }

    .reports-source-grid {
        grid-template-columns: 1fr;
    }

    .reports-kpi-money,
    .reports-kpi-card .card-value {
        font-size: 30px;
    }

    .tab-header h2 {
        font-size: 25px;
    }

    .device-count-pill strong {
        font-size: 24px;
    }

    .btn-large {
        width: 100%;
    }
}

/* -----------------------------------------------
   NEW INVOICE DRAWER
   ----------------------------------------------- */
.fi-subtab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.fi-subtab {
    background: #f3f4f6;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}

/* Keep the reports surface readable at normal desktop widths. */
.reports-screen {
    min-width: 0;
    overflow: hidden;
}

.reports-toolbar {
    flex-wrap: wrap;
}

.reports-kpi-grid {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    align-items: stretch;
}

.reports-kpi-card {
    min-width: 0;
    overflow: hidden;
}

.reports-kpi-card .card-value,
.reports-kpi-money {
    font-size: 28px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.reports-main-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    align-items: stretch;
}

.reports-panel {
    min-width: 0;
    overflow: hidden;
}

.reports-panel h3,
.reports-zreports-header h3 {
    font-size: 21px;
    line-height: 1.25;
}

.reports-hero p {
    font-size: 14px;
}

.reports-empty-chart {
    height: 180px;
    font-size: 16px;
}

.status-row {
    grid-template-columns: 78px minmax(0, 1fr) 28px;
    margin-bottom: 12px;
}

.status-row span,
.status-row strong {
    font-size: 14px;
}

.pipeline-track {
    min-width: 0;
    height: 9px;
}

.reports-zreports-header {
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 1100px) {
    .reports-kpi-grid {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }

    .reports-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .reports-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reports-toolbar,
    .reports-date-row {
        align-items: stretch;
    }

    .reports-date-row > * {
        max-width: 100%;
    }
}
.fi-subtab-active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.fi-panel {
    display: block;
}
.fi-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.fi-overview-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
}
.fi-overview-card strong {
    display: block;
    margin-top: 2px;
    font-size: 33px;
    line-height: 1.1;
    color: #12223c;
}
.fi-overview-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #9aa6bc;
    font-weight: 700;
}
.fi-overview-card small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #9aa6bc;
}
.fi-overview-card.is-success {
    background: linear-gradient(135deg, #fff, #f2fdf7);
}
.fi-overview-card.is-success strong,
.fi-overview-card.is-success small {
    color: #10984e;
}
.fi-overview-card.is-warning {
    background: linear-gradient(135deg, #fff, #fff7ea);
}
.fi-overview-card.is-warning strong,
.fi-overview-card.is-warning small {
    color: #d16f00;
}
.fi-overview-card.is-info {
    background: linear-gradient(135deg, #fff, #eef4ff);
}
.fi-overview-card.is-info strong,
.fi-overview-card.is-info small {
    color: #1e57df;
}

.fi-toolbar {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 140px 140px 124px;
    gap: 10px;
    margin-bottom: 14px;
}
.fi-search-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fbfcff;
    padding: 0 10px;
}
.fi-search-icon {
    color: #a3afc4;
    font-size: 15px;
}
.fi-search-wrap input,
.fi-toolbar select {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fbfcff;
    padding: 10px 12px;
    font-size: 14px;
    color: #1a253d;
}
.fi-search-wrap input {
    border: none;
    background: transparent;
    padding: 10px 8px;
}
.fi-search-wrap input:focus,
.fi-toolbar select:focus {
    outline: none;
}

.fi-list-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}
.fi-list-table {
    margin: 0;
}
.fi-list-table th {
    background: #fff;
    border-color: #edf1f8;
    color: #95a2b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 10px;
}
.fi-list-table td {
    border-color: #edf1f8;
    padding: 12px 10px;
    font-size: 13px;
}

.fi-empty-state {
    padding: 52px 20px 24px;
    text-align: center;
    display: none;
}
.fi-empty-orb {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    background: radial-gradient(circle at 30% 30%, #fff8dc 0%, #ffe89f 74%);
}
.fi-empty-state h3 {
    font-size: 33px;
    line-height: 1.15;
    color: #111f3b;
    margin-bottom: 8px;
}
.fi-empty-state p {
    color: #6f7d95;
    max-width: 620px;
    margin: 0 auto 16px;
}
.fi-steps-row {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.fi-step-item span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 6px;
}
.fi-step-item:nth-child(1) span { background: #fde8e8; color: #ba2b2b; }
.fi-step-item:nth-child(2) span { background: #fff8dc; color: #8b6700; }
.fi-step-item:nth-child(3) span { background: #e9f9ef; color: #169b4f; }
.fi-step-item:nth-child(4) span { background: #eaf1ff; color: #2b5ddb; }
.fi-step-item strong {
    display: block;
    color: #27364f;
    font-size: 16px;
}
.fi-step-item small {
    display: block;
    color: #9aa6bc;
    font-size: 13px;
}

@media (max-width: 1200px) {
    .fi-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .fi-toolbar {
        grid-template-columns: 1fr;
    }
    .fi-steps-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.fi-company-actions {
    margin-top: 16px;
}
.cs-logo-preview {
    max-width: 180px;
    max-height: 90px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    object-fit: contain;
    margin-top: 8px;
}
.fi-drawer {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    pointer-events: none;
    visibility: hidden;
    overflow: hidden;
}
.fi-drawer.fi-open {
    pointer-events: all;
    visibility: visible;
}
.fi-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 26, 0.52);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.fi-drawer.fi-open .fi-drawer-backdrop {
    opacity: 1;
}
.fi-drawer-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(96vw, 1140px);
    max-width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    box-shadow: -6px 0 40px rgba(10,14,26,0.18);
    overflow: hidden;
}
.fi-drawer.fi-open .fi-drawer-panel {
    transform: translateX(0);
}

/* Top bar */
.fi-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
    flex-shrink: 0;
    gap: 12px;
}
.fi-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.fi-topbar-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}
.fi-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.fi-close-btn:hover { background: #f3f4f6; color: var(--text-dark); }
.fi-topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.fi-submit-btn { gap: 6px; }
.fi-submit-icon { font-size: 11px; }

/* Body layout */
.fi-body {
    display: grid;
    grid-template-columns: 1fr 400px;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

/* Form column */
.fi-form-col {
    overflow-y: auto;
    padding: 22px 26px 32px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0;
}
.fi-meta-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}
.fi-device-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.fi-form-col .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.fi-form-col .form-group input,
.fi-form-col .form-group select,
.fi-form-col .form-group textarea {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 14px;
    width: 100%;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fi-form-col .form-group input:focus,
.fi-form-col .form-group select:focus,
.fi-form-col .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(158,28,29,0.10);
    background: #fff;
}

/* Customer details */
.fi-section-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.fi-section-icon { color: var(--primary); }
.fi-customer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.fi-customer-grid input,
.fi-customer-grid textarea {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
    resize: vertical;
}
.fi-customer-grid input:focus,
.fi-customer-grid textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(158,28,29,0.10);
    background: #fff;
}

/* Lines */
.fi-lines-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
}
.fi-lines-wrap {
    overflow-x: auto;
    margin-bottom: 6px;
}
.fi-lines-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.fi-lines-table thead th {
    background: #f5f6fa;
    padding: 8px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    border: 1px solid var(--border-color);
}
.fi-col-num { width: 90px; text-align: right; }
.fi-col-del { width: 36px; }
.fi-lines-table tbody td {
    border: 1px solid var(--border-color);
    padding: 5px 6px;
}
.fi-lines-table tbody input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    padding: 4px 4px;
    text-align: inherit;
}
.fi-lines-table tbody input:focus { outline: none; background: #f0f4ff; border-radius: 4px; }
.fi-col-num input { text-align: right; }
.fi-line-total { text-align: right; font-weight: 600; padding-right: 8px !important; }
.fi-line-del {
    background: none;
    border: none;
    cursor: pointer;
    color: #c0c4cf;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 4px;
    width: 100%;
}
.fi-line-del:hover { color: var(--danger); background: #fff2f2; }

/* Totals */
.fi-totals-row {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 20px;
}
.fi-totals-block { min-width: 280px; }
.fi-total-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    color: var(--text-muted);
    border-bottom: 1px solid #f0f0f0;
}
.fi-grand-total {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    border-bottom: none;
    padding-top: 8px;
}

/* Notes */
.fi-notes-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

/* Appearance */
.fi-appearance-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.fi-theme-swatches { display: flex; gap: 8px; }
.fi-swatch {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--primary);
    transition: transform 0.15s, border-color 0.15s;
}
.fi-swatch:hover { transform: scale(1.15); }
.fi-swatch-active { border-color: #111 !important; }
.fi-swatch[data-theme="default"] { background: #f5f5f5; border-color: #ccc; }

/* Success banner */
.fi-success-banner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f0faf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: #065f46;
}
.fi-success-icon {
    font-size: 20px;
    color: var(--success);
    flex-shrink: 0;
}

/* Preview column */
.fi-preview-col {
    overflow-y: auto;
    padding: 18px 18px 32px;
    background: #f7f8fc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.fi-preview-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.fi-preview-doc {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(18,26,42,0.07);
    padding: 22px 20px 24px;
    font-size: 12px;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow 0.2s;
}

/* Preview: header */
.fi-prev-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 12px;
}
.fi-prev-supplier {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fi-prev-supplier strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
}
.fi-prev-muted {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}
.fi-prev-invoice-label {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.fi-prev-type-label {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fi-prev-invoice-no {
    font-size: 12px;
    color: var(--text-muted);
}

/* Preview: bill to */
.fi-prev-billto {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fi-prev-billto-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.fi-prev-billto strong { font-size: 13px; }

/* Preview: dates */
.fi-prev-dates {
    display: flex;
    gap: 28px;
    font-size: 11px;
    color: var(--text-muted);
}
.fi-prev-date-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 2px;
}
.fi-prev-dates strong { color: var(--text-dark); }

/* Preview: table */
.fi-prev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}
.fi-prev-table th {
    text-align: left;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 6px 5px;
    background: #fafbfd;
}
.fi-prev-table td {
    padding: 6px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.fi-prev-num { text-align: right; }

/* Preview: totals */
.fi-prev-totals {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-self: flex-end;
    width: 180px;
    font-size: 12px;
}
.fi-prev-total-line {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
}
.fi-prev-grand {
    font-weight: 800;
    font-size: 13px;
    color: var(--primary);
    border-top: 1px solid var(--border-color);
    padding-top: 5px;
    margin-top: 2px;
}

/* Preview: QR block */
.fi-prev-qr {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border: 1px dashed #dde2ee;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    transition: background 0.3s, border-color 0.3s;
}
.fi-qr-verified {
    background: #f0faf5;
    border-color: #a7f3d0;
}
.fi-prev-qr strong { display: block; color: var(--text-dark); margin-bottom: 2px; font-size: 12px; }
.fi-prev-qr-icon { flex-shrink: 0; opacity: 0.7; }

/* ==========================================================================
   Compact 2-Column Register Form Layout
   ========================================================================== */
.login-box {
    transition: max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), padding 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-box.register-mode {
    max-width: 650px;
    padding: 22px 28px 18px;
}

.login-box.register-mode .logo-section {
    margin-bottom: 12px;
}

.login-box.register-mode .logo-section .logo {
    max-width: 46px;
    margin-bottom: 4px;
}

.login-box.register-mode .logo-section h1 {
    font-size: 22px;
    margin-bottom: 2px;
}

.login-box.register-mode .logo-section .tagline {
    font-size: 12.5px;
    line-height: 1.3;
}

.login-box.register-mode .form h2 {
    font-size: 20px;
    margin-bottom: 14px;
    gap: 8px;
    font-weight: 700;
}

.register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

.register-grid .form-group {
    margin-bottom: 0;
}

.register-grid .form-group label {
    margin-bottom: 3px;
    font-size: 12.5px;
    font-weight: 600;
}

.register-grid .form-group label .ti {
    font-size: 0.95rem;
}

.register-grid .form-group input,
.register-grid .form-group select {
    padding: 6px 12px;
    font-size: 13.5px;
    border-radius: 8px;
    height: 36px;
    box-sizing: border-box;
}

.register-grid .password-input-wrap input {
    padding-right: 36px !important;
}

.register-grid .password-toggle-btn {
    right: 4px;
    padding: 4px 6px;
}

.register-grid .password-toggle-btn .ti {
    font-size: 1.05rem;
}

.register-grid .form-group small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

.register-grid .col-span-2 {
    grid-column: span 2;
    margin-top: 6px;
}

.register-grid .col-span-2 .btn-block {
    height: 38px;
    font-size: 14px;
    padding: 0 14px;
    justify-content: center;
}

@media (max-width: 640px) {
    .login-box.register-mode {
        max-width: 100%;
        padding: 16px 14px;
    }
    .register-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .register-grid .col-span-2 {
        grid-column: span 1;
    }
}

.password-hint {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.2;
    transition: color 0.15s ease;
}

/* ==========================================================================
   Fiscal Profile Edit Modal (Center 2-Column Compact Layout)
   ========================================================================== */
.fiscal-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    animation: fiscalModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fiscalModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fiscal-modal-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    width: min(600px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 24px 28px 22px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: fiscalModalZoomIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fiscalModalZoomIn {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.fiscal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.fiscal-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fiscal-modal-icon {
    font-size: 1.25rem;
}

.fiscal-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
}

.fiscal-modal-close-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.fiscal-modal-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.fiscal-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}

.fiscal-modal-grid .form-group {
    margin-bottom: 0;
}

.fiscal-modal-grid .form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.fiscal-modal-grid .form-group input {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    font-size: 13.5px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.fiscal-modal-grid .form-group input:focus {
    outline: none;
    border-color: #9e1c1d;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(158, 28, 29, 0.1);
}

.fiscal-modal-grid-full {
    grid-column: span 2;
}

.fiscal-modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.fiscal-modal-actions .btn {
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 8px;
}

@media (max-width: 560px) {
    .fiscal-modal-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .fiscal-modal-grid-full {
        grid-column: span 1;
    }
    .fiscal-modal-card {
        padding: 20px 18px 16px;
    }
}


/* Odoo Studio Mapping Modal & Compact Integration Widget */
.odoo-studio-mapping-box {
    margin-top: 16px;
    border-top: 1px solid #e2e8f0;
    padding-top: 14px;
}

.odoo-mapping-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.odoo-mapping-modal-card {
    width: min(860px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    padding: 22px 24px 18px;
}

.odoo-mapping-modal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    gap: 10px;
    flex-wrap: wrap;
}

.odoo-mapping-modal-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #475569;
}

.odoo-mapping-modal-info .protocol-chip {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

.odoo-mapping-modal-info .model-chip {
    background: #f1f5f9;
    color: #334155;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.odoo-mapping-table-wrap {
    overflow-y: auto;
    max-height: 420px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.odoo-mapping-table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
}

.odoo-mapping-table thead tr {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    color: #475569;
    position: sticky;
    top: 0;
    z-index: 2;
}

.odoo-mapping-table th {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.odoo-mapping-table td {
    padding: 7px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.odoo-mapping-table tr:hover {
    background: #f8fafc;
}

.odoo-mapping-table input.odoo-field-map-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    padding: 4px 8px;
    height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 100%;
    min-width: 180px;
    background: #f8fafc;
    transition: all 0.15s ease;
}

.odoo-mapping-table input.odoo-field-map-input:focus {
    background: #ffffff;
    border-color: #9e1c1d;
    box-shadow: 0 0 0 2px rgba(158, 28, 29, 0.1);
    outline: none;
}

.odoo-mapping-modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.odoo-mapping-modal-right-actions {
    display: flex;
    gap: 8px;
}

.test-writeback-btn {
    border: 1px solid #16a34a !important;
    color: #16a34a !important;
    background: transparent !important;
}

.test-writeback-btn:hover {
    background: #f0fdf4 !important;
}


/* Tabler Outline Icons styling */
.ti {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: -0.15em;
    font-size: 1.15em;
    line-height: 1;
    stroke-width: 1.75;
}

.nav-link .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.nav-link .icon .ti {
    font-size: 1.15rem;
    vertical-align: middle;
}

.btn .ti {
    font-size: 1.05em;
    margin-right: 4px;
}

.fi-icon-btn .ti {
    font-size: 1.15rem;
    margin-right: 0;
}

.fiscal-modal-icon .ti {
    font-size: 1.3rem;
}

.fiscal-modal-close-btn .ti {
    font-size: 1.15rem;
}

.ti-spin {
    animation: ti-spin 1s infinite linear;
}

@keyframes ti-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Global Universal Confirmation Modal
   Small, thin, compact, modern dialog replacement for browser confirm()
   ========================================================================== */
.fiscal-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10050;
    padding: 16px;
    animation: fiscalModalFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.fiscal-confirm-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 45px -8px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.85);
    width: min(420px, calc(100vw - 32px));
    padding: 18px 20px 16px;
    animation: fiscalModalZoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.fiscal-confirm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fiscal-confirm-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fiscal-confirm-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.fiscal-confirm-icon-badge.is-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.fiscal-confirm-icon-badge.is-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}

.fiscal-confirm-icon-badge.is-primary {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.fiscal-confirm-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.fiscal-confirm-body {
    padding-left: 42px;
    margin-bottom: 16px;
}

.fiscal-confirm-message {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #475569;
    white-space: pre-line;
}

.fiscal-confirm-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.fiscal-confirm-btn {
    padding: 7px 16px;
    font-weight: 600;
    font-size: 0.84rem;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fiscal-confirm-btn.btn-danger {
    background: #dc2626;
    border: 1px solid #b91c1c;
    color: #ffffff;
}

.fiscal-confirm-btn.btn-danger:hover {
    background: #b91c1c;
}

/* ==========================================================================
   ZIMRA Invoice Layouts Section
   ========================================================================== */
.layout-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.layout-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

.layout-card.is-active-selection {
    border-color: #0f766e !important;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15) !important;
}

.layout-card.is-active-selection .layout-card-header {
    background: #f0fdfa !important;
}

.wireframe-container {
    transition: transform 0.2s ease;
}

.layout-card:hover .wireframe-container {
    transform: scale(1.01);
}

#layout-preview-viewport {
    min-height: 520px;
}

#layout-preview-viewport table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 768px) {
    .layouts-catalog-grid {
        grid-template-columns: 1fr !important;
    }
}


