:root {
    --nota-ink: #0a3d3a;
    --nota-ink-soft: #14615c;
    --nota-mist: #eef4f3;
    --nota-paper: #f7faf9;
    --nota-line: #c9d9d6;
    --nota-accent: #e07a2f;
    --nota-accent-deep: #c45f18;
    --nota-text: #1a2e2c;
    --nota-muted: #5a736f;
    --nota-danger: #b42318;
    --nota-ok: #1f7a4d;
    --font-display: "Syne", sans-serif;
    --font-body: "Figtree", sans-serif;
    --radius: 10px;
    --shadow-soft: 0 12px 40px rgba(10, 61, 58, 0.08);
    --app-sidebar: 260px;
}

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

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--nota-text);
    background: var(--nota-paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}

h1, h2, h3, .brand-word {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    color: var(--nota-ink);
}

a {
    color: var(--nota-ink-soft);
}

a:hover {
    color: var(--nota-accent-deep);
}

/* Links na sidebar ignoram o estilo global */
.app-sidebar a {
    color: rgba(255, 255, 255, 0.88);
}

.app-sidebar a:hover {
    color: #fff;
}

.btn-primary,
button.btn-primary {
    --bs-btn-bg: var(--nota-ink);
    --bs-btn-border-color: var(--nota-ink);
    --bs-btn-hover-bg: var(--nota-ink-soft);
    --bs-btn-hover-border-color: var(--nota-ink-soft);
    --bs-btn-active-bg: var(--nota-ink);
    --bs-btn-active-border-color: var(--nota-ink);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
}

.btn-outline-secondary {
    border-color: var(--nota-line);
    color: var(--nota-ink);
    border-radius: 8px;
    font-weight: 600;
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--nota-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-body);
    padding: 0.85rem 1.4rem;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-accent:hover {
    background: var(--nota-accent-deep);
    color: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--nota-ink);
    border: 1.5px solid rgba(10, 61, 58, 0.25);
    border-radius: 8px;
    font-weight: 600;
    padding: 0.85rem 1.4rem;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
    border-color: var(--nota-ink);
    background: rgba(10, 61, 58, 0.04);
    color: var(--nota-ink);
}

.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--nota-line);
    padding: 0.7rem 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--nota-ink-soft);
    box-shadow: 0 0 0 3px rgba(20, 97, 92, 0.15);
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nota-muted);
    font-weight: 600;
    border-bottom-width: 1px;
}

.alert {
    border-radius: var(--radius);
    border: none;
}

.content {
    padding-top: 0.5rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--nota-ok);
}

.invalid {
    outline: 1px solid var(--nota-danger);
}

.validation-message {
    color: var(--nota-danger);
}

.page-title {
    font-size: clamp(1.6rem, 2vw, 2rem);
    margin-bottom: 0.35rem;
}

.page-sub {
    color: var(--nota-muted);
    margin-bottom: 1.5rem;
}

/* ——— Public site ——— */
.public-shell {
    min-height: 100vh;
    overflow-x: clip;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(224, 122, 47, 0.18), transparent 55%),
        radial-gradient(900px 500px at -10% 20%, rgba(20, 97, 92, 0.12), transparent 50%),
        linear-gradient(165deg, #e8f1ef 0%, #f4f7f6 45%, #eef2f1 100%);
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem clamp(1.25rem, 4vw, 3.5rem);
    position: relative;
    z-index: 5;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}

.brand-lockup:hover {
    color: inherit;
}

.brand-logo,
.app-brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
    flex-shrink: 0;
}

.public-nav .brand-word {
    font-size: 1.45rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--nota-ink);
    letter-spacing: -0.03em;
}

.brand-accent {
    color: var(--nota-accent);
}

.public-nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.public-nav-links a {
    text-decoration: none;
    color: var(--nota-ink);
    font-weight: 600;
    font-size: 0.95rem;
}

.public-nav-links a:not(.btn-accent):not(.btn-whatsapp):not(.nav-whatsapp):hover {
    color: var(--nota-accent-deep);
}

.public-nav-links a.nav-whatsapp {
    color: #128c46;
}

.public-nav-links a.nav-whatsapp:hover {
    color: #0d6b36;
}

.public-nav-links .nav-whatsapp svg {
    width: 1.05rem;
    height: 1.05rem;
}

.public-nav-links .btn-accent {
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    min-height: calc(100vh - 5rem);
    padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 3rem;
    position: relative;
    overflow: visible;
}

.hero-copy {
    max-width: 34rem;
    min-width: 0;
    padding-bottom: 1rem;
    position: relative;
    z-index: 2;
    animation: rise-in 0.8s ease both;
}

.hero-brand-lockup {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hero-brand-logo {
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
}

.hero-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    line-height: 1;
    color: var(--nota-ink);
    margin: 0;
}

.hero-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.45rem, 2.6vw, 2.15rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    color: var(--nota-ink);
}

.hero-lead {
    font-size: 1.08rem;
    line-height: 1.55;
    color: var(--nota-muted);
    margin: 0 0 1.75rem;
    max-width: 28rem;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-visual {
    position: relative;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 380px;
    height: min(58vh, 520px);
    animation: float-in 1s 0.15s ease both;
}

.hero-stage {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background:
        linear-gradient(160deg, rgba(10, 61, 58, 0.92), rgba(20, 97, 92, 0.75)),
        repeating-linear-gradient(
            -12deg,
            transparent,
            transparent 18px,
            rgba(255, 255, 255, 0.03) 18px,
            rgba(255, 255, 255, 0.03) 19px
        );
    overflow: hidden;
}

.hero-stage::after {
    content: "";
    position: absolute;
    inset: auto 0 -20% 10%;
    height: 65%;
    background: radial-gradient(circle at 30% 30%, rgba(224, 122, 47, 0.45), transparent 55%);
    animation: glow-drift 8s ease-in-out infinite alternate;
}

.receipt {
    position: absolute;
    right: 10%;
    top: 12%;
    width: min(280px, 70%);
    background: #fbfcfb;
    color: var(--nota-ink);
    padding: 1.4rem 1.25rem 1.6rem;
    box-shadow: var(--shadow-soft);
    transform: rotate(3deg);
    font-family: var(--font-body);
    animation: receipt-float 5.5s ease-in-out infinite;
}

.receipt-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.receipt-meta {
    font-size: 0.75rem;
    color: var(--nota-muted);
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--nota-line);
    padding-bottom: 0.75rem;
}

.receipt-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin: 0.35rem 0;
}

.receipt-total {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--nota-line);
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.receipt-barcode {
    margin-top: 1rem;
    height: 36px;
    background: repeating-linear-gradient(
        90deg,
        var(--nota-ink) 0 2px,
        transparent 2px 4px,
        var(--nota-ink) 4px 5px,
        transparent 5px 8px
    );
    opacity: 0.75;
}

.section {
    padding: 4.5rem clamp(1.25rem, 4vw, 3.5rem);
}

.section-narrow {
    max-width: 720px;
}

.section h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin: 0 0 0.75rem;
}

.section p.lead {
    font-size: 1.1rem;
    color: var(--nota-muted);
    margin: 0 0 2rem;
    max-width: 34rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.25rem;
}

.feature-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1.1rem 0;
    border-top: 1px solid rgba(10, 61, 58, 0.12);
}

.feature-list li:last-child {
    border-bottom: 1px solid rgba(10, 61, 58, 0.12);
}

.feature-index {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--nota-accent);
    font-size: 1.1rem;
    min-width: 2rem;
}

.feature-list h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
}

.feature-list p {
    margin: 0;
    color: var(--nota-muted);
}

.band {
    background: var(--nota-ink);
    color: #e8f1ef;
    padding: 4rem clamp(1.25rem, 4vw, 3.5rem);
}

.band h2 {
    color: #fff;
    margin: 0 0 0.75rem;
}

.band p {
    color: rgba(232, 241, 239, 0.78);
    max-width: 32rem;
    margin: 0 0 1.5rem;
}

.band .btn-accent {
    background: var(--nota-accent);
}

.band-ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

/* ——— Planos / pricing ——— */
.pricing-section {
    padding-top: 2rem;
}

.pricing-intro {
    max-width: 40rem;
    margin-bottom: 2.5rem;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--nota-accent);
    margin: 0 0 0.5rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
}

.pricing-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
}

.pricing-grid--single {
    grid-template-columns: minmax(0, 26rem);
    justify-content: center;
    max-width: 40rem;
    margin-inline: auto;
}

.pricing-grid--single.pricing-grid--compact {
    max-width: 26rem;
    margin-inline: 0;
}

.pricing-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(10, 61, 58, 0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pricing-card--featured {
    border-color: rgba(224, 122, 47, 0.35);
    box-shadow: 0 16px 48px rgba(224, 122, 47, 0.12);
}

.pricing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(224, 122, 47, 0.12);
    color: var(--nota-accent-deep);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.pricing-name {
    margin: 0;
    font-size: 1.35rem;
}

.pricing-desc {
    margin: 0;
    color: var(--nota-muted);
    font-size: 0.95rem;
    min-height: 2.8rem;
}

.pricing-price {
    margin: 0;
}

.pricing-amount {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--nota-ink);
}

.pricing-period {
    color: var(--nota-muted);
    font-size: 0.95rem;
}

.pricing-fineprint {
    margin: 0;
    color: var(--nota-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.pricing-features {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    flex: 1;
}

.pricing-features li {
    padding: 0.35rem 0 0.35rem 1.25rem;
    position: relative;
    font-size: 0.92rem;
    color: var(--nota-text);
}

.pricing-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--nota-ok);
    font-weight: 700;
}

@media (max-width: 900px) {
    .pricing-grid,
    .pricing-grid--compact,
    .pricing-grid--single {
        grid-template-columns: 1fr;
    }
}

.public-footer {
    padding: 2rem 11rem 5.75rem clamp(1.25rem, 4vw, 3.5rem);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--nota-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(10, 61, 58, 0.1);
}

.public-footer .brand-lockup .brand-word {
    font-size: 1.1rem;
}

.whatsapp-inline,
.nav-whatsapp,
.btn-whatsapp,
.whatsapp-float {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    text-decoration: none;
}

.whatsapp-inline svg,
.nav-whatsapp svg,
.btn-whatsapp svg,
.whatsapp-float svg {
    flex-shrink: 0;
}

.whatsapp-inline {
    color: #128c46;
}

.whatsapp-inline svg {
    width: 1.05rem;
    height: 1.05rem;
}

.whatsapp-inline:hover {
    color: #0d6b36;
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 1.4rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-whatsapp svg {
    width: 1.15rem;
    height: 1.15rem;
}

.btn-whatsapp:hover {
    background: #1ebe5d;
    color: #fff;
    transform: translateY(-1px);
}

.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    background: #25d366;
    color: #fff;
    border-radius: 999px;
    padding: 0.8rem 1.05rem 0.8rem 0.9rem;
    box-shadow: 0 10px 28px rgba(18, 140, 70, 0.35);
}

.whatsapp-float svg {
    width: 1.35rem;
    height: 1.35rem;
}

.whatsapp-float:hover {
    background: #1ebe5d;
    color: #fff;
}

.pricing-whatsapp {
    margin: 0.25rem 0 0;
    color: var(--nota-muted);
    font-size: 0.9rem;
}

.auth-panel {
    max-width: 420px;
    margin: 0 auto;
    padding: 1rem clamp(1.25rem, 4vw, 3.5rem) 4rem;
    animation: rise-in 0.5s ease both;
}

.auth-panel h1 {
    font-size: 2rem;
    margin-bottom: 0.35rem;
}

.auth-panel h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--nota-muted);
    margin-bottom: 1.25rem;
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float-in {
    from { opacity: 0; transform: translateY(28px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes receipt-float {
    0%, 100% { transform: rotate(3deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-10px); }
}

@keyframes glow-drift {
    from { transform: translate(0, 0); }
    to { transform: translate(-8%, -6%); }
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        align-items: start;
        padding-bottom: 2rem;
    }

    .hero-visual {
        height: 320px;
        min-height: 320px;
        order: -1;
    }

    .hero-brand {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
    }

    .public-nav-links a:not(.btn-accent):not(.nav-login):not(.nav-whatsapp) {
        display: none;
    }
}

/* ——— App shell ——— */
.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
    padding-left: var(--app-sidebar);
    background:
        linear-gradient(180deg, #f3f7f6 0%, #eef3f2 100%);
    max-width: 100%;
    box-sizing: border-box;
}

.app-sidebar {
    background: linear-gradient(180deg, #0c4541 0%, #0a3d3a 40%, #083230 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--app-sidebar);
    height: auto;
    max-height: none;
    z-index: 30;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-sizing: border-box;
}

.app-sidebar-menu {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.15rem;
    text-decoration: none;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.app-brand:hover {
    color: #fff !important;
}

.app-brand-mark,
.app-brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9px;
    flex-shrink: 0;
}

.app-brand-mark {
    background: var(--nota-accent);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.app-brand .brand-word {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
}

.app-brand small {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-label {
    margin: 0.85rem 1.5rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.nav-hint {
    margin: 0 0.5rem 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8rem;
    line-height: 1.4;
}

.nav-parent {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.app-sidebar .nav-parent-trigger {
    cursor: pointer;
    user-select: none;
}

.app-sidebar .nav-parent-trigger:hover,
.app-sidebar .nav-parent.is-open > .nav-parent-trigger,
.app-sidebar .nav-parent.has-active > .nav-parent-trigger {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.app-sidebar .nav-parent.has-active > .nav-parent-trigger {
    box-shadow: inset 3px 0 0 var(--nota-accent);
}

.app-sidebar .nav-parent.has-active > .nav-parent-trigger .nav-icon-wrap {
    background: rgba(224, 122, 47, 0.35);
    color: #fff;
}

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

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

.nav-parent-children {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-left: 0.85rem;
}

.app-sidebar .nav-parent-children .app-nav-link {
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
}

.app-sidebar .nav-parent-children .nav-icon-wrap {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 7px;
}

.app-sidebar .nav-parent-children .nav-icon-wrap svg {
    width: 0.95rem;
    height: 0.95rem;
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 0.75rem;
    flex: 1 0 auto;
}

.app-sidebar .app-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.82) !important;
    text-decoration: none;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    font-weight: 600;
    font-size: 0.93rem;
    transition: background 0.15s ease, color 0.15s ease;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.nav-icon-wrap {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.nav-icon-wrap svg {
    width: 1.05rem;
    height: 1.05rem;
    stroke: currentColor;
}

.nav-label {
    flex: 1;
    line-height: 1.2;
    text-align: left;
}

.app-sidebar .app-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.06);
}

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

.app-sidebar .app-nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 3px 0 0 var(--nota-accent);
}

.app-sidebar .app-nav-link.active .nav-icon-wrap {
    background: rgba(224, 122, 47, 0.35);
    color: #fff;
}

.app-nav-footer {
    margin-top: auto;
    padding: 0.85rem 0.75rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.logout-form {
    margin: 0;
}

.app-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.93rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-logout-btn .nav-icon-wrap {
    background: rgba(255, 255, 255, 0.08);
}

.app-logout-btn:hover {
    background: rgba(180, 50, 40, 0.35);
    border-color: rgba(255, 120, 100, 0.35);
    color: #fff;
}

.app-main {
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: auto;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(10, 61, 58, 0.08);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.app-topbar-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--nota-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.7rem 0.35rem 0.35rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--nota-line);
    text-decoration: none;
    color: var(--nota-text);
    max-width: min(280px, 45vw);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-user-chip:hover {
    border-color: var(--nota-ink-soft);
    box-shadow: var(--shadow-soft);
    color: var(--nota-text);
}

.app-user-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--nota-ink);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-user-email {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.app-content {
    padding: 1.5rem 1.5rem 2.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* ——— Dashboard ——— */
.dash {
    width: 100%;
    max-width: none;
}

.dash-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0.95rem 1.1rem;
    border-radius: 12px;
    background: #eef8f1;
    border: 1px solid rgba(31, 122, 77, 0.22);
    color: var(--nota-ink);
}

.dash-banner strong {
    display: block;
    margin-bottom: 0.15rem;
}

.dash-banner span {
    color: var(--nota-muted);
    font-size: 0.92rem;
}

.dash-banner-close {
    border: 0;
    background: transparent;
    color: var(--nota-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
}

.dash-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid rgba(10, 61, 58, 0.08);
}

.dash-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--nota-muted);
    text-transform: capitalize;
}

.dash-title {
    margin: 0 0 0.45rem;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--nota-ink);
    letter-spacing: -0.03em;
}

.dash-subtitle {
    margin: 0;
    color: var(--nota-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.dash-company {
    font-weight: 700;
    color: var(--nota-ink-soft);
}

.dash-sep {
    margin: 0 0.35rem;
    opacity: 0.45;
}

.dash-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.dash-section-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--nota-ink);
}

.dash-section-lead {
    margin: 0;
    font-size: 0.9rem;
    color: var(--nota-muted);
}

.dash-progress-card,
.dash-flow-card {
    background: #fff;
    border: 1px solid rgba(10, 61, 58, 0.08);
    border-radius: 14px;
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.25rem;
}

.dash-progress-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.dash-progress-pct {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--nota-ink);
}

.dash-progress-track {
    height: 0.45rem;
    border-radius: 999px;
    background: var(--nota-mist);
    overflow: hidden;
    margin-bottom: 1.15rem;
}

.dash-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--nota-ink-soft), var(--nota-ok));
    transition: width 0.25s ease;
}

.dash-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.dash-checklist li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    background: var(--nota-paper);
    border: 1px solid transparent;
}

.dash-checklist li.is-current {
    background: #fff;
    border-color: rgba(224, 122, 47, 0.35);
    box-shadow: inset 3px 0 0 var(--nota-accent);
}

.dash-checklist li.is-done {
    opacity: 0.72;
}

.dash-check-mark {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    border: 2px solid var(--nota-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-checklist li.is-done .dash-check-mark {
    border-color: var(--nota-ok);
    background: var(--nota-ok);
}

.dash-checklist li.is-done .dash-check-mark::after {
    content: "";
    width: 0.35rem;
    height: 0.65rem;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) translate(-1px, -1px);
}

.dash-checklist li.is-current .dash-check-mark {
    border-color: var(--nota-accent);
    box-shadow: 0 0 0 3px rgba(224, 122, 47, 0.15);
}

.dash-check-body strong {
    display: block;
    margin-bottom: 0.1rem;
    color: var(--nota-ink);
    font-size: 0.95rem;
}

.dash-check-body p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--nota-muted);
}

.dash-check-link {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--nota-accent-deep);
    text-decoration: none;
    white-space: nowrap;
}

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

.dash-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.35rem;
}

.dash-metric {
    background: #fff;
    border: 1px solid rgba(10, 61, 58, 0.08);
    border-radius: 14px;
    padding: 1.1rem 1.15rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    min-height: 148px;
}

.dash-metric-label {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--nota-muted);
}

.dash-metric-value {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--nota-ink);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.dash-metric-value--sm {
    font-size: 1.35rem;
    padding-top: 0.35rem;
}

.dash-metric-hint {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--nota-muted);
    flex: 1;
}

.dash-metric-link {
    margin-top: 0.85rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--nota-ink-soft);
    text-decoration: none;
}

.dash-metric-link:hover {
    color: var(--nota-accent-deep);
}

.dash-actions {
    margin-bottom: 1.35rem;
}

.dash-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.dash-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(10, 61, 58, 0.08);
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.dash-action:hover {
    border-color: rgba(224, 122, 47, 0.4);
    transform: translateY(-1px);
    color: inherit;
}

.dash-action-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 9px;
    background: var(--nota-mist);
    color: var(--nota-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-action-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.dash-action strong {
    display: block;
    font-size: 0.92rem;
    color: var(--nota-ink);
}

.dash-action small {
    color: var(--nota-muted);
    font-size: 0.78rem;
}

.dash-flow-steps {
    list-style: none;
    margin: 0.9rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.dash-flow-steps li {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.85rem 0.9rem;
    border-radius: 10px;
    background: var(--nota-paper);
}

.dash-flow-steps span {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--nota-ink);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-flow-steps strong {
    display: block;
    font-size: 0.9rem;
    color: var(--nota-ink);
}

.dash-flow-steps p {
    margin: 0.1rem 0 0;
    font-size: 0.8rem;
    color: var(--nota-muted);
}

.dash-loading .dash-skeleton {
    border-radius: 14px;
    background: linear-gradient(90deg, #e8efee 25%, #f4f8f7 50%, #e8efee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

.dash-skeleton-hero {
    height: 120px;
    margin-bottom: 1rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.dash-skeleton-card {
    height: 148px;
}

@media (max-width: 992px) {
    .dash-metrics,
    .dash-action-grid,
    .dash-flow-steps,
    .dash-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dash-metrics,
    .dash-action-grid,
    .dash-flow-steps,
    .dash-grid,
    .dash-checklist {
        grid-template-columns: 1fr;
    }

    .dash-header-actions {
        width: 100%;
    }

    .dash-header-actions .btn {
        flex: 1;
    }

    .dash-checklist li {
        grid-template-columns: auto 1fr;
    }

    .dash-check-link {
        grid-column: 2;
    }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* App tables & page headers */
.app-content .page-title {
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    margin-bottom: 0.25rem;
}

.app-content .page-sub {
    margin-bottom: 1.25rem;
}

.app-content .table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(10, 61, 58, 0.08);
    box-shadow: var(--shadow-soft);
}

.app-content .table > :not(caption) > * > * {
    padding: 0.85rem 1rem;
}

.app-content .btn-primary {
    background-color: var(--nota-ink) !important;
    border-color: var(--nota-ink) !important;
}

.app-content .btn-primary:hover {
    background-color: var(--nota-ink-soft) !important;
    border-color: var(--nota-ink-soft) !important;
}

.app-content .btn-outline-secondary {
    border-color: var(--nota-line);
    color: var(--nota-ink);
}

.app-content .btn-outline-secondary:hover {
    background: var(--nota-mist);
    border-color: var(--nota-ink-soft);
    color: var(--nota-ink);
}

.app-content .alert-info {
    background: rgba(20, 97, 92, 0.08);
    color: var(--nota-ink);
}

.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.app-mobile-toggle {
    display: none;
}

.empresa-switcher {
    min-width: 240px;
    max-width: 360px;
}

.empresa-switcher-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.empresa-switcher-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--nota-muted);
    margin: 0;
}

.empresa-switcher-count {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--nota-accent-deep);
}

.empresa-switcher-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.empresa-switcher-select-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.empresa-switcher-select-wrap::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 2px solid var(--nota-muted);
    border-bottom: 2px solid var(--nota-muted);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.empresa-switcher-select {
    width: 100%;
    min-width: 0;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.45rem 1.75rem 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--nota-line);
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.empresa-switcher-select:disabled {
    cursor: default;
    opacity: 1;
    background: #fff;
}

.empresa-switcher-manage {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--nota-ink-soft);
    text-decoration: none;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    border: 1px solid var(--nota-line);
    background: #fff;
}

.empresa-switcher-manage:hover {
    color: var(--nota-accent-deep);
    border-color: var(--nota-accent);
}

.empresa-switcher-meta {
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    color: var(--nota-muted);
}

.empresa-switcher-meta a {
    font-weight: 700;
    color: var(--nota-ink-soft);
}

.empresa-admin-badge {
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(224, 122, 47, 0.15);
    color: var(--nota-accent-deep);
}

@media (max-width: 900px) {
    .app-user-email {
        display: none;
    }

    .empresa-switcher-meta {
        display: none;
    }

    .app-shell {
        padding-left: 0;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, var(--app-sidebar));
        height: auto;
        bottom: 0;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 40;
        box-shadow: var(--shadow-soft);
        overflow-x: hidden;
        overflow-y: auto;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 8px;
        border: 1px solid var(--nota-line);
        background: #fff;
        cursor: pointer;
        flex-shrink: 0;
        padding: 0;
        font-size: 1.1rem;
        line-height: 1;
        color: var(--nota-ink);
    }

    .app-topbar {
        flex-wrap: wrap;
        align-items: center;
        padding: 0.5rem 0.75rem 0.65rem;
        gap: 0.5rem;
        padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
    }

    .app-topbar-left {
        flex: 0 0 auto;
        order: 1;
    }

    .app-topbar-right {
        display: contents;
    }

    .app-user-chip {
        order: 2;
        margin-left: auto;
        max-width: 2.5rem;
        padding: 0.35rem;
    }

    .empresa-switcher {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .empresa-switcher-head {
        display: none;
    }

    .empresa-switcher-row {
        width: 100%;
    }

    .empresa-switcher-select {
        width: 100%;
    }

    .empresa-switcher-manage {
        white-space: nowrap;
    }

    .app-topbar-title {
        display: none;
    }

    .app-content {
        padding: 1rem 0.85rem 2rem;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .page-header .btn {
        width: 100%;
    }

    .app-content [class*="col-md-"],
    .app-content [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .app-content form[class*="col-md"],
    .app-content form[class*="col-lg"] {
        width: 100%;
        max-width: 100%;
    }

    .app-content .input-group {
        flex-wrap: wrap;
    }

    .app-content .input-group > .form-control {
        min-width: 0;
        flex: 1 1 8rem;
    }

    .app-content .input-group > .btn {
        flex: 1 1 auto;
    }

    .app-content .d-flex.gap-2,
    .app-content .d-flex.gap-3 {
        flex-wrap: wrap;
    }

    .app-content .d-flex.gap-2 .btn,
    .app-content .d-flex.gap-3 .btn {
        flex: 1 1 auto;
    }
}

.app-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 61, 58, 0.35);
    z-index: 30;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.app-backdrop.is-visible {
    display: block;
}

#blazor-error-ui {
    background: #fff3cd;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.15);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: var(--nota-danger);
    padding: 1rem;
    color: white;
    border-radius: var(--radius);
}

.ncm-picker {
    position: relative;
}

.ncm-picker-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.ncm-picker-list li button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
}

.ncm-picker-list li button:hover {
    background: rgba(13, 148, 136, 0.08);
}

.ncm-picker-code {
    display: inline-block;
    min-width: 6.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 600;
    color: var(--nota-teal-700);
}

.ncm-picker-desc {
    color: var(--nota-ink-700);
}

.ncm-picker-empty,
.ncm-picker-hint {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--nota-ink-500);
}

.ncm-picker-empty {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    padding: 0.65rem 0.75rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius);
}

.select2-combobox {
    position: relative;
}

.select2-combobox-control {
    position: relative;
}

.select2-combobox-input {
    width: 100%;
    padding-right: 2.25rem;
    cursor: text;
}

.select2-combobox-control .form-control.select2-combobox-input {
    background-color: #fff;
}

.select2-combobox-arrow {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--nota-ink-500);
    border-bottom: 2px solid var(--nota-ink-500);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.select2-combobox.is-open .select2-combobox-input {
    border-color: var(--nota-teal-600);
    box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.12);
}

.select2-combobox-results {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.select2-combobox-results li button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
}

.select2-combobox-results li button:hover,
.select2-combobox-results li button:focus {
    background: rgba(13, 148, 136, 0.08);
}

.select2-combobox-label {
    color: var(--nota-ink-800);
    font-weight: 500;
}

.select2-combobox-meta {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    color: var(--nota-ink-500);
    white-space: nowrap;
}

.select2-combobox-empty {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    padding: 0.65rem 0.8rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--nota-ink-500);
}

.nota-combobox {
    position: relative;
}

.nota-combobox-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: calc(1.5em + 0.75rem + 2px);
    text-align: left;
    background-color: #fff;
    cursor: pointer;
    overflow: hidden;
}

.nota-combobox-trigger > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nota-combobox-trigger:focus {
    border-color: var(--nota-teal-600);
    box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.12);
}

.nota-combobox-placeholder {
    color: var(--nota-ink-500);
}

.nota-combobox.is-open .nota-combobox-trigger {
    border-color: var(--nota-teal-600);
    box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.12);
}

.nota-combobox-panel {
    position: absolute;
    z-index: 45;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.nota-combobox-search {
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0;
    box-shadow: none;
}

.nota-combobox-search:focus {
    box-shadow: none;
    border-color: rgba(15, 23, 42, 0.08);
}

.nota-combobox-list {
    max-height: 260px;
    overflow-y: auto;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
}

.nota-combobox-list li button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
}

.nota-combobox-list li button:hover,
.nota-combobox-list li button:focus {
    background: rgba(13, 148, 136, 0.08);
}

.nota-combobox-item-label {
    color: var(--nota-ink-800);
    font-weight: 500;
}

.nota-combobox-item-meta {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    color: var(--nota-ink-500);
    white-space: nowrap;
}

.nota-combobox-empty {
    padding: 0.65rem 0.8rem;
    font-size: 0.9rem;
    color: var(--nota-ink-500);
}

.pdv-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.pdv-venda {
    display: grid;
    gap: 1rem;
}

.pdv-config-panel {
    margin-bottom: 0;
}

.pdv-cliente-padrao {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-height: calc(1.5em + 0.75rem + 2px);
    justify-content: center;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--nota-line);
    border-radius: 8px;
    background: var(--nota-paper);
}

.pdv-cliente-padrao span {
    font-weight: 600;
    color: var(--nota-ink);
}

.pdv-cliente-padrao small {
    color: var(--nota-muted);
    font-size: 0.78rem;
}

.pdv-busca-hint {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    color: var(--nota-muted);
}

.pdv-produto-picker .nota-combobox-placeholder {
    color: var(--nota-muted);
}

.pdv-panel {
    background: #fff;
    border: 1px solid rgba(10, 61, 58, 0.08);
    border-radius: 14px;
    padding: 1.15rem;
    box-shadow: var(--shadow-soft);
}

.pdv-carrinho-panel {
    position: sticky;
    top: 4.5rem;
}

.pdv-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.pdv-panel-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--nota-ink);
}

.pdv-panel-meta {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--nota-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pdv-panel-badge {
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--nota-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdv-search {
    margin-bottom: 0.85rem;
}

.pdv-produtos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    max-height: calc(100vh - 14rem);
    overflow-y: auto;
    padding-right: 0.15rem;
}

.pdv-produto-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
    min-height: 5.5rem;
    text-align: left;
    border: 1px solid rgba(10, 61, 58, 0.1);
    border-radius: 10px;
    background: #fff;
    padding: 0.8rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.pdv-produto-card:hover {
    border-color: var(--nota-ink-soft);
    background: var(--nota-mist);
}

.pdv-produto-card.in-cart {
    border-color: rgba(20, 97, 92, 0.35);
    background: rgba(20, 97, 92, 0.05);
}

.pdv-produto-card.just-added {
    animation: pdv-flash 0.45s ease;
}

.pdv-produto-nome {
    font-weight: 600;
    color: var(--nota-ink);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdv-produto-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--nota-muted);
    margin-top: auto;
}

.pdv-produto-codigo {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
}

.pdv-produto-badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--nota-ink);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdv-empty,
.pdv-cart-empty {
    color: var(--nota-muted);
    text-align: center;
    padding: 1.5rem 0.5rem;
}

.pdv-cart-empty-icon {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}

.pdv-cart-list {
    display: grid;
    gap: 0.65rem;
    max-height: min(42vh, 360px);
    overflow-y: auto;
    margin-bottom: 0.85rem;
}

.pdv-cart-item {
    border: 1px solid rgba(10, 61, 58, 0.08);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    background: var(--nota-paper);
}

.pdv-cart-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pdv-cart-item-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pdv-cart-item-nome {
    font-weight: 600;
    color: var(--nota-ink);
    line-height: 1.25;
}

.pdv-cart-item-meta {
    font-size: 0.8rem;
    color: var(--nota-muted);
}

.pdv-qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--nota-line);
    border-radius: 999px;
    padding: 0.15rem;
}

.pdv-qty-btn {
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 50%;
    background: var(--nota-mist);
    color: var(--nota-ink);
    font-size: 1rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdv-qty-btn:hover {
    background: rgba(10, 61, 58, 0.12);
}

.pdv-qty-value {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.pdv-cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px dashed rgba(10, 61, 58, 0.1);
}

.pdv-cart-item-total {
    color: var(--nota-ink);
    font-size: 1rem;
}

.pdv-cart-remove {
    text-decoration: none;
    padding: 0;
}

.pdv-summary {
    border-top: 1px solid rgba(10, 61, 58, 0.08);
    padding-top: 0.75rem;
    margin-bottom: 0.85rem;
}

.pdv-summary-row {
    display: flex;
    justify-content: space-between;
    color: var(--nota-muted);
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.pdv-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    color: var(--nota-ink);
}

.pdv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.pdv-actions .btn-primary {
    flex: 1 1 12rem;
}

.pdv-mobile-bar {
    display: none;
}

@keyframes pdv-flash {
    0% { transform: scale(1); background: rgba(20, 97, 92, 0.12); }
    100% { transform: scale(1); background: rgba(20, 97, 92, 0.05); }
}

@media (max-width: 991px) {
    .pdv-layout {
        grid-template-columns: 1fr;
    }

    .pdv-carrinho-panel {
        order: 2;
        position: static;
    }

    .pdv-busca-panel {
        order: 1;
    }

    .pdv-produtos {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .pdv-cart-list {
        max-height: none;
    }

    .pdv-actions .btn-primary {
        display: none;
    }

    .pdv-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        padding: 0.75rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid rgba(10, 61, 58, 0.1);
        box-shadow: 0 -8px 24px rgba(10, 61, 58, 0.08);
    }

    .pdv-mobile-bar-total {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .pdv-mobile-bar-total small {
        color: var(--nota-muted);
        font-size: 0.75rem;
    }

    .pdv-mobile-bar .btn {
        min-width: 7rem;
        font-weight: 700;
    }

    .app-content:has(.pdv-mobile-bar) {
        padding-bottom: 5.5rem;
    }
}

@media (min-width: 992px) and (max-width: 1200px) {
    .pdv-produtos {
        grid-template-columns: 1fr;
    }
}

.pdv-pagamento-row {
    display: grid;
    grid-template-columns: 1fr 7rem auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pdv-pagamento-resumo {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--nota-muted);
    margin-top: 0.5rem;
}

.pdv-pagamento-resumo-erro {
    color: #b45309;
}

.pdv-qty-input {
    width: 4.25rem;
    text-align: center;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.pdv-cart-preco {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 5.5rem;
}

.pdv-cart-preco .form-control {
    max-width: 6.5rem;
}

.pdv-produto-picker .pdv-produtos {
    margin-top: 0.75rem;
    max-height: 22rem;
    overflow: auto;
}

.pdv-cart-item-sem-estoque {
    border-left: 3px solid #f59e0b;
}

.nota-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 61, 58, 0.35);
    z-index: 1040;
}

.nota-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    width: min(28rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 16px 48px rgba(10, 61, 58, 0.18);
}

.nota-modal > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.nota-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(10, 61, 58, 0.08);
}

.nota-modal-title {
    font-size: 1.1rem;
    margin: 0;
}

.nota-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 1.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nota-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(10, 61, 58, 0.08);
    background: #fff;
}

.nota-modal-lg {
    width: min(42rem, calc(100vw - 2rem));
}

.nota-modal-xl {
    width: min(52rem, calc(100vw - 2rem));
}

.fiscal-guia {
    border: 1px solid rgba(10, 61, 58, 0.1);
    background: rgba(10, 61, 58, 0.03);
}

.fiscal-guia-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.fiscal-guia-num {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--nota-primary, #0a3d3a);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fiscal-tabs .nav-link {
    cursor: pointer;
    color: inherit;
    border: none;
    background: transparent;
}

.fiscal-tabs .nav-link.active {
    font-weight: 600;
}

/* ——— Layout padronizado ——— */
.page-header-main {
    min-width: 0;
}

.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.page-header .page-sub {
    margin-bottom: 0;
    margin-top: 0.35rem;
}

.nota-page {
    display: grid;
    gap: 1rem;
}

.nota-panel {
    background: #fff;
    border: 1px solid rgba(10, 61, 58, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1.25rem 1.5rem;
}

.nota-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.nota-table-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.nota-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    line-height: 1;
}

.nota-icon,
.nota-btn-icon > * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.nota-btn-icon svg,
.nota-icon svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    display: block;
    stroke: currentColor;
    overflow: visible;
}

.nota-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.nota-documentos-table .nota-documentos-col-cliente {
    min-width: 14rem;
    max-width: 18rem;
}

.nota-rejeicao {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    max-width: 20rem;
}

.nota-rejeicao-texto {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    color: var(--nota-danger);
}

.nota-rejeicao-ver {
    padding: 0;
    border: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
    flex: 0 0 auto;
}

.nota-rejeicao-detalhe {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--nota-text);
}

.nota-badge--success {
    background: rgba(31, 122, 77, 0.12);
    color: var(--nota-ok);
}

.nota-badge--warning {
    background: rgba(224, 122, 47, 0.14);
    color: var(--nota-accent-deep);
}

.nota-badge--danger {
    background: rgba(180, 35, 24, 0.1);
    color: var(--nota-danger);
}

.nota-badge--info {
    background: rgba(20, 97, 92, 0.1);
    color: var(--nota-ink-soft);
}

.nota-badge--neutral {
    background: rgba(10, 61, 58, 0.08);
    color: var(--nota-muted);
}

.nota-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #fff;
    border: 1px dashed rgba(10, 61, 58, 0.16);
    border-radius: var(--radius);
}

.nota-empty-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--nota-ink);
}

.nota-empty-text {
    margin: 0;
    color: var(--nota-muted);
}

.nota-empty-actions {
    margin-top: 1rem;
}

.nota-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0;
    color: var(--nota-muted);
}

.nota-loading-spinner {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid rgba(10, 61, 58, 0.15);
    border-top-color: var(--nota-ink-soft);
    border-radius: 50%;
    animation: nota-spin 0.8s linear infinite;
}

@keyframes nota-spin {
    to { transform: rotate(360deg); }
}

.nota-acao-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nota-loading-spinner--sm {
    width: 0.85rem;
    height: 0.85rem;
    border-width: 2px;
    flex-shrink: 0;
}

.nota-status-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.app-content tr.nota-row-processando > td {
    background: rgba(20, 97, 92, 0.06);
}

.app-content tr.nota-row-highlight > td {
    background: rgba(224, 122, 47, 0.08);
}

.nota-combobox-trigger:focus,
.nota-combobox.is-open .nota-combobox-trigger {
    border-color: var(--nota-ink-soft);
    box-shadow: 0 0 0 0.2rem rgba(20, 97, 92, 0.12);
}

.nota-combobox-placeholder,
.nota-combobox-empty,
.select2-combobox-empty {
    color: var(--nota-muted);
}

.nota-combobox-item-label {
    color: var(--nota-text);
}

.nota-combobox-item-meta {
    color: var(--nota-muted);
}

.nota-combobox-list li button:hover,
.nota-combobox-list li button:focus {
    background: rgba(20, 97, 92, 0.08);
}

/* Impressão de venda */
.print-layout {
    min-height: 100vh;
    background: #fff;
}

.venda-print {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    justify-content: center;
}

.venda-print-doc {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 1.5rem 2rem;
    background: #fff;
    color: #111;
    font-size: 13px;
    line-height: 1.45;
}

.venda-print-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 2px solid #111;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.venda-print-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    color: #111;
}

.venda-print-meta {
    text-align: right;
    font-size: 12px;
}

.venda-print-title h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #111;
}

.venda-print-title p,
.venda-print-block p {
    margin: 0.25rem 0;
}

.venda-print-block {
    margin-top: 1.25rem;
}

.venda-print-block h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #333;
}

.venda-print-table {
    width: 100%;
    border-collapse: collapse;
}

.venda-print-table th,
.venda-print-table td {
    border-bottom: 1px solid #ddd;
    padding: 0.45rem 0.35rem;
    vertical-align: top;
}

.venda-print-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #555;
}

.venda-print-table tfoot td {
    border-top: 2px solid #111;
    border-bottom: none;
    padding-top: 0.65rem;
}

.venda-print-muted {
    color: #666;
    font-size: 12px;
}

.venda-print-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed #bbb;
    text-align: center;
    font-size: 11px;
}

.print-loading {
    padding: 2rem;
    text-align: center;
}

@media print {
    .no-print,
    .app-shell,
    .app-topbar,
    .app-sidebar {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .venda-print-doc {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .print-layout {
        min-height: auto;
    }
}


/* ===== Venda desk (transaction screen) ===== */
.venda-desk {
    max-width: 1280px;
}

.venda-desk-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.venda-desk-topbar-main {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    min-width: 0;
}

.venda-desk-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--nota-line);
    color: var(--nota-ink);
    text-decoration: none;
    background: #fff;
    flex-shrink: 0;
}

.venda-desk-back:hover {
    background: var(--nota-mist);
}

.venda-desk-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--nota-ink);
    line-height: 1.2;
}

.venda-desk-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-top: 0.35rem;
}

.venda-desk-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--nota-mist);
    color: var(--nota-muted);
    font-size: 0.78rem;
}

.venda-desk-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.venda-desk-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 1rem;
    align-items: start;
}

.venda-desk-main,
.venda-desk-side {
    min-width: 0;
}

.venda-desk-search {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 5;
}

.venda-desk-search .venda-search {
    flex: 1 1 auto;
    min-width: 0;
}

.venda-desk-search-btn {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
}

.venda-busca-input {
    font-size: 1.05rem;
    padding: 0.7rem 0.9rem;
}

.venda-busca-meta {
    margin: 0.55rem 0 0.75rem;
    color: var(--nota-muted);
    font-size: 0.85rem;
}

.venda-busca-empty {
    padding: 1.25rem 0.25rem;
    color: var(--nota-muted);
}

.venda-busca-table-wrap {
    max-height: min(28rem, calc(100dvh - 16rem));
    overflow: auto;
}

.venda-busca-table thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.venda-busca-table th.text-end,
.venda-busca-table td.text-end {
    white-space: nowrap;
}

.venda-busca-table tr.is-active {
    background: var(--nota-mist);
}

.venda-busca-nome {
    font-weight: 600;
}

.venda-busca-sub {
    color: var(--nota-muted);
    font-size: 0.82rem;
}

.venda-search {
    position: relative;
}

.venda-search-input {
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--nota-line);
    border-radius: 0.65rem;
    background: #fff;
}

.venda-search-input:focus {
    border-color: var(--nota-ink-soft);
    box-shadow: 0 0 0 3px rgba(20, 97, 92, 0.12);
}

.venda-search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    background: #fff;
    border: 1px solid var(--nota-line);
    border-radius: 0.65rem;
    box-shadow: 0 12px 28px rgba(10, 61, 58, 0.12);
    max-height: 18rem;
    overflow: auto;
}

.venda-search-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem;
}

.venda-search-list button {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 0.45rem;
    padding: 0.65rem 0.75rem;
    color: var(--nota-text);
}

.venda-search-list button:hover,
.venda-search-list button.is-active {
    background: var(--nota-mist);
}

.venda-search-name {
    font-weight: 600;
}

.venda-search-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--nota-muted);
}

.venda-search-empty {
    padding: 0.9rem 1rem;
    color: var(--nota-muted);
    font-size: 0.9rem;
}

.venda-desk-receipt {
    background: #fff;
    border: 1px solid var(--nota-line);
    border-radius: 0.75rem;
    overflow: hidden;
}

.venda-desk-receipt-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--nota-line);
    background: var(--nota-mist);
}

.venda-desk-receipt-head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--nota-ink);
}

.venda-desk-count {
    font-size: 0.8rem;
    color: var(--nota-muted);
}

.venda-desk-empty {
    padding: 2.5rem 1.25rem;
    text-align: center;
    color: var(--nota-muted);
}

.venda-desk-table {
    --bs-table-bg: transparent;
}

.venda-desk-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--nota-muted);
    border-bottom-color: var(--nota-line);
    white-space: nowrap;
    background: #fff;
}

.venda-desk-table tbody td {
    vertical-align: middle;
    border-color: var(--nota-line);
}

.venda-desk-table tr.is-warn {
    background: #fff8eb;
}

.venda-desk-item-name {
    font-weight: 600;
    color: var(--nota-text);
}

.venda-desk-item-sub {
    font-size: 0.78rem;
    color: var(--nota-muted);
}

.venda-desk-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    justify-content: flex-end;
}

.venda-desk-qty button {
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid var(--nota-line);
    border-radius: 0.35rem;
    background: #fff;
    color: var(--nota-ink);
    line-height: 1;
}

.venda-desk-qty input {
    width: 3.6rem;
    text-align: center;
    border: 1px solid var(--nota-line);
    border-radius: 0.35rem;
    height: 1.7rem;
    padding: 0 0.2rem;
}

.venda-desk-money {
    max-width: 6.5rem;
    margin-left: auto;
}

.venda-desk-side {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: 0.75rem;
}

.venda-desk-card {
    background: #fff;
    border: 1px solid var(--nota-line);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
}

.venda-desk-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nota-muted);
    margin-bottom: 0.55rem;
    font-weight: 600;
}

.venda-desk-cliente-nome {
    font-weight: 700;
    color: var(--nota-ink);
}

.venda-desk-totals {
    background: linear-gradient(180deg, #fff 0%, var(--nota-mist) 100%);
}

.venda-desk-total-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
    color: var(--nota-muted);
}

.venda-desk-total-row strong {
    color: var(--nota-text);
}

.venda-desk-total-hero {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--nota-line);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.venda-desk-total-hero span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.venda-desk-total-hero strong {
    font-size: 1.55rem;
    line-height: 1;
}

.venda-desk-total-hero.is-ok {
    color: var(--nota-ok);
}

.venda-desk-total-hero.is-open {
    color: var(--nota-accent-deep);
}

.venda-desk-pay-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.venda-desk-pay-tile {
    border: 1px solid var(--nota-line);
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.55rem 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--nota-ink);
}

.venda-desk-pay-tile:hover {
    border-color: var(--nota-ink-soft);
    background: var(--nota-mist);
}

.venda-desk-pay-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.venda-desk-pay-line {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.venda-desk-pay-edit {
    display: grid;
    grid-template-columns: 1fr 5.5rem auto;
    gap: 0.35rem;
    align-items: center;
}

.venda-desk-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.venda-desk-actions .btn-lg {
    font-weight: 700;
}

@media (max-width: 960px) {
    .venda-desk-grid {
        grid-template-columns: 1fr;
    }

    .venda-desk-side {
        position: static;
        order: -1;
    }
}

.venda-desk-desconto-row {
    align-items: flex-start;
}

.venda-desk-desconto-edit {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 9.5rem;
}

.venda-desk-desconto-edit .input-group-text {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
}

.venda-desk-qty-mask {
    width: 4.25rem;
    text-align: center;
    border: 1px solid var(--nota-line);
    border-radius: 0.35rem;
    height: 1.7rem;
    padding: 0 0.35rem;
    background: #fff;
}

.venda-desk-money {
    -moz-appearance: textfield;
}

input.venda-desk-money::-webkit-outer-spin-button,
input.venda-desk-money::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
