:root {
    --nd-navy:#0b1f3a;
    --nd-blue:#1e5eff;
    --nd-cyan:#1ab8ff;
    --nd-surface:#ffffff;
    --nd-bg:#f5f8fc;
    --nd-muted:#6b7a90;
    --nd-border:#e5ebf3;
    --nd-shadow:0 24px 70px rgba(11,31,58,.10);
}
html,body {
    min-height:100%
}
body {
    background:#fff;
    color:var(--nd-navy);
    font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
.app-shell {
    max-width:1120px;
    margin:0 auto;
    padding:34px 18px 60px
}
.brand-bar {
    background:rgba(255,255,255,.86);
    backdrop-filter:none;
    border:1px solid rgba(229,235,243,.9);
    box-shadow:none;
    border-radius:0;
    padding:14px 18px;
}
.nd-logo {
    width:auto;
    max-width:320px;
    object-fit:contain;
}
.nd-fallback {
    font-size:1.15rem;
    font-weight:900;
    letter-spacing:-.04em;
    color:var(--nd-navy)
}
.hero {
    padding:48px 10px 26px;
    text-align:center
}
.hero-badge {
    display:inline-flex;
    align-items:center;
    gap:7px;
    background:#fff3bf;
    color:#8a5a00;
    border:1px solid #ffe37a;
    border-radius:0;
    padding:7px 13px;
    font-weight:800;
    font-size:.78rem
}
.hero h1 {
    font-weight:900;
    letter-spacing:-.045em;
    font-size:clamp(2rem,5vw,3.55rem);
    margin:15px 0 9px
}
.hero p {
    color:var(--nd-muted);
    font-size:1.05rem;
    margin:0
}
.premium-card {
    border:1px solid var(--nd-border);
    border-radius:0;
    background:rgba(255,255,255,.96);
    box-shadow:none;
    overflow:hidden
}
.card-inner {
    padding:clamp(22px,4vw,42px)
}
.section-kicker {
    font-size:.76rem;
    letter-spacing:.12em;
    text-transform:uppercase;
    color:var(--nd-blue);
    font-weight:900
}
.form-label {
    font-weight:800;
    color:var(--nd-navy);
    margin-bottom:8px
}
.form-control,.form-select {
    border-color:#dbe4ef;
    border-radius:0;
    min-height:52px;
    box-shadow:none;
    padding:.8rem 1rem
}
.form-control:focus,.form-select:focus {
    border-color:#79a0ff;
    box-shadow:none;
    resize:vertical
}
.upload-box {
    border:1.5px dashed #cdd9e8;
    border-radius:0;
    padding:18px;
    background:#fbfdff
}
.upload-box:hover {
    border-color:#8fb0ff;
    background:#f8fbff
}
.btn-premium {
    min-height:56px;
    border:0;
    border-radius:0;
    font-weight:900;
    background:#1e5eff;
    box-shadow:none;
    align-items:center;
    gap:7px;
    padding:7px 11px;
    border-radius:0;
    background:#f2f6fb;
    color:#50627a;
    font-size:.82rem;
    font-weight:700
}
.result-image {
    max-width:100%;
    height:auto;
    border-radius:0;
    box-shadow:none;
    color:#40526a;
    font-size:.78rem;
    text-transform:uppercase;
    letter-spacing:.06em
}
.table-premium td,.table-premium th {
    padding:14px 16px;
    vertical-align:middle
}
.category-chip {
    display:inline-block;
    background:#eef4ff;
    color:#2453b8;
    border-radius:0;
    padding:5px 9px;
    font-size:.76rem;
    font-weight:800
}
.loading-overlay {
    position:fixed;
    inset:0;
    z-index:9999;
    background:rgba(6,20,42,.83);
    backdrop-filter:none;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px
}
.loading-overlay.show {
    display:flex
}
.loading-card {
    width:min(440px,100%);
    background:#fff;
    border-radius:0;
    padding:34px;
    text-align:center;
    box-shadow:none;
    height:auto;
    margin:0;
    border:1px solid #D9DDE5;
    animation:none !important;
    transform:none !important;
}
@keyframes spin {
    to {
        transform:rotate(360deg)
    }
}
.loading-card h4 {
    font-weight:900;
    letter-spacing:-.02em
}
.loading-card p {
    color:var(--nd-muted);
    margin-bottom:0
}
.small-muted {
    font-size:.86rem;
    color:var(--nd-muted)
}
.nav-link-premium {
    color:#52647b;
    text-decoration:none;
    font-weight:750;
    padding:9px 12px;
    border-radius:10px
}
.nav-link-premium:hover {
    background:#f0f5fb;
    color:#123c8b
}
.alert {
    border-radius:16px
}
.preview-logo {
    max-height:46px;
    max-width:190px
}
@media(max-width:767px) {
    .nd-logo {
        max-width:320px
    }
    .app-shell {
        padding-top:16px
    }
    .hero {
        padding-top:32px
    }
    .brand-bar {
        border-radius:16px
    }
    .card-inner {
        padding:20px
    }
}
/* =====================================================
   V5 MULTICLIENTE
   ===================================================== */
body {
    font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
.fw-black {
    font-weight:900
}
.nav-link-premium.active {
    background:#eef4ff;
    color:#174fc9;
}
.user-chip {
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:9px 12px;
    background:#0d2343;
    color:#fff;
    border-radius:0;
    font-size:.82rem;
    font-weight:800;
}
.admin-badge {
    display:inline-flex;
    align-items:center;
    padding:6px 10px;
    border-radius:0;
    background:#101828;
    color:#fff;
    font-size:.68rem;
    font-weight:900;
    letter-spacing:.1em;
}
.login-body {
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px 18px;
}
.login-shell {
    width:min(510px,100%);
}
.login-card {
    box-shadow:none;
}
.login-logo {
    max-width:290px;
    width:75%;
    height:auto;
}
.client-logo-preview {
    max-width:380px;
    object-fit:contain;
    background:#fff;
    padding:10px 16px;
    box-shadow:none;
}
.stat-card {
    height:100%;
    background:#fff;
    border:1px solid #e3eaf4;
    border-radius:0;
    padding:28px;
    box-shadow:none;
}
.stat-icon {
    width:48px;
    height:48px;
    border-radius:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#edf4ff;
    color:#1e5eff;
    font-size:1.25rem;
    margin-bottom:18px;
}
.stat-value {
    font-size:2.4rem;
    line-height:1;
    font-weight:900;
    letter-spacing:-.05em;
    color:#0b1f3a;
}
.stat-label {
    color:#718096;
    margin-top:9px;
    font-weight:650;
}
.admin-client-logo {
    width:72px;
    height:48px;
    object-fit:contain;
    border:1px solid #e5ebf3;
    border-radius:0;
    background:#fff;
    padding:5px;
}
.admin-logo-preview {
    max-width:260px;
    max-height:100px;
    object-fit:contain;
    border:1px solid #e5ebf3;
    border-radius:0;
    padding:10px;
    background:#fff;
}
.color-field {
    display:grid;
    grid-template-columns:52px 1fr;
    gap:8px;
}
.form-control-color {
    width:52px;
    min-height:52px;
    padding:5px;
}
@media(max-width:767px) {
    .user-chip {
        width:100%;
        justify-content:center;
        margin-top:6px;
    }
}
/* V7 - CARTEIRA / PIX */
.balance-chip {
    display:inline-flex;
    align-items:center;
    gap:7px;
    text-decoration:none;
    padding:8px 11px;
    border-radius:0;
    background:#ecfdf3;
    color:#067647;
    border:1px solid #abefc6;
    font-size:.82rem;
    font-weight:800
}
.balance-chip:hover,.balance-chip.active {
    background:#dcfae6;
    color:#05603a
}
.balance-plus {
    display:flex;
    width:21px;
    height:21px;
    align-items:center;
    justify-content:center;
    background:#12b76a;
    color:#fff;
    border-radius:50%;
    font-size:.95rem
}
.wallet-mini-panel {
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    padding:20px 24px;
    border-radius:20px;
    background:#fff;
    border:1px solid #e3eaf4;
    box-shadow:none;
    font-weight:900;
    letter-spacing:-.04em;
    color:#067647
}
.wallet-balance-card {
    border-radius:0;
    padding:34px;
    color:#fff;
    background:#fff;
    box-shadow:none;
    line-height:1;
    font-weight:900;
    letter-spacing:-.06em;
    margin-top:16px
}
.pix-qr-wrap {
    display:inline-block;
    padding:20px;
    background:#fff;
    border:1px solid #e3eaf4;
    border-radius:0;
    box-shadow:none;
    width:min(330px,75vw);
    height:auto
}
.pix-value {
    font-size:clamp(2.5rem,6vw,4.5rem);
    line-height:1;
    font-weight:900;
    letter-spacing:-.06em;
    color:#0b1f3a
}
.pix-waiting {
    display:inline-flex;
    align-items:center;
    color:#b54708;
    background:#fffaeb;
    border:1px solid #fedf89;
    padding:12px 15px;
    border-radius:0;
    font-weight:750
}
/* =====================================================
   V7.5 - CORREÇÃO DEFINITIVA DO QR CODE PIX
   ===================================================== */
.pix-qr-wrap {
    width:100%;
    max-width:360px;
    margin-inline:auto;
    overflow:hidden;
}
.pix-qr-wrap .pix-qr,
.pix-qr {
    display:block !important;
    width:100% !important;
    max-width:312px !important;
    height:auto !important;
    max-height:312px !important;
    object-fit:contain !important;
    margin-inline:auto !important;
}
/* =========================================================
   Upload de imagem: escolher, arrastar ou colar Ctrl+V
   ========================================================= */
.paste-image-wrapper {
    position: relative;
    padding: 12px;
    border: 1px dashed #c8d7ef;
    border-radius: 16px;
    background: #fff;
    transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
    cursor: pointer;
    outline: none;
}
.paste-image-wrapper:focus,
.paste-image-wrapper:focus-within {
    border-color: #2b63ff;
    box-shadow:none;
}
.paste-image-wrapper.paste-image-dragging {
    border-color: #2b63ff;
    background: #f4f7ff;
    box-shadow:none;
}
.paste-image-wrapper.paste-image-success {
    border-color: #198754;
    background: #f5fff9;
}
.paste-image-file-input {
    width: 100%;
}
.paste-image-helper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
    color: #60708a;
    font-size: .80rem;
    pointer-events: none;
}
.paste-image-helper-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: #f1f5fb;
    color: #245cff;
    font-size: .95rem;
}
.paste-image-helper-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.paste-image-helper-text strong {
    color: #364760;
    font-weight: 700;
}
.paste-image-helper-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.paste-image-preview {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf1f6;
}
.paste-image-preview img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 10px;
}
.paste-image-has-file .paste-image-helper-icon {
    background: #eaf8ef;
    color: #198754;
}
@media (max-width: 575.98px) {
    .paste-image-helper {
        align-items: flex-start;
    }
    .paste-image-preview img {
        max-height: 120px;
    }
}
/* =====================================================
   V8.30 - ESTRUTURA, PERFIL E RESPONSIVIDADE
   ===================================================== */
.client-brand-bar {
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    width:100%;
}
.client-brand-bar > a:first-child {
    flex:0 0 auto !important;
    white-space:nowrap;
}
.client-brand-bar .nd-logo {
    max-width:320px;
}
.client-menu-actions {
    display:flex !important;
    flex:1 1 auto !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:flex-end !important;
    min-width:0;
    gap:2px !important;
    white-space:nowrap;
}
.client-menu-actions .nav-link-premium {
    flex:0 0 auto;
    padding:8px 8px;
    font-size:.76rem;
}
.client-menu-actions .balance-chip {
    flex:0 0 auto;
    margin-left:4px !important;
    padding:7px 8px;
    font-size:.76rem;
}
.client-menu-actions .user-chip {
    flex:0 1 auto;
    width:auto !important;
    max-width:190px;
    margin:0 0 0 4px !important;
    padding:8px 9px;
    font-size:.76rem;
    overflow:hidden;
}
.client-menu-actions .user-chip span {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.client-menu-actions .user-chip:hover,
.client-menu-actions .user-chip.active {
    background:#17345f;
    color:#fff;
}
.profile-hero {
    padding-bottom:30px;
}
.profile-logo-current {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}
.profile-logo-current img {
    display:block;
    width:auto;
    max-width:100%;
    max-height:130px;
    object-fit:contain;
    background:#fff;
    border:1px solid var(--nd-border);
    border-radius:0;
    padding:12px;
}
.profile-color-field {
    display:grid;
    grid-template-columns:48px minmax(0,1fr);
    align-items:stretch;
    gap:8px;
}
.profile-color-preview {
    min-height:52px;
    border:1px solid #dbe4ef;
    border-radius:0;
    box-shadow:none;
}
.profile-color-input {
    text-transform:uppercase;
    font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
    font-weight:700;
}
/* Quando existe apenas um item, o Bootstrap col-12
   garante que campos e imagens ocupem toda a largura. */
.row > .col-12 > .upload-box {
    width:100%;
}
.row > .col-12 > .form-control,
.row > .col-12 > .form-select {
    width:100%;
}
@media (min-width:1200px) {
    .app-shell {
        max-width:1320px;
    }
}
@media (min-width:768px) and (max-width:1199.98px) {
    .client-brand-bar {
        gap:7px !important;
        padding:12px 13px;
    }
    .client-brand-bar .nd-logo {
        max-width:320px;
    }
    .client-menu-actions .nav-link-premium {
        padding:7px 5px;
        font-size:.68rem;
    }
    .client-menu-actions .balance-chip {
        padding:6px 7px;
        font-size:.68rem;
    }
    .client-menu-actions .user-chip {
        max-width:135px;
        padding:7px 7px;
        font-size:.68rem;
    }
}
@media (max-width:767.98px) {
    .client-brand-bar {
        flex-wrap:wrap !important;
        justify-content:center !important;
    }
    .client-brand-bar > a:first-child {
        width:100%;
        justify-content:center;
    }
    .client-menu-actions {
        width:100%;
        flex:1 0 100% !important;
        flex-wrap:wrap !important;
        justify-content:center !important;
        gap:4px !important;
    }
    .client-menu-actions .user-chip {
        max-width:100%;
    }
    .profile-color-field {
        grid-template-columns:44px minmax(0,1fr);
    }
}
/* =====================================================
   V8.30 - AJUSTES ESTRUTURAIS FINAIS
   ===================================================== */
/* O skin.css controla cores, bordas e efeitos.
   Aqui ficam apenas tamanho, alinhamento e comportamento. */
.navbar.brand-bar,
.navbar.client-brand-bar,
.navbar.admin-brand-bar {
    width:100%;
}
.navbar .container-fluid {
    min-width:0;
}
.navbar-brand {
    flex:0 0 auto;
    min-width:0;
}
.navbar-brand .nd-logo {
    display:block;
    width:auto;
    max-width:320px;
    object-fit:contain;
}
.navbar-collapse {
    min-width:0;
}
.client-menu-actions {
    min-width:0;
}
.client-menu-actions .nav-link-premium,
.client-menu-actions .balance-chip,
.client-menu-actions .user-chip {
    white-space:nowrap;
}
.admin-table-actions {
    justify-content:flex-end;
}
.field-row,
.prompt-client-card,
.prompt-image-preview-box {
    width:100%;
}
/* Campo/box único ocupa a linha inteira */
.row > .col-12 > .upload-box,
.row > .col-12 > .paste-image-wrapper,
.row > .col-12 > .form-control,
.row > .col-12 > .form-select {
    width:100%;
}
@media (max-width:767.98px) {
    .navbar-brand .nd-logo {
        max-width:220px;
    }
    .navbar-collapse {
        width:100%;
    }
    .client-menu-actions,
    .navbar-collapse .navbar-nav {
        width:100%;
    }
    .admin-table-actions {
        width:100%;
        justify-content:flex-start;
    }
}
/* V8.43 - correção: somente o loader gira */
.loading-card {
    animation:none !important;
    transform:none !important;
}
.loading-card:hover,
.loading-card:focus,
.loading-card:active {
    animation:none !important;
    transform:none !important;
}
