/* Exactus Central de Soluções — Azul · Dourado · Branco · Creme perolado */

:root {
    --exactus-blue: #1B4D8C;
    --exactus-blue-dark: #0F3460;
    --exactus-blue-deep: #061B33;
    --exactus-gold: #C9A227;
    --exactus-gold-dark: #B8860B;
    --exactus-gold-light: #E8C547;
    --exactus-white: #FFFFFF;
    --exactus-cream: #FAF7F2;
    --exactus-cream-deep: #F5F0E8;
    --exactus-pearl: linear-gradient(135deg, #FDFBF7 0%, #FAF7F2 45%, #F5F0E8 100%);
    --menu-blue: #0056D2;
    --menu-blue-light: #5BA8FF;
    --menu-blue-mid: #0056D2;
    --menu-blue-dark: #003D99;
    --menu-blue-deep: #001848;
}

[x-cloak] { display: none !important; }

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    background: var(--exactus-cream);
}

.label, .form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--exactus-blue-dark);
    margin-bottom: 0.25rem;
}

.input, .form-input {
    display: block;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #D6E6F8;
    background: var(--exactus-white);
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: var(--exactus-blue-deep);
    box-shadow: 0 1px 2px 0 rgb(15 52 96 / 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus, .form-input:focus {
    outline: none;
    border-color: var(--exactus-blue);
    box-shadow: 0 0 0 3px rgb(27 77 140 / 0.15);
}

.input::placeholder, .form-input::placeholder { color: #94a3b8; }

.input-sm { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }

.form-file {
    display: block;
    width: 100%;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--exactus-blue-deep);
}

.form-file::file-selector-button {
    margin-right: 0.75rem;
    border: 1px solid #A8C9EE;
    border-radius: 0.5rem;
    background: var(--exactus-white);
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--exactus-blue);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.form-file::file-selector-button:hover {
    background: #EBF3FC;
    border-color: var(--exactus-blue);
}

.form-section {
    border-radius: 0.75rem;
    border: 1px solid #E2E8F0;
    background: #fff;
    padding: 1.25rem;
}

.form-section-muted {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

.form-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--exactus-blue-dark);
    margin-bottom: 1rem;
}

.form-section + .form-section,
.form-section + hr,
hr + .form-section {
    margin-top: 0;
}

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.page-container {
    width: 100%;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.text-link {
    color: var(--exactus-blue);
    font-size: 0.875rem;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.text-muted {
    color: #64748B;
    font-size: 0.875rem;
}

.text-muted-sm {
    color: #64748B;
    font-size: 0.75rem;
}

.hidden {
    display: none !important;
}

.form-stack > * + * {
    margin-top: 1.5rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid-2 {
    grid-template-columns: 1fr;
}

.form-grid-2 .col-span-2 {
    grid-column: 1 / -1;
}

@media (min-width: 640px) {
    .form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid-2 .col-span-2 {
        grid-column: span 2;
    }
}

.form-radio-group {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .form-radio-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #E2E8F0;
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
}

.form-radio-option input[type="radio"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.form-radio-option.is-homolog {
    border-color: #FBBF24;
    background: #FFFBEB;
}

.form-radio-option.is-prod {
    border-color: #34D399;
    background: #ECFDF5;
}

.form-radio-title {
    display: block;
    font-weight: 600;
    color: #0F172A;
}

.form-radio-desc {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: #64748B;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
}

.form-actions-end {
    margin-left: auto;
}

.form-section-cert {
    border-color: #E8C547;
    background: rgba(255, 251, 235, 0.65);
}

.section-step {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0F172A;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.section-head .form-section-title,
.section-head .emitente-section-title {
    margin-bottom: 0;
}

.field-hint {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: #64748B;
}

.field-hint.ok { color: #059669; }
.field-hint.err { color: #DC2626; }
.field-hint.info { color: var(--exactus-blue); }

.cert-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

@media (min-width: 640px) {
    .cert-actions {
        flex-direction: row;
        align-items: center;
    }

    .cert-actions .field-hint {
        flex: 1;
    }
}

.alert-box {
    border-radius: 0.75rem;
    border: 1px solid #FCD34D;
    background: #FFFBEB;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #92400E;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.25rem;
}

/* Layout app — funciona mesmo se Tailwind CDN falhar */
.app-body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    color: var(--exactus-blue-dark);
    background: var(--exactus-cream);
    -webkit-font-smoothing: antialiased;
}

.app-shell {
    min-height: 100vh;
}

@media (min-width: 1024px) {
    .app-shell {
        padding-left: 17rem;
        transition: padding-left 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .app-shell--no-sidebar,
    .app-shell--sidebar-collapsed {
        padding-left: 0;
    }
}

.app-header-logo {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    height: 2.5rem;
    max-width: 10rem;
    padding: 0.2rem 0.45rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #FDFBF7 0%, #FAF7F2 50%, #F5F0E8 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 1px 2px rgba(0, 24, 72, 0.08);
    line-height: 0;
}

.app-header-logo img {
    display: block;
    width: auto;
    height: 2.1rem;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

@media (min-width: 640px) {
    .app-header-logo {
        max-width: 12rem;
        height: 2.75rem;
    }

    .app-header-logo img {
        height: 2.35rem;
    }
}

.app-main {
    padding: 1rem;
}

@media (min-width: 640px) {
    .app-main {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .app-main {
        padding: 2rem;
    }
}

.app-header {
    display: flex;
    height: 4rem;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    border-bottom: 1px solid #EDE8DF;
    background: var(--exactus-pearl);
    padding: 0 1rem;
    box-shadow: 0 1px 2px rgb(15 52 96 / 0.05);
}

@media (min-width: 640px) {
    .app-header {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .app-header {
        padding: 0 2rem;
    }
}

.app-header-title {
    flex: 1;
    min-width: 0;
}

.app-header-title h1 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--exactus-blue-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header-title p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--exactus-blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cabeçalho deluxe — barra de módulos */
.app-header-shell {
    position: sticky;
    top: 0;
    z-index: 45;
    background: var(--exactus-pearl);
    border-bottom: 1px solid #EDE8DF;
    box-shadow: 0 1px 2px rgb(15 52 96 / 0.05);
    overflow: visible;
}

.app-header-shell .app-header {
    position: static;
    border-bottom: none;
    box-shadow: none;
    overflow: visible;
}

.header-nav-deluxe {
    border-top: 1px solid rgba(15, 52, 96, 0.08);
    background: #fff;
    padding: 0.4rem 0.75rem;
    overflow: visible;
}

@media (min-width: 640px) {
    .header-nav-deluxe {
        padding: 0.45rem 1.5rem;
    }
}

@media (min-width: 1024px) {
    .header-nav-deluxe {
        padding: 0.45rem 2rem;
    }
}

.header-nav-deluxe-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    overflow: visible;
}

.header-nav-deluxe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 52, 96, 0.12);
    background: #fff;
    color: var(--exactus-blue-dark);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    font-family: inherit;
}

.header-nav-deluxe-btn:hover {
    border-color: rgba(15, 52, 96, 0.22);
    background: #F7F9FC;
    box-shadow: none;
    transform: none;
    color: var(--exactus-blue-deep);
}

.header-nav-deluxe-btn.is-open,
.header-nav-deluxe-btn.is-current {
    border-color: transparent;
    background: var(--exactus-blue-dark);
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 52, 96, 0.2);
}

.header-nav-deluxe-btn.is-active:not(.is-open):not(.is-current) {
    border-color: rgba(15, 52, 96, 0.12);
    background: #fff;
    color: var(--exactus-blue-dark);
    box-shadow: none;
}

.header-nav-deluxe-btn.is-open .header-nav-deluxe-icon,
.header-nav-deluxe-btn.is-current .header-nav-deluxe-icon {
    color: #fff;
    opacity: 1;
}

.header-nav-deluxe-icon {
    display: flex;
    color: var(--exactus-blue-dark);
    flex-shrink: 0;
    opacity: 0.85;
}

.header-nav-deluxe-label {
    line-height: 1;
}

.header-nav-deluxe-chevron {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    opacity: 0.7;
    transition: transform 0.15s;
}

.header-nav-deluxe-chevron.rotate-180,
.header-nav-deluxe-btn.is-open .header-nav-deluxe-chevron {
    transform: rotate(180deg);
}

.header-nav-deluxe-dropdown {
    position: relative;
}

.header-nav-deluxe-panel {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    z-index: 200;
    min-width: 15rem;
    max-width: min(92vw, 36rem);
    padding: 0.65rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(15, 52, 96, 0.1);
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 52, 96, 0.14);
    display: grid;
    gap: 0.35rem;
}

.header-nav-deluxe-panel--cols {
    grid-template-columns: repeat(var(--nav-cols, 2), minmax(11rem, 1fr));
    min-width: 28rem;
}

.header-nav-deluxe-panel[hidden] {
    display: none !important;
}

.header-nav-deluxe-group {
    min-width: 11rem;
}

.header-nav-deluxe-group-label {
    margin: 0.15rem 0.35rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.header-nav-deluxe-panel-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.55rem;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background 0.12s, color 0.12s;
}

.header-nav-deluxe-panel-item:hover {
    background: #F1F5F9;
    color: var(--exactus-blue-deep);
}

.header-nav-deluxe-panel-item.is-active {
    background: rgba(15, 52, 96, 0.08);
    color: var(--exactus-blue-dark);
    font-weight: 600;
}

.header-nav-deluxe-panel-icon {
    display: flex;
    color: #64748b;
    flex-shrink: 0;
}

.header-nav-deluxe-panel-item.is-active .header-nav-deluxe-panel-icon {
    color: var(--exactus-blue-dark);
}

@media (max-width: 900px) {
    .header-nav-deluxe-label {
        display: none;
    }

    .header-nav-deluxe-btn {
        padding: 0.45rem;
    }

    .header-nav-deluxe-panel--cols {
        grid-template-columns: 1fr;
        min-width: 15rem;
    }
}

/* Cards resumo do documento — clicáveis para edição rápida */
.doc-summary-card {
    margin: 0;
}

.doc-summary-card--editable {
    cursor: pointer;
    border: 1.5px solid var(--exactus-gold);
    background: linear-gradient(145deg, var(--exactus-white) 0%, #FBF6EA 55%, #F3EBD4 100%);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    font-family: inherit;
}

.doc-summary-card--editable:hover,
.doc-summary-card--editable:focus-visible {
    outline: none;
    transform: translateY(-1px);
    border-color: var(--exactus-gold-light);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 4px 12px rgba(201, 162, 39, 0.22),
        0 0 0 1px rgba(201, 162, 39, 0.2);
}

.doc-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.doc-edit-modal.hidden {
    display: none !important;
}

.doc-edit-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 27, 51, 0.45);
}

.doc-edit-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 42rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border-radius: 1rem;
    border: 1.5px solid var(--exactus-gold);
    background: var(--exactus-white);
    box-shadow: 0 20px 48px rgba(15, 52, 96, 0.28);
}

.doc-edit-modal-panel--danfe {
    max-width: 56rem;
}

.nota-danfe-frame {
    width: 100%;
    height: min(70vh, 720px);
    border: 1px solid #EDE8DF;
    border-radius: 0.5rem;
    background: #fff;
}


.doc-edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #EDE8DF;
}

.doc-edit-modal-body {
    padding: 1.25rem;
}

.doc-edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #EDE8DF;
}

/* NF-e — itens em linha única */
.nota-itens-linha-adicionar {
    display: grid;
    grid-template-columns: 5.5rem minmax(10rem, 2.2fr) 5.5rem 4.5rem 4.5rem 5.5rem 5rem 6.5rem;
    gap: 0.5rem;
    align-items: end;
}

.nota-itens-tabela-wrap {
    overflow-x: auto;
    margin-top: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: var(--exactus-white);
}

.nota-itens-tabela {
    min-width: 58rem;
}

.nota-itens-linha {
    display: grid;
    grid-template-columns: 2rem 5rem minmax(9rem, 2fr) 5.5rem 4.5rem 4.5rem 5.5rem 4.5rem 5.5rem 4.5rem;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.nota-itens-linha--header {
    background: #f8fafc;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--exactus-blue);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.nota-itens-linha:last-child {
    border-bottom: none;
}

.nota-itens-linha:hover:not(.nota-itens-linha--header) {
    background: #faf7f2;
}

.nota-itens-acoes {
    display: flex;
    gap: 0.2rem;
    justify-content: flex-end;
}

.nota-itens-campo .form-label {
    font-size: 0.6875rem;
    margin-bottom: 0.15rem;
}

@media (max-width: 900px) {
    .nota-itens-linha-adicionar {
        grid-template-columns: 1fr 1fr;
    }

    .nota-itens-descricao {
        grid-column: 1 / -1;
    }

    .nota-itens-acao {
        grid-column: 1 / -1;
    }
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: 17rem;
    height: 100vh;
    background: linear-gradient(
        175deg,
        #0B2D5C 0%,
        #0A2854 42%,
        #071E42 100%
    );
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 4px 0 24px rgba(7, 30, 66, 0.35);
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar.translate-x-0 {
    transform: translateX(0);
}

.app-sidebar.-translate-x-full {
    transform: translateX(-100%);
}

@media (min-width: 1024px) {
    .app-sidebar {
        transform: translateX(0);
    }

    /* Permite recolher no desktop pelos três tracinhos */
    .app-sidebar.-translate-x-full {
        transform: translateX(-100%);
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 45, 115, 0.55);
}

@media (min-width: 1024px) {
    .sidebar-backdrop {
        display: none;
    }
}

.app-sidebar-brand {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    margin: 0;
    background: #ffffff;
    overflow: hidden;
    line-height: 0;
}

.app-sidebar-brand-link {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    line-height: 0;
}

.sidebar-toggle-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: var(--exactus-blue-dark);
}

.sidebar-close-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 2;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    color: #0B2D5C;
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 3px rgba(0, 24, 72, 0.12);
}

.sidebar-close-btn:hover {
    background: #ffffff;
}

.app-sidebar-brand img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: contain;
    object-position: center;
    filter: none;
}

.app-sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.625rem 0.75rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.app-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.app-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
}

.lg-hidden {
    display: block;
}

@media (min-width: 1024px) {
    .lg-hidden {
        display: none;
    }
}

.card {
    border-radius: 1rem;
    border: 1px solid #EDE8DF;
    background: var(--exactus-pearl);
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgb(15 52 96 / 0.06);
}

.card.overflow-visible {
    overflow: visible;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #E8C547 0%, #C9A227 50%, #B8860B 100%);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--exactus-blue-deep);
    box-shadow: 0 2px 4px 0 rgb(201 162 39 / 0.25);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s, transform 0.1s;
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid #A8C9EE;
    background: var(--exactus-white);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--exactus-blue);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
    background: #EBF3FC;
    border-color: var(--exactus-blue);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--exactus-blue);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-ghost:hover { background: #EBF3FC; }

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #dc2626;
    background: transparent;
    border: none;
    cursor: pointer;
}

.btn-danger:hover { background: #fef2f2; }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }

/* Barra de opções com rolagem horizontal */
.toolbar-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    max-width: 100%;
}

.toolbar-scroll::-webkit-scrollbar {
    height: 6px;
}

.toolbar-scroll::-webkit-scrollbar-thumb {
    background: #A8C9EE;
    border-radius: 9999px;
}

.toolbar-scroll-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    width: max-content;
    min-width: min(100%, max-content);
    padding-bottom: 0.125rem;
}

.toolbar-scroll-inner form,
.toolbar-scroll-inner a,
.toolbar-scroll-inner label {
    flex-shrink: 0;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-gray { background: #EDE8DF; color: var(--exactus-blue-dark); }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-amber { background: #F9EED9; color: #96700A; }
.badge-indigo { background: #D6E6F8; color: var(--exactus-blue); }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-red { background: #fee2e2; color: #991b1b; }

.badge-status-ok { background: #dcfce7; color: #166534; font-weight: 600; }
.badge-status-err { background: #fee2e2; color: #991b1b; font-weight: 600; }
.badge-status-warn { background: #ffedd5; color: #c2410c; font-weight: 600; }

/* Sidebar navigation */
.nav-section-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    padding: 1rem 0.625rem 0.375rem;
    margin: 0;
}

.nav-section-divider {
    height: 1px;
    margin: 0.75rem 0.5rem;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.nav-group {
    margin-bottom: 0.125rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-radius: 0.625rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    margin-bottom: 0.125rem;
    text-decoration: none;
    position: relative;
}

.nav-link-text {
    line-height: 1.25;
}

.nav-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
}

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

.nav-link:hover .nav-icon-wrap {
    background: rgba(255, 255, 255, 0.12);
}

.nav-link-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--exactus-gold);
}

.nav-link-active .nav-icon-wrap {
    background: rgba(232, 197, 71, 0.18);
}

.nav-sub {
    margin: 0.125rem 0 0.375rem 0.875rem;
    padding-left: 0.625rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-sublink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.4375rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.nav-sublink-label {
    line-height: 1.25;
}

.nav-sublink:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
}

.nav-sublink-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: inset 2px 0 0 var(--exactus-gold);
}

.nav-subdesc {
    font-size: 0.625rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.32);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.nav-sublink-active .nav-subdesc {
    color: rgba(255, 255, 255, 0.5);
}

.nav-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    opacity: 0.92;
}

.nav-link-btn {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.nav-link-grow {
    flex: 1;
}

.nav-chevron {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.15s;
}

.nav-chevron.is-open {
    transform: rotate(180deg);
}

.app-sidebar-user {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.875rem 0.75rem;
    background: rgba(0, 0, 0, 0.15);
}

.app-sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.5rem 0.625rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar-user-meta {
    min-width: 0;
    flex: 1;
}

.app-sidebar-avatar {
    display: flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: var(--exactus-gold);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--exactus-blue-deep);
}

.app-sidebar-user-name {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
}

.app-sidebar-user-role {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.45);
}

.app-sidebar-version {
    margin: 0.5rem 0 0;
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

/* Cadastro de empresas — layout autossuficiente */
.emitente-page {
    width: 100%;
    max-width: 52rem;
    margin: 0 auto;
}

.emitente-page .page-toolbar {
    margin-bottom: 1rem;
}

.emitente-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.emitente-section {
    padding-top: 0;
}

.emitente-section + .emitente-section {
    padding-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
}

.emitente-section-title {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--exactus-blue-dark);
}

.emitente-section-muted {
    padding: 1rem;
    border-radius: 0.75rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
}

.emitente-section-cert {
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 251, 235, 0.65);
    border: 1px solid #E8C547;
}

.emitente-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

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

@media (min-width: 640px) {
    .emitente-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emitente-grid .full {
        grid-column: span 2;
    }
}

.emitente-ambiente {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .emitente-ambiente {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.field-with-icon {
    position: relative;
}

.field-with-icon .form-input {
    padding-right: 2.5rem;
}

.field-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--exactus-blue);
}

.form-input.uppercase {
    text-transform: uppercase;
}

.form-input[readonly] {
    background: #F8FAFC;
}

.field-hint.warn {
    color: #D97706;
}

.intro-text {
    margin-bottom: 1rem;
}

/* Tabelas de dados */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background: #F8FAFC;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #EDE8DF;
}

.data-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748B;
}

.data-table tbody tr:hover {
    background: rgba(27, 77, 140, 0.03);
}

.input-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
}

/* Planos Central MEI */
.mei-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.mei-plan-card {
    position: relative;
    background: var(--exactus-white);
    border: 1px solid #E8E2D8;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgb(15 52 96 / 0.06);
    display: flex;
    flex-direction: column;
}

.mei-plan-card-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--exactus-gold-dark), var(--exactus-gold-light));
}

.mei-plan-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mei-plan-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--exactus-blue-deep);
    margin: 0 0 0.5rem;
}

.mei-plan-desc {
    font-size: 0.875rem;
    color: #64748B;
    margin: 0 0 1.25rem;
    line-height: 1.45;
    min-height: 2.5rem;
}

.mei-plan-price {
    margin-bottom: 0.25rem;
}

.mei-plan-price-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--exactus-blue-deep);
}

.mei-plan-price-period {
    font-size: 0.875rem;
    color: #64748B;
}

.mei-plan-implantacao {
    font-size: 0.8125rem;
    color: #64748B;
    margin: 0 0 1.25rem;
}

.mei-plan-features {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    flex: 1;
}

.mei-plan-features li {
    position: relative;
    padding-left: 1.125rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    color: var(--exactus-blue-dark);
    line-height: 1.4;
}

.mei-plan-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--exactus-gold);
}

.mei-plan-limits {
    font-size: 0.75rem;
    color: #94A3B8;
    margin: 0 0 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #EDE8DF;
}

.mei-plan-edit {
    align-self: flex-start;
    margin-top: auto;
}

/* Importação XML → estoque (layout responsivo, sem scroll horizontal) */
.import-estoque-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.import-estoque-item {
    border: 1px solid #EDE8DF;
    border-radius: 0.75rem;
    background: var(--exactus-white);
    padding: 1rem;
    min-width: 0;
}

.import-estoque-kicker,
.import-estoque-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94A3B8;
    margin-bottom: 0.25rem;
}

.import-estoque-label-varejo { color: #047857; }
.import-estoque-label-atacado { color: var(--exactus-blue); }

.import-estoque-xml-text {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748B;
    word-break: break-word;
}

.import-estoque-nomes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 0.875rem;
}

@media (min-width: 640px) {
    .import-estoque-nomes {
        grid-template-columns: 1fr 1fr;
    }
}

.import-estoque-field {
    min-width: 0;
}

.import-estoque-field .input,
.import-estoque-field select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.import-estoque-field-span2 {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .import-estoque-field-span2 {
        grid-column: span 2;
    }
}

.import-estoque-value {
    display: block;
    font-size: 0.875rem;
    color: #334155;
    word-break: break-word;
}

.import-estoque-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #F1EDE4;
}

@media (min-width: 768px) {
    .import-estoque-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .import-estoque-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.import-estoque-precos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px dashed #EDE8DF;
}

@media (min-width: 640px) {
    .import-estoque-precos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .import-estoque-precos {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.import-estoque-preco-val {
    display: block;
    font-size: 0.8125rem;
    word-break: break-word;
}

.import-estoque-nfe {
    margin-top: 0.75rem;
    border-top: 1px dashed #E2E8F0;
    padding-top: 0.625rem;
}

.import-estoque-nfe-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--exactus-blue);
    list-style: none;
}

.import-estoque-nfe-summary::-webkit-details-marker {
    display: none;
}

.import-estoque-nfe-summary::before {
    content: '▸';
    margin-right: 0.375rem;
    color: #94A3B8;
}

.import-estoque-nfe[open] .import-estoque-nfe-summary::before {
    content: '▾';
}

.nfe-transp-summary {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    list-style: none;
}
.nfe-transp-summary::-webkit-details-marker {
    display: none;
}
.nfe-transp-summary::before {
    content: '▸';
    flex: 0 0 auto;
    margin-top: 0.15rem;
    color: #94A3B8;
    font-size: 0.85rem;
}
.nfe-transp-details[open] .nfe-transp-summary::before {
    content: '▾';
}
.nfe-transp-summary > span {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.nfe-transp-hint {
    display: block;
    font-weight: 500;
}

.import-estoque-nfe-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    margin-top: 0.625rem;
}

@media (min-width: 768px) {
    .import-estoque-nfe-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

#conversao-estoque {
    overflow: hidden;
    min-width: 0;
}

/* Contabilidade — sub-navegação e lançamentos */
.contabil-subnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #EDE8DF;
    background: linear-gradient(180deg, #FAF8F4 0%, var(--exactus-pearl) 100%);
}

.contabil-subnav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--exactus-blue);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.contabil-subnav-link:hover {
    background: #EBF3FC;
}

.contabil-subnav-link.is-active {
    background: var(--exactus-blue);
    color: #fff;
}

.contabil-subnav-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
    padding: 0.2rem 0.35rem 0.2rem 0.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid #E8E2D6;
}

.contabil-subnav-group-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94A3B8;
    padding-right: 0.25rem;
}

/* Financeiro — subnavegação horizontal */
.financeiro-subnav {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.375rem;
    padding: 0.5rem;
    margin-bottom: 1.25rem;
    border-radius: 0.875rem;
    border: 1px solid #E8E2D6;
    background: linear-gradient(180deg, #FAF8F4 0%, var(--exactus-pearl) 100%);
    box-shadow: 0 1px 2px rgba(15, 52, 96, 0.04);
}

.financeiro-subnav-link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.125rem;
    min-width: 7.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--exactus-blue);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    border: 1px solid transparent;
}

.financeiro-subnav-link:hover {
    background: #EBF3FC;
    border-color: #D6E6F8;
}

.financeiro-subnav-link.is-active {
    background: var(--exactus-blue);
    color: #fff;
    border-color: var(--exactus-blue);
    box-shadow: 0 2px 8px rgba(15, 52, 96, 0.18);
}

.financeiro-subnav-desc {
    font-size: 0.625rem;
    font-weight: 500;
    opacity: 0.72;
    letter-spacing: 0.02em;
}

.financeiro-subnav-link.is-active .financeiro-subnav-desc {
    opacity: 0.85;
}

.financeiro-page-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .financeiro-page-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}

.financeiro-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.contabil-page-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .contabil-page-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}

.contabil-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.relatorio-export-toolbar {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    background: #fff;
    border: 1px solid #E8E2D6;
}

.contabil-filtro-periodo,
.contabil-conta-filtro,
.contabil-emitente-form {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
}

.contabil-filtro-label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
}

.contabil-lancamentos-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contabil-lancamento-card {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #F1EDE4;
}

.contabil-lancamento-card:last-child {
    border-bottom: none;
}

.contabil-lancamento-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.contabil-lancamento-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.contabil-lancamento-data {
    font-weight: 700;
    color: var(--exactus-blue-deep);
}

.contabil-lancamento-totais {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.contabil-lancamento-historico {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: #334155;
    word-break: break-word;
}

.contabil-lancamento-partidas {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: #FAFAF8;
    border: 1px solid #F1EDE4;
}

.contabil-lancamento-partidas-title {
    margin: 0 0 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94A3B8;
}

.contabil-lancamento-foot {
    margin-top: 0.75rem;
}

.contabil-partidas-resumo {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contabil-partida-linha {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8125rem;
    min-width: 0;
}

.contabil-partida-tipo {
    min-width: 1.5rem;
    justify-content: center;
    padding: 0.1rem 0.35rem;
}

.contabil-partida-nome {
    min-width: 0;
    word-break: break-word;
    color: #475569;
}

.contabil-partida-valor {
    white-space: nowrap;
}

/* —— Extratos: arrastar e soltar —— */
.extrato-dropzone {
    border-radius: 1rem;
    border: 2px dashed #C9B896;
    background: linear-gradient(180deg, #FBF8F1 0%, var(--exactus-pearl, #F7F3EA) 100%);
    padding: 0;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.extrato-dropzone.is-dragover {
    border-color: #0F3460;
    background: #E8F0FA;
    box-shadow: 0 0 0 3px rgb(15 52 96 / 0.12);
}
.extrato-dropzone.is-uploading {
    opacity: 0.7;
    pointer-events: none;
}
.extrato-dropzone-conta {
    padding: 1rem 1.25rem 0;
}
.extrato-dropzone-area {
    text-align: center;
    padding: 2.5rem 1.25rem;
}
.extrato-dropzone--compact .extrato-dropzone-area {
    padding: 2rem 1rem;
}
.extrato-dropzone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 0.75rem;
    border-radius: 999px;
    background: rgb(15 52 96 / 0.08);
    color: #0F3460;
}
.extrato-dropzone.is-dragover .extrato-dropzone-icon {
    background: rgb(15 52 96 / 0.16);
}
.extrato-dropzone-title {
    margin: 0 0 0.35rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1e293b;
}
.extrato-dropzone-formats {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}
.extrato-dropzone-formats-more {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #94a3b8;
}
.extrato-dropzone-file {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0F3460;
}
.extrato-dropzone-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.extrato-dropzone-browse {
    cursor: pointer;
}
.extrato-dropzone-hint {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}
.js-guia-drop .extrato-dropzone-title,
.js-guia-drop .extrato-dropzone-hint {
    pointer-events: none;
}
.extrato-viewer-card {
    min-height: 70vh;
}
.extrato-viewer-frame {
    display: block;
    width: 100%;
    height: 75vh;
    border: 0;
    background: #f8fafc;
}
.extrato-dropzone-filelist {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    text-align: left;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}
.extrato-dropzone-filelist li {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0F3460;
    padding: 0.35rem 0.6rem;
    margin-bottom: 0.25rem;
    background: rgb(15 52 96 / 0.06);
    border-radius: 0.5rem;
}
.extrato-vinculo-panel {
    max-width: 40rem;
    width: min(96vw, 40rem);
}
.extrato-vinculo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 640px) {
    .extrato-vinculo-grid {
        grid-template-columns: 1fr;
    }
}

/* —— CNAEs da empresa —— */
.cnaes-lista {
    border: 1px solid #EDE8DF;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.75rem 1rem;
}
.cnaes-lista-ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.cnaes-lista-ul li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.6rem;
    font-size: 0.8125rem;
    color: #334155;
}
.cnaes-lista-ul .cnae-cod {
    font-family: ui-monospace, monospace;
    font-weight: 600;
    color: #0F3460;
}
.cnaes-lista-ul .cnae-desc {
    flex: 1 1 12rem;
    color: #64748b;
}

/* —— Central de Soluções (Início) —— */
.csol-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}
.csol-tabs {
    display: inline-flex;
    padding: 0.2rem;
    border-radius: 999px;
    background: #E8EEF5;
    border: 1px solid #D5DEEA;
}
.csol-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5B6B7C;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.csol-tab:hover {
    color: #0B2D5C;
}
.csol-tab.is-active {
    background: #0B2D5C;
    color: #fff;
    box-shadow: 0 2px 8px rgba(11, 45, 92, 0.25);
}
.csol-pref-btn {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.25rem 0;
}
.csol-pref-btn:hover {
    color: #0B2D5C;
}

.csol-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.25rem;
}
.csol-hero-logo {
    display: block;
    height: 3.25rem;
    width: auto;
    max-width: min(100%, 18rem);
    object-fit: contain;
    background: #fff;
    border-radius: 0.65rem;
    padding: 0.25rem 0.5rem;
    box-shadow: 0 1px 3px rgba(12, 45, 87, 0.08);
}
.csol-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C9A227;
}
.csol-greeting {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 700;
    color: #0B2D5C;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.csol-empresa {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: #475569;
}
.csol-search-wrap {
    position: relative;
    flex: 1 1 16rem;
    max-width: 22rem;
}
.csol-search {
    width: 100%;
    border: 1px solid #D5DEEA;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.7rem 2.4rem 0.7rem 0.95rem;
    font-size: 0.875rem;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.csol-search:focus {
    outline: none;
    border-color: #0B2D5C;
    box-shadow: 0 0 0 3px rgba(11, 45, 92, 0.12);
}
.csol-search-icon {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.csol-layout {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1100px) {
    .csol-layout {
        grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.85fr);
        align-items: start;
    }
}

.csol-acesso {
    padding: 1.15rem 1.25rem 1.35rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), #fff),
        radial-gradient(120% 80% at 0% 0%, rgba(201, 162, 39, 0.08), transparent 55%);
}
.csol-acesso-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #EDE8DF;
}
.csol-acesso-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0B2D5C;
}

.csol-grupos {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
}
.csol-grupo {
    border: 1px solid #E8EEF5;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
    min-height: 100%;
}
.csol-grupo-titulo {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    background: linear-gradient(90deg, #0B2D5C 0%, #163A6B 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.csol-grupo-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.9;
}
.csol-links {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
}
.csol-link {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.55rem 0.8rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}
.csol-link:hover {
    background: #F7F5F0;
    border-left-color: #C9A227;
}
.csol-link-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}
.csol-link-hint {
    font-size: 0.72rem;
    color: #64748b;
}
.csol-empty {
    margin: 1rem 0 0;
}

.csol-side-title {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0B2D5C;
}
.csol-kpi-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}
.csol-kpi-list > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #f1f5f9;
}
.csol-kpi-list dt {
    font-size: 0.8rem;
    color: #64748b;
}
.csol-kpi-list dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}
.csol-side-link {
    display: inline-block;
    margin-top: 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0B2D5C;
    text-decoration: none;
}
.csol-side-link:hover {
    text-decoration: underline;
}
.csol-venc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.csol-venc-desc {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
}
.csol-venc-meta {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
}
.csol-tips {
    background: linear-gradient(165deg, #FFFBF0 0%, #fff 55%);
    border-color: #EDE8DF;
}
.csol-tips-list {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.45;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ——— Tema claro / escuro ——— */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    gap: 0.35rem;
    line-height: 0;
}

.theme-toggle-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

@media (max-width: 640px) {
    .theme-toggle-label {
        display: none;
    }
}

.theme-toggle-fab {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    border: 1px solid #A8C9EE;
    background: var(--exactus-white);
    color: var(--exactus-blue);
    box-shadow: 0 2px 8px rgb(15 52 96 / 0.12);
    cursor: pointer;
}

.theme-toggle-fab .theme-toggle-label {
    display: none;
}

.theme-toggle-fab:hover {
    background: #EBF3FC;
}

[data-theme="light"] .theme-icon-sun { display: none !important; }
[data-theme="dark"] .theme-icon-moon { display: none !important; }

/* Ícones: se data-theme faltar, mostra só a lua (ação = ir para escuro) */
html:not([data-theme]) .theme-icon-sun { display: none !important; }

.auth-body {
    background: #fcf9f2;
}

.auth-shell {
    background: linear-gradient(180deg, #0c2d57 0%, #081f3d 52%, #fcf9f2 52%, #fcf9f2 100%);
    min-height: 100vh;
}

.auth-card {
    background: var(--exactus-white);
    box-shadow: 0 20px 40px rgb(15 52 96 / 0.18);
    border: 1px solid #EDE8DF;
    border-top: 4px solid var(--exactus-gold);
}

.ex-auth-login .btn-gold,
.auth-card .btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 0.75rem;
    background: #e8b923;
    color: #081f3d;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.ex-auth-login .btn-gold:hover,
.auth-card .btn-gold:hover {
    background: #f5d978;
}

[data-theme="dark"] .auth-body {
    background: #0b1220;
}

[data-theme="dark"] .auth-shell {
    background: linear-gradient(180deg, #0b1220 0%, #152033 52%, #0b1220 52%, #0b1220 100%);
}

[data-theme="dark"] .auth-card {
    background: #152033;
    border-color: #243247;
    border-top-color: var(--exactus-gold);
}

[data-theme="dark"] {
    color-scheme: dark;
    --exactus-cream: #0b1220;
    --exactus-cream-deep: #080e18;
    --exactus-white: #152033;
    --exactus-pearl: linear-gradient(160deg, #152033 0%, #0f1a2e 50%, #0b1220 100%);
}

[data-theme="dark"] body,
[data-theme="dark"] .app-body,
[data-theme="dark"] .auth-body {
    background: var(--exactus-cream);
    color: #dbe7f5;
}

[data-theme="dark"] .label,
[data-theme="dark"] .form-label,
[data-theme="dark"] .form-section-title,
[data-theme="dark"] .app-header-title h1 {
    color: #e2e8f0;
}

[data-theme="dark"] .app-header-title p,
[data-theme="dark"] .text-link {
    color: #8bb8ef;
}

[data-theme="dark"] .app-header,
[data-theme="dark"] .app-header-shell {
    border-color: #243247;
    background: var(--exactus-pearl);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

[data-theme="dark"] .header-nav-deluxe {
    background: #121c2e;
    border-top-color: #243247;
}

[data-theme="dark"] .header-nav-deluxe-btn {
    color: #dbe7f5;
}

[data-theme="dark"] .header-nav-deluxe-btn.is-active:not(.is-open):not(.is-current) {
    background: #152033;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .header-nav-deluxe-icon {
    color: #8bb8ef;
}

[data-theme="dark"] .app-sidebar-brand,
[data-theme="dark"] .app-sidebar-brand-link {
    background: #ffffff;
}

[data-theme="dark"] .app-header-logo {
    background: linear-gradient(135deg, #1a2740 0%, #152033 50%, #0f1a2e 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .card {
    border-color: #243247;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
}

[data-theme="dark"] .input,
[data-theme="dark"] .form-input,
[data-theme="dark"] select.input {
    border-color: #334155;
    background: #0f1a2e;
    color: #e8eef8;
    box-shadow: none;
}

[data-theme="dark"] .input:focus,
[data-theme="dark"] .form-input:focus {
    border-color: #5BA8FF;
    box-shadow: 0 0 0 3px rgb(91 168 255 / 0.2);
}

[data-theme="dark"] .input::placeholder,
[data-theme="dark"] .form-input::placeholder {
    color: #64748b;
}

[data-theme="dark"] .form-section {
    border-color: #243247;
    background: #152033;
}

[data-theme="dark"] .form-section-muted {
    background: #121c2e;
    border-color: #243247;
}

[data-theme="dark"] .form-radio-option {
    border-color: #334155;
    background: #0f1a2e;
}

[data-theme="dark"] .form-radio-title,
[data-theme="dark"] .section-step {
    color: #e2e8f0;
}

[data-theme="dark"] .form-radio-desc,
[data-theme="dark"] .field-hint,
[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-muted-sm {
    color: #94a3b8;
}

[data-theme="dark"] .form-actions {
    border-top-color: #243247;
}

[data-theme="dark"] .btn-secondary {
    border-color: #3d7bc8;
    background: #152033;
    color: #8bb8ef;
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(91, 168, 255, 0.12);
    border-color: #5BA8FF;
}

[data-theme="dark"] .btn-ghost {
    color: #8bb8ef;
}

[data-theme="dark"] .btn-ghost:hover {
    background: rgba(91, 168, 255, 0.12);
}

[data-theme="dark"] .btn-danger:hover {
    background: rgba(220, 38, 38, 0.15);
}

[data-theme="dark"] .form-file::file-selector-button {
    border-color: #3d7bc8;
    background: #152033;
    color: #8bb8ef;
}

[data-theme="dark"] .form-file::file-selector-button:hover {
    background: rgba(91, 168, 255, 0.12);
}

[data-theme="dark"] .alert-box {
    border-color: #854d0e;
    background: #422006;
    color: #fde68a;
}

[data-theme="dark"] .theme-toggle-fab {
    border-color: #334155;
    background: #152033;
    color: #e8c547;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.4);
}

[data-theme="dark"] .theme-toggle-fab:hover {
    background: rgba(91, 168, 255, 0.12);
}

[data-theme="dark"] .auth-card {
    background: #152033;
    border-color: #243247;
    box-shadow: 0 20px 40px rgb(0 0 0 / 0.45);
}

[data-theme="dark"] .auth-shell {
    background: linear-gradient(180deg, #0b1220 0%, #152033 50%, #0b1220 50%, #0b1220 100%) !important;
}

/* Utilitários Tailwind frequentes no tema escuro */
[data-theme="dark"] .bg-white { background-color: #152033 !important; }
[data-theme="dark"] .bg-exactus-cream-50,
[data-theme="dark"] .bg-exactus-cream-100,
[data-theme="dark"] .bg-exactus-cream-200 { background-color: #0b1220 !important; }
[data-theme="dark"] .bg-exactus-pearl { background-image: none !important; background-color: #0b1220 !important; }
[data-theme="dark"] .bg-slate-50,
[data-theme="dark"] .bg-gray-50 { background-color: #121c2e !important; }
[data-theme="dark"] .bg-slate-100,
[data-theme="dark"] .bg-gray-100 { background-color: #152033 !important; }
[data-theme="dark"] .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.12) !important; }
[data-theme="dark"] .text-emerald-700 { color: #6ee7b7 !important; }
[data-theme="dark"] .text-slate-900,
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-slate-700,
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-gray-800 { color: #e2e8f0 !important; }
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-500,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-500 { color: #94a3b8 !important; }
[data-theme="dark"] .text-slate-400,
[data-theme="dark"] .text-gray-400 { color: #64748b !important; }
[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-slate-100,
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-100,
[data-theme="dark"] .border-exactus-cream-300 { border-color: #243247 !important; }
[data-theme="dark"] .divide-slate-200 > :not([hidden]) ~ :not([hidden]),
[data-theme="dark"] .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: #243247 !important;
}
[data-theme="dark"] .shadow-slate-300\/40,
[data-theme="dark"] .shadow-xl {
    --tw-shadow-color: rgb(0 0 0 / 0.45);
}
[data-theme="dark"] .ring-exactus-cream-300,
[data-theme="dark"] .ring-1 {
    --tw-ring-color: #243247;
}

/* Central de Soluções (Início) */
[data-theme="dark"] .csol-kpi-list > div { border-bottom-color: #243247; }
[data-theme="dark"] .csol-kpi-list dt,
[data-theme="dark"] .csol-venc-meta,
[data-theme="dark"] .csol-tips-list { color: #94a3b8; }
[data-theme="dark"] .csol-kpi-list dd,
[data-theme="dark"] .csol-venc-desc { color: #e2e8f0; }
[data-theme="dark"] .csol-side-link { color: #8bb8ef; }
[data-theme="dark"] .csol-tips {
    background: linear-gradient(165deg, #2a2210 0%, #152033 55%);
    border-color: #3f3420;
}
[data-theme="dark"] .csol-tabs {
    background: #1a2740;
    border-color: #334155;
}
[data-theme="dark"] .csol-tab {
    color: #94a3b8;
}
[data-theme="dark"] .csol-tab:hover {
    color: #e2e8f0;
}
[data-theme="dark"] .csol-pref-btn {
    color: #94a3b8;
}
[data-theme="dark"] .csol-pref-btn:hover {
    color: #8bb8ef;
}
[data-theme="dark"] .csol-hero-logo {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
    color: #e8eef8;
}
[data-theme="dark"] .csol-empresa {
    color: #94a3b8;
}
[data-theme="dark"] .csol-search {
    background: #0f1a2e;
    border-color: #334155;
    color: #e8eef8;
}
[data-theme="dark"] .csol-grupo-titulo,
[data-theme="dark"] .csol-side-title,
[data-theme="dark"] .csol-acesso-head,
[data-theme="dark"] .csol-link-label {
    color: #e2e8f0;
}
[data-theme="dark"] .csol-link {
    border-color: #243247;
    background: #121c2e;
}
[data-theme="dark"] .csol-link:hover {
    background: #1a2740;
    border-color: #3d7bc8;
}
[data-theme="dark"] .csol-link-hint,
[data-theme="dark"] .csol-empty {
    color: #94a3b8;
}
[data-theme="dark"] .cnaes-lista-ul li { color: #cbd5e1; }
[data-theme="dark"] .cnaes-lista-ul .cnae-cod { color: #8bb8ef; }
[data-theme="dark"] .cnaes-lista-ul .cnae-desc { color: #94a3b8; }

/* Tabelas e painéis comuns */
[data-theme="dark"] table {
    color: #e2e8f0;
}
[data-theme="dark"] thead th {
    color: #cbd5e1;
    border-color: #243247 !important;
}
[data-theme="dark"] tbody td {
    border-color: #243247 !important;
}
[data-theme="dark"] .overflow-hidden.rounded-xl,
[data-theme="dark"] .rounded-xl.border,
[data-theme="dark"] .rounded-lg.border {
    border-color: #243247 !important;
}
[data-theme="dark"] .bg-exactus-blue-50 {
    background-color: rgba(27, 77, 140, 0.25) !important;
}
[data-theme="dark"] .text-exactus-blue-700,
[data-theme="dark"] .text-exactus-blue-800,
[data-theme="dark"] .text-exactus-blue-900 {
    color: #93c5fd !important;
}

.xml-import-progress {
    height: 0.65rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.xml-import-progress-bar {
    height: 100%;
    background: #0F3460;
    transition: width 0.2s ease;
}
.xml-import-drop.is-dragover {
    border-color: #0F3460;
}

.btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0F3460;
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-brand:hover { background: #164078; color: #fff; }
.shop-top {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 52, 96, 0.08);
  backdrop-filter: blur(12px);
}
.ext-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #eef1f5;
  border-radius: 999px;
  padding: 0.35rem 0.45rem;
}
.ext-tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  padding: 0.1rem 0;
}
.ext-tabs::-webkit-scrollbar { display: none; }
.ext-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  background: transparent;
  border: none;
  white-space: nowrap;
}
.ext-pill.is-on {
  background: #fff;
  color: #0F3460;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.ext-tab-arrow,
.ext-row-arrow {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
}
.ext-tab-arrow.is-next,
.ext-row-arrow.is-next {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.ext-scroller {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.25rem 0.15rem 0.5rem;
}
.ext-scroller::-webkit-scrollbar { display: none; }
.ext-card {
  flex: 0 0 9.5rem;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 0.85rem;
  padding: 1rem 0.75rem 0.85rem;
  text-align: center;
  min-height: 11.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ext-card.is-on {
  border-color: #86efac;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.12);
}
.ext-mark {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.65rem;
}
.ext-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.25;
}
.ext-card-status {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}
.ext-card.is-on .ext-card-status { color: #16a34a; }
.ext-card-actions {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}
.ext-btn-primary,
.ext-btn-ghost {
  width: 100%;
  border-radius: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.4rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.ext-btn-primary {
  background: #0F3460;
  color: #fff;
  border: none;
}
.ext-btn-ghost {
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
}


