/* Base reset for consistent rendering */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font-sans, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif); line-height: 1.5; color: #1f2937; background: #f8f9fa; }

/* Utilities */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.component-group { padding: 0 1rem; }
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.table-header-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pagination-container { padding-bottom: 1rem; }

/* Responsive typography */
h1 { font-size: clamp(1.5rem, 1.2rem + 2vw, 2.25rem); margin: .25rem 0 .5rem; }
h2 { font-size: clamp(1.25rem, 1rem + 1.5vw, 1.75rem); }
h3 { font-size: clamp(1.125rem, .95rem + 1vw, 1.5rem); }
p { margin: .25rem 0 .75rem; }

/* Cards and papers */
.pa-3 { padding: 1rem !important; }

/* MudBlazor specific tweaks */
.mud-table { width: 100%; }
.mud-table-container { overflow: hidden; }
.mud-button { white-space: nowrap; }
.mud-grid { width: 100%; }

/* Forms spacing */
.form-inline-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: .75rem !important; }
.mt-3 { margin-top: .75rem !important; }
.my-2 { margin-top: .5rem !important; margin-bottom: .5rem !important; }

/* Breakpoints */
@media (max-width: 600px) {
    .header-section { padding: .5rem 0; }
    .header-content p { font-size: .9rem; }
    .table-header { flex-direction: column; align-items: stretch; }
    .table-header-actions { width: 100%; }

    /* Stack grid controls */
    .mud-grid-item { padding-top: .5rem !important; padding-bottom: .5rem !important; }

    /* Compact buttons */
    .mud-button, .mud-icon-button { min-width: 36px; }

    /* Dialogs full width on mobile */
    .mud-dialog { margin: 0 !important; max-width: 100% !important; width: 100% !important; }
    .mud-dialog-content { padding: .75rem !important; }

    /* Tables: make cells readable */
    .mud-table-cell { padding: .5rem .5rem !important; }
    .mud-table { font-size: .9rem; }
}

@media (max-width: 900px) {
    .table-header-actions { gap: .5rem; }
    .mud-grid { row-gap: .5rem; }
    .mud-textfield, .mud-select, .mud-numeric-field { width: 100%; }
}

/* Large screens */
@media (min-width: 1200px) {
    .container { max-width: 1280px; }
}

/* Helpful responsive helpers for custom layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Ensure overflow-x for wide content in modals */
.mud-dialog-content { overflow-x: hidden; }

/* Accessibility & focus */
:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* Demo workspace badge */
.nav-demo-badge {
    background: #f59e0b;
    border-radius: 4px;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 1px 5px;
    vertical-align: middle;
}
html, body {
    font-family: var(--font-sans, 'Helvetica Neue', Helvetica, Arial, sans-serif);
}

:root {
    --color-primary: #325bb3;
    --color-secondary: #6B7280;
    --primary: #325bb3;
    --secondary: #6B7280;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --bg-primary: #FFFFFF;
    --bg-secondary: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --background-color: #f8f9fa;
    --border: #E5E7EB;
    --shadow: rgba(0, 0, 0, 0.1);
    --card-bg: #FFFFFF;
    --panel-bg: #FFFFFF;
    --surface: #FFFFFF;
    --border-color: #E5E7EB;
    --surface-subtle: #f3f4f6;
    --nav-bg: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);

    /* Assinatura de marca (ver docs/design-system/DESIGN.md) */
    --brand-indigo:   #6366f1;
    --brand-pink:     #ec5ba6;
    --gradient-brand: linear-gradient(135deg, #325bb3, #6366f1);
    --font-sans:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Modo escuro — paleta navy Slate (ver docs/design-system/DESIGN.dark.md) */
[data-theme="dark"] {
    --primary:          #4D89FF;
    --bg-primary:       #1E293B;
    --bg-secondary:     #131B2E;
    --text-primary:     #E2E8F0;
    --text-secondary:   #94A3B8;
    --background-color: #0F172A;
    --border:           #334155;
    --border-color:     #334155;
    --shadow:           rgba(0, 0, 0, 0.45);
    --card-bg:          #1E293B;
    --bg-card:          #1E293B;
    --panel-bg:         #1E293B;
    --surface:          #1E293B;
    --surface-subtle:   #0F172A;
    --nav-bg:           #131B2E;

    --success:          #34D399;
    --error:            #F87171;
    --warning:          #FBBF24;
    --info:             #60A5FA;

    --brand-indigo:     #818CF8;
    --brand-pink:       #F472B6;
    --gradient-brand:   linear-gradient(135deg, #4D89FF, #818CF8);
}

[data-theme="dark"] body {
    color: var(--text-primary);
    background: var(--background-color);
}

/* ::deep + [data-theme] não funciona em scoped CSS — o Blazor coloca o scope no seletor de ancestral */
[data-theme="dark"] .dash-card {
    background: var(--card-bg);
    border-color: var(--border);
}

a, .btn-link {
    color: #006bb7;
}

/* ─── Botões ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    background: transparent;
    color: var(--text-primary);
}

    .btn:active {
        transform: scale(0.97);
    }

    .btn:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        transform: none;
    }

    .btn:focus,
    .btn:active:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(50, 91, 179, 0.25);
    }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

    .btn-primary:hover {
        background: #274a94;
        border-color: #274a94;
    }

    .btn-primary:disabled {
        background: #9CA3AF;
        border-color: #9CA3AF;
    }

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border);
}

    .btn-secondary:hover {
        background: var(--bg-secondary);
        border-color: var(--primary);
        color: var(--primary);
    }

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

    .btn-danger:hover {
        background: #b91c1c;
        border-color: #b91c1c;
    }

.btn .btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

    .btn-loading .btn-spinner {
        display: inline-block;
    }

.btn-secondary .btn-spinner {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--text-primary);
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Botões Dark Mode ─── */
[data-theme="dark"] .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
[data-theme="dark"] .btn-primary:hover {
    background: #6ba0ff;
    border-color: #6ba0ff;
}
[data-theme="dark"] .btn-primary:disabled {
    background: var(--border);
    border-color: var(--border);
}
[data-theme="dark"] .btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-primary);
}
[data-theme="dark"] .btn-secondary:hover {
    background: var(--card-bg);
    border-color: var(--primary);
    color: var(--primary);
}
[data-theme="dark"] .btn-danger {
    background: #dc2626;
    border-color: #dc2626;
}
[data-theme="dark"] .btn-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.content {
    padding-top: 1.1rem;
}

.main-body-wrap {
    padding: 16px 24px;
    overflow-x: hidden;
}

@media (max-width: 640px) {
    .main-body-wrap {
        padding: 8px;
    }
}

/* Header Section */
.header-section {
    background: var(--primary);
    color: white !important;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

    .header-content h1 {
        font-size: 2rem;
        font-weight: 700;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        color: white !important;
    }

        .header-content h1 i {
            font-size: 2.4rem;
            color: white !important;
        }

    .header-content p {
        font-size: 1rem;
        margin: 0;
        opacity: 0.95;
        color: white !important;
        line-height: 1.6;
        flex: 1;
        min-width: 260px;
    }

/* Botões dentro do header (sobre fundo primário) */
.header-section .btn-primary {
    background: white;
    color: var(--primary);
    border-color: white;
}
.header-section .btn-primary:hover {
    background: #e8edf5;
    border-color: #e8edf5;
}
.header-section .btn-primary:disabled {
    background: #9CA3AF;
    border-color: #9CA3AF;
    color: white;
}

[data-theme="dark"] .header-section .btn-primary {
    background: var(--card-bg);
    color: var(--primary);
    border-color: var(--primary);
}
[data-theme="dark"] .header-section .btn-primary:hover {
    background: var(--bg-secondary);
    border-color: #6ba0ff;
}
[data-theme="dark"] .header-section .btn-primary:disabled {
    background: var(--border);
    border-color: var(--border);
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .auth-wrapper {
        align-items: center;
    }

    .login-split-layout {
        width: 520px;
        max-width: 94vw;
        margin: 0 auto;
    }

    .login-split-form {
        max-width: 520px;
        width: 100%;
        margin: 0 auto;
    }
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

        .header-content h1 {
            font-size: 1.6rem;
        }

            .header-content h1 i {
                font-size: 2rem;
            }

        .header-content p {
            font-size: 0.95rem;
        }

    .header-section {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.4rem;
    }

    .header-content p {
        font-size: 0.85rem;
    }
}

/* ========================================
   LOGIN SPLIT LAYOUT
   ======================================== */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    background-color: #f8f9fa;
    padding: 20px;
    box-sizing: border-box;
    margin: 0;
}

.login-logo {
    text-align: center;
}

.nav-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ── DfLogo — wordmark com troca por tema (componente DfLogo.razor) ── */
.df-logo {
    width: auto;
    height: 2rem;
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
}

.df-logo--dark { display: none; }

[data-theme="dark"] .df-logo--light { display: none; }
[data-theme="dark"] .df-logo--dark { display: inline-block; }

.login-split-layout {
    display: flex;
    flex-wrap: wrap;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    max-height: 700px;
}

.login-split-image {
    position: relative;
    max-height: 700px;
    flex: 1;
    overflow: hidden;
}

    .login-split-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.login-split-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(59, 130, 246, 0.8));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: white;
}

    .login-split-overlay h2 {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 1rem;
        color: white;
    }

    .login-split-overlay p {
        font-size: 1.1rem;
        opacity: 0.95;
        max-width: 400px;
        line-height: 1.6;
        color: white;
    }

.login-split-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    box-sizing: border-box;
}

    .login-split-form h3 {
        font-size: 1.75rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: #111827;
    }

    .login-split-form .subtitle {
        font-size: 1rem;
        color: #6B7280;
        margin-bottom: 2rem;
    }

.login-form {
    width: 100%;
}

/* ─── Finanças ─── */
.financas-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.financas-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.financas-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.financas-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

.financas-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.financas-summary-card {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.financas-summary-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.financas-summary-icon.icon-amber  { background: #fef3c7; color: #f59e0b; }
.financas-summary-icon.icon-blue   { background: #dbeafe; color: #3b82f6; }
.financas-summary-icon.icon-purple { background: #ede9fe; color: #8b5cf6; }
.financas-summary-icon.icon-green  { background: #d1fae5; color: #10b981; }
.financas-summary-icon.icon-red    { background: #fee2e2; color: #ef4444; }

[data-theme="dark"] .financas-summary-icon.icon-amber  { background: rgba(245,158,11,.15); }
[data-theme="dark"] .financas-summary-icon.icon-blue   { background: rgba(59,130,246,.15); }
[data-theme="dark"] .financas-summary-icon.icon-purple { background: rgba(139,92,246,.15); }
[data-theme="dark"] .financas-summary-icon.icon-green  { background: rgba(16,185,129,.15); }
[data-theme="dark"] .financas-summary-icon.icon-red    { background: rgba(239,68,68,.15); }

.financas-summary-card .financas-summary-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.financas-summary-card .financas-summary-value {
    display: block;
    font-size: 1.35rem;
}

.financas-summary-card.entradas .financas-summary-value { color: #10b981; }
.financas-summary-card.saidas .financas-summary-value { color: #ef4444; }
.financas-summary-card.saldo.positivo .financas-summary-value { color: #10b981; }
.financas-summary-card.saldo.negativo .financas-summary-value { color: #ef4444; }

.financas-summary.encomendas-kpi-row {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .financas-summary.encomendas-kpi-row,
    .financas-summary.financas-kpi-row,
    .financas-summary.organizacao-kpi-row {
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px 4px 24px;
        scroll-padding-left: 24px;
    }

    .financas-summary.encomendas-kpi-row {
        grid-auto-columns: minmax(150px, 42vw);
    }

    .financas-summary.financas-kpi-row,
    .financas-summary.organizacao-kpi-row {
        grid-auto-columns: minmax(190px, 60vw);
    }

    .financas-summary.encomendas-kpi-row .financas-summary-card,
    .financas-summary.financas-kpi-row .financas-summary-card,
    .financas-summary.organizacao-kpi-row .financas-summary-card {
        scroll-snap-align: start;
    }
}

.financas-cards {
    display: grid;
    gap: 0.75rem;
}

.financas-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease;
}

.financas-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.financas-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.financas-card-icon.entrada-icon { background: #d1fae5; }
.financas-card-icon.saida-icon { background: #fee2e2; }
.financas-card-icon.relatorio-icon { background: #dbeafe; }
.financas-card-icon.condicao-icon { background: #e0e7ff; }

.financas-card-body { flex: 1; }
.financas-card-body h3 { margin: 0; font-size: 1rem; }
.financas-card-body p { margin: 0; font-size: 0.85rem; color: var(--text-secondary); }

.financas-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}

.financas-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.financas-section-header h2 { margin: 0; font-size: 1.15rem; }

.financas-group-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 1rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.financas-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.financas-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.financas-list-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.financas-list-icon.entrada-icon { background: #d1fae5; }
.financas-list-icon.saida-icon { background: #fee2e2; }

.financas-list-content { flex: 1; min-width: 0; }
.financas-list-content strong { display: block; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.financas-list-meta { display: block; font-size: 0.8rem; color: var(--text-secondary); }
.financas-list-value { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.financas-list-value.positivo { color: #10b981; }
.financas-list-value.negativo { color: #ef4444; }

.financas-list-item.inactive { opacity: 0.5; }
.financas-list-item.inactive .financas-list-icon { filter: grayscale(1); }

.inactive-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: #9ca3af;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    margin-left: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.financas-empty { text-align: center; padding: 2rem; color: var(--text-secondary); }

/* Saidas — search + filter chips (mesmo padrão das Encomendas) */
.saidas-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    margin-bottom: 0.75rem;
}

.saidas-search-icon { color: var(--text-secondary); font-size: 1rem; flex-shrink: 0; }

.saidas-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    min-width: 0;
}

.saidas-search-input::placeholder { color: var(--text-secondary); opacity: 0.7; }

.saidas-search-clear {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s;
}

.saidas-search-clear:hover { background: var(--surface-subtle); color: var(--text-primary); }

.saidas-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.saidas-filter-chip {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.saidas-filter-chip:hover { border-color: var(--primary); color: var(--primary); }

.saidas-filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.financas-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px;
}

.financas-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.financas-form-group label { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }

.financas-radio-group { display: flex; gap: 1rem; }
.financas-radio { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.financas-radio input[type="radio"] { accent-color: var(--mud-palette-primary, #1d4ed8); }

.financas-selected-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #d1fae5;
}

.financas-selected-item strong { font-size: 0.95rem; }
.financas-selected-item span { font-size: 0.85rem; color: var(--text-secondary); }

.financas-pedidos-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }

.financas-pedido-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    transition: background 0.15s;
}

.financas-pedido-item:hover { background: var(--bg-secondary); }
.financas-pedido-item strong { display: block; font-size: 0.9rem; }
.financas-pedido-item span { font-size: 0.8rem; color: var(--text-secondary); }

.financas-form-actions { display: flex; gap: 0.75rem; padding-top: 0.5rem; }

.financas-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card-bg); }
.financas-table { width: 100%; border-collapse: collapse; }
.financas-table th, .financas-table td { padding: 0.75rem 0.65rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
.financas-table th { color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Balanço mensal — card layout (mobile-first, sem scroll horizontal) */
.balanco-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.balanco-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    overflow: hidden;
}

.balanco-card-header {
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--surface-subtle);
    border-bottom: 1px solid var(--border);
}

.balanco-card-body {
    padding: 0.5rem 1rem;
}

.balanco-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
}

.balanco-card-row:last-child {
    border-bottom: none;
}

.balanco-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.balanco-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.balanco-value.positivo { color: var(--success, #10b981); }
.balanco-value.negativo { color: var(--danger, #ef4444); }

/* Destaque temporário do mês atual */
.balanco-card--destaque {
    border-color: var(--primary, #325bb3);
    animation: balancoMesAtualPulse 1.8s ease-in-out infinite;
}

@keyframes balancoMesAtualPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(50, 91, 179, 0.35); }
    50% { box-shadow: 0 0 0 10px rgba(50, 91, 179, 0); }
}

.balanco-badge-atual {
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(50, 91, 179, 0.12);
    color: var(--primary, #325bb3);
}

/* Dica flutuante quando o mês atual está fora do ecrã */
.mes-atual-dica {
    position: fixed;
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    background: var(--primary, #325bb3);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    animation: mesAtualDicaEntrada 0.3s ease-out;
}

.mes-atual-dica:hover { filter: brightness(1.08); }

.mes-atual-dica i { animation: mesAtualDicaSeta 1.4s ease-in-out infinite; }

@keyframes mesAtualDicaEntrada {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes mesAtualDicaSeta {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* No mobile o BottomNav ocupa o fundo do ecrã — a dica fica acima dele */
@media (max-width: 768px) {
    .mes-atual-dica {
        bottom: calc(84px + env(safe-area-inset-bottom));
    }
}

@media (min-width: 768px) {
    .balanco-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .financas-summary { grid-template-columns: 1fr; }
    .financas-page { padding-left: 0.5rem; padding-right: 0.5rem; }
}

.form-group {
    margin-bottom: 1.5rem;
}

.section-subtitle {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.supplier-price-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.supplier-price-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.cost-preview {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cost-preview-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cost-preview-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.cost-preview-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
    font-family: inherit;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

    .form-input:focus,
    .form-select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.forgot-password-link {
    display: block;
    text-align: right;
    margin-top: -0.5rem;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
}

    .forgot-password-link:hover {
        text-decoration: underline;
    }

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn-login:hover {
        background-color: #274a94;
    }

    .btn-login:active {
        transform: scale(0.98);
    }

    .btn-login:disabled {
        background-color: #9CA3AF;
        cursor: not-allowed;
        opacity: 0.6;
    }

.login-btn-content, .login-btn-spinner {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-login--loading {
    cursor: default !important;
    pointer-events: none;
    background-color: var(--primary) !important;
    opacity: 1 !important;
}
.login-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin 0.65s linear infinite;
    flex-shrink: 0;
}
@keyframes login-spin { to { transform: rotate(360deg); } }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Spinner de Loading */
.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mensagem de Erro */
.alert-error {
    background-color: #FEE2E2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Link "Criar conta" */
.signup-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #6B7280;
}

    .signup-link a {
        color: #325bb3;
        text-decoration: none;
        font-weight: 600;
    }

        .signup-link a:hover {
            text-decoration: underline;
        }

/* ===== BREADCRUMBS ===== */
.breadcrumbs-container {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.breadcrumb-item:hover {
    color: var(--primary);
    transform: translateX(2px);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 500;
    cursor: default;
}

.breadcrumb-item.active:hover {
    transform: none;
}

.breadcrumb-item i {
    font-size: 0.9rem;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .breadcrumbs {
        padding: 0.5rem 0;
        gap: 0.25rem;
    }

    .breadcrumb-item {
        font-size: 0.75rem;
    }

    .breadcrumb-item span {
        display: none;
    }

    .breadcrumb-item.active span {
        display: inline;
    }

    .breadcrumb-separator i {
        font-size: 0.7rem;
    }

    .breadcrumb-item i {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .supplier-price-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        padding: 0.5rem 0;
        gap: 0.2rem;
    }

    .breadcrumb-item {
        font-size: 0.7rem;
    }

    .breadcrumb-item i {
        font-size: 0.8rem;
    }
}

/* ===== STEPPER PROGRESS ===== */

.stepper-progress-bar {
    height: 4px;
    background-color: var(--border);

    margin-bottom: 1.5rem;
    overflow: hidden;
}

.stepper-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
}

.stepper-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.stepper-step-circle {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--surface-light);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

    .stepper-step-circle i {
        font-size: 1.25rem;
        color: var(--text-secondary);
        transition: all 0.3s ease;
    }

.stepper-step-number {
    display: none;
    font-weight: 600;
    color: var(--text-secondary);
}

.stepper-step-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Active Step */
.stepper-step.active .stepper-step-circle {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(50, 91, 179, 0.15);
}

    .stepper-step.active .stepper-step-circle i {
        color: white !important;
    }

.stepper-step.active .stepper-step-label {
    color: var(--primary);
    font-weight: 600;
}

/* Completed Step */
.stepper-step.completed .stepper-step-circle {
    background-color: var(--success);
    border-color: var(--success);
}

    .stepper-step.completed .stepper-step-circle i {
        display: none;
    }

    .stepper-step.completed .stepper-step-circle::after {
        content: "✓";
        color: var(--white);
        font-size: 1.5rem;
        font-weight: bold;
    }

.stepper-step.completed .stepper-step-label {
    color: var(--success);
}

/* Inactive Step */
.stepper-step:not(.active):not(.completed) .stepper-step-circle i {
    color: #000;
}

/* ===== STEPS CONTAINER ===== */
.steps-container {
    position: relative;
    margin-bottom: 1rem;
}

.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

    .step-content.active {
        display: block;
    }

/* Finance Toggle */
.finance-toggle {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--surface-light);
    border-radius: 8px;
}

/* ===== FINANCE SUMMARY ===== */
.finance-summary {
    background-color: var(--surface-light);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.finance-summary-item {
    display: flex;
    flex-direction: column;
}

.finance-summary-label {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.finance-summary-value {
    margin: 0.25rem 0 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

    .finance-summary-value.highlight {
        color: var(--primary);
    }

/* Finance Placeholder */
.finance-placeholder {
    padding: 2rem;
    text-align: center;
    background-color: var(--surface-light);
    border-radius: 8px;
}

    .finance-placeholder i {
        font-size: 3rem;
        color: var(--primary);
        margin-bottom: 1rem;
        display: block;
    }

    .finance-placeholder h4 {
        margin: 0 0 0.5rem;
        color: var(--text-primary);
        font-size: 1.25rem;
    }

    .finance-placeholder p {
        margin: 0;
        color: var(--text-secondary);
        line-height: 1.6;
    }

/* ===== CONFIRMATION SUMMARY ===== */
.confirmation-summary {
    background-color: var(--surface-light);
    border-radius: 8px;
}

.summary-title {
    margin: 0 0 1rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.summary-section {
    margin-bottom: 1rem;
}

    .summary-section:last-child {
        margin-bottom: 0;
    }

.summary-label {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.summary-text {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .login-split-form {
        padding: 2rem;
    }
}

/* Mobile Landscape (481px - 768px) */
@media (max-width: 768px) {
    .login-split-form {
        padding: 2rem 1.5rem;
    }

    .stepper-steps {
        gap: 0.25rem;
    }

    .stepper-step-label {
        font-size: 0.75rem;
    }

    .stepper-step-circle {
        width: 42px;
        height: 42px;
    }

        .stepper-step-circle i {
            font-size: 1.1rem;
        }

    .form-row {
        grid-template-columns: 1fr;
    }

    .login-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}

/* Mobile Portrait (até 480px) */
@media (max-width: 480px) {
    .auth-wrapper {
        padding: 10px;
        align-items: center;
        padding-top: 20px;
    }

    .login-split-form {
        padding: 1.5rem 1rem;
    }

    .nav-logo {
        width: 60px;
        height: 60px;
    }

    .login-logo h2 {
        font-size: 1.25rem;
    }

    .login-logo p {
        font-size: 0.9rem;
    }

    /* Stepper simplificado em mobile */
    .stepper-progress {
        margin-bottom: 2rem;
    }

    .stepper-step-label {
        font-size: 0.7rem;
        max-width: 60px;
        word-wrap: break-word;
    }

    .stepper-step-circle {
        width: 36px;
        height: 36px;
    }

        .stepper-step-circle i {
            font-size: 1rem;
        }

    /* Form adjustments */
    .steps-container {
        min-height: 350px;
    }

    .form-input,
    .form-select,
    textarea.form-input {
        font-size: 16px; /* Previne zoom no iOS */
        padding: 0.7rem 0.875rem;
    }

    .input-group .form-input,
    .input-group textarea {
        padding-left: 2.5rem;
    }

    .input-icon {
        left: 0.875rem;
        font-size: 0.95rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    /* Finance summary em coluna única */
    .finance-summary {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Buttons */
    .btn {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }

    .stepper-navigation {
        gap: 0.5rem;
    }

    /* Confirmation summary */
    .confirmation-summary {
        padding: 1rem;
    }

    .summary-title {
        font-size: 1.1rem;
    }

    .form-check-label {
        font-size: 0.875rem;
    }

    .form-checkbox {
        width: 16px;
        height: 16px;
    }
}

/* Mobile muito pequeno (até 360px) */
@media (max-width: 360px) {
    .login-split-form {
        padding: 1rem 0.75rem;
    }

    .nav-logo {
        width: 50px;
        height: 50px;
    }

    .stepper-step-circle {
        width: 32px;
        height: 32px;
    }

        .stepper-step-circle i {
            font-size: 0.9rem;
            color: white;
        }

    .stepper-step-label {
        font-size: 0.65rem;
        max-width: 50px;
    }

    .form-input,
    .form-select,
    textarea.form-input {
        padding: 0.65rem 0.75rem;
    }

    .input-group .form-input,
    .input-group textarea {
        padding-left: 2.25rem;
    }

    .input-icon {
        left: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .form-checkbox,
    .btn,
    .stepper-step {
        min-height: 44px;
    }

    .form-check {
        padding: 0.5rem 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
    font-size: 0.85rem;
    color: #9CA3AF;
}

/* Responsividade para Tablets e Mobile */
@media (max-width: 968px) {
    .login-split-layout {
        flex-direction: column;
        max-width: 600px;
        min-height: auto;
        max-height: none; /* libera altura em telas pequenas */
        overflow: visible; /* permite scroll do conteúdo do formulário */
    }

    .login-split-image {
        display: none !important;
    }

    .login-split-form {
        padding: 2rem;
        flex: none;
        width: 100%;
    }

    .login-split-overlay h2 {
        font-size: 1.5rem;
    }

    .login-split-overlay p {
        font-size: 0.95rem;
    }

    .login-split-overlay i {
        font-size: 3rem !important;
    }
}

@media (max-width: 640px) {
    .auth-wrapper {
        padding: 10px;
    }

    .login-split-layout {
        max-width: 100%;
    }

    .login-split-form {
        padding: 1.5rem;
    }

        .login-split-form h3 {
            font-size: 1.5rem;
        }
}

@media (max-width: 480px) {
    .login-split-form {
        padding: 1rem;
    }
}

/* Header */
.nav-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.nav-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-brand h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #325bb3;
    letter-spacing: -0.02em;
}

.nav-brand p {
    margin: 0;
    font-size: 12px;
    color: #325bb3;
    font-weight: 400;
}

.mud-nav-custom {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.nav-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 10px;
    transition: background 0.2s ease;
    cursor: pointer;
}

    .user-info:hover {
        background-color: #f5f5f5;
    }

.user-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.user-role {
    font-size: 12px;
    color: #64748b;
}

.mud-nav-custom::-webkit-scrollbar {
    width: 5px;
}

.mud-nav-custom::-webkit-scrollbar-track {
    background: transparent;
}

.mud-nav-custom::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 3px;
}

    .mud-nav-custom::-webkit-scrollbar-thumb:hover {
        background: #d0d0d0;
    }

.section-header-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #325bb3;
    border-left: 4px solid #325bb3;
    padding-left: 12px;
}

    .section-header-icon i {
        font-size: 1.5rem;
        color: #325bb3;
    }

/* --- Responsividade geral: permite cards lado a lado --- */
.cards-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* --- Card Moderno --- */
.modern-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 20px var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border);
    display: flex;
    position: relative;
    overflow: hidden;
}

    /* Linha superior ao hover */
    .modern-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #4a6cf7 0%, #764ba2 100%);
        transform: scaleX(0);
        transition: transform 0.4s ease;
    }

    .modern-card:hover::before {
        transform: scaleX(1);
    }

    .modern-card:hover {
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    }

/* --- Ícone Container --- */
.icon-container {
    width: 64px;
    height: 64px;
    background: #325bb3;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.modern-card:hover .icon-container {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.icon-container i {
    font-size: 32px;
    color: white;
    transition: all 0.3s ease;
}

.modern-card:hover .icon-container i {
    transform: scale(1.1);
}
/* --- Profile Card --- */
.profile-card {
    max-width: 100%;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
}

.profile-card-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.profile-image-container {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    background: var(--card-bg);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #4c7cd8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.profile-image-placeholder::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    top: -10px;
    right: -10px;
}

.profile-image-placeholder::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    bottom: -5px;
    left: -5px;
}

.profile-image-placeholder i {
    font-size: 3rem;
    color: white;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.profile-image-edit-btn {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: 2px solid var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

    .profile-image-edit-btn:hover {
        background: #264a8f;
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .profile-image-edit-btn i {
        font-size: 0.95rem;
    }

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    word-wrap: break-word;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.profile-detail-item {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    word-break: break-word;
}

    .profile-detail-item i {
        flex-shrink: 0;
    }

.profile-date {
    font-size: 0.875rem;
}

.modern-expansion-panels {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.expansion-panel-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

    .expansion-panel-title i {
        font-size: 1.25rem;
        color: var(--primary);
    }

@media (max-width: 640px) {
    .profile-card {
        padding: 1rem;
    }

    .profile-card-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .profile-image-container {
        width: 100px;
        height: 100px;
    }

    .profile-info {
        width: 100%;
    }

    .profile-name {
        font-size: 1.35rem;
    }

    .profile-details {
        align-items: center;
    }

    .profile-detail-item {
        font-size: 0.9rem;
        justify-content: center;
    }
}

/* --- Conteúdo --- */
.card-content {
    flex: 1;
    margin-left: 20px;
}

.card-title {
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.modern-card:hover .card-title {
    color: #667eea;
}

.card-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Badge */
.card-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.modern-card:hover .card-badge {
    background: #325bb3;
    color: white;
    transform: translateX(4px);
}

/* --- RESPONSIVIDADE AVANÇADA --- */

/* Tablets e ecrãs médios */
@media (max-width: 768px) {
    .modern-card {
        max-width: 100%;
        padding: 20px;
        flex-direction: row;
    }

    .card-title {
        font-size: 18px;
    }

    .card-description {
        font-size: 13px;
    }

    .icon-container {
        width: 54px;
        height: 54px;
        border-radius: 14px;
    }

        .icon-container i {
            font-size: 26px;
        }
}

/* Telemóveis pequenos */
@media (max-width: 576px) {

    .modern-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 18px;
    }

    .icon-container {
        margin-bottom: 16px;
        width: 48px;
        height: 48px;
    }

        .icon-container i {
            font-size: 22px;
        }

    .card-content {
        margin-left: 0;
    }

    .card-title {
        font-size: 17px;
    }

    .card-description {
        font-size: 13px;
    }

    .card-badge {
        font-size: 16px;
        margin-top: 5px;
    }
}

/* Telemóveis extra pequenos */
@media (max-width: 400px) {
    .modern-card {
        padding: 14px;
        border-radius: 16px;
    }

    .icon-container {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

        .icon-container i {
            font-size: 18px;
        }
}


/* ===========================
   RECIPE CALCULATOR STYLES
   =========================== */

.recipe-calculator {
    background-color: transparent;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    margin-top: -1rem;
}

.header-actions {
    display: flex;
    justify-content: flex-end; /* posiciona no canto direito */
    align-items: center;
    margin-top: 5px;
    gap: 8px; /* espa�o entre bot�o e spinner */
}

    .header-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        min-height: 38px;
        padding: 0.55rem 0.9rem;
        border-radius: 10px;
        font-size: 0.88rem;
        font-weight: 600;
        line-height: 1.1;
        box-shadow: 0 8px 18px rgba(27, 110, 194, 0.18);
    }

        .header-actions .btn i {
            font-size: 0.95rem;
        }

    .header-actions .loading-indicator {
        width: 20px;
        height: 20px;
    }

        .header-actions .loading-indicator .spinner {
            width: 100%;
            height: 100%;
            border: 2px solid #cbd5e1; /* cor da borda clara */
            border-top: 2px solid #4f46e5; /* cor do spinner */
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* 1. Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 2rem;
    position: relative;
}

.page-header-content {
    flex: 1;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 0.5rem 0;
}

.page-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

.btn-refresh {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

    .btn-refresh:hover {
        background: #3730a3;
        transform: rotate(180deg);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    }

.loading-indicator {
    position: absolute;
    top: 50%;
    right: 70px;
    transform: translateY(-50%);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 2. Recipe Selector */
.recipe-selector-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .section-title i {
        color: var(--primary);
    }

.recipe-selector-mobile {
    display: none;
}

.recipe-selector {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
}

    .recipe-selector::-webkit-scrollbar {
        height: 6px;
    }

    .recipe-selector::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 3px;
    }

    .recipe-selector::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 3px;
    }

.recipe-item {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

    .recipe-item:hover {
        border-color: var(--primary);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
        transform: translateY(-2px);
    }

    .recipe-item.active {
        border-color: var(--primary);
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.07) 0%, var(--card-bg) 100%);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    }

.recipe-item-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    flex-shrink: 0;
}

.recipe-item-info {
    flex: 1;
}

    .recipe-item-info h4 {
        margin: 0 0 0.25rem 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
    }

.recipe-total {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.recipe-check {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #e5e7eb;
    transition: all 0.3s ease;
}

.recipe-item.active .recipe-check {
    color: var(--primary);
}

/* 3. Recipe Ingredients Panel */
.recipe-ingredients-panel {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ingredient-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
}


.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ingredient-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.3s ease;
}

    .ingredient-item:hover {
        border-color: var(--primary);
        box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
    }

.ingredient-name {
    flex: 2;
    font-weight: 500;
    color: var(--text-primary);
}

.ingredient-quantity {
    flex: 1;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

.ingredient-value {
    flex: 1;
    text-align: right;
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

/* 4. Expense Selector */
.expense-selector-section {
    margin-bottom: 2rem;
}

.expense-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

    .expense-selector::-webkit-scrollbar {
        width: 6px;
    }

    .expense-selector::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 3px;
    }

    .expense-selector::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 3px;
    }

        .expense-selector::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }

.expense-item {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

    .expense-item:hover {
        border-color: var(--primary);
        box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
    }

.expense-checkbox {
    display: none;
}

.expense-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width:100%;
    user-select: none;
}

.expense-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.expense-name {
    font-weight: 500;
    color: var(--text-primary);
}

.expense-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.expense-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.expense-type-badge.fixed {
    background: #dcfce7;
    color: #14532d;
    border-color: #86efac;
}

@media (max-width: 768px) {
    .expense-row.has-fixed-badge {
        grid-template-areas:
            "check name value"
            ". badge badge";
    }

    .expense-type-badge {
        grid-area: badge;
        justify-self: start;
        font-size: 0.68rem;
        padding: 2px 6px;
    }
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
}

.detail-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

    .detail-label i {
        margin-right: 0.25rem;
        color: var(--primary);
    }

.detail-value {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Seção de ingredientes */
.detail-section {
    margin-top: 1.5rem;
}

.section-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

    .section-header i {
        margin-right: 0.5rem;
    }

.ingredients-container {
    display: grid;
    gap: 0.75rem;
}

.ingredient-card {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s ease;
}

    .ingredient-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-color: var(--primary-light);
        transform: translateY(-2px);
    }

.ingredient-main-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.ingredient-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ingredient-quantity-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ingredient-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.ingredient-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .ingredient-detail-item.highlight {
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
        padding: 0.5rem;
        border-radius: 6px;
        border: 1px solid rgba(76, 175, 80, 0.2);
    }

.detail-item-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-item-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.detail-item-value-highlight {
    font-size: 1rem;
    color: var(--success);
    font-weight: 700;
}

/* Tablet */
@media (max-width: 768px) {
    .ingredient-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .ingredient-detail-item.highlight {
        grid-column: 1 / -1;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .ingredient-card {
        padding: 0.875rem;
    }

    .ingredient-main-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .ingredient-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .ingredient-detail-item {
        padding: 0.5rem;
        background: rgba(0, 0, 0, 0.02);
        border-radius: 6px;
    }

        .ingredient-detail-item.highlight {
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08));
        }
}

/* Layout principal dos ingredientes */
.ingredients-list {
    display: grid;
    gap: 0.5rem;
}

.ingredient-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr 1.2fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-light);
    transition: all 0.2s ease;
}

    .ingredient-row:hover:not(.ingredient-header) {
        background: var(--surface-hover);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transform: translateY(-1px);
    }

.ingredient-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, var(--primary-light), var(--surface-light));
    border-color: var(--primary-light);
}

.ingredient-main {
    display: none;
}

.ingredient-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.ingredient-qty,
.ingredient-unit,
.ingredient-supplier,
.ingredient-supplier-price,
.ingredient-value {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.ingredient-supplier {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.ingredient-value {
    font-weight: 600;
    color: var(--success);
}

.text-right {
    text-align: right;
}

/* Tablet (médio) */
@media (max-width: 900px) {
    .ingredient-row {
        grid-template-columns: 1.8fr 0.9fr 0.8fr 1.2fr 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    /* Esconde a coluna de unidade em tablets */
    .ingredient-unit {
        display: none;
    }

    .ingredient-header span:nth-child(3) {
        display: none;
    }
}

/* Mobile */
@media (max-width: 720px) {
    .ingredient-header {
        display: none;
    }

    .ingredient-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem 1rem;
        padding: 1rem;
    }

    .ingredient-main {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        grid-column: 1 / -1;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.25rem;
    }

    .ingredient-name {
        font-size: 1rem;
    }

    .ingredient-meta {
        font-size: 0.875rem;
        color: var(--text-secondary);
        font-weight: 500;
    }

    .ingredient-qty,
    .ingredient-unit {
        display: none;
    }

    .ingredient-supplier,
    .ingredient-supplier-price,
    .ingredient-value {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.9rem;
    }

        .ingredient-supplier::before,
        .ingredient-supplier-price::before,
        .ingredient-value::before {
            content: attr(data-label);
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.02em;
        }

        .ingredient-supplier::before {
            content: "Fornecedor";
        }

        .ingredient-supplier-price::before {
            content: "Preço Unit.";
        }

        .ingredient-value::before {
            content: "Valor Total";
        }

    .ingredient-value {
        font-weight: 700;
        font-size: 1rem;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .ingredient-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.875rem;
    }

    .ingredient-supplier,
    .ingredient-supplier-price,
    .ingredient-value {
        text-align: left;
        padding: 0.5rem;
        background: rgba(0, 0, 0, 0.02);
        border-radius: 4px;
    }

    .text-right {
        text-align: left;
    }
}

/* 5. Calculation Form */
.calculation-form {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-row-calc {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group-calc {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label-calc {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input-calc {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .form-input-calc:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

.btn-calculate {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn-calculate:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
    }

    .btn-calculate:active {
        transform: translateY(0);
    }

/* 6. Results Panel */
.results-panel {
    margin-bottom: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
}

    .result-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }

.card-expenses {
    border-left: 4px solid #ef4444;
}

    .card-expenses:hover {
        border-left-color: #dc2626;
        box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
    }

.card-ingredients {
    border-left: 4px solid #f59e0b;
}

    .card-ingredients:hover {
        border-left-color: #d97706;
        box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
    }

.card-yield {
    border-left: 4px solid #8b5cf6;
}

    .card-yield:hover {
        border-left-color: #7c3aed;
        box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
    }

.card-profit {
    border-left: 4px solid #10b981;
}

    .card-profit:hover {
        border-left-color: #059669;
        box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
    }

.card-price {
    border-left: 4px solid #3b82f6;
}

    .card-price:hover {
        border-left-color: #2563eb;
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
    }

.result-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.card-expenses .result-icon {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #ef4444;
}

.card-ingredients .result-icon {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #f59e0b;
}

.card-yield .result-icon {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    color: #8b5cf6;
}

.card-profit .result-icon {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #10b981;
}

.card-price .result-icon {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #3b82f6;
}

.result-content {
    flex: 1;
}

.result-label {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-sublabel {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

    .result-sublabel span {
        font-weight: 600;
        color: var(--text-primary);
    }

/* 7. Create Product Button */
.btn-create-product {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 1.25rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

    .btn-create-product:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    }

    .btn-create-product:active {
        transform: translateY(-1px);
    }

/* Responsive Design */
@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .recipe-calculator {
        padding: 1.5rem;
        margin-top: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-header {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .form-row-calc {
        grid-template-columns: 1fr;
    }

    .expense-selector {
        grid-template-columns: 1fr;
        max-height: 280px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .results-panel {
        background: transparent;
        border-radius: 0;
        padding: 0;
    }

    .result-card {
        padding: 0.75rem 0.85rem;
        align-items: center;
        gap: 0.65rem;
    }

    .result-icon {
        width: 48px;
        height: 48px;
        font-size: 1.35rem;
    }

    .result-value {
        font-size: 1.25rem;
    }

    .result-label,
    .result-sublabel {
        font-size: 0.8rem;
    }

    .recipe-item {
        min-width: 240px;
    }

    .ingredient-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.85rem;
        gap: 0.4rem;
    }

    .ingredient-quantity,
    .ingredient-value {
        text-align: left;
        font-size: 0.9rem;
    }

    .ingredients-list {
        max-height: 240px;
        overflow-y: auto;
        padding-right: 0.5rem;
        gap: 0.5rem;
    }

    .recipe-ingredients-panel {
        background: transparent;
        padding: 0;
        margin-bottom: 1.5rem;
    }

        .ingredients-list::-webkit-scrollbar {
            width: 6px;
        }

        .ingredients-list::-webkit-scrollbar-track {
            background: #f0f0f0;
            border-radius: 3px;
        }

        .ingredients-list::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 3px;
        }

    .section-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .btn-refresh {
        position: absolute;
        top: 0;
        right: 0;
    }

    .loading-indicator {
        right: 60px;
    }

    .recipe-item {
        min-width: 200px;
    }
}


.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
    font-family: inherit;
}

    .form-input:focus,
    .form-textarea:focus,
    .form-select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

    .form-input.success {
        border-color: var(--success);
    }

    .form-input.error {
        border-color: var(--error);
    }

    .form-input:disabled,
    .form-textarea:disabled,
    .form-select:disabled {
        background-color: var(--bg-secondary);
        cursor: not-allowed;
        opacity: 0.6;
    }



.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

    .form-hint.success {
        color: var(--success);
    }

    .form-hint.error {
        color: var(--error);
    }

    .form-hint i {
        margin-right: 0.25rem;
    }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.25rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-secondary {
  background-color: #7c4dff;
  color: white;
}

.badge-success {
    background-color: var(--success);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: white;
}

.badge-neutral {
    background-color: var(--secondary); /* cinza neutro */
    color: white;
}

.badge-error {
    background-color: var(--error);
    color: white;
}

.badge-danger {
    background-color: var(--success);
    color: white;
}

.badge-info {
    background-color: var(--info);
    color: white;
}

/* ─── Badge Subtle (monocromático, peso visual reduzido) ─── */
.badge-mono {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--surface-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    white-space: nowrap;
    line-height: 1.5;
}
.badge-mono i { font-size: 0.8rem; }

.badge-mono-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}
.badge-mono-dot.success { background: var(--success); }
.badge-mono-dot.warning { background: var(--warning); }
.badge-mono-dot.danger  { background: var(--error); }
.badge-mono-dot.info    { background: var(--info); }
.badge-mono-dot.primary { background: var(--primary); }

[data-theme="dark"] .badge-mono {
    background: var(--surface-subtle);
    border-color: var(--border);
}

/* Input Group */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 10;
}

.input-icon-right {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-group .form-input {
    padding-left: 2.75rem;
}

/* Botão toggle mostrar/ocultar senha */
.btn-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    font-size: 1rem;
    z-index: 10;
}

    .btn-password-toggle:hover {
        color: var(--primary);
    }

/* Input código OTP */
.otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5em;
    font-family: 'Courier New', Courier, monospace;
    text-transform: uppercase;
    padding-left: 1rem;
    padding-right: 0.5rem;
}

.input-group .input-icon-right ~ .form-input,
.input-group:has(.btn-password-toggle) .form-input {
    padding-right: 2.75rem;
}

.input-group .form-select {
    padding-left: 2.75rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.75rem;
}


/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.form-checkbox,
.form-radio {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

.form-checkbox:disabled,
.form-radio:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Switch / Toggle */
.form-switch {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.switch-input {
    display: none;
}

.switch-label {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    cursor: pointer;
    margin-right: 0.75rem;
}

.switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    transition: 0.3s;
}

    .switch-slider::before {
        content: '';
        position: absolute;
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        border-radius: 50%;
        transition: 0.3s;
    }

.switch-input:checked + .switch-label .switch-slider {
    background-color: var(--primary);
}

    .switch-input:checked + .switch-label .switch-slider::before {
        transform: translateX(24px);
    }

.switch-input:disabled + .switch-label {
    cursor: not-allowed;
    opacity: 0.5;
}

.switch-text {
    color: var(--text-primary);
}

/* Table Header */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

    .table-header h4 {
        margin: 0;
        font-size: 1.2rem;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.table-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Expenses Table */
.table-expenses {
    font-size: 0.9rem;
}

.table-expense-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .table-expense-info strong {
        color: var(--text-primary);
        font-size: 0.95rem;
    }

    .table-expense-info small {
        color: var(--text-secondary);
        font-size: 0.8rem;
    }

.expense-amount {
    font-size: 1rem;
    font-weight: 600;
}

    .expense-amount strong {
        color: var(--error);
    }

.table-expenses tbody tr:hover {
    background: var(--bg-secondary);
}

.table-expenses tfoot tr {
    background: var(--bg-secondary);
    font-weight: 600;
}

.table-expenses tfoot td {
    padding: 1rem;
    border-top: 2px solid var(--border);
}

.table-expenses .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

    .table-expenses .badge i {
        font-size: 0.85rem;
    }

/* Responsive Tables */
@media (max-width: 1024px) {
    .table-container {
        overflow-x: auto;
    }

    .table-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .table-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Table */

.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

    .table thead {
        background-color: var(--bg-secondary);
    }

    .table th,
    .table td {
        padding: 1rem;
        text-align: left;
    }

    .table th {
        font-weight: 600;
        color: var(--text-primary);
    }

    .table tbody tr {
        border-bottom: 1px solid var(--border);
    }

        .table tbody tr:hover {
            background-color: var(--bg-secondary);
        }

/* Filtered List by Category */
.filtered-list-container {
    background: var(--card-bg);
    border-radius: 12px;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .filter-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: rgba(79, 70, 229, 0.05);
    }

    .filter-btn.active {
        border-color: var(--primary);
        background: var(--primary);
        color: white;
    }

/* Header da Lista Filtrada - Selecionar Todos */
.filtered-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #f0f4f8;
    border-radius: 10px 10px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    margin-bottom: 0;
    gap: 1rem;
}

.select-all-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
}

.select-all-label:hover {
    color: #325bb3;
}

/* Botão para gerar QR Code */
.btn-generate-qr {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    white-space: nowrap;
}

.btn-generate-qr:hover {
    color:white;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

.btn-generate-qr:active {
    transform: translateY(0);
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .filtered-header {
        flex-wrap: wrap;
    }

    .btn-generate-qr {
        width: 100%;
        justify-content: center;
    }
}

.filtered-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filtered-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

    .filtered-item:hover {
        border-color: #325bb3;
        background: #f8fafc;
        box-shadow: 0 4px 12px rgba(50, 91, 179, 0.12);
        transform: translateY(-2px);
    }

    .filtered-item.selected {
        background: #f0f4f8;
        border-color: #325bb3;
        box-shadow: 0 4px 12px rgba(50, 91, 179, 0.15);
    }

    .filtered-item .item-checkbox {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .filtered-item .item-checkbox .form-checkbox {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: #325bb3;
    }

    .filtered-item .item-icon {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #325bb3 0%, #4a73c9 100%);
        border-radius: 10px;
        font-size: 1.5rem;
        color: #ffffff;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(50, 91, 179, 0.25);
    }

    .filtered-item .item-content {
        flex: 1;
        min-width: 0;
    }

        .filtered-item .item-content h4 {
            margin: 0 0 0.25rem 0;
            font-size: 1rem;
            font-weight: 600;
            color: #1e293b;
        }

        .filtered-item .item-content p {
            margin: 0 0 0.5rem 0;
            font-size: 0.9rem;
            color: #64748b;
            line-height: 1.5;
        }

    .filtered-item .item-meta {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .filtered-item .item-date {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.85rem;
        color: #94a3b8;
        font-weight: 500;
    }

    .item-prices {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .item-prices-empty {
        margin-top: 0.75rem;
        font-size: 0.85rem;
        color: #94a3b8;
    }

.filtered-totals {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #325bb3 0%, #4a73c9 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(50, 91, 179, 0.2);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.total-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

    .total-item:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
    }

    .total-item strong {
        font-size: 0.875rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .total-item span {
        font-size: 1.5rem;
        font-weight: 700;
        color: #ffffff;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .total-item .text-primary {
        color: #ffffff !important;
    }

    .total-item .text-success {
        color: #ffffff !important;
    }

    .total-item .text-danger {
        color: #ffffff !important;
    }

    .total-item .text-info {
        color: #ffffff !important;
    }


    /* Ações dentro do card */
.item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    outline: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: .2s;
    color: white;
}

.action-btn i {
    pointer-events: none;
}

/* Cores */
.action-btn.info { background: #0ea5e9; }
.action-btn.success {background: #22c55e;}
.action-btn.primary { background: #4f46e5; }
.action-btn.danger { background: #ef4444; }
.action-btn.warning { background: #f59e0b; }

.action-btn:hover { opacity: 0.85; }

/* Melhor responsividade */
@media (max-width: 480px) {
    .item-actions {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
}

/* ─── Botão ⋮ e wrapper do dropdown ─── */
.item-actions-wrapper {
    display: inline-flex;
    position: relative;
    z-index: 10;
    align-items: center;
}
.action-btn-more {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    background: transparent;
    flex-shrink: 0;
    font-size: 1.15rem;
}
.action-btn-more:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
}

/* Item de menu perigoso (excluir) */
.mud-menu-item.menu-item-danger {
    color: var(--error) !important;
}
[data-theme="dark"] .mud-menu-item.menu-item-danger {
    color: #f87171 !important;
}

/* ─── Consistência de espaçamento nas listagens ─── */
.component-group {
    padding-left: 1rem;
    padding-right: 1rem;
    margin-bottom: 1rem;
}
.filtered-items {
    gap: 0.75rem;
}
.filtered-item {
    padding: 1rem 1.25rem;
}
.filtered-item .item-content p {
    margin-bottom: 0.5rem;
}
.item-meta {
    gap: 0.5rem;
}

/* Mobile: itens mais compactos */
@media (max-width: 600px) {
    .filtered-item {
        padding: 0.75rem;
        gap: 0.65rem;
    }
    .filtered-item .item-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 8px;
    }
    .filtered-item .item-content h4 {
        font-size: 0.9rem;
    }
    .filtered-item .item-meta {
        gap: 0.4rem;
    }
    .filtered-item .item-content p {
        font-size: 0.8rem;
    }
    .badge-mono {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }
    .action-btn-more {
        width: 32px;
        height: 32px;
    }
    .component-group {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Range Slider */
.form-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
    cursor: pointer;
    accent-color: var(--primary);
}

/* File Input */
.form-file {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
}

    .form-file::file-selector-button {
        padding: 0.5rem 1rem;
        margin-right: 1rem;
        border: none;
        border-radius: 4px;
        background-color: var(--primary);
        color: white;
        cursor: pointer;
        font-size: 0.9rem;
        transition: background-color 0.2s;
    }

        .form-file::file-selector-button:hover {
            background-color: #4338CA;
        }

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    margin-bottom: 2rem;
    border-top: 1px solid var(--border);
}

/* ===========================
   FORECAST (PREVIS�O) STYLES
   =========================== */

.forecast-container {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-top: 1rem;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

/* Header Section */
.forecast-header {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1rem;
}


.forecast-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.header-titles {
    flex: 1;
}

.forecast-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
}

.forecast-subtitle {
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
    opacity: 0.9;
}

.forecast-summary {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 1rem 0 0 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

    .forecast-summary i {
        font-size: 1.25rem;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.loading-indicator-forecast {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

    .btn-clear:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-2px);
    }

/* Section Styling */
.forecast-section {
    background: var(--surface-subtle);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.forecast-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .forecast-section-title i {
        color: var(--primary);
        font-size: 1.5rem;
    }

.forecast-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.forecast-section-head .forecast-section-title {
    margin: 0;
}

.recipe-search-desktop {
    min-width: 260px;
    width: 340px;
}

/* Recipe Collection */
.recipe-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.recipe-carousel {
    display: block;
    width: 100%;
}

.recipe-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.35rem 0.2rem 0.6rem;
    scrollbar-width: thin;
    min-height: 180px;
}

.recipe-carousel .recipe-carousel-item {
    min-width: 240px;
    max-width: 240px;
    width: 240px;
    flex: 0 0 240px;
    scroll-snap-align: start;
    display: block;
}

@media (min-width: 769px) {
    .forecast-section .recipe-selector-mobile {
        display: none !important;
    }

    .forecast-section .recipe-carousel {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .forecast-section .recipe-carousel-track {
        display: flex !important;
    }

    .forecast-section .recipe-carousel .recipe-carousel-item {
        display: block !important;
        flex: 0 0 240px !important;
    }
}

.recipe-carousel-track::-webkit-scrollbar {
    height: 7px;
}

.recipe-carousel-track::-webkit-scrollbar-track {
    background: #eef2f7;
    border-radius: 4px;
}

.recipe-carousel-track::-webkit-scrollbar-thumb {
    background: #c5cedd;
    border-radius: 4px;
}

.recipe-forecast-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

    .recipe-forecast-card:hover {
        transform: translateY(-4px);
    }

.recipe-forecast-border {
    background: white;
    border: 1px solid #dde4ef;
    border-radius: 10px;
    padding: 0.55rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.recipe-forecast-card.active .recipe-forecast-border {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f6f8ff 0%, #ffffff 100%);
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.15);
}

.recipe-forecast-content {
    text-align: center;
}

.recipe-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 0.55rem;
}

.recipe-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.selection-indicator {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.recipe-forecast-card.active .selection-indicator {
    color: var(--primary);
}

.recipe-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.55rem 0;
}

.recipe-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.55rem;
}

.recipe-info-item {
    font-size: 0.72rem;
    color: #6b7280;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

    .recipe-info-item i {
        color: var(--primary);
    }

.recipe-value-badge {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 8px;
    padding: 0.3rem 0.45rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.value-label {
    font-size: 0.68rem;
    color: #6b7280;
    font-weight: 500;
}

.value-amount {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
}

/* Empty State */
.recipe-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #9ca3af;
    margin: 0 auto 1rem;
}

.recipe-empty-state h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.recipe-empty-state p {
    color: #6b7280;
    margin: 0;
}

/* Quantity Input */
.quantity-input-container {
    background: white;
    border-radius: 12px;
    padding: 0.8rem;
}

.compact-title {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.quantity-input-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    align-items: end;
}

.input-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.82rem;
}

.quantity-input {
    padding: 0.65rem 0.75rem;
    border: 1px solid #dbe3f0;
    border-radius: 8px;
    font-size: 0.92rem;
    transition: all 0.3s ease;
    background: white;
}

    .quantity-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

.btn-forecast {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.66rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

    .btn-forecast:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
    }

/* Forecast Results */
.forecast-results {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.forecast-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #ecfdf3;
    color: #15803d;
    font-weight: 700;
    font-size: 0.95rem;
}

.summary-caption {
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 500;
}

.results-grid-forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.forecast-single-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #64748b;
    border-radius: 10px;
    padding: 0.8rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.single-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    border-bottom: 1px dashed #e5e7eb;
    padding-bottom: 0.55rem;
}

.single-card-label {
    margin: 0;
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 600;
}

.single-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.single-metric {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.single-metric-k {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

.single-metric-v {
    font-size: 0.94rem;
    color: #111827;
}

.single-metric-sub {
    font-size: 0.74rem;
    color: #6b7280;
}

.single-card-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.forecast-result-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

    .forecast-result-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }

.card-status {
    border-left: 4px solid #10b981;
}

.card-quantity {
    border-left: 4px solid #3b82f6;
}

.card-cost {
    border-left: 4px solid #f59e0b;
}

.card-summary {
    border-left: 4px solid #8b5cf6;
}

.forecast-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: #eef2ff;
    color: #4f46e5;
}

.card-icon.status { background: #ecfdf3; color: #10b981; }
.card-icon.quantity { background: #eff6ff; color: #2563eb; }
.card-icon.cost { background: #fffbeb; color: #d97706; }
.card-icon.summary { background: #f5f3ff; color: #7c3aed; }

.forecast-card-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.forecast-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #10b981;
    margin: 0;
}

.status-text.text-success {
    color: #10b981;
}

.status-text.text-warning {
    color: #f59e0b;
}

.status-text.text-danger {
    color: #ef4444;
}


.percentage-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.quantity-max {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.quantity-requested {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

    .quantity-requested span {
        font-weight: 600;
        color: var(--text-primary);
    }

.cost-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Summary Items */
.summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.45rem;
    border-radius: 6px;
    font-size: 0.82rem;
}

.summary-ok {
    background: #f0fdf4;
    color: #10b981;
}

    .summary-ok i {
        color: #10b981;
    }

.summary-partial {
    background: #fffbeb;
    color: #f59e0b;
}

    .summary-partial i {
        color: #f59e0b;
    }

.summary-missing {
    background: #fef2f2;
    color: #ef4444;
}

    .summary-missing i {
        color: #ef4444;
    }

/* Ingredients Panel */
.ingredients-panel {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.ingredients-panel::-webkit-scrollbar {
    width: 7px;
}

.ingredients-panel::-webkit-scrollbar-track {
    background: #eef2f7;
    border-radius: 4px;
}

.ingredients-panel::-webkit-scrollbar-thumb {
    background: #c5cedd;
    border-radius: 4px;
}

.ingredient-forecast-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.55rem;
    transition: all 0.3s ease;
}

    .ingredient-forecast-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        border-color: var(--primary);
    }

.ingredient-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #f3f4f6;
}

.ingredient-code {
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ingredient-status {
    padding: 0.22rem 0.48rem;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-ok {
    background: #f0fdf4;
    color: #10b981;
}

.status-partial {
    background: #fffbeb;
    color: #f59e0b;
}

.status-missing {
    background: #fef2f2;
    color: #ef4444;
}

.ingredient-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.45rem 0;
}

/* Info Grid */
.ingredient-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.info-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.38rem;
    transition: all 0.3s ease;
}

    .info-card:hover {
        background: #f3f4f6;
        border-color: var(--primary);
    }

.info-card-full {
    grid-column: auto;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.3rem;
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 600;
}

    .info-card-header i {
        font-size: 0.85rem;
        color: var(--primary);
    }

.info-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.info-label {
    font-size: 0.66rem;
    color: #6b7280;
    margin: 0;
}

    .info-label strong {
        color: var(--text-primary);
    }

/* Ingredient Alert */
.ingredient-alert {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.alert-danger {
    background: #fef2f2;
    border-color: #f87171;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

    .alert-content i {
        font-size: 1.25rem;
        color: #f59e0b;
    }

.alert-danger .alert-content i {
    color: #ef4444;
}

.alert-content span {
    font-size: 0.95rem;
    font-weight: 500;
    color: #92400e;
}

.alert-danger .alert-content span {
    color: #991b1b;
}

.btn-buy {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

    .btn-buy:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    }

.btn-buy-urgent {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

    .btn-buy-urgent:hover {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }

/* Forecast Footer Buttons */
.forecast-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-forecast-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

    .btn-forecast-header.primary {
        background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
        color: white;
    }

        .btn-forecast-header.primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
        }

    .btn-forecast-header.secondary {
        background: #f3f4f6;
        color: #374151;
        border: 1px solid #e5e7eb;
    }

        .btn-forecast-header.secondary:hover {
            background: #e5e7eb;
            transform: translateY(-2px);
        }

    .btn-forecast-header.info {
        background: #dbeafe;
        color: #1e40af;
    }

        .btn-forecast-header.info:hover {
            background: #bfdbfe;
            transform: translateY(-2px);
        }

.ingredients-empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon-wrapper {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #9ca3af;
    margin: 0 auto 1.5rem;
}

.ingredients-empty-state h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.ingredients-empty-state p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}

.btn-start-analysis {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-start-analysis:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
    }

/* Responsive Design */
@media (max-width: 1024px) {
    .results-grid-forecast {
        grid-template-columns: repeat(2, 1fr);
    }

    .recipe-collection {
        grid-template-columns: repeat(2, 1fr);
    }

    .recipe-carousel .recipe-carousel-item {
        min-width: 220px;
        max-width: 220px;
        width: 220px;
        flex: 0 0 220px;
    }

    .ingredient-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .info-card-full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .forecast-container {
        padding: 1.25rem;
    }

    .forecast-header {
        padding: 1.25rem;
    }

    .forecast-header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .forecast-title {
        font-size: 1.4rem;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .forecast-results {
        padding: 1rem;
        border-radius: 10px;
    }

    .results-grid-forecast {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .forecast-result-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .forecast-card-header {
        gap: 0.6rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .card-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
    }

    .status-text {
        font-size: 1.1rem;
    }

    .quantity-max,
    .cost-value {
        font-size: 1.3rem;
    }

    .forecast-summary {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 0.6rem 0.8rem;
    }

    .single-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .single-card-metrics {
        grid-template-columns: 1fr;
    }

    .single-card-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-chip {
        font-size: 0.9rem;
    }

    .summary-caption {
        font-size: 0.85rem;
    }

    .recipe-selector-mobile {
        display: block;
    }

    .recipe-search-desktop {
        display: none;
    }

    .recipe-collection,
    .recipe-carousel,
    .recipe-selector {
        display: none;
    }

    .quantity-input-grid {
        grid-template-columns: 1fr;
    }

    .btn-forecast {
        width: 100%;
        justify-content: center;
    }

    .ingredient-info-grid {
        grid-template-columns: 1fr;
    }

    .ingredient-forecast-card {
        padding: 0.7rem;
        border-radius: 10px;
        gap: 0.4rem;
    }

    .ingredient-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .ingredient-title {
        margin-bottom: 0.5rem;
    }

    .ingredients-panel {
        max-height: 420px;
        overflow-y: auto;
        padding-right: 0.35rem;
    }

    .ingredients-panel::-webkit-scrollbar {
        width: 6px;
    }

    .ingredients-panel::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 3px;
    }

    .ingredients-panel::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 3px;
    }

    .ingredient-alert {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-buy {
        width: 100%;
        justify-content: center;
    }

    .forecast-footer {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .btn-forecast-footer {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .forecast-section {
        padding: 0.75rem;
    }

    .forecast-section-title {
        font-size: 1.05rem;
    }

    .forecast-result-card {
        padding: 0.85rem;
    }

    .card-icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .status-text,
    .quantity-max,
    .cost-value {
        font-size: 1.15rem;
    }

    .percentage-text,
    .quantity-requested {
        font-size: 0.85rem;
    }

    .summary-item {
        padding: 0.4rem;
        font-size: 0.85rem;
    }

    .summary-chip {
        padding: 0.3rem 0.55rem;
    }

    .ingredient-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ===========================
   RECONNECT MODAL STYLES
   ======================================== */

.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}


#components-reconnect-modal {
    background-color: var(--surface, #ffffff);
    width: min(90vw, 420px);
    margin: 12vh auto;
    padding: 1.5rem;
    border: 1px solid var(--border-color, #e1e5eb);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
    backdrop-filter: blur(4px);
}

#components-reconnect-modal[open] {
    animation: components-reconnect-modal-slideUp 1.1s cubic-bezier(.05, .89, .25, 1.02) 0.2s, components-reconnect-modal-fadeInOpacity 0.4s ease-in-out 0.2s;
    animation-fill-mode: both;
}

#components-reconnect-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--text-primary, #1f2933);
}

.components-reconnect-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.08), rgba(0, 148, 255, 0.12));
    border: 1px solid var(--border-color, #e1e5eb);
}

.components-reconnect-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary, #0d6efd), var(--primary-dark, #0a58ca));
    color: #fff;
    font-size: 1.35rem;
}

.components-reconnect-title {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary, #1f2933);
}

.components-reconnect-subtitle {
    color: var(--text-secondary, #6b7280);
}

#components-reconnect-modal p {
    margin: 0;
    text-align: center;
}

.components-reconnect-text {
    color: var(--text-secondary, #4b5563);
    line-height: 1.5;
    padding: 0 0.25rem;
}

#components-reconnect-modal button.components-reconnect-button {
    border: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary, #0d6efd), var(--primary-dark, #0a58ca));
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 28px rgba(0, 118, 255, 0.25);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

#components-reconnect-modal button.components-reconnect-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(0, 118, 255, 0.3);
}

#components-reconnect-modal button.components-reconnect-button:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.components-rejoining-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.components-rejoining-animation div {
    position: absolute;
    border: 3px solid var(--primary, #0d6efd);
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes components-rejoining-animation {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

@media (max-width: 480px) {
    #components-reconnect-modal {
        margin: 8vh auto;
        padding: 1.25rem;
        width: min(94vw, 420px);
    }

    .components-reconnect-header {
        align-items: flex-start;
    }

    .components-reconnect-title {
        font-size: 1rem;
    }

    #components-reconnect-modal button.components-reconnect-button {
        padding: 12px 14px;
    }
}

/* Container da pesquisa */
.search-container {
    margin-bottom: 1rem;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

/* Wrapper do input e ícones */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Ícone de pesquisa à esquerda */
.search-input-wrapper i.bi-search {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
}

/* Input de pesquisa */
.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: #325bb3;
    box-shadow: 0 0 0 3px rgba(50, 91, 179, 0.1);
    background: var(--bg-secondary);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Filtro select (consistente com search-input) */
.filter-select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    height: 47px;
    padding: 0 0.85rem;
    transition: border-color 0.12s;
    outline: none;
    cursor: pointer;
}
.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(50, 91, 179, 0.1);
}

/* Botão de limpar (X) */
.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
    width: 24px;
    height: 24px;
    padding: 0;
}

.search-clear:hover {
    color: #325bb3;
    transform: translateY(-50%) scale(1.15);
}

.search-clear:active {
    transform: translateY(-50%) scale(0.95);
}

/* Value Cards Styling */
.value-card {
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.value-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

.value-card-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.value-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.total-card .value-card-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.fatia-card .value-card-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.value-card-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.value-card-label {
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.value-card-amount {
  font-weight: 700;
  color: var(--text-primary);
}

.total-card {
  border-left: 4px solid #667eea;
}

.fatia-card {
  border-left: 4px solid #f5576c;
}

@media (max-width: 768px) {
  .form-container { padding: 1rem; }
  .form-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  
  .value-card-content {
    gap: 1rem;
  }
  
  .value-card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .value-card-amount {
    font-size: 1.5rem !important;
  }
}

/* Sobre Page Styles */
.sobre-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.sobre-section {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.sobre-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #325bb3 0%, #3B82F6 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sobre-section:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #3B82F6;
}

.sobre-section:hover::before {
    transform: scaleX(1);
}

.sobre-section h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #325bb3;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sobre-section h1::before {
    content: '';
    width: 4px;
    height: 32px;
    background: linear-gradient(180deg, #325bb3 0%, #3B82F6 100%);
    border-radius: 2px;
}

.sobre-section h2 {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sobre-section h2::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, #325bb3 0%, #3B82F6 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

.sobre-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: #6b7280;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.sobre-section p strong {
    color: #325bb3;
    font-weight: 600;
}

.sobre-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

.sobre-section li {
    font-size: 1rem;
    line-height: 1.7;
    color: #6b7280;
    margin-bottom: 0.85rem;
    padding-left: 2.25rem;
    position: relative;
    transition: all 0.3s ease;
}

.sobre-section li:hover {
    color: #325bb3;
    padding-left: 2.5rem;
}

.sobre-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #10B981;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Sobre Page Responsive */
@media (max-width: 768px) {
    .sobre-container {
        padding: 1rem;
    }

    .sobre-section {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }

    .sobre-section h1 {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .sobre-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .sobre-section p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .sobre-section li {
        font-size: 0.95rem;
        padding-left: 2rem;
    }

    .sobre-section li::before {
        width: 18px;
        height: 18px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .sobre-container {
        padding: 0.5rem;
    }

    .sobre-section {
        padding: 1.5rem 1.25rem;
        margin-bottom: 1.25rem;
    }

    .sobre-section h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .sobre-section h1::before {
        height: 28px;
    }

    .sobre-section h2 {
        font-size: 1.2rem;
        margin-bottom: 0.85rem;
        gap: 0.5rem;
    }

    .sobre-section p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 0.85rem;
    }

    .sobre-section li {
        font-size: 0.9rem;
        padding-left: 1.75rem;
        margin-bottom: 0.7rem;
    }

    .sobre-section li::before {
        width: 18px;
        height: 18px;
        font-size: 0.75rem;
    }
}

.dashboard-shell {
    --tone-bg: linear-gradient(135deg, #173d7a 0%, #245ca6 50%, #2d88cc 100%);
    --tone-glass: rgba(255, 255, 255, 0.16);
    --tone-border: rgba(255, 255, 255, 0.24);
    --text-strong: #0f1f39;
    --text-soft: #51627f;
}

.hero-wrap {
    margin-top: 0;
}

.hero-card {
    position: relative;
    overflow: hidden;
    background: var(--tone-bg);
    border-radius: 16px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 16px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(22, 66, 130, 0.15);
}

.hero-card::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -90px;
    right: -80px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-tag {
    margin: 0;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
}

.hero-content h2 {
    margin: 4px 0 3px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    margin: 0;
    opacity: 0.92;
}

.hero-kpis {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero-kpi {
    background: var(--tone-glass);
    border: 1px solid var(--tone-border);
    border-radius: 12px;
    padding: 10px;
}

.hero-kpi small {
    display: block;
    font-size: 0.72rem;
    opacity: 0.9;
}

.hero-kpi strong {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-balance {
    position: relative;
    z-index: 1;
    background: rgba(11, 26, 54, 0.25);
    border: 1px solid var(--tone-border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-balance-label {
    margin: 0;
    opacity: 0.85;
    font-size: 0.85rem;
}

.hero-balance h3 {
    margin: 6px 0;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.1;
}

.hero-balance-chip {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 10px;
}

.saldo-ok {
    background: rgba(30, 206, 125, 0.2);
    color: #d7ffec;
}

.saldo-alerta {
    background: rgba(255, 114, 94, 0.22);
    color: #ffe8e5;
}

.saldo-neutro {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e7edf6;
    border-radius: 12px;
    padding: 12px;
    min-height: 72px;
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

.kpi-clientes { background: #e8f3ff; color: #1b67be; }
.kpi-produtos { background: #eafbf0; color: #159a56; }
.kpi-receitas { background: #fff4e8; color: #c57421; }
.kpi-ingredientes { background: #efe9ff; color: #6a4dc9; }
.kpi-despesas { background: #ffecec; color: #c23939; }

.kpi-label {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.82rem;
}

.kpi-value {
    margin: 2px 0 0;
    color: var(--text-strong);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.finance-card {
    border-radius: 16px;
    padding: 18px;
    border: 1px solid #e8edf4;
    background: #fff;
    height: 100%;
}

.finance-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #51627f;
    font-weight: 600;
    font-size: 0.95rem;
}

.finance-card h3 {
    margin: 10px 0 4px;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
}

.finance-card p {
    margin: 0;
    color: #6e7f99;
}

.finance-card.despesa {
    border-left: 6px solid #ea6363;
}

.finance-card.produto {
    border-left: 6px solid #28aa68;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-meta {
    color: #6b7b95;
    font-size: 0.8rem;
    background: #eef3fb;
    border-radius: 5px;
    padding: 4px 10px;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-secondary);
    opacity: 0.45;
}

.empty-state h3 {
    margin-top: 0.8rem;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-secondary);
}

@media (max-width: 992px) {
    .hero-card {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .hero-aside {
        justify-content: flex-start;
    }

    .hero-content h2 {
        font-size: 1.35rem;
    }

    .hero-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-balance h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 600px) {
    .kpi-card {
        min-height: 78px;
        padding: 12px;
    }

    .kpi-value {
        font-size: 1.15rem;
    }

    .finance-card h3 {
        font-size: 1.35rem;
    }
}

/* ══════════════════════════════════════════════════════
   DARK MODE OVERRIDES — custom HTML/CSS components
   ══════════════════════════════════════════════════════ */

/* Dashboard shell local vars */
[data-theme="dark"] .dashboard-shell {
    --text-strong: #F3F4F6;
    --text-soft:   #9CA3AF;
}

/* Auth / Login */
[data-theme="dark"] .login-split-layout {
    background: var(--card-bg);
    box-shadow: 0 2px 8px var(--shadow);
}
[data-theme="dark"] .auth-wrapper {
    background-color: var(--background-color);
}
[data-theme="dark"] .login-split-form h3 {
    color: var(--text-primary);
}
[data-theme="dark"] .login-split-form .subtitle {
    color: var(--text-secondary);
}

/* Registration (NovaConta) */
[data-theme="dark"] .nc-step-dot {
    background: var(--card-bg);
    border-color: var(--border);
    color: var(--text-secondary);
}
[data-theme="dark"] .nc-step-line {
    background: var(--border);
}
[data-theme="dark"] .nc-step.completed .nc-step-label {
    color: var(--text-secondary);
}
[data-theme="dark"] .nc-switch-group {
    background: var(--surface-subtle);
    border-color: var(--border);
}
[data-theme="dark"] .nc-switch-label {
    color: var(--text-primary);
}
[data-theme="dark"] .nc-summary {
    background: var(--surface-subtle);
    border-color: var(--border);
}
[data-theme="dark"] .nc-summary-label {
    color: var(--text-secondary);
}
[data-theme="dark"] .nc-summary-value {
    color: var(--text-primary);
}
[data-theme="dark"] .nc-terms-label {
    color: var(--text-secondary);
}
[data-theme="dark"] .nc-btn-back {
    background: var(--card-bg);
    border-color: var(--border);
    color: var(--text-secondary);
}
[data-theme="dark"] .nc-btn-back:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

/* Cost preview */
[data-theme="dark"] .cost-preview {
    background: var(--surface-subtle);
}

/* Home Dashboard — KPI cards */
[data-theme="dark"] .kpi-card {
    background: var(--card-bg);
    border-color: var(--border);
}
[data-theme="dark"] .finance-card {
    background: var(--card-bg);
    border-color: var(--border);
}
[data-theme="dark"] .finance-card-head {
    color: var(--text-secondary);
}
[data-theme="dark"] .finance-card p {
    color: var(--text-secondary);
}
[data-theme="dark"] .section-meta {
    background: var(--surface-subtle);
    color: var(--text-secondary);
}

/* Home — filtered list items */
[data-theme="dark"] .filtered-item {
    background: var(--card-bg);
    border-color: var(--border);
}
[data-theme="dark"] .filtered-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
}
[data-theme="dark"] .filtered-item.selected {
    background: var(--bg-secondary);
}
[data-theme="dark"] .filtered-item .item-content h4 {
    color: var(--text-primary);
}
[data-theme="dark"] .filtered-item .item-content p {
    color: var(--text-secondary);
}
[data-theme="dark"] .filtered-item .item-date {
    color: var(--text-secondary);
}

/* Recipe forecast cards */
[data-theme="dark"] .recipe-forecast-border {
    background: var(--card-bg);
    border-color: var(--border);
}
[data-theme="dark"] .recipe-forecast-card.active .recipe-forecast-border {
    background: var(--bg-secondary);
    border-color: var(--primary);
}
[data-theme="dark"] .recipe-value-badge {
    background: var(--surface-subtle);
}
[data-theme="dark"] .value-label {
    color: var(--text-secondary);
}
[data-theme="dark"] .recipe-info-item {
    color: var(--text-secondary);
}
[data-theme="dark"] .selection-indicator {
    background: var(--card-bg);
    color: var(--border);
}
[data-theme="dark"] .recipe-carousel-track::-webkit-scrollbar-track {
    background: var(--surface-subtle);
}
[data-theme="dark"] .recipe-carousel-track::-webkit-scrollbar-thumb {
    background: var(--border);
}

/* Quantity input container */
[data-theme="dark"] .quantity-input-container {
    background: var(--card-bg);
}

/* Forecast results */
[data-theme="dark"] .forecast-results {
    background: var(--card-bg);
}
[data-theme="dark"] .forecast-summary {
    background: var(--surface-subtle);
    border-color: var(--border);
}
[data-theme="dark"] .summary-caption {
    color: var(--text-secondary);
}
[data-theme="dark"] .forecast-single-card {
    background: var(--card-bg);
    border-color: var(--border);
}
[data-theme="dark"] .single-card-head {
    border-bottom-color: var(--border);
}
[data-theme="dark"] .single-card-label {
    color: var(--text-secondary);
}
[data-theme="dark"] .single-metric {
    background: var(--surface-subtle);
    border-color: var(--border);
}
[data-theme="dark"] .single-metric-k {
    color: var(--text-secondary);
}
[data-theme="dark"] .single-metric-v {
    color: var(--text-primary);
}
[data-theme="dark"] .single-metric-sub {
    color: var(--text-secondary);
}
[data-theme="dark"] .forecast-result-card {
    background: var(--card-bg);
    border-color: var(--border);
}
[data-theme="dark"] .forecast-card-header {
    border-bottom-color: var(--border);
}
[data-theme="dark"] .percentage-text,
[data-theme="dark"] .quantity-requested {
    color: var(--text-secondary);
}
[data-theme="dark"] .forecast-footer {
    border-top-color: var(--border);
}
[data-theme="dark"] .btn-forecast-header.secondary {
    background: var(--surface-subtle);
    color: var(--text-primary);
    border-color: var(--border);
}
[data-theme="dark"] .btn-forecast-header.secondary:hover {
    background: var(--bg-secondary);
}

/* Ingredient cards */
[data-theme="dark"] .ingredient-forecast-card {
    background: var(--card-bg);
    border-color: var(--border);
}
[data-theme="dark"] .ingredient-header {
    border-bottom-color: var(--border);
}
[data-theme="dark"] .ingredient-code {
    background: var(--surface-subtle);
    color: var(--text-secondary);
}
[data-theme="dark"] .info-card {
    background: var(--surface-subtle);
    border-color: var(--border);
}
[data-theme="dark"] .info-card:hover {
    background: var(--bg-secondary);
}
[data-theme="dark"] .info-card-header {
    color: var(--text-secondary);
}
[data-theme="dark"] .info-label {
    color: var(--text-secondary);
}
[data-theme="dark"] .ingredients-panel::-webkit-scrollbar-track {
    background: var(--surface-subtle);
}
[data-theme="dark"] .ingredients-panel::-webkit-scrollbar-thumb {
    background: var(--border);
}
[data-theme="dark"] .empty-state-icon {
    background: var(--surface-subtle);
    color: var(--text-secondary);
}
[data-theme="dark"] .empty-icon-wrapper {
    background: var(--surface-subtle);
    color: var(--text-secondary);
}
[data-theme="dark"] .ingredients-empty-state p,
[data-theme="dark"] .recipe-empty-state p {
    color: var(--text-secondary);
}

/* ── Finanças Dark Mode ────────────────────────────────────────────────────── */
[data-theme="dark"] .financas-card-icon.entrada-icon { background: rgba(16,185,129,.15); }
[data-theme="dark"] .financas-card-icon.saida-icon { background: rgba(239,68,68,.15); }
[data-theme="dark"] .financas-card-icon.relatorio-icon { background: rgba(59,130,246,.15); }
[data-theme="dark"] .financas-card-icon.condicao-icon { background: rgba(99,102,241,.15); }
[data-theme="dark"] .financas-list-icon.entrada-icon { background: rgba(16,185,129,.15); }
[data-theme="dark"] .financas-list-icon.saida-icon { background: rgba(239,68,68,.15); }
[data-theme="dark"] .financas-selected-item { background: rgba(16,185,129,.15); }

/* ── DoceFinance Modal Overlay ──────────────────────────────────────────────── */
.df-overlay {
    align-items: center;
    animation: df-overlay-in .15s ease;
    background: rgba(0,0,0,.45);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 1rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1400;
}
@keyframes df-overlay-in { from { opacity: 0; } to { opacity: 1; } }

.df-modal {
    animation: df-modal-in .18s ease;
    background: var(--bg-card, #fff);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3rem);
    max-width: 560px;
    overflow: hidden;
    width: 100%;
}
@keyframes df-modal-in { from { opacity: 0; transform: scale(.95) translateY(-8px); } to { opacity: 1; transform: none; } }
.df-modal-sm { max-width: 440px; }
.df-modal-lg { max-width: 720px; }

.df-modal-head {
    align-items: center;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-shrink: 0;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}
.df-modal-head h5 {
    align-items: center;
    color: var(--text-primary, #111827);
    display: flex;
    font-size: 0.97rem;
    font-weight: 800;
    gap: 0.4rem;
    margin: 0;
}
.df-modal-close {
    align-items: center;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    display: flex;
    font-size: 1rem;
    height: 30px;
    justify-content: center;
    padding: 0;
    transition: background .15s, color .15s;
    width: 30px;
}
.df-modal-close:hover { background: var(--bg-secondary, #f3f4f6); color: var(--text-primary, #111827); }

[data-theme="dark"] .df-overlay { background: rgba(0,0,0,.7); }

.df-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}
.df-modal-foot {
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-shrink: 0;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 0.85rem 1.5rem;
}

/* ===== Locked content state ===== */
.content-locked .aprender-thumb img,
.content-locked .aprender-event-thumb img,
.content-locked .video-thumb img,
.content-locked img {
    filter: grayscale(1) opacity(0.5);
}

.content-locked .aprender-thumb,
.content-locked .aprender-event-thumb,
.content-locked .aprender-thumb-placeholder,
.content-locked .aprender-event-thumb-placeholder {
    filter: grayscale(1) opacity(0.5);
}

.lock-badge-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    pointer-events: none;
}

.launch-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 4px;
}

.btn-content-locked {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ===== APRENDER — Sub-Nav (desktop) ===== */
.aprender-subnav {
    display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-card, #fff); padding: 0 0.5rem;
}
.aprender-subnav::-webkit-scrollbar { display: none; }
.aprender-subnav-item {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.75rem 1rem; font-size: 0.85rem; font-weight: 600;
    color: var(--text-secondary, #6b7280); text-decoration: none;
    border-bottom: 2px solid transparent; white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.aprender-subnav-item:hover { color: var(--primary, #325bb3); }
.aprender-subnav-item.active {
    color: var(--primary, #325bb3);
    border-bottom-color: var(--primary, #325bb3);
}

/* ===== APRENDER — Bottom Nav (mobile only) ===== */
.aprender-bottom-nav { display: none; }

@media (max-width: 768px) {
    .aprender-bottom-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
        background: var(--bg-card, #fff);
        border-top: 1px solid var(--border-color, #e5e7eb);
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    }
    .aprender-subnav { display: none; }
    .aprender-page-body { padding-bottom: 72px; }
}
.aprender-bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 2px; font-size: 0.62rem; font-weight: 600;
    color: var(--text-secondary, #9ca3af); text-decoration: none;
}
.aprender-bn-item i { font-size: 1.1rem; }
.aprender-bn-item.active { color: var(--primary, #325bb3); }

/* ===== APRENDER — Mini Hero (páginas de listagem) ===== */
.aprender-page-hero {
    background: linear-gradient(135deg, var(--primary, #325bb3) 0%, #1e3a8a 100%);
    border-radius: 14px; color: #fff; padding: 1.5rem 1.75rem;
}
.aprender-page-hero h1 {
    color: #fff; font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 800; margin: 0 0 0.3rem;
}
.aprender-page-hero p { color: rgba(255,255,255,.8); font-size: 0.9rem; margin: 0; }

/* ===== APRENDER — Wide Card (vídeos e materiais) ===== */
.aprender-wide-list { display: flex; flex-direction: column; gap: 0.75rem; }
.aprender-wide-card {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--bg-card, #fff); border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px; padding: 0.9rem; text-decoration: none;
    transition: box-shadow .15s, border-color .15s;
}
.aprender-wide-card:hover {
    border-color: var(--primary, #325bb3);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.aprender-wide-thumb {
    width: 130px; flex-shrink: 0; aspect-ratio: 16/9;
    border-radius: 8px; overflow: hidden;
    background: #1e1e1e; position: relative;
}
.aprender-wide-thumb img { width: 100%; height: 100%; object-fit: cover; }
.aprender-wide-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: rgba(255,255,255,.3);
}
.aprender-wide-dur {
    position: absolute; bottom: 4px; right: 4px;
    background: rgba(0,0,0,.8); color: #fff;
    font-size: 0.62rem; font-weight: 700; border-radius: 3px; padding: 1px 5px;
}
.aprender-wide-info { flex: 1; min-width: 0; }
.aprender-wide-title {
    font-weight: 700; font-size: 0.9rem; color: var(--text-primary, #111827);
    margin: 0 0 0.3rem; line-height: 1.35;
}
.aprender-wide-desc {
    font-size: 0.78rem; color: var(--text-secondary, #6b7280);
    margin: 0 0 0.5rem; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; overflow: hidden;
}
.aprender-wide-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.aprender-wide-chip {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.68rem; font-weight: 700; border-radius: 5px; padding: 2px 7px;
}
.awc-cat  { background: rgba(99,102,241,.1); color: #6366f1; }
.awc-dur  { background: #f3f4f6; color: #6b7280; }
.awc-tipo { background: rgba(16,185,129,.1); color: #10b981; }

/* ===== APRENDER — Breadcrumb spacing ===== */
.ev-detalhe-breadcrumb { padding-top: 0.75rem; }
.vid-detalhe-breadcrumb { padding: 0.75rem 0 0.25rem; }

/* ===== APRENDER — Event card images ===== */
.ev-card-thumb img { height: 100%; object-fit: cover; width: 100%; display: block; }
.ev-banner img { height: 100%; object-fit: cover; width: 100%; display: block; }

@media (max-width: 480px) {
    .aprender-wide-thumb { width: 96px; }
    .aprender-wide-title { font-size: 0.82rem; }
    .aprender-wide-desc { -webkit-line-clamp: 1; }
}

/* ===================================================================
   APRENDER — Hub redesenhado (namespace .aph-*)
   =================================================================== */
.aph .component-group + .component-group { margin-top: 2rem; }

.aph-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
}

.aph-section-head h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary, #111827);
}

.aph-section-head a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary, #325bb3);
    text-decoration: none;
    white-space: nowrap;
}

    .aph-section-head a:hover { text-decoration: underline; }

/* ── Hero ── */
.aph-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 300px;
    border-radius: 20px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: var(--card-bg, #1e293b);
    text-decoration: none;
    border: 1px solid var(--border, #e5e7eb);
}

.aph-hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 15, 30, 0.92) 0%, rgba(10, 15, 30, 0.45) 45%, rgba(10, 15, 30, 0.1) 100%);
}

.aph-hero--plain {
    background: var(--gradient-brand, linear-gradient(135deg, #325bb3, #6366f1));
    min-height: 220px;
    align-items: center;
}

    .aph-hero--plain .aph-hero-scrim { display: none; }

.aph-hero-body {
    position: relative;
    z-index: 1;
    padding: 1.75rem;
    max-width: 640px;
    color: #fff;
}

.aph-hero-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--brand-pink, #ec5ba6);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.aph-hero-body h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 1.1rem + 2.2vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
}

.aph-hero-body p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.aph-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.1rem;
    padding: 10px 18px;
    border-radius: 12px;
    background: #fff;
    color: var(--primary, #325bb3);
    font-size: 0.88rem;
    font-weight: 700;
}

.aph-hero:hover .aph-hero-cta { background: #f1f5ff; }

/* ── Grelha de vídeos ── */
.aph-video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.aph-video-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    text-decoration: none;
    transition: box-shadow 0.15s, transform 0.15s;
}

    .aph-video-card:hover {
        box-shadow: 0 8px 22px var(--shadow, rgba(0, 0, 0, 0.1));
        transform: translateY(-2px);
    }

.aph-video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--surface-subtle, #f1f5f9);
    overflow: hidden;
}

    .aph-video-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

.aph-video-card:hover .aph-video-thumb img { transform: scale(1.05); }

.aph-video-thumb-ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    color: var(--text-secondary, #9ca3af);
}

.aph-video-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    color: #fff;
    background: rgba(10, 15, 30, 0.25);
    opacity: 0;
    transition: opacity 0.15s;
}

.aph-video-card:hover .aph-video-play { opacity: 1; }

.aph-video-dur {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(10, 15, 30, 0.82);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.aph-video-info {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .aph-video-info h3 {
        margin: 0;
        font-size: 0.9rem;
        font-weight: 600;
        line-height: 1.35;
        color: var(--text-primary, #111827);
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

.aph-video-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
}

/* ── Documentos ── */
.aph-doc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.aph-doc-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    background: var(--card-bg, #fff);
    text-decoration: none;
    transition: border-color 0.15s;
}

    .aph-doc-card:hover { border-color: var(--primary, #325bb3); }

.aph-doc-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

.aph-doc-icon.mat-pdf { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.aph-doc-icon.mat-doc { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.aph-doc-icon.mat-xls { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.aph-doc-icon.mat-gen { background: rgba(107, 114, 128, 0.12); color: #6b7280; }

.aph-doc-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .aph-doc-info h3 {
        margin: 0;
        font-size: 0.86rem;
        font-weight: 600;
        color: var(--text-primary, #111827);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .aph-doc-info span {
        font-size: 0.74rem;
        color: var(--text-secondary, #6b7280);
    }

.aph-doc-dl {
    flex-shrink: 0;
    color: var(--text-secondary, #9ca3af);
    font-size: 1rem;
}

.aph-doc-card:hover .aph-doc-dl { color: var(--primary, #325bb3); }

/* ── Eventos (bento) ── */
.aph-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.25rem;
}

.aph-event-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.25rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    background: var(--card-bg, #fff);
}

.aph-event-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.aph-event-date {
    width: 54px;
    border-radius: 10px;
    background: var(--surface-subtle, #f1f5f9);
    text-align: center;
    padding: 6px 0;
    line-height: 1.1;
}

    .aph-event-date span {
        display: block;
        font-size: 0.68rem;
        font-weight: 700;
        color: var(--text-secondary, #6b7280);
    }

    .aph-event-date strong {
        display: block;
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--primary, #325bb3);
    }

.aph-event-cert {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-pink, #ec5ba6);
    background: rgba(236, 91, 166, 0.1);
    border-radius: 999px;
    padding: 3px 9px;
}

.aph-event-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary, #111827);
}

.aph-event-meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    display: flex;
    align-items: center;
    gap: 6px;
}

.aph-event-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 0.5rem;
}

.aph-event-price {
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 10px;
}

.aph-event-price.free { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.aph-event-price.paid { background: rgba(99, 102, 241, 0.12); color: var(--brand-indigo, #6366f1); }

.aph-btn-sm {
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
}

/* ── Atualizações ── */
.aph-updates {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.aph-update {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: var(--card-bg, #fff);
    text-decoration: none;
    transition: border-color 0.15s;
}

    .aph-update:hover { border-color: var(--primary, #325bb3); }

.aph-update-tipo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
}

.aph-update-tipo.upd-func      { background: rgba(99, 102, 241, 0.12); color: var(--brand-indigo, #6366f1); }
.aph-update-tipo.upd-melhoria  { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.aph-update-tipo.upd-correcao  { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.aph-update-tipo.upd-seguranca { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

.aph-update-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .aph-update-info strong {
        font-size: 0.88rem;
        font-weight: 700;
        color: var(--text-primary, #111827);
    }

    .aph-update-info span {
        font-size: 0.75rem;
        color: var(--text-secondary, #6b7280);
    }

.aph-update-chevron {
    flex-shrink: 0;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.85rem;
}

/* ── Estado vazio ── */
.aph-empty-hub {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 3rem 2rem;
}

.aph-empty-main {
    text-align: center;
}

    .aph-empty-main i {
        display: block;
        font-size: 3rem;
        color: var(--primary, #325bb3);
        opacity: 0.4;
        margin-bottom: 1rem;
    }

    .aph-empty-main h2 {
        margin: 0 0 0.5rem;
        font-size: 1.25rem;
        color: var(--text-primary, #111827);
    }

    .aph-empty-main p {
        margin: 0 auto;
        max-width: 420px;
        color: var(--text-secondary, #6b7280);
    }

.aph-empty-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.aph-empty-action {
    align-items: center;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    color: var(--text-primary, #111827);
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: border-color .15s, background-color .15s;
}

    .aph-empty-action:hover {
        background: var(--bg-secondary, #f3f4f6);
        border-color: var(--primary, #325bb3);
    }

    .aph-empty-action i:first-child {
        color: var(--primary, #325bb3);
        flex-shrink: 0;
        font-size: 1.1rem;
        text-align: center;
        width: 20px;
    }

    .aph-empty-action span {
        flex: 1;
        font-size: 0.88rem;
        font-weight: 700;
    }

    .aph-empty-action-chevron {
        color: var(--text-secondary, #9ca3af);
        font-size: 0.8rem;
    }

@media (min-width: 900px) {
    .aph-empty-hub {
        align-items: center;
        flex-direction: row;
        padding: 3.5rem;
    }

    .aph-empty-main {
        flex: 1;
        text-align: left;
    }

        .aph-empty-main p {
            margin: 0;
        }

    .aph-empty-actions {
        flex-shrink: 0;
        width: 360px;
    }
}

@container layout (max-width: 1100px) {
    .aph-video-grid { grid-template-columns: repeat(2, 1fr); }
    .aph-doc-grid   { grid-template-columns: repeat(2, 1fr); }
}

@container layout (max-width: 640px) {
    .aph-video-grid,
    .aph-doc-grid { grid-template-columns: 1fr; }
    .aph-hero-body { padding: 1.25rem; }
}

/* Breadcrumbs Ultra-Minimalista & Profissional */
.wiz-breadcrumbs {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: system-ui, -apple-system, sans-serif;
}

    .wiz-breadcrumbs a,
    .breadcrumb-current {
        font-size: 0.825rem;
        letter-spacing: -0.01em;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    /* Links (Páginas Anteriores) */
    .wiz-breadcrumbs a {
        color: var(--text-secondary, #64748b);
        font-weight: 500;
    }

        .wiz-breadcrumbs a:hover {
            color: var(--primary, #325bb3);
        }

        /* Ícone de Voltar/Home */
        .wiz-breadcrumbs a i {
            font-size: 0.9rem;
            opacity: 0.8;
        }

/* Separador */
.breadcrumb-sep {
    color: var(--text-secondary, #cbd5e1);
    font-weight: 300;
    font-size: 0.75rem;
    user-select: none;
    opacity: 0.6;
}

/* Página Atual */
.breadcrumb-current {
    color: var(--text-primary, #111827);
    font-weight: 600;
    cursor: default;
}

/* Micro-ajuste para o hover */
.wiz-breadcrumbs a:hover i {
    transform: translateX(-2px);
}

/* Mobile */
@media (max-width: 640px) {
    .wiz-breadcrumbs {
        gap: 6px;
    }

        .wiz-breadcrumbs a,
        .breadcrumb-current {
            font-size: 0.775rem;
        }
}

.dashboard-shell {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 0;
}

.dashboard-item-full {
    grid-column: span 12;
}

.dashboard-item-third {
    grid-column: span 4;
}

.dashboard-item-twothirds {
    grid-column: span 8;
}

/* Checklist de onboarding: ocupa uma coluna como os .dashboard-item-third. */
.dashboard-shell .oc-grid-item {
    grid-column: span 4;
}

@container layout (max-width: 1100px) {
    .dashboard-item-third,
    .dashboard-shell .oc-grid-item {
        grid-column: span 6;
    }

    .dashboard-item-twothirds {
        grid-column: span 12;
    }

    /* Com duas colunas, o último card ocupa a linha inteira em vez de ficar solto */
    .dashboard-shell > .dashboard-item-third:last-child {
        grid-column: span 12;
    }
}

@container layout (max-width: 768px) {
    .dashboard-item-third,
    .dashboard-shell .oc-grid-item {
        grid-column: span 12;
    }
}

/* ─── Cabeçalho do dashboard ─── */
.dash-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.dash-header-text h1 {
    margin: 0;
    font-size: clamp(1.4rem, 1.1rem + 1.8vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary, #111827);
}

.dash-header-text p {
    margin: 4px 0 0;
    color: var(--text-secondary, #6B7280);
    font-size: 0.95rem;
}

.dash-header-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    color: var(--text-primary, #111827);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

    .dash-header-chip i { color: var(--text-secondary, #9CA3AF); }

/* ─── Linha de KPI cards ─── */
.dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.dash-kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--border, #e8edf4);
    border-radius: 16px;
    background: var(--card-bg, #fff);
}

.dash-kpi-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.dash-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    margin-bottom: 4px;
}

.dash-kpi-top .dash-kpi-icon { margin-bottom: 0; }

.dash-kpi-icon.kpi-in    { background: rgba(50, 91, 179, 0.12); color: var(--primary, #325bb3); }
.dash-kpi-icon.kpi-out   { background: rgba(236, 91, 166, 0.12); color: var(--brand-pink, #ec5ba6); }
.dash-kpi-icon.kpi-alert { background: rgba(239, 68, 68, 0.12); color: var(--error, #ef4444); }

.dash-kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.dash-kpi-trend.up   { color: var(--success, #10B981); background: rgba(16, 185, 129, 0.12); }
.dash-kpi-trend.down { color: var(--error, #ef4444);   background: rgba(239, 68, 68, 0.12); }

.dash-kpi-label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary, #6B7280);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-kpi-value {
    margin: 0;
    font-size: clamp(1rem, 0.85rem + 0.9vw, 1.25rem);
    font-weight: 700;
    color: var(--text-primary, #111827);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.dash-kpi-value.value-ok    { color: var(--success, #10B981); }
.dash-kpi-value.value-alert { color: var(--error, #ef4444); }

.dash-card-meta {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary, #9CA3AF);
}

/* ─── Próxima Encomenda (itemizada) ─── */
.next-order-grid {
    display: grid;
    grid-template-columns: 1fr minmax(180px, 240px);
    gap: 20px;
    flex: 1;
}

.next-order-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.next-order-top .next-order-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
}

.next-order-sub {
    font-size: 0.82rem;
    color: var(--text-secondary, #6B7280);
}

.next-order-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.next-order-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    padding: 10px 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background: var(--surface-subtle, #f8fafc);
    font-size: 0.86rem;
}

.next-order-item-qty {
    font-weight: 700;
    color: var(--primary, #325bb3);
    flex-shrink: 0;
    order: 1;
}

.next-order-item-name {
    color: var(--text-primary, #111827);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 100%;
    min-width: 0;
    order: 3;
}

.next-order-item-price {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-primary, #111827);
    flex-shrink: 0;
    order: 2;
}

.next-order-item-more {
    justify-content: center;
    color: var(--text-secondary, #6B7280);
    font-weight: 500;
    background: transparent;
    border-style: dashed;
}

.next-order-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.next-order-right .next-order-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-bottom: 4px;
}

    .next-order-right .next-order-value small {
        color: var(--text-secondary, #6B7280);
        font-size: 0.75rem;
    }

    .next-order-right .next-order-value strong {
        font-size: 1.35rem;
        color: var(--primary, #325bb3);
    }

.next-order-right .btn { width: 100%; }

@container layout (max-width: 640px) {
    .next-order-grid { grid-template-columns: 1fr; }
    .next-order-right .next-order-value { align-items: flex-start; }
}

/* ─── Doces Populares (lista com barras) ─── */
.populares-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    justify-content: center;
}

.populares-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.populares-row-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.populares-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.populares-name {
    color: var(--text-primary, #111827);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.populares-pct {
    margin-left: auto;
    font-weight: 700;
    color: var(--text-secondary, #6B7280);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.populares-track {
    height: 8px;
    border-radius: 999px;
    background: var(--surface-subtle, #f1f5f9);
    overflow: hidden;
}

.populares-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    min-width: 3px;
    transition: width 0.3s ease;
}

/* Secção "Novidade" ocupa a maior parte da largura; só encolhe para 1/3
   quando a dica de onboarding (.oc-grid-item) está presente na grelha. */
.dashboard-item-stock    { grid-column: span 4; }
.dashboard-item-novidade { grid-column: span 8; }

.dashboard-shell:has(.oc-grid-item) .dashboard-item-novidade {
    grid-column: span 4;
}

@container layout (max-width: 1100px) {
    .dashboard-item-stock,
    .dashboard-item-novidade,
    .dashboard-shell:has(.oc-grid-item) .dashboard-item-novidade {
        grid-column: span 6;
    }

    .dashboard-shell > .dashboard-item-novidade:last-child {
        grid-column: span 12;
    }
}

@container layout (max-width: 768px) {
    .dashboard-item-stock,
    .dashboard-item-novidade,
    .dashboard-shell:has(.oc-grid-item) .dashboard-item-novidade {
        grid-column: span 12;
    }
}

@media (max-width: 900px) {
    .dash-kpi-row {
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-auto-columns: minmax(160px, 52vw);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px 4px 24px;
        scroll-padding-left: 24px;
    }

    .dash-kpi {
        scroll-snap-align: start;
    }

    .dash-kpi-value {
        font-size: 1.05rem;
    }
}

[data-theme="dark"] .dash-kpi,
[data-theme="dark"] .dash-header-chip {
    background: var(--card-bg);
    border-color: var(--border);
}

[data-theme="dark"] .dash-kpi-icon.kpi-in    { background: rgba(77, 137, 255, 0.16); }
[data-theme="dark"] .dash-kpi-icon.kpi-out   { background: rgba(244, 114, 182, 0.16); }
[data-theme="dark"] .dash-kpi-icon.kpi-alert { background: rgba(248, 113, 113, 0.16); }

[data-theme="dark"] .dash-kpi-value,
[data-theme="dark"] .dash-header-text h1,
[data-theme="dark"] .next-order-item-name,
[data-theme="dark"] .next-order-item-price,
[data-theme="dark"] .populares-name { color: var(--text-primary); }

[data-theme="dark"] .dash-kpi-label,
[data-theme="dark"] .dash-header-text p { color: var(--text-secondary); }

[data-theme="dark"] .next-order-item {
    background: var(--surface-subtle);
    border-color: var(--border);
}

[data-theme="dark"] .populares-track { background: var(--surface-subtle); }

.money-safe {
    display: inline-block;
    max-width: 100%;
    line-height: 1.2;
    font-size: clamp(0.95rem, 1.5vw, 1.6rem);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dash-card {
    padding: 24px;
    border: 1px solid #e8edf4;
    border-radius: 16px;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dash-card-highlight {
    border-color: rgba(50, 91, 179, 0.35);
    box-shadow: 0 8px 28px rgba(50, 91, 179, 0.16);
    background: linear-gradient(160deg, #fff 55%, #eef3fd 100%);
    position: relative;
    overflow: hidden;
}

    .dash-card-highlight .dash-card-head {
        color: var(--primary, #325bb3);
    }

        .dash-card-highlight .dash-card-head i {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            display: grid;
            place-items: center;
            font-size: 0.95rem;
            background: linear-gradient(135deg, #325bb3, #6366f1);
            color: #fff;
        }

    .dash-card-highlight .next-order-value strong {
        color: var(--primary, #325bb3);
        font-size: 1.45rem;
    }

.dash-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #51627f;
    margin-bottom: 14px;
}

    .dash-card-head i {
        font-size: 1.1rem;
        color: var(--primary, #325bb3);
    }

    .dash-card-head .dash-card-link {
        margin-left: auto;
        font-size: 0.78rem;
        font-weight: 500;
        color: var(--primary, #325bb3);
        text-decoration: none;
    }

        .dash-card-head .dash-card-link:hover {
            text-decoration: underline;
        }

.dash-card-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    color: var(--text-secondary, #6B7280);
    font-size: 0.88rem;
    justify-content: center;
}

.dash-card-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary, #6B7280);
    gap: 8px;
}

    .dash-card-empty i {
        font-size: 2rem;
        opacity: 0.45;
    }

    .dash-card-empty p {
        margin: 0;
        font-size: 0.9rem;
    }

.next-order-body {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
}

.next-order-main {
    flex: 1;
    min-width: 0;
}

.next-order-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-strong, #111827);
    line-height: 1.3;
}

.next-order-client {
    margin: 2px 0 10px;
    font-size: 0.85rem;
    color: var(--text-secondary, #6B7280);
}

.next-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.next-order-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #374151;
}

    .next-order-meta-item i {
        font-size: 0.95rem;
        color: var(--primary, #325bb3);
    }

.next-order-value {
    text-align: right;
    flex-shrink: 0;
}

    .next-order-value small {
        display: block;
        font-size: 0.75rem;
        color: var(--text-secondary, #6B7280);
    }

    .next-order-value strong {
        display: block;
        font-size: 1.25rem;
        font-weight: 800;
        color: var(--text-strong, #111827);
        line-height: 1.2;
        white-space: nowrap;
    }

.next-order-action {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f3f8;
    display: flex;
    gap: 10px;
}

.dash-ver-btn {
    flex: 1;
    font-weight: 600;
    border-radius: 10px;
    padding: 8px 16px;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

    .dash-ver-btn i {
        font-size: 1rem;
    }

.dash-produzir-btn {
    flex: 1;
}

.dash-produzir-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    font-weight: 600;
    border-radius: 10px;
    padding: 8px 16px;
    min-height: 38px;
}

    .dash-produzir-btn i {
        font-size: 1rem;
        margin-right: 6px;
    }

.day-summary-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    justify-content: center;
}

.day-stat {
    display: flex;
    align-items: center;
    gap: 14px;
}

.day-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.day-orders {
    background: #e8f3ff;
    color: #1b67be;
}

.day-pending {
    background: #fff4e8;
    color: #c57421;
}

.day-money {
    background: #eafbf0;
    color: #159a56;
}

.day-stat-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

    .day-stat-info strong {
        font-size: 1.15rem;
        font-weight: 800;
        color: var(--text-strong, #111827);
        line-height: 1.2;
    }

    .day-stat-info small {
        font-size: 0.78rem;
        color: var(--text-secondary, #6B7280);
    }

.assistant-list {
    flex: 1;
}

.assistant-subtitle {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: var(--text-secondary, #6B7280);
}

.assistant-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text-primary, #111827);
}

.assistant-item-critical {
    background: #fef2f2;
}

.assistant-item + .assistant-item {
    border-top: 1px solid var(--border, #eef2f7);
}

.assistant-item i {
    color: #d97706;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.assistant-item-critical i {
    color: #dc2626;
}

.assistant-item-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.assistant-item-name {
    flex: 1;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}

.assistant-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-left: 12px;
    border-left: 1px solid var(--border, #e5e7eb);
}

.assistant-item-type {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--border, #e5e7eb);
    color: var(--text-secondary, #6b7280);
    flex-shrink: 0;
}

.assistant-item-stock {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary, #6b7280);
    flex-shrink: 0;
}

.assistant-item-stock-atual {
    color: #dc2626;
}

.novidade-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    flex: 1;
}

    .novidade-content:hover {
        background: #f8fafd;
    }

.novidade-tipo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.novidade-capa {
    width: 64px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color, #e5e7eb);
}

    .novidade-tipo.upd-func {
        background: #e8f3ff;
        color: #1b67be;
    }

    .novidade-tipo.upd-melhoria {
        background: #eafbf0;
        color: #159a56;
    }

    .novidade-tipo.upd-correcao {
        background: #fff4e8;
        color: #c57421;
    }

    .novidade-tipo.upd-seguranca {
        background: #ffecec;
        color: #c23939;
    }

.novidade-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

    .novidade-info strong {
        font-size: 0.92rem;
        font-weight: 700;
        color: var(--text-strong, #111827);
        line-height: 1.3;
    }

.novidade-meta {
    font-size: 0.78rem;
    color: var(--text-secondary, #6B7280);
}

.novidade-desc {
    margin: 4px 0 0;
    font-size: 0.83rem;
    color: #4b5563;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novidade-chevron {
    font-size: 0.9rem;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .dashboard-shell {
        padding: 0;
    }

    .dash-card {
        padding: 18px;
        border-radius: 12px;
    }

    .dash-card-head {
        font-size: 0.88rem;
        margin-bottom: 10px;
    }

    .next-order-value strong {
        font-size: 1.1rem;
    }

    .dash-card-highlight .next-order-value strong {
        font-size: 1.25rem;
    }

    .novidade-content {
        padding: 8px;
    }
}

@media (max-width: 600px) {
    .next-order-body {
        flex-direction: column;
        gap: 10px;
    }

    .next-order-value {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .next-order-value small {
            font-size: 0.8rem;
        }

        .next-order-value strong {
            font-size: 1.1rem;
        }

    .day-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .day-stat-info strong {
        font-size: 1.05rem;
    }
}


[data-theme="dark"] .dash-card {
    background: var(--card-bg);
    border-color: var(--border);
}

[data-theme="dark"] .dash-card-highlight {
    border-color: rgba(129, 140, 248, 0.35);
    box-shadow: 0 8px 28px rgba(129, 140, 248, 0.14);
    background: linear-gradient(160deg, #1E293B 55%, #23314f 100%);
}

    [data-theme="dark"] .dash-card-highlight .dash-card-head {
        color: var(--primary);
    }

        [data-theme="dark"] .dash-card-highlight .dash-card-head i {
            background: var(--gradient-brand);
            color: #fff;
        }

    [data-theme="dark"] .dash-card-highlight .next-order-value strong {
        color: var(--primary);
    }

[data-theme="dark"] .dash-card-head {
    color: var(--text-secondary);
}

    [data-theme="dark"] .dash-card-head i {
        color: var(--primary);
    }

[data-theme="dark"] .dash-card-link {
    color: var(--primary);
}

[data-theme="dark"] .next-order-name {
    color: var(--text-primary);
}

[data-theme="dark"] .next-order-client {
    color: var(--text-secondary);
}

[data-theme="dark"] .next-order-meta-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .next-order-value strong {
    color: var(--text-primary);
}

[data-theme="dark"] .next-order-action {
    border-top-color: var(--border);
}

[data-theme="dark"] .day-stat-info strong {
    color: var(--text-primary);
}

[data-theme="dark"] .day-orders {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .day-pending {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .day-money {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

[data-theme="dark"] .assistant-item {
    color: #d1d5db;
}

[data-theme="dark"] .assistant-item-critical {
    background: rgba(220, 38, 38, 0.12);
}

[data-theme="dark"] .assistant-item-stock-atual {
    color: #f87171;
}

[data-theme="dark"] .assistant-item-type {
    background: var(--border, #374151);
    color: var(--text-secondary, #9ca3af);
}

[data-theme="dark"] .novidade-content:hover {
    background: var(--surface-subtle, #1a2033);
}

[data-theme="dark"] .novidade-info strong {
    color: var(--text-primary, #F3F4F6);
}

[data-theme="dark"] .novidade-desc {
    color: #9ca3af;
}

[data-theme="dark"] .dash-card-empty {
    color: var(--text-secondary, #9CA3AF);
}

[data-theme="dark"] .dash-card-loading {
    color: var(--text-secondary, #9CA3AF);
}

.recentes-section {
    border-top: 1px solid #f0f3f8;
    padding-top: 10px;
    margin-top: 4px;
}

.recentes-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary, #6B7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding: 0 4px;
}

.recentes-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 4px 8px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
    -webkit-overflow-scrolling: touch;
}

    .recentes-scroll::-webkit-scrollbar {
        height: 4px;
    }

    .recentes-scroll::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }

.recente-card {
    flex: 0 0 160px;
    min-width: 0;
    border: 1px solid #e8edf4;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
}

    .recente-card:hover {
        border-color: var(--primary, #325bb3);
        box-shadow: 0 2px 8px rgba(50, 91, 179, 0.12);
    }

.recente-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
    background: #f3f4f6;
}

.recente-thumb-placeholder {
    width: 100%;
    height: 80px;
    display: grid;
    place-items: center;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 1.5rem;
}

.recente-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.recente-nome {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-strong, #111827);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recente-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-secondary, #6B7280);
}

.recente-tipo-badge {
    font-weight: 600;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    background: #e8f3ff;
    color: #1b67be;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.recente-data {
    white-space: nowrap;
}

[data-theme="dark"] .recentes-section {
    border-top-color: var(--border);
}

[data-theme="dark"] .recente-card {
    background: var(--card-bg);
    border-color: var(--border);
}

    [data-theme="dark"] .recente-card:hover {
        border-color: var(--primary);
        box-shadow: 0 2px 8px rgba(77, 137, 255, 0.18);
    }

[data-theme="dark"] .recente-thumb,
[data-theme="dark"] .recente-thumb-placeholder {
    background: var(--bg-secondary);
}

[data-theme="dark"] .recente-nome {
    color: var(--text-primary);
}

[data-theme="dark"] .recente-tipo-badge {
    background: rgba(77, 137, 255, 0.15);
    color: var(--primary);
}

