/* ==========================================
   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 .stat-value--money {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.2;
}

.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--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--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--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--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%;
    bottom: 1.25rem;
    transform: translateX(-50%) translateY(120%);
    z-index: 1080;
    max-width: calc(100vw - 2rem);
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(33, 37, 41, 0.92);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    box-shadow: 0 4px 18px 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: rgba(18, 18, 30, 0.94);
    color: #f1f2f6;
}

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;
}

@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: #0072B2;
    background: #E6F2FA;
}

.party-payment-card--total .party-payment-icon {
    background: #0072B2;
    color: #fff;
}

.party-payment-card--total .party-payment-label,
.party-payment-card--total .party-payment-value {
    color: #004C7A;
}

.party-payment-card--paid {
    border-color: #009E73;
    background: #E6F5F0;
}

.party-payment-card--paid .party-payment-icon {
    background: #009E73;
    color: #fff;
}

.party-payment-card--paid .party-payment-label,
.party-payment-card--paid .party-payment-value {
    color: #006B50;
}

.party-payment-card--remaining.party-payment-card--pending {
    border-color: #D55E00;
    background: #FFF3E8;
    border-style: dashed;
}

.party-payment-card--remaining.party-payment-card--pending .party-payment-icon {
    background: #D55E00;
    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: #9A3F00;
}

.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: #CC79A1;
    background: #FAEDF3;
}

.party-payment-card--lucro .party-payment-icon {
    background: #CC79A1;
    color: #fff;
}

.party-payment-card--lucro .party-payment-label,
.party-payment-card--lucro .party-payment-value {
    color: #8E5572;
}

.party-payment-card--lucro.party-payment-card--negative {
    border-color: #D55E00;
    background: #FDF0E8;
}

.party-payment-card--lucro.party-payment-card--negative .party-payment-icon {
    background: #D55E00;
}

.party-payment-card--lucro.party-payment-card--negative .party-payment-label,
.party-payment-card--lucro.party-payment-card--negative .party-payment-value {
    color: #9A3F00;
}

body[data-theme="neon"] .party-payment-card {
    background: #1e293b;
    box-shadow: none;
}

body[data-theme="neon"] .party-payment-card--total {
    background: #0f2740;
}

body[data-theme="neon"] .party-payment-card--paid {
    background: #0f2e28;
}

body[data-theme="neon"] .party-payment-card--remaining.party-payment-card--pending {
    background: #3a2410;
}

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,
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--paid .party-payment-label,
body[data-theme="neon"] .party-payment-card--paid .party-payment-value {
    color: #7FDCC0;
}

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: #FFB07A;
}

body[data-theme="neon"] .party-payment-card--lucro .party-payment-label,
body[data-theme="neon"] .party-payment-card--lucro .party-payment-value {
    color: #E8A8C8;
}

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: #FFB07A;
}

@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;
    }
}

/* 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;
}