/* ==========================================
   SISTEMA MULTI-THEME (VARIÃÂVEIS)
   ========================================== */

/* Tema 1: Playful Glass (PadrÃÂ£o) */
body[data-theme="glass"], :root {
    --bg-body: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --bg-navbar: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    --navbar-brand-height: clamp(2rem, 6vw, 2.75rem);
    --bg-card: rgba(255, 255, 255, 0.6);
    --card-backdrop: blur(12px);
    --card-border: 1px solid rgba(255, 255, 255, 0.5);
    --text-main: #495057;
    --text-muted: #868e96;
    --grid-bg: transparent;
    --grid-gap: 6px;
    --day-bg: rgba(255, 255, 255, 0.7);
    --day-hover: rgba(255, 255, 255, 1);
    --dot-scheduled: #339af0;
    --dot-pending: #ff6b6b;
    --dot-past: #ced4da;
    --btn-add-bg: #a18cd1;
    --btn-add-text: #fff;
    --shadow-main: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --border-radius-card: 16px;
    --border-radius-day: 12px;
}

/* Tema 2: Neon Night (Modo Escuro Premium) */
body[data-theme="neon"] {
    --bg-body: #0f172a;
    --bg-navbar: #020617;
    --bg-card: #1e293b;
    --card-backdrop: none;
    --card-border: 1px solid #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --grid-bg: #334155;
    --grid-gap: 1px;
    --day-bg: #0f172a;
    --day-hover: #1e293b;
    --dot-scheduled: #0ea5e9;
    --dot-pending: #ec4899;
    --dot-past: #475569;
    --dot-glow: 0 0 8px; /* Brilho Neon */
    --btn-add-bg: #8b5cf6;
    --btn-add-text: #fff;
    --shadow-main: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --border-radius-card: 8px;
    --border-radius-day: 0px;
}

/* Tema 3: Clean Candy (Neumorfismo e Tons PastÃÂ©is) */
body[data-theme="candy"] {
    --bg-body: #f4f6f8;
    --bg-navbar: #38d9a9;
    --bg-card: #ffffff;
    --card-backdrop: none;
    --card-border: none;
    --text-main: #5f6368;
    --text-muted: #a8a8a8;
    --grid-bg: transparent;
    --grid-gap: 8px;
    --day-bg: #ffffff;
    --day-hover: #f1f3f5;
    --dot-scheduled: #20c997; /* Mint */
    --dot-pending: #ff8787;   /* Pink */
    --dot-past: #e9ecef;
    --btn-add-bg: #ff8787;
    --btn-add-text: #fff;
    --shadow-main: 8px 8px 16px #e6e7e8, -8px -8px 16px #ffffff;
    --border-radius-card: 24px;
    --border-radius-day: 16px;
}

/* ==========================================
   APLICAÃÂÃÂO DAS VARIÃÂVEIS NA INTERFACE
   ========================================== */
body {
    background: var(--bg-body) !important;
    color: var(--text-main);
    transition: background 0.4s ease, color 0.4s ease;
}

.custom-navbar {
    background: var(--bg-navbar) !important;
    transition: background 0.4s ease;
}

.brand-logo {
    display: block;
    height: var(--navbar-brand-height);
    width: auto;
    max-width: min(100%, 18rem);
    object-fit: contain;
}

.form-signin .brand-logo {
    height: calc(3.7rem + calc(var(--bs-border-width) * 2.5));
    border-radius: var(--bs-border-radius);
}

.custom-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0;
    padding-bottom: 0;
}

.custom-navbar .navbar-brand .brand-logo {
    display: block;
    flex-shrink: 0;
    height: var(--navbar-brand-height);
    width: auto;
    max-width: none;
    margin: 0;
}

.navbar-username {
    opacity: 0.92;
    letter-spacing: 0.02em;
}

.navbar-user-meta {
    max-width: 22rem;
}

.plan-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    padding: 0.28rem 0.45rem;
    border-radius: 999px;
    white-space: nowrap;
}

.plan-badge--free {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.plan-badge--premium {
    color: #2d3436;
    background: #ffeaa7;
    border: 1px solid rgba(253, 203, 110, 0.9);
}

.navbar-upgrade-link {
    color: #ffeaa7;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-upgrade-link:hover,
.navbar-upgrade-link:focus {
    color: #fff;
    text-decoration: underline;
}

.navbar-upgrade-link-mobile {
    font-weight: 600;
    color: var(--bs-primary, #6c5ce7);
}

.navbar-upgrade-link-mobile:hover,
.navbar-upgrade-link-mobile:focus {
    color: var(--bs-primary, #6c5ce7);
    background-color: rgba(108, 92, 231, 0.08);
}

.login-premium-link {
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.login-premium-link:hover,
.login-premium-link:focus {
    text-decoration: underline;
}

.login-forgot-link {
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.login-forgot-link:hover,
.login-forgot-link:focus {
    text-decoration: underline;
}

.field-uniqueness-feedback {
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.form-control.is-checking {
    border-color: var(--bs-secondary, #6c757d);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 2.85rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--custom-text-muted, #6c757d);
    cursor: pointer;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: var(--bs-primary, #0d6efd);
    background: rgba(13, 110, 253, 0.08);
}

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

.password-toggle-icon {
    display: block;
}

.custom-month-filter-wrap {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.custom-month-filter {
    width: auto;
    min-width: 10rem;
    max-width: 11.5rem;
    background: var(--bg-card);
    color: var(--text-main);
    color-scheme: light;
}

.custom-month-filter-label {
    display: inline-flex;
    align-items: center;
    min-width: 10rem;
    max-width: 11.5rem;
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    border-radius: var(--bs-border-radius-sm, 0.25rem);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    white-space: nowrap;
}

.party-money-input {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body[data-theme="neon"] .custom-month-filter:not(:disabled) {
    color-scheme: dark;
}

.custom-month-filter::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.75;
}

.custom-month-nav {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
}

.btn-month-nav {
    flex: 1 1 0;
    min-width: 0;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--card-border, rgba(0, 0, 0, 0.12));
    border-radius: 8px;
    text-align: center;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.75rem;
    box-shadow: none;
    padding: 0.35rem 0.45rem;
    line-height: 1.2;
}

.btn-month-nav:hover,
.btn-month-nav:focus {
    color: var(--text-main);
    background: var(--day-hover, rgba(255, 255, 255, 0.95));
    border-color: rgba(0, 0, 0, 0.16);
}

.btn-month-nav:disabled {
    opacity: 0.4;
}

.btn-month-nav-short {
    display: none;
}

/* Shell e toolbar do dashboard */
.dashboard-shell {
    padding: 0.65rem 0.75rem 0.5rem;
    gap: 0.5rem;
    min-height: 0;
}

.min-h-0 {
    min-height: 0 !important;
}

.dashboard-toolbar {
    padding: 0.55rem 0.7rem;
    margin-bottom: 0;
}

.dashboard-toolbar-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "title actions"
        "filters filters";
    align-items: center;
    gap: 0.45rem 0.5rem;
}

.dashboard-title {
    grid-area: title;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.2;
    min-width: 0;
}

.dashboard-toolbar-filters {
    grid-area: filters;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.dashboard-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dashboard-stats {
    padding-top: 0.15rem;
    padding-bottom: 1.25rem;
}

.dashboard-stats-row {
    margin-left: 0;
    margin-right: 0;
}

.dashboard-stats-row--finance {
    margin-top: 0.35rem !important;
}

.dashboard-stats-row--finance .dashboard-finance-card {
    height: 100%;
    min-height: 4.5rem;
    box-sizing: border-box;
}

.dashboard-stats-row--finance button.dashboard-finance-card {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    padding: 0.85rem 1rem;
    background-clip: padding-box;
}

.dashboard-stats-row--finance button.dashboard-finance-card:focus-visible {
    outline: 2px solid #6c5ce7;
    outline-offset: 2px;
}

.dashboard-stats-row--finance .party-payment-value {
    font-size: clamp(1.05rem, 2.4vw, 1.45rem);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 991.98px) {
    .dashboard-stats-row--finance .dashboard-finance-card {
        padding: 0.7rem 0.8rem;
        gap: 0.65rem;
    }

    .dashboard-stats-row--finance .party-payment-icon {
        width: 1.85rem;
        height: 1.85rem;
    }

    .dashboard-stats-row--finance .party-payment-label {
        font-size: 0.72rem;
    }
}

.details-tfoot {
    background: rgba(0, 0, 0, 0.035);
    border-top: 2px solid rgba(0, 0, 0, 0.08);
}

.details-tfoot td {
    font-weight: 700;
    white-space: nowrap;
}

.install-app-banner {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 1080;
    max-width: 28rem;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(108, 92, 231, 0.22);
    border-radius: 1rem;
    box-shadow: 0 12px 40px rgba(45, 52, 54, 0.22);
    padding: 0.9rem 1rem;
}

.install-app-banner__title {
    display: block;
    font-size: 0.95rem;
    color: #2d3436;
    margin-bottom: 0.25rem;
}

.install-app-banner__text {
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    color: #636e72;
    line-height: 1.35;
}

.install-app-banner__text--emphasis {
    color: #6c5ce7;
    font-weight: 600;
}

.install-app-banner__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat-card .card-body {
    padding: 0.6rem 0.7rem;
}

.btn-custos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.95rem;
    border: none;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #6c5ce7 0%, #8b7cf7 100%);
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-custos:hover,
.btn-custos:focus {
    color: #fff;
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(108, 92, 231, 0.42);
}

.btn-custos:active {
    transform: scale(0.97);
}

.btn-custos-icon {
    font-size: 1rem;
    line-height: 1;
}

@media (min-width: 768px) {
.btn-custos-icon {
    display: none;
}

.btn-custos-icon--plus {
    font-weight: 800;
    font-size: 1.55rem;
    line-height: 1;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
}

body[data-theme="neon"] .btn-custos {
    background: linear-gradient(135deg, #7c6cf0 0%, #a78bfa 100%);
    box-shadow: 0 4px 14px rgba(124, 108, 240, 0.45);
}

.custom-text-main { color: var(--text-main) !important; transition: color 0.4s ease; }
.custom-text-muted { color: var(--text-muted) !important; transition: color 0.4s ease; }

.custom-card {
    background: var(--bg-card);
    backdrop-filter: var(--card-backdrop);
    -webkit-backdrop-filter: var(--card-backdrop);
    border: var(--card-border);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-main) !important;
    transition: all 0.4s ease;
}

.custom-card-header {
    background: transparent !important;
    color: var(--text-main);
}

/* O BotÃÂ£o de Adicionar (+) */
.custom-add-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-add-bg);
    color: var(--btn-add-text);
    border: none;
    transition: transform 0.2s, background 0.4s ease;
}
.custom-add-btn:hover { color: #fff; opacity: 0.9; }
.custom-add-btn:active { transform: scale(0.92); }

/* Cards de resumo (novo dashboard) */
.stat-card {
    cursor: pointer;
    padding: 0;
}
.stat-card:active { transform: scale(0.99); }
.stat-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.stat-value {
    font-weight: 800;
    line-height: 1;
    font-size: clamp(1.65rem, 5vw, 2.35rem);
    color: var(--text-main);
}

.stat-card--contratada { border-left: 4px solid #56B4E9 !important; }
.stat-card--entregue-retirado { border-left: 4px solid var(--dot-scheduled) !important; }
.stat-card--contrato { border-left: 4px solid #7b61c9 !important; }
.stat-card--paga { border-left: 4px solid #51cf66 !important; }
.stat-card--devolvida { border-left: 4px solid var(--dot-past) !important; }
.stat-card--finalizada { border-left: 4px solid #51cf66 !important; }
.stat-card--offer-aniversario { border-left: 4px solid #e8590c !important; }
.stat-card--offer-mesversario { border-left: 4px solid #be4bdb !important; }
.stat-card:hover { opacity: 0.95; }

.dashboard-stats-heading {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat-hint {
    margin-top: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    min-height: 0.95rem;
}

.stat-hint--ok {
    color: #2b8a3e;
}

.stat-hint--alert {
    color: #c92a2a;
}

body[data-theme="neon"] .stat-hint--ok {
    color: #7FDCC0;
}

body[data-theme="neon"] .stat-hint--alert {
    color: #fca5a5;
}

.stat-card--alert .stat-value {
    font-size: clamp(1.45rem, 4.5vw, 2rem);
}

.stat-card--nao-paga { border-left: 4px solid #e67700 !important; }
.stat-card--falta-retirar { border-left: 4px solid #1971c2 !important; }
.stat-card--material-pendente { border-left: 4px solid #d6336c !important; }
.stat-card--sem-contrato { border-left: 4px solid #7048e8 !important; }

.stat-card--needs-attention {
    background: rgba(255, 243, 224, 0.92) !important;
    box-shadow: 0 0 0 2px rgba(230, 119, 0, 0.22) !important;
}

.stat-card--needs-attention.stat-card--falta-retirar {
    background: rgba(231, 245, 255, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(25, 113, 194, 0.2) !important;
}

.stat-card--needs-attention.stat-card--material-pendente {
    background: rgba(255, 235, 241, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(214, 51, 108, 0.2) !important;
}

.stat-card--needs-attention.stat-card--sem-contrato {
    background: rgba(243, 237, 255, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(112, 72, 232, 0.2) !important;
}

.stat-card--all-clear {
    opacity: 0.82;
}

.stat-card--has-warning {
    box-shadow: inset 0 -3px 0 rgba(201, 42, 42, 0.55) !important;
}

body[data-theme="neon"] .stat-card--needs-attention {
    background: rgba(62, 40, 20, 0.85) !important;
}

body[data-theme="neon"] .stat-card--needs-attention.stat-card--falta-retirar {
    background: rgba(20, 40, 70, 0.85) !important;
}

body[data-theme="neon"] .stat-card--needs-attention.stat-card--material-pendente {
    background: rgba(62, 24, 40, 0.85) !important;
}

body[data-theme="neon"] .stat-card--needs-attention.stat-card--sem-contrato {
    background: rgba(40, 30, 70, 0.85) !important;
}

.dashboard-stats-row--alerts .stat-title {
    font-size: 0.68rem;
}

@media (max-width: 575.98px) {
    .dashboard-stats-row--alerts .stat-title {
        font-size: 0.62rem;
        line-height: 1.2;
    }

    .dashboard-stats-row--alerts .stat-value {
        font-size: 1.35rem;
    }

    .dashboard-stats-row--alerts .stat-hint {
        font-size: 0.65rem;
    }
}

.stat-card--finance {
    cursor: default;
    background: #e8f4fc !important;
}

.stat-card--finance:hover {
    opacity: 1;
}

body[data-theme="neon"] .stat-card--finance {
    background: #132f4a !important;
}

body[data-theme="candy"] .stat-card--finance {
    background: #e3f0ff !important;
}

.stat-value--money {
    font-size: clamp(1rem, 2.8vw, 1.35rem);
    font-variant-numeric: tabular-nums;
}

.stat-value--money.stat-value--negative {
    color: #D55E00;
}

.stat-card--receita { border-left: 4px solid #0072B2 !important; }
.stat-card--receita .stat-value--money { color: #004C7A; }

.stat-card--recebido { border-left: 4px solid #009E73 !important; }
.stat-card--recebido .stat-value--money { color: #006B50; }

.stat-card--a-receber {
    border-left: 4px dashed #D55E00 !important;
}
.stat-card--a-receber .stat-value--money { color: #9A3F00; }

.stat-card--multas {
    border-left: 4px solid #E69F00 !important;
    cursor: pointer;
}
.stat-card--multas .stat-value--money { color: #8A5A00; }
.stat-card--multas-active {
    background: #FFF8E6 !important;
}
.stat-card--multas .stat-hint {
    margin-top: 0.15rem;
    font-size: 0.7rem;
}

.text-end.text-warning.fw-semibold {
    color: #FD2127 !important;
}

.stat-card--lucro { border-left: 4px solid #CC79A1 !important; }
.stat-card--lucro .stat-value--money { color: #8E5572; }

body[data-theme="neon"] .stat-card--receita .stat-value--money { color: #9BD0F5; }
body[data-theme="neon"] .stat-card--recebido .stat-value--money { color: #7FDCC0; }
body[data-theme="neon"] .stat-card--a-receber .stat-value--money { color: #FFB07A; }
body[data-theme="neon"] .stat-card--multas .stat-value--money { color: #FFD27A; }
body[data-theme="neon"] .stat-card--multas-active { background: rgba(80, 55, 10, 0.55) !important; }
body[data-theme="neon"] .stat-card--lucro .stat-value--money { color: #E8A8C8; }
body[data-theme="neon"] .stat-value--money.stat-value--negative { color: #FFB07A; }

.materials-total-value {
    font-size: clamp(1.35rem, 4vw, 2rem);
    font-weight: 800;
    color: #004C7A;
    font-variant-numeric: tabular-nums;
}

body[data-theme="neon"] .materials-total-value {
    color: #9BD0F5;
}

.material-cost-readonly {
    background: #eef6fb !important;
    font-weight: 700;
    color: #004C7A;
}

body[data-theme="neon"] .material-cost-readonly {
    background: #0f2740 !important;
    color: #9BD0F5;
}

.materials-table th,
.materials-table td {
    white-space: nowrap;
}

.materials-table td:first-child {
    white-space: normal;
    min-width: 10rem;
}

/* Calculadora de custos */
.custos-shell {
    padding: 0.65rem 0.75rem 0.5rem;
    gap: 0.5rem;
    min-height: 0;
}

.custos-toolbar-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.custos-title {
    margin: 0 0 0.15rem;
    font-size: 1.15rem;
    line-height: 1.2;
}

.custos-subtitle {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.35;
}

.custos-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    align-self: flex-start;
    padding-top: 0.15rem;
}

/* AÃÂ§ÃÂµes discretas nas toolbars (Custos, Contrato, Lembretes) */
.toolbar-text-action {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.2rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 0.2rem;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.toolbar-text-action:hover,
.toolbar-text-action:focus {
    color: var(--text-main);
    background: transparent;
    outline: none;
    box-shadow: none;
}

.toolbar-text-action--accent {
    color: var(--bs-primary, #6c5ce7);
}

.toolbar-text-action--accent:hover,
.toolbar-text-action--accent:focus {
    color: var(--bs-primary, #6c5ce7);
    opacity: 0.78;
}

.toolbar-text-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dashboard-actions .toolbar-text-action {
    align-self: center;
}

.dashboard-toast {
    position: fixed;
    left: 50%;
    top: 4.75rem;
    bottom: auto;
    transform: translateX(-50%) translateY(-140%);
    z-index: 2000;
    max-width: min(28rem, calc(100vw - 2rem));
    padding: 0.7rem 1.15rem;
    border-radius: 0.75rem;
    background: #198754;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.dashboard-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

body[data-theme="neon"] .dashboard-toast {
    background: #0f766e;
    color: #ecfeff;
}

body[data-theme="neon"] .toolbar-text-action {
    color: rgba(255, 255, 255, 0.62);
}

body[data-theme="neon"] .toolbar-text-action:hover,
body[data-theme="neon"] .toolbar-text-action:focus {
    color: rgba(255, 255, 255, 0.92);
}

body[data-theme="neon"] .toolbar-text-action--accent {
    color: #a29bfe;
}

body[data-theme="neon"] .toolbar-text-action--accent:hover,
body[data-theme="neon"] .toolbar-text-action--accent:focus {
    color: #c8c2ff;
    opacity: 1;
}

.btn-custos-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--card-border, rgba(0, 0, 0, 0.12));
    transition: background 0.15s ease;
}

.btn-custos-back:hover,
.btn-custos-back:focus {
    color: var(--text-main);
    background: var(--day-hover, rgba(255, 255, 255, 0.95));
}

.btn-custos-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--btn-add-bg), #c084fc);
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.3);
}

.btn-custos-new:hover,
.btn-custos-new:focus {
    color: #fff;
    opacity: 0.95;
}

.custos-materials-card {
    min-height: 0;
}

.materials-scroll {
    height: 100%;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.field-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.2rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(108, 92, 231, 0.15);
    color: #6c5ce7;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    cursor: help;
}

.field-help:hover,
.field-help:focus {
    background: rgba(108, 92, 231, 0.28);
    color: #5649c0;
}

.form-required {
    color: #dc3545;
    font-weight: 700;
    margin-left: 0.15rem;
}

@media (max-width: 767.98px) {
    .custos-shell {
        padding: 0.5rem 0.55rem 0.35rem;
    }

    .custos-toolbar-inner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "title actions"
            "subtitle actions";
        align-items: center;
        gap: 0.2rem 0.5rem;
    }

    .custos-toolbar-text {
        display: contents;
    }

    .custos-title {
        grid-area: title;
        font-size: 1rem;
    }

    .custos-subtitle {
        grid-area: subtitle;
        font-size: 0.78rem;
    }

    .custos-toolbar-actions {
        grid-area: actions;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 0.5rem;
        align-self: start;
        padding-top: 0.05rem;
    }

    .btn-custos-back,
    .btn-custos-new {
        padding: 0.4rem 0.65rem;
        font-size: 0.8125rem;
    }

    .btn-custos-new-label {
        display: none;
    }

    .btn-custos-new {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
    }

    .btn-custos-new-icon {
        font-size: 1.35rem;
        line-height: 1;
    }

    .materials-table thead {
        display: none;
    }

    .materials-table,
    .materials-table tbody,
    .materials-table tr,
    .materials-table td {
        display: block;
        width: 100%;
    }

    .materials-table tr.material-row {
        padding: 0.65rem 0.75rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    body[data-theme="neon"] .materials-table tr.material-row {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .materials-table tr.material-row-empty td {
        display: block;
        white-space: normal;
        padding: 1.25rem 0.75rem;
    }

    .materials-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.2rem 0;
        border: 0;
        white-space: normal;
        text-align: right !important;
        font-variant-numeric: tabular-nums;
    }

    .materials-table td::before {
        content: attr(data-label);
        flex: 1 1 auto;
        text-align: left;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .materials-table td.material-cell-name {
        display: block;
        padding: 0 0 0.45rem;
        margin-bottom: 0.35rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        font-size: 0.95rem;
        text-align: left !important;
    }

    .materials-table td.material-cell-name::before {
        display: none;
    }

    .materials-table td.material-cell-actions {
        display: flex;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.35rem;
        padding-top: 0.45rem;
        margin-top: 0.15rem;
    }

    .materials-table td.material-cell-actions::before {
        display: none;
    }

    .materials-table td.material-cell-actions .btn {
        flex: 1 1 auto;
        min-width: 5.5rem;
    }
}

.party-picker-field {
    position: relative;
    display: flex;
    align-items: stretch;
}

.party-picker-field .form-control {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 2.6rem;
}

.party-picker-btn {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0.2rem 0.35rem;
    cursor: pointer;
    opacity: 0.8;
}

.party-picker-btn:hover,
.party-picker-btn:focus {
    opacity: 1;
}

.party-picker-native {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 2.5rem;
    height: 2.5rem;
    opacity: 0;
    pointer-events: none;
}

.party-time-picker-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 1060;
    min-width: 11.5rem;
    padding: 0.65rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body[data-theme="neon"] .party-time-picker-panel {
    background: rgba(20, 20, 35, 0.98);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.45);
}

.party-time-picker-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.party-time-picker-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0;
    opacity: 0.8;
}

.party-time-picker-sep {
    font-weight: 700;
    padding: 0 0.1rem;
}

.party-time-picker-select {
    min-width: 4.1rem;
    text-align: center;
}

.party-material-costs-section {
    background: rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    padding: 0.85rem;
}

body[data-theme="neon"] .party-material-costs-section {
    background: rgba(30, 41, 59, 0.55);
}

.party-material-costs-table-wrap {
    max-height: 12rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.party-material-costs-table {
    table-layout: fixed;
    width: 100%;
    margin-bottom: 0;
}

.party-material-costs-table th,
.party-material-costs-table td {
    font-size: 0.8125rem;
    vertical-align: middle;
}

.party-material-costs-table th:first-child,
.party-material-costs-table td:first-child {
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 0.35rem;
}

.party-material-col-qty {
    width: 3.25rem;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.party-material-col-cost {
    width: 4.75rem;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.party-material-actions-col,
.party-material-actions {
    width: 3.5rem;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
}

.party-material-actions {
    white-space: nowrap;
    text-align: right;
}

.party-material-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    vertical-align: middle;
    transition: color 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.party-material-action-icon {
    display: block;
    pointer-events: none;
}

.party-material-action + .party-material-action {
    margin-left: 0.15rem;
}

.party-material-action--edit {
    color: var(--text-muted);
}

.party-material-action--edit:hover,
.party-material-action--edit:focus {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.05);
}

.party-material-action--remove {
    color: #c92a2a;
    opacity: 0.75;
}

.party-material-action--remove:hover,
.party-material-action--remove:focus {
    color: #a61e1e;
    opacity: 1;
    background: rgba(201, 42, 42, 0.08);
}

body[data-theme="neon"] .party-material-action--edit {
    color: #94a3b8;
}

body[data-theme="neon"] .party-material-action--edit:hover,
body[data-theme="neon"] .party-material-action--edit:focus {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

body[data-theme="neon"] .party-material-action--remove {
    color: #f87171;
}

body[data-theme="neon"] .party-material-action--remove:hover,
body[data-theme="neon"] .party-material-action--remove:focus {
    background: rgba(248, 113, 113, 0.12);
}

.party-material-total-row {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 0.75rem;
}

.party-material-total-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #004C7A;
    font-variant-numeric: tabular-nums;
}

body[data-theme="neon"] .party-material-total-value {
    color: #9BD0F5;
}

.material-search-combo {
    position: relative;
}

.material-search-dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 1080;
    max-height: 14rem;
    overflow: auto;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body[data-theme="neon"] .material-search-dropdown {
    background: #1e293b;
    border-color: #334155;
}

.material-search-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 0;
    background: transparent;
    text-align: left;
    color: var(--text-main);
}

.material-search-option:hover,
.material-search-option:focus {
    background: rgba(0, 114, 178, 0.08);
}

.material-search-option-name {
    font-weight: 600;
}

.material-search-option-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.material-search-empty {
    padding: 0.75rem 0.85rem;
    font-size: 0.875rem;
}

.material-qty-input {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* O CalendÃÂ¡rio Grid */
.calendar-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr; 
    height: 100%;
    min-height: 0;
    background-color: var(--grid-bg);
    gap: var(--grid-gap);
    border: var(--card-border);
    border-radius: calc(var(--border-radius-card) / 1.5);
    overflow: hidden;
    padding: 2px;
}

/* Os Dias */
.calendar-day {
    background-color: var(--day-bg);
    border-radius: var(--border-radius-day);
    padding: 6px;
    position: relative;
    transition: background-color 0.2s ease, border-radius 0.4s ease;
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    background-color: var(--day-hover);
    cursor: pointer;
}

.empty-day {
    opacity: 0.4;
    cursor: default !important;
}

.day-number {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
}

/* As Bolinhas */
.indicators-wrapper {
    margin-top: auto; 
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    padding-bottom: 2px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.dot-scheduled { background-color: var(--dot-scheduled); box-shadow: var(--dot-glow, var(--dot-scheduled)); } 
.dot-pending { background-color: var(--dot-pending); box-shadow: var(--dot-glow, var(--dot-pending)); }   
.dot-past { background-color: var(--dot-past); opacity: 0.7; }

/* Resumo financeiro do formulÃÂ¡rio de festa (paleta Okabe-Ito Ã¢ÂÂ acessÃÂ­vel para daltÃÂ´nicos) */
.party-payment-summary {
    display: grid;
    gap: 0.75rem;
}

.party-payment-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #fff;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.party-payment-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
}

.party-payment-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.party-payment-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.party-payment-value {
    font-size: 1.55rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.party-payment-card--total {
    border-color: #9B7EBD;
    background: #F3EDF8;
}

.party-payment-card--total .party-payment-icon {
    background: #9B7EBD;
    color: #fff;
}

.party-payment-card--total .party-payment-label,
.party-payment-card--total .party-payment-value {
    color: #6B4F8A;
}

.party-payment-card--paid {
    border-color: #0072B2;
    background: #E6F2FA;
}

.party-payment-card--paid .party-payment-icon {
    background: #0072B2;
    color: #fff;
}

.party-payment-card--paid .party-payment-label,
.party-payment-card--paid .party-payment-value {
    color: #004C7A;
}

.party-payment-card--remaining.party-payment-card--pending {
    border-color: #DC3545;
    background: #FDECEC;
    border-style: dashed;
}

.party-payment-card--remaining.party-payment-card--pending .party-payment-icon {
    background: #DC3545;
    color: #fff;
}

.party-payment-card--remaining.party-payment-card--pending .party-payment-label,
.party-payment-card--remaining.party-payment-card--pending .party-payment-value {
    color: #A71D2A;
}

.party-payment-card--remaining.party-payment-card--settled {
    border-color: #0072B2;
    background: #E6F2FA;
    border-style: solid;
}

.party-payment-card--remaining.party-payment-card--settled .party-payment-icon {
    background: #0072B2;
    color: #fff;
}

.party-payment-card--remaining.party-payment-card--settled .party-payment-label,
.party-payment-card--remaining.party-payment-card--settled .party-payment-value {
    color: #004C7A;
}

.party-payment-card--fine {
    border-color: #E69F00;
    background: #FFF8E6;
    border-style: dashed;
}

.party-payment-card--fine.party-payment-card--fine-active {
    box-shadow: 0 0 0 1px rgba(230, 159, 0, 0.35), 0 2px 8px rgba(15, 23, 42, 0.06);
}

.party-payment-card--fine .party-payment-icon {
    background: #E69F00;
    color: #fff;
}

.party-payment-card--fine .party-payment-label,
.party-payment-card--fine .party-payment-value {
    color: #8A5A00;
}

.party-payment-card--lucro {
    border-color: #009E73;
    background: #E6F5F0;
}

.party-payment-card--lucro .party-payment-icon {
    background: #009E73;
    color: #fff;
}

.party-payment-card--lucro .party-payment-label,
.party-payment-card--lucro .party-payment-value {
    color: #006B50;
}

.party-payment-card--lucro.party-payment-card--negative {
    border-color: #DC3545;
    background: #FDECEC;
}

.party-payment-card--lucro.party-payment-card--negative .party-payment-icon {
    background: #DC3545;
}

.party-payment-card--lucro.party-payment-card--negative .party-payment-label,
.party-payment-card--lucro.party-payment-card--negative .party-payment-value {
    color: #A71D2A;
}

body[data-theme="neon"] .party-payment-card {
    background: #1e293b;
    box-shadow: none;
}

body[data-theme="neon"] .party-payment-card--total {
    background: #2a2040;
}

body[data-theme="neon"] .party-payment-card--paid {
    background: #0f2740;
}

body[data-theme="neon"] .party-payment-card--remaining.party-payment-card--pending {
    background: #3a1518;
}

body[data-theme="neon"] .party-payment-card--remaining.party-payment-card--settled {
    background: #0f2740;
}

body[data-theme="neon"] .party-payment-card--total .party-payment-label,
body[data-theme="neon"] .party-payment-card--total .party-payment-value {
    color: #D4B8F0;
}

body[data-theme="neon"] .party-payment-card--paid .party-payment-label,
body[data-theme="neon"] .party-payment-card--paid .party-payment-value {
    color: #9BD0F5;
}

body[data-theme="neon"] .party-payment-card--remaining.party-payment-card--pending .party-payment-label,
body[data-theme="neon"] .party-payment-card--remaining.party-payment-card--pending .party-payment-value {
    color: #FF8A95;
}

body[data-theme="neon"] .party-payment-card--remaining.party-payment-card--settled .party-payment-label,
body[data-theme="neon"] .party-payment-card--remaining.party-payment-card--settled .party-payment-value {
    color: #9BD0F5;
}

body[data-theme="neon"] .party-payment-card--lucro .party-payment-label,
body[data-theme="neon"] .party-payment-card--lucro .party-payment-value {
    color: #7FDCC0;
}

body[data-theme="neon"] .party-payment-card--lucro.party-payment-card--negative .party-payment-label,
body[data-theme="neon"] .party-payment-card--lucro.party-payment-card--negative .party-payment-value {
    color: #FF8A95;
}

@media (min-width: 576px) {
    .party-payment-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .party-payment-summary {
        grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    }
}

/* Toggles Tipo de festa / Status (mobile-friendly) */
.party-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.party-toggle {
    display: block;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.party-toggle-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.party-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    border: 2px solid #C5CDD6;
    background: #E8EEF3;
    color: #5A6570;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.party-toggle-input:checked + .party-toggle-btn {
    border-color: #009E73;
    background: #009E73;
    color: #fff;
}

.party-toggle-input:disabled + .party-toggle-btn {
    cursor: not-allowed;
    opacity: 0.72;
    box-shadow: none;
}

.party-toggle-input:disabled:checked + .party-toggle-btn {
    border-color: #009E73;
    background: #009E73;
    color: #fff;
    opacity: 0.85;
}

.party-toggle:has(.party-toggle-input:disabled) {
    cursor: not-allowed;
}

.party-toggle-input:focus-visible + .party-toggle-btn {
    outline: 2px solid #0072B2;
    outline-offset: 2px;
}

.party-toggle:active .party-toggle-btn {
    transform: scale(0.98);
}

body[data-theme="neon"] .party-toggle-btn {
    border-color: #2A4A66;
    background: #132f4a;
    color: #9BB0C4;
}

body[data-theme="neon"] .party-toggle-input:checked + .party-toggle-btn {
    border-color: #009E73;
    background: #009E73;
    color: #fff;
}

body[data-theme="candy"] .party-toggle-btn {
    border-color: #E2C4D4;
    background: #F7EEF3;
    color: #8E5572;
}

body[data-theme="candy"] .party-toggle-input:checked + .party-toggle-btn {
    border-color: #009E73;
    background: #009E73;
    color: #fff;
}

/* Dashboard Ã¢ÂÂ responsivo */
@media (min-width: 768px) {
    .dashboard-shell {
        padding: 0.75rem 1rem 0.5rem;
        gap: 0.55rem;
    }

    .dashboard-toolbar {
        padding: 0.6rem 0.85rem;
    }

    .dashboard-toolbar-inner {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.65rem;
    }

    .dashboard-title {
        flex: 0 0 auto;
        font-size: 1.15rem;
        margin-right: 0.15rem;
    }

    .dashboard-toolbar-filters {
        flex: 1 1 auto;
        min-width: 0;
    }

    .dashboard-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .custom-month-filter {
        min-width: 9.5rem;
        max-width: 10.5rem;
    }

    .btn-month-nav {
        flex: 0 0 auto;
        font-size: 0.8125rem;
        padding: 0.35rem 0.7rem;
    }

    .custom-add-btn {
        width: 46px;
        height: 46px;
        font-size: 23px;
    }
}

@media (max-width: 575.98px) {
    .dashboard-shell {
        padding: 0.5rem 0.55rem 0.35rem;
    }

    .dashboard-toolbar {
        padding: 0.5rem 0.55rem;
    }

    .dashboard-toolbar-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }

    .custom-month-filter-wrap {
        width: 100%;
    }

    .custom-month-filter,
    .custom-month-filter-label {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .custom-month-nav {
        width: 100%;
    }

    .btn-month-nav-short {
        display: inline;
    }

    .btn-month-nav-full {
        display: none;
    }

    .btn-custos-label {
        display: none;
    }

    .btn-custos-icon {
        display: inline;
        font-size: 1.1rem;
        line-height: 1;
    }

    .btn-custos-icon--plus {
        font-size: 1.7rem;
        font-weight: 800;
        line-height: 1;
    }

    .btn-custos {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
    }

    .stat-card .card-body {
        padding: 0.5rem 0.55rem;
    }

    .stat-title {
        font-size: 0.7rem;
    }

    .dashboard-stats {
        padding-bottom: 5.5rem;
    }
}

/* ===== Bottom navigation (mobile) ===== */
.app-mobile-bottom-nav {
    display: none;
}

@media (max-width: 767.98px) {
    body.has-mobile-bottom-nav .dashboard-shell,
    body.has-mobile-bottom-nav .calendario-shell,
    body.has-mobile-bottom-nav .custos-shell,
    body.has-mobile-bottom-nav .contrato-shell,
    body.has-mobile-bottom-nav .lembretes-shell,
    body.has-mobile-bottom-nav .ajuda-shell,
    body.has-mobile-bottom-nav .form-signin {
        padding-bottom: 4.25rem;
    }

    body.has-mobile-bottom-nav .install-app-banner {
        bottom: calc(3.85rem + env(safe-area-inset-bottom, 0px));
    }

    .app-mobile-bottom-nav {
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        min-height: 3.35rem;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--custom-card-bg, rgba(255, 255, 255, 0.96));
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    }

    .app-mobile-bottom-nav__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        min-height: 3.35rem;
        min-width: 44px;
        padding: 0.35rem 0.25rem 0.45rem;
        border: 0;
        background: transparent;
        color: var(--custom-text-muted, #636e72);
        text-decoration: none;
        font-size: 0.68rem;
        line-height: 1.1;
        font-weight: 500;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .app-mobile-bottom-nav__item:hover,
    .app-mobile-bottom-nav__item:focus {
        color: var(--accent-color, #6c5ce7);
        text-decoration: none;
    }

    .app-mobile-bottom-nav__item--active {
        color: var(--accent-color, #6c5ce7);
    }

    .app-mobile-bottom-nav__item--active .app-mobile-bottom-nav__label {
        font-weight: 700;
    }

    .app-mobile-bottom-nav__item--sheet-open {
        color: var(--accent-color, #6c5ce7);
    }

    .app-mobile-bottom-nav__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 0;
    }

    .app-mobile-bottom-nav__label {
        white-space: nowrap;
    }

    .app-mobile-more-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1045;
        background: rgba(0, 0, 0, 0.35);
    }

    .app-mobile-more-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        max-height: min(78vh, 32rem);
        padding-bottom: calc(3.35rem + env(safe-area-inset-bottom, 0px));
        background: var(--custom-card-bg, #fff);
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .app-mobile-more-sheet[hidden],
    .app-mobile-more-backdrop[hidden] {
        display: none !important;
    }

    .app-mobile-more-sheet__handle {
        width: 2.5rem;
        height: 0.25rem;
        margin: 0.55rem auto 0.35rem;
        border-radius: 999px;
        background: rgba(0, 0, 0, 0.15);
        flex-shrink: 0;
    }

    .app-mobile-more-sheet__body {
        overflow: auto;
        padding: 0.35rem 0.85rem 1rem;
    }

    .app-mobile-more-sheet__nav {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }

    .app-mobile-more-sheet__link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.7rem 0.65rem;
        border-radius: 0.65rem;
        color: var(--custom-text-main, #2d3436);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.95rem;
    }

    .app-mobile-more-sheet__link:hover,
    .app-mobile-more-sheet__link:focus {
        background: rgba(108, 92, 231, 0.08);
        color: var(--accent-color, #6c5ce7);
        text-decoration: none;
    }

    .app-mobile-more-sheet__link--current {
        background: rgba(108, 92, 231, 0.12);
        color: var(--accent-color, #6c5ce7);
        font-weight: 700;
    }

    .app-mobile-more-sheet__link-icon {
        width: 1.35rem;
        text-align: center;
        flex-shrink: 0;
    }

    .app-mobile-more-sheet__section {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .app-mobile-more-sheet__section-title {
        margin: 0 0 0.5rem 0.65rem;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--custom-text-muted, #636e72);
    }

    .app-mobile-more-sheet__themes {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .app-mobile-more-sheet__theme {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.65rem 0.65rem;
        border: 0;
        border-radius: 0.65rem;
        background: transparent;
        color: var(--custom-text-main, #2d3436);
        font-size: 0.92rem;
        font-weight: 500;
    }

    .app-mobile-more-sheet__theme:hover,
    .app-mobile-more-sheet__theme:focus {
        background: rgba(108, 92, 231, 0.08);
        color: var(--accent-color, #6c5ce7);
    }

    .app-mobile-more-sheet__logout {
        display: block;
        width: 100%;
        margin-top: 0.85rem;
        padding: 0.7rem 0.65rem;
        border: 0;
        border-radius: 0.65rem;
        background: rgba(214, 48, 49, 0.08);
        color: #d63031;
        font-weight: 600;
        font-size: 0.95rem;
        text-align: left;
    }

    .app-mobile-more-sheet__logout:hover,
    .app-mobile-more-sheet__logout:focus {
        background: rgba(214, 48, 49, 0.14);
        color: #c0392b;
    }
}

/* Navbar mobile: badge, Conta, menu hamburger */
.navbar-nav-mobile {
    display: none;
}

.navbar-hamburger-btn {
    width: 38px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar-hamburger-icon,
.navbar-hamburger-icon::before,
.navbar-hamburger-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.navbar-hamburger-icon {
    position: relative;
}

.navbar-hamburger-icon::before,
.navbar-hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.navbar-hamburger-icon::before {
    top: -6px;
}

.navbar-hamburger-icon::after {
    top: 6px;
}

.app-mobile-nav-menu {
    min-width: 15rem;
}

@media (max-width: 767.98px) {
    .navbar-nav-desktop {
        display: none !important;
    }

    .navbar-nav-mobile {
        display: block;
    }

    .navbar-user-meta {
        max-width: none;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .dashboard-actions .dashboard-nav-link {
        display: none !important;
    }

    .lembretes-filter-label {
        display: none !important;
    }

    .dashboard-navbar .container-fluid,
    .app-navbar .container-fluid {
        flex-wrap: nowrap;
    }

    .dashboard-navbar .navbar-actions,
    .app-navbar .navbar-actions {
        flex: 1 1 auto;
        justify-content: flex-end;
        margin-left: 0 !important;
        min-width: 0;
    }

    .dashboard-navbar .navbar-nav-mobile,
    .app-navbar .navbar-nav-mobile {
        margin-left: auto;
        flex-shrink: 0;
    }

    #dashboardTableView {
        min-height: 0;
        overflow: hidden;
    }

    #dashboardTableView .dashboard-table-body {
        overflow: hidden;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    #dashboardTableView .dashboard-table-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
    }

    #dashboardTableView .dashboard-table-scroll::-webkit-scrollbar {
        width: 5px;
        height: 5px;
    }

    #dashboardTableView .dashboard-table-scroll::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.22);
        border-radius: 999px;
    }

    #dashboardTableView .dashboard-table-scroll::-webkit-scrollbar-track {
        background: transparent;
    }
}

/* Contrato */
.contrato-shell {
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.75rem;
}

.contrato-toolbar-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.contrato-toolbar-text {
    flex: 1 1 auto;
    min-width: 0;
}

.contrato-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
    align-self: flex-start;
    padding-top: 0.2rem;
}

.contrato-title {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
}

.contrato-subtitle {
    font-size: 0.9rem;
    margin-bottom: 0;
    max-width: 52rem;
}

.contrato-subtitle code {
    font-size: 0.82em;
}

.contrato-editor-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.contrato-editor-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 1rem;
}

.contrato-editor {
    min-height: 100%;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    line-height: 1.55;
    font-size: 0.95rem;
    color: #222;
    outline: none;
}

.contrato-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(108, 92, 231, 0.35);
}

.contrato-editor--readonly {
    background: #f8f9fa;
}

.contrato-editor h2,
.contrato-editor h3 {
    font-size: 1rem;
    margin-top: 1rem;
}

.contrato-status {
    font-size: 0.85rem;
    margin: 0;
    min-height: 1.25rem;
}

.contrato-whatsapp-section {
    padding-top: 0.25rem;
}

.contrato-whatsapp-card {
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
}

.contrato-link-input {
    flex: 1 1 16rem;
    max-width: 100%;
    font-size: 0.85rem;
}

.assinar-contrato-page {
    background: var(--bg-main, #f4f6fb);
}

.assinar-contrato-header {
    background: linear-gradient(135deg, #6c5ce7 0%, #8b7cf7 100%);
    color: #fff;
}

.assinar-contrato-header-title,
.assinar-contrato-header-subtitle {
    color: #fff !important;
}

.assinar-contrato-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.contrato-preview {
    line-height: 1.6;
    color: #222;
}

.contrato-preview h2,
.contrato-preview h3 {
    font-size: 1rem;
    margin-top: 1rem;
}

.profile-logo-preview {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.35rem;
}

.party-modal-header-banner {
    width: min(300px, calc(100% - 1.5rem));
    aspect-ratio: 1 / 1;
    margin: 0.75rem auto;
    overflow: hidden;
    background: #1a1a1a;
    line-height: 0;
    border-radius: 0.5rem;
}

.party-modal-header-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.premium-price-box {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: rgba(108, 92, 231, 0.08);
}

.premium-price-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--custom-text-main, #2d3436);
}

.premium-pix-qr {
    width: min(240px, 100%);
    height: auto;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.party-contract-section {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(108, 92, 231, 0.06);
}

@media (max-width: 767.98px) {
    .contrato-toolbar-inner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "title actions"
            "subtitle subtitle";
        align-items: start;
        gap: 0.2rem 0.5rem;
    }

    .contrato-toolbar-text {
        display: contents;
    }

    .contrato-title {
        grid-area: title;
        font-size: 1rem;
    }

    .contrato-subtitle {
        grid-area: subtitle;
        font-size: 0.78rem;
    }

    .contrato-toolbar-actions {
        grid-area: actions;
        justify-content: flex-end;
        align-self: start;
        padding-top: 0.05rem;
        width: auto;
        overflow: visible;
    }

    .contrato-editor {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* Lembretes de oferta */
.lembretes-shell {
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.75rem;
}

.lembretes-toolbar-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.lembretes-toolbar-text {
    flex: 1 1 auto;
    min-width: 0;
}

.lembretes-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
    align-self: flex-start;
    padding-top: 0.2rem;
}

.lembretes-title {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
}

.lembretes-subtitle {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.lembretes-list-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.lembretes-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.lembretes-status {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    min-height: 1.25rem;
}

@media (max-width: 767.98px) {
    .lembretes-toolbar-inner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "title actions"
            "subtitle subtitle";
        align-items: start;
        gap: 0.2rem 0.5rem;
    }

    .lembretes-toolbar-text {
        display: contents;
    }

    .lembretes-title {
        grid-area: title;
        font-size: 1rem;
    }

    .lembretes-subtitle {
        grid-area: subtitle;
        font-size: 0.78rem;
    }

    .lembretes-toolbar-actions {
        grid-area: actions;
        justify-content: flex-end;
        align-self: start;
        padding-top: 0.05rem;
    }
}

.lembretes-filter-btn.active {
    font-weight: 700;
}

.reminder-placeholder-chip {
    font-size: 0.75rem;
}

/* ===== Ajuda / Guia de inÃÂ­cio rÃÂ¡pido ===== */
.ajuda-shell {
    padding: 1rem 1.25rem 1.5rem;
}

.ajuda-container {
    max-width: 42rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ajuda-header {
    padding: 0.15rem 0 0.35rem;
}

.ajuda-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    line-height: 1.25;
}

.ajuda-lead {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.ajuda-toc {
    padding: 1rem 1.15rem;
}

.ajuda-toc-title {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.ajuda-toc-list {
    padding-left: 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ajuda-toc-list a {
    color: var(--accent-color, #6c5ce7);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
}

.ajuda-toc-list a:hover {
    text-decoration: underline;
}

.ajuda-section {
    padding: 1.15rem 1.25rem;
}

.ajuda-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.ajuda-step-badge {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-color, #6c5ce7);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
}

.ajuda-step-title {
    line-height: 1.3;
}

.ajuda-steps-list {
    padding-left: 1.35rem;
    margin-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.ajuda-steps-list > li {
    line-height: 1.55;
}

.ajuda-steps-list ul {
    margin: 0.4rem 0 0.15rem;
    padding-left: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ajuda-steps-list ul li {
    line-height: 1.45;
}

.ajuda-note {
    margin: 0.35rem 0 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.ajuda-callout {
    padding: 0.75rem 0.95rem;
    border-radius: 0.65rem;
    margin-bottom: 0.85rem;
    font-size: 0.92rem;
    line-height: 1.5;
    border-left: 4px solid;
}

.ajuda-callout--warning {
    background: rgba(255, 193, 7, 0.14);
    border-color: #e6a800;
}

.ajuda-callout--tip {
    background: rgba(81, 207, 102, 0.14);
    border-color: #40c057;
    margin-bottom: 0;
}

.ajuda-checklist {
    list-style: none;
    padding-left: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ajuda-checklist li {
    position: relative;
    padding-left: 1.65rem;
    line-height: 1.45;
}

.ajuda-checklist li::before {
    content: "Ã¢ÂÂ";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1rem;
    line-height: 1.45;
}

.ajuda-next-steps {
    padding-left: 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ajuda-links-list {
    padding-left: 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ajuda-links-list a {
    color: var(--accent-color, #6c5ce7);
    font-weight: 500;
}

.ajuda-footer {
    padding: 0.25rem 0 0.75rem;
}

.ajuda-credits {
    font-size: 0.85rem;
}

@media (max-width: 767.98px) {
    .ajuda-shell {
        padding: 0.85rem 0.85rem 1.25rem;
    }

    .ajuda-section,
    .ajuda-toc {
        padding: 1rem;
    }

    .ajuda-title {
        font-size: 1.25rem;
    }

    .ajuda-lead {
        font-size: 0.95rem;
    }
}

/* ===== CalendÃÂ¡rio de festas ===== */
.calendario-shell {
    padding: 0.75rem 1rem 1rem;
    gap: 0.75rem;
}

.calendario-month-view {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calendario-card {
    padding: 0.75rem;
}

.calendario-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.calendario-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.2rem;
    min-height: 4.25rem;
    padding: 0.4rem 0.25rem 0.35rem;
    border: 1px solid var(--card-border, rgba(0, 0, 0, 0.08));
    border-radius: 0.75rem;
    background: var(--bg-card, #fff);
    color: var(--text-main, #212529);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.calendario-day:hover:not(:disabled),
.calendario-day:focus-visible:not(:disabled) {
    background: var(--day-hover, rgba(108, 92, 231, 0.08));
    border-color: rgba(108, 92, 231, 0.35);
    outline: none;
}

.calendario-day:active:not(:disabled) {
    transform: scale(0.98);
}

.calendario-day:disabled {
    cursor: default;
    opacity: 0.72;
}

.calendario-day--empty {
    visibility: hidden;
    pointer-events: none;
    border: none;
    background: transparent;
    min-height: 4.25rem;
}

.calendario-day--today {
    border-color: rgba(108, 92, 231, 0.55);
    box-shadow: inset 0 0 0 1px rgba(108, 92, 231, 0.25);
}

.calendario-day--has-parties {
    background: rgba(108, 92, 231, 0.06);
}

.calendario-day--selected {
    border-color: #6c5ce7;
    background: rgba(108, 92, 231, 0.12);
}

.calendario-day-number {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.1;
}

.calendario-day-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

.calendario-status {
    margin: 0;
    font-size: 0.85rem;
    min-height: 1.25rem;
}

body[data-theme="neon"] .calendario-day {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="neon"] .calendario-day--has-parties,
body[data-theme="neon"] .calendario-day:hover:not(:disabled) {
    background: rgba(162, 155, 254, 0.14);
}

body[data-theme="neon"] .calendario-day-count {
    background: linear-gradient(135deg, #a29bfe, #74b9ff);
}

body[data-theme="candy"] .calendario-day--has-parties {
    background: rgba(255, 107, 157, 0.08);
}

body[data-theme="candy"] .calendario-day-count {
    background: linear-gradient(135deg, #ff6b9d, #c084fc);
}

@media (max-width: 767.98px) {
    .calendario-shell {
        padding: 0.5rem 0.65rem 0.75rem;
    }

    .calendario-card {
        padding: 0.5rem;
    }

    .calendario-weekdays {
        font-size: 0.65rem;
        gap: 0.2rem;
    }

    .calendario-grid {
        gap: 0.2rem;
    }

    .calendario-day,
    .calendario-day--empty {
        min-height: 3.4rem;
        padding: 0.3rem 0.15rem;
        border-radius: 0.55rem;
    }

    .calendario-day-number {
        font-size: 0.85rem;
    }

    .calendario-day-count {
        min-width: 1.15rem;
        height: 1.15rem;
        font-size: 0.65rem;
    }
}

/* ==========================================
   NOITE NEON - contraste em telas e modais
   (contrato, custos, lembretes e componentes claros)
   ========================================== */

body[data-theme="neon"] .contrato-editor,
body[data-theme="neon"] .contrato-editor--readonly {
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: inset 0 0 0 1px #334155;
}

body[data-theme="neon"] .contrato-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.55);
}

body[data-theme="neon"] .contrato-editor h1,
body[data-theme="neon"] .contrato-editor h2,
body[data-theme="neon"] .contrato-editor h3,
body[data-theme="neon"] .contrato-editor h4,
body[data-theme="neon"] .contrato-editor strong,
body[data-theme="neon"] .contrato-editor b,
body[data-theme="neon"] .contrato-editor p,
body[data-theme="neon"] .contrato-editor li,
body[data-theme="neon"] .contrato-editor span,
body[data-theme="neon"] .contrato-editor div {
    color: inherit;
}

body[data-theme="neon"] .contrato-editor a {
    color: #93c5fd;
}

body[data-theme="neon"] .contrato-subtitle code,
body[data-theme="neon"] .lembretes-shell code,
body[data-theme="neon"] .modal-body code {
    color: #c4b5fd;
    background: #0f172a;
    padding: 0.1em 0.35em;
    border-radius: 0.25rem;
}

body[data-theme="neon"] .contrato-whatsapp-card {
    background: #1e293b;
    color: #e2e8f0;
}

body[data-theme="neon"] .alert-success {
    background: #14532d !important;
    color: #bbf7d0 !important;
}

body[data-theme="neon"] .alert-warning {
    background: #713f12 !important;
    color: #fde68a !important;
}

body[data-theme="neon"] .alert-warning .btn-warning {
    color: #1c1917;
    font-weight: 700;
}

body[data-theme="neon"] .materials-table,
body[data-theme="neon"] .lembretes-table,
body[data-theme="neon"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e2e8f0;
    --bs-table-striped-bg: rgba(148, 163, 184, 0.08);
    --bs-table-striped-color: #e2e8f0;
    --bs-table-hover-bg: rgba(148, 163, 184, 0.14);
    --bs-table-hover-color: #f8fafc;
    --bs-table-border-color: #334155;
    color: #e2e8f0;
}

body[data-theme="neon"] .table-light,
body[data-theme="neon"] thead.table-light,
body[data-theme="neon"] .materials-table thead,
body[data-theme="neon"] .lembretes-table thead {
    --bs-table-bg: #1e293b;
    --bs-table-color: #cbd5e1;
    --bs-table-border-color: #334155;
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
}

body[data-theme="neon"] .materials-table th,
body[data-theme="neon"] .materials-table td,
body[data-theme="neon"] .lembretes-table th,
body[data-theme="neon"] .lembretes-table td {
    color: inherit;
    border-color: #334155;
}

body[data-theme="neon"] .materials-table td.material-cell-name {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="neon"] .modal-content {
    background: #1e293b;
    color: #e2e8f0;
}

body[data-theme="neon"] .modal-header {
    border-bottom-color: #334155;
}

body[data-theme="neon"] .modal-footer {
    border-top-color: #334155;
}

body[data-theme="neon"] .modal-title,
body[data-theme="neon"] .modal-body,
body[data-theme="neon"] .modal-body .form-label,
body[data-theme="neon"] .modal-body .fw-semibold {
    color: #e2e8f0;
}

body[data-theme="neon"] .modal-body.bg-light,
body[data-theme="neon"] .modal-footer.bg-white,
body[data-theme="neon"] .modal-body.bg-white {
    background-color: #1e293b !important;
    color: #e2e8f0;
}

body[data-theme="neon"] .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

body[data-theme="neon"] .modal-body hr {
    border-color: #334155;
    opacity: 1;
}

body[data-theme="neon"] .form-control,
body[data-theme="neon"] .form-select,
body[data-theme="neon"] .contrato-link-input {
    background-color: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
}

body[data-theme="neon"] .form-control:focus,
body[data-theme="neon"] .form-select:focus {
    background-color: #0f172a;
    color: #f8fafc;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}

body[data-theme="neon"] .form-control::placeholder {
    color: #64748b;
}

body[data-theme="neon"] .form-control:disabled,
body[data-theme="neon"] .form-control[readonly] {
    background-color: #1e293b;
    color: #cbd5e1;
    opacity: 1;
}

body[data-theme="neon"] .btn-outline-secondary,
body[data-theme="neon"] .btn-outline-secondary.bg-white {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

body[data-theme="neon"] .btn-outline-secondary:hover,
body[data-theme="neon"] .btn-outline-secondary:focus {
    background-color: #334155 !important;
    color: #f8fafc !important;
    border-color: #64748b !important;
}

.material-edit-btn {
    background-color: #fff;
}

.material-edit-btn:hover,
.material-edit-btn:focus {
    background-color: var(--bs-primary, #0d6efd) !important;
    border-color: var(--bs-primary, #0d6efd) !important;
    color: #fff !important;
}

body[data-theme="neon"] .material-edit-btn {
    background-color: #0f172a !important;
    color: #c4b5fd !important;
    border-color: #8b5cf6 !important;
}

body[data-theme="neon"] .material-edit-btn:hover,
body[data-theme="neon"] .material-edit-btn:focus {
    background-color: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
    color: #fff !important;
}

body[data-theme="neon"] .btn-secondary {
    background-color: #334155;
    border-color: #475569;
    color: #f8fafc;
}

body[data-theme="neon"] .btn-secondary:hover,
body[data-theme="neon"] .btn-secondary:focus {
    background-color: #475569;
    border-color: #64748b;
    color: #fff;
}

body[data-theme="neon"] .btn-outline-primary {
    color: #c4b5fd;
    border-color: #8b5cf6;
}

body[data-theme="neon"] .btn-outline-primary:hover,
body[data-theme="neon"] .btn-outline-primary:focus,
body[data-theme="neon"] .lembretes-filter-btn.active {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
    color: #fff;
}

body[data-theme="neon"] .lembretes-filter-btn:not(.active) {
    color: #c4b5fd;
    border-color: #6366f1;
    background: transparent;
}

body[data-theme="neon"] .badge.text-bg-light {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

body[data-theme="neon"] .badge.text-bg-success-subtle,
body[data-theme="neon"] .badge.border-success-subtle {
    background-color: rgba(34, 197, 94, 0.18) !important;
    color: #86efac !important;
    border-color: rgba(34, 197, 94, 0.45) !important;
}

body[data-theme="neon"] .reminder-placeholder-chip {
    background-color: #0f172a;
    color: #cbd5e1;
    border-color: #475569;
}

body[data-theme="neon"] .text-muted:not(.custom-text-muted) {
    color: #94a3b8 !important;
}

body[data-theme="neon"] .custos-materials-card,
body[data-theme="neon"] .lembretes-list-card,
body[data-theme="neon"] .contrato-editor-card {
    background: #1e293b;
}

body[data-theme="neon"] .contrato-editor-wrap {
    background: transparent;
}
