/* =============================================
   ELBARBERO — DESIGN SYSTEM v2.0 "BLACK & GOLD"
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700;800&display=swap');

/* ── Design Tokens ─────────────────────────── */
:root {
    --bg:               #0f0f0f;
    --surface:          #1a1a1a;
    --surface-2:        #222222;
    --surface-3:        #2c2c2c;
    --border:           rgba(255,255,255,0.07);
    --border-strong:    rgba(255,255,255,0.13);

    --primary:          #d4a853;
    --primary-dark:     #b8902f;
    --primary-glow:     rgba(212,168,83,0.14);
    --primary-glow-strong: rgba(212,168,83,0.24);

    --text:             #f0ece4;
    --text-muted:       #7a7570;
    --text-faint:       rgba(240,236,228,0.28);

    --success:          #27ae60;
    --success-bg:       rgba(39,174,96,0.12);
    --danger:           #e74c3c;
    --danger-bg:        rgba(231,76,60,0.12);
    --info:             #2980b9;
    --info-bg:          rgba(41,128,185,0.12);
    --purple:           #8e44ad;
    --purple-bg:        rgba(142,68,173,0.12);
    --warning:          #f39c12;

    /* Aliases para compatibilidade com inline styles existentes */
    --primary-color:    #d4a853;
    --dark-bg:          #0f0f0f;
    --text-main:        #f0ece4;
    --success-color:    #27ae60;
    --danger-color:     #e74c3c;
    --info-color:       #2980b9;
    --purple-color:     #8e44ad;
    --text-muted:       #7a7570;

    --shadow-sm:  0 1px 4px rgba(0,0,0,0.45);
    --shadow-md:  0 4px 20px rgba(0,0,0,0.55);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.65);
    --shadow-gold: 0 4px 24px rgba(212,168,83,0.18);

    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  24px;

    --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-mid:  260ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset / Base ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: var(--bg);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    padding-bottom: 36px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .dash-title, .profile-name, .main-value, .total-footer h3 {
    font-family: 'Playfair Display', Georgia, serif;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* Sobrescreve cores hard-coded usadas em inline styles */
[style*="color:#555"], [style*="color: #555"]  { color: var(--text-muted) !important; }
[style*="color:#333"], [style*="color: #333"]  { color: var(--text) !important; }
[style*="color:#aaa"], [style*="color: #aaa"]  { color: var(--text-muted) !important; }
[style*="color:#888"], [style*="color: #888"]  { color: var(--text-muted) !important; }
[style*="color:#999"], [style*="color: #999"]  { color: var(--text-muted) !important; }
[style*="background:#f8f9fa"]  { background: var(--surface-2) !important; }
[style*="background: #f8f9fa"] { background: var(--surface-2) !important; }
[style*="border-top:1px solid #eee"]  { border-top-color: var(--border-strong) !important; }
[style*="border-top: 1px solid #eee"] { border-top-color: var(--border-strong) !important; }
[style*="border-color:#e5e5e5"] { border-color: var(--border) !important; }
[style*="color:#ccc"], [style*="color: #ccc"] { color: var(--text-faint) !important; }

/* ── Layout ────────────────────────────────── */
.card-container { padding: 0 15px; }

/* ── Header / Hero ─────────────────────────── */
.dash-header, .profile-header {
    background: linear-gradient(160deg, #141210 0%, #1e1a13 60%, #231e16 100%);
    border-bottom: 1px solid rgba(212,168,83,0.14);
    color: var(--text);
    padding: 28px 20px 26px;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.dash-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 56px; height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.dash-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.04em;
    color: var(--text);
}

.dash-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-family: 'Inter', sans-serif;
}

.dash-subtitle a { color: var(--primary); opacity: 0.75; font-size: 0.78rem; }
.dash-subtitle a:hover { opacity: 1; }

.profile-name {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    color: var(--text);
}

.profile-pix {
    font-size: 0.78rem;
    color: var(--primary);
    cursor: pointer;
    margin-top: 6px;
    opacity: 0.75;
    transition: opacity var(--t-fast);
    font-family: 'Inter', sans-serif;
}
.profile-pix:hover { opacity: 1; }

/* ── Cards ─────────────────────────────────── */
.custom-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-md);
}

.card-title {
    font-weight: 700;
    font-size: 0.78rem;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-family: 'Inter', sans-serif;
}

.filter-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

/* ── Summary Card ──────────────────────────── */
.summary-card {
    background: linear-gradient(150deg, #1c1810 0%, #221d14 50%, #272118 100%);
    border: 1px solid rgba(212,168,83,0.18);
    border-radius: var(--radius-xl);
    padding: 28px 22px;
    box-shadow: var(--shadow-gold);
    text-align: center;
    margin-bottom: 16px;
}

.main-label {
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.main-value {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 10px 0 4px;
    line-height: 1;
    color: var(--primary);
}

.main-value.positive { color: var(--success); }
.main-value.negative { color: var(--danger); }

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.summary-item {
    background: rgba(0,0,0,0.25);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: left;
}

.summary-item small {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-bottom: 4px;
}

.summary-item strong { font-size: 1rem; font-weight: 700; }

.breakdown-container {
    display: flex;
    justify-content: space-around;
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.breakdown-item { text-align: center; }
.breakdown-item small {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    margin-bottom: 3px;
}

.breakdown-value { font-weight: 700; font-size: 0.92rem; }

/* ── Formulários ────────────────────────────── */
label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 7px;
    display: block;
}

.form-control {
    background-color: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md) !important;
    color: var(--text);
    font-size: 0.9rem;
    padding: 10px 14px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    font-family: 'Inter', sans-serif;
}

.form-control::placeholder { color: var(--text-faint); }

.form-control:focus {
    background-color: var(--surface-2);
    border-color: var(--primary) !important;
    color: var(--text);
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
    outline: none;
}

select.form-control option {
    background-color: var(--surface-2);
    color: var(--text);
}

.form-control-sm { font-size: 0.82rem; padding: 7px 11px; }

.input-group-append .btn {
    border: 1px solid var(--border-strong) !important;
    background: var(--surface-2) !important;
    color: var(--text-muted) !important;
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

.input-group-append .btn:hover { color: var(--text) !important; }

/* ── Botões ─────────────────────────────────── */
.btn-primary-custom, .btn-filter {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: #111 !important;
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: var(--radius-md) !important;
    padding: 10px 18px;
    letter-spacing: 0.02em;
    transition: filter var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
    cursor: pointer;
}

.btn-primary-custom:hover, .btn-filter:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
    color: #111 !important;
}

.btn-primary-custom:active, .btn-filter:active {
    transform: translateY(0);
    box-shadow: none;
    filter: brightness(0.93);
    color: #111 !important;
}

.btn-primary-custom:focus, .btn-filter:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: none !important;
    color: #111 !important;
}

.btn-outline-secondary {
    background: transparent !important;
    border: 1px solid var(--border-strong) !important;
    color: var(--text-muted) !important;
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: var(--radius-md) !important;
    padding: 8px 14px;
    transition: all var(--t-fast);
    cursor: pointer;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: var(--primary-glow) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    box-shadow: none !important;
}

.btn-outline-secondary:active {
    background: var(--surface-3) !important;
}

.btn-delete, .btn-delete-sm {
    background: transparent;
    border: none;
    color: var(--text-faint);
    padding: 5px 7px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color var(--t-fast), background var(--t-fast);
    line-height: 1;
}

.btn-delete:hover, .btn-delete-sm:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.btn-delete:active, .btn-delete-sm:active { color: var(--danger); transform: scale(0.94); }

/* ── Tabs ──────────────────────────────────── */
.nav-tabs {
    border: none !important;
    background: var(--surface);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg);
    padding: 5px;
    margin-bottom: 14px;
    display: flex;
    gap: 4px;
}

.nav-tabs .nav-item { flex: 1; }

.nav-tabs .nav-link {
    border: none !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.83rem;
    padding: 9px 12px;
    text-align: center;
    width: 100%;
    transition: all var(--t-fast);
    background: transparent;
}

.nav-tabs .nav-link:hover { color: var(--text); background: var(--surface-2); }

.nav-tabs .nav-link.active {
    background: var(--primary) !important;
    color: #111 !important;
    font-weight: 700;
    box-shadow: var(--shadow-gold);
}

/* ── Listas de itens ────────────────────────── */
.item-servico, .item-desp, .item-list {
    display: flex;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.item-servico:last-child, .item-desp:last-child, .item-list:last-child {
    border-bottom: none;
}

.item-icon, .desp-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 13px;
    font-size: 0.95rem;
    flex-shrink: 0;
    color: white;
}

.icon-servico { background: var(--info-bg); color: var(--info) !important; }
.icon-produto { background: var(--purple-bg); color: var(--purple) !important; }
.icon-vale    { background: var(--danger-bg); color: var(--danger) !important; }
.icon-desp    { background: var(--danger-bg); color: var(--danger) !important; }

.item-info, .desp-info { flex-grow: 1; min-width: 0; }

.item-info h6, .desp-info h6, .item-info .titulo {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-info small, .item-info .hora, .desp-info small {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.item-valor, .desp-valor, .item-price {
    font-weight: 700;
    font-size: 0.92rem;
    text-align: right;
    margin-left: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.lista-registros, .lista-itens { max-height: 420px; overflow-y: auto; }

.lista-registros::-webkit-scrollbar,
.lista-itens::-webkit-scrollbar { width: 4px; }

.lista-registros::-webkit-scrollbar-track,
.lista-itens::-webkit-scrollbar-track { background: var(--surface); }

.lista-registros::-webkit-scrollbar-thumb,
.lista-itens::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* ── Cards de Barbeiro (accordion) ────────── */
.barber-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: border-color var(--t-fast);
}

.barber-card:hover { border-color: var(--border-strong); }

.barber-header {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-left: 3px solid var(--primary);
    transition: background var(--t-fast);
}

.barber-header:hover { background: var(--surface-2); }

.barber-info h5 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.barber-info small { color: var(--text-muted); font-size: 0.74rem; }

.barber-info a {
    font-size: 0.72rem;
    color: var(--primary);
    display: inline-block;
    margin-top: 3px;
    opacity: 0.75;
}

.barber-info a:hover { opacity: 1; }

.barber-total { text-align: right; }
.barber-total .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.barber-total .value { font-size: 1.05rem; font-weight: 700; color: var(--primary); }

.barber-details {
    background: var(--surface-2);
    padding: 16px 18px;
    border-top: 1px solid var(--border);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.87rem;
    color: var(--text);
}

.detail-row strong { font-weight: 700; }

hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

/* ── Total Footer ───────────────────────────── */
.total-footer {
    background: linear-gradient(135deg, #1c1810, #231e14);
    border: 1px solid rgba(212,168,83,0.2);
    color: var(--text);
    border-radius: var(--radius-xl);
    padding: 24px;
    text-align: center;
    margin-top: 12px;
}

.total-footer small {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.total-footer h3 {
    margin: 0;
    font-weight: 800;
    font-size: 1.9rem;
    color: var(--primary);
}

/* ── Filtros ────────────────────────────────── */
.filter-group { display: flex; gap: 10px; }
.filter-group select { flex: 1; }

/* ── Empty State ────────────────────────────── */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ── Cores utilitárias ──────────────────────── */
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-info    { color: var(--info)    !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-warning { color: var(--warning) !important; }
.positive     { color: var(--success) !important; }
.negative     { color: var(--danger)  !important; }

.badge-secondary { background: var(--surface-3) !important; color: var(--text-muted) !important; }
.badge-danger    { background: var(--danger-bg)  !important; color: var(--danger) !important; }

/* ── Alerts → ocultos (convertidos para Toast via JS) ── */
.alert { display: none !important; }

/* ── TOAST NOTIFICATIONS ────────────────────── */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 36px);
}

.app-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: var(--shadow-lg);
    pointer-events: all;
    min-width: 240px;
    max-width: 330px;
    animation: toastIn var(--t-mid) ease both;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.app-toast.toast-success { border-left-color: var(--success); }
.app-toast.toast-danger  { border-left-color: var(--danger);  }
.app-toast.toast-warning { border-left-color: var(--warning); }

.app-toast i { font-size: 1rem; flex-shrink: 0; }
.app-toast.toast-success i { color: var(--success); }
.app-toast.toast-danger  i { color: var(--danger); }
.app-toast.toast-warning i { color: var(--warning); }
.app-toast:not([class*="toast-success"]):not([class*="toast-danger"]):not([class*="toast-warning"]) i {
    color: var(--primary);
}

.app-toast.toast-out { animation: toastOut var(--t-mid) ease both; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0)   scale(1); }
    to   { opacity: 0; transform: translateY(8px) scale(0.97); }
}

/* =============================================
   NAVBAR — MOBILE FIRST
   ============================================= */

.navbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(15,15,15,0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.app-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    gap: 10px;
}

.app-navbar .navbar-brand {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    font-family: 'Playfair Display', serif;
}

.app-navbar .navbar-brand .brand-filial {
    font-size: 0.52rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.navbar-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.navbar-avatar-wrap {
    flex-shrink: 0;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    display: block;
    transition: box-shadow var(--t-fast);
}

.navbar-avatar-wrap:hover .nav-avatar-img {
    box-shadow: 0 0 0 3px var(--primary-glow-strong);
}

.nav-avatar-icon {
    color: var(--primary);
    font-size: 1.85rem;
    line-height: 1;
    transition: opacity var(--t-fast);
}

.navbar-avatar-wrap:hover .nav-avatar-icon { opacity: 0.75; }

.navbar-toggler {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    border-radius: var(--radius-sm);
    transition: background var(--t-fast);
}

.navbar-toggler:hover { background: var(--surface-2); }

.toggler-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(240,236,228,0.55);
    border-radius: 2px;
    transition: transform var(--t-mid) ease, opacity var(--t-fast), background var(--t-fast);
    transform-origin: center;
}

.navbar-toggler.open .toggler-bar { background: var(--primary); }
.navbar-toggler.open .toggler-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggler.open .toggler-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar-toggler.open .toggler-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-mid) ease;
    border-top: 1px solid var(--border);
    background: rgba(12,12,12,0.96);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.nav-dropdown.open { max-height: 540px; }

.nav-drop-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 22px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    transition: background var(--t-fast), color var(--t-fast);
}

.nav-drop-item i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--primary);
    opacity: 0.65;
    transition: opacity var(--t-fast);
}

.nav-drop-item.active { color: var(--primary); background: var(--primary-glow); }
.nav-drop-item.active i { opacity: 1; }

.nav-drop-item:hover, .nav-drop-item:active {
    background: var(--surface-2);
    color: var(--text);
}

.nav-drop-item:hover i { opacity: 1; }

.nav-drop-divider { height: 1px; background: var(--border-strong); margin: 4px 0; }

.nav-drop-sair             { color: rgba(231,76,60,0.55) !important; }
.nav-drop-sair i           { color: rgba(231,76,60,0.55) !important; }
.nav-drop-sair:hover,
.nav-drop-sair:active      { background: var(--danger-bg) !important; color: var(--danger) !important; }
.nav-drop-sair:hover i     { color: var(--danger) !important; opacity: 1 !important; }

.navbar-wrapper + .dash-header,
.navbar-wrapper + .profile-header {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
}

/* ── Seletor de filial no dropdown da navbar ── */
.nav-filial-wrap {
    padding: 14px 22px 12px;
    border-bottom: 1px solid var(--border);
}

.nav-filial-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 9px;
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.nav-filial-btns {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.nav-filial-btn {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    background: var(--surface-2);
    transition: all var(--t-fast);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.nav-filial-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #111;
}

.nav-filial-btn:not(.active):hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
}

/* =============================================
   HOME — MENU GRID
   ============================================= */

.logo-container {
    text-align: center;
    padding: 28px 20px 16px;
}

.logo-container img {
    width: 72%;
    max-width: 240px;
    height: auto;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
    padding: 0 15px;
}

.menu-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 140px;
    transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.menu-card:hover {
    border-color: rgba(212,168,83,0.35);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    color: var(--text);
}

.menu-card:active { transform: scale(0.96); box-shadow: var(--shadow-sm); }

.menu-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
}

.menu-card:hover .menu-title { color: var(--text); }

.menu-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}

.bg-dashboard   { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.bg-lancamentos { background: linear-gradient(135deg, var(--info), #1a5a8a); }
.bg-despesas    { background: linear-gradient(135deg, var(--danger), #a01e12); }
.bg-produtos    { background: linear-gradient(135deg, var(--purple), #6a2882); }
.bg-usuarios    { background: linear-gradient(135deg, var(--success), #186030); }
.bg-sair        { background: linear-gradient(135deg, #4a4a4a, #2a2a2a); }

.filial-bar { padding: 4px 15px 16px; }
.filial-bar p {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 8px;
}

.filial-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.filial-btn {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    background: var(--surface);
    transition: all var(--t-fast);
}

.filial-btn.active { background: var(--primary); border-color: var(--primary); color: #111; }
.filial-btn:not(.active):hover { border-color: var(--primary); color: var(--primary); }

.perfil-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-family: 'Inter', sans-serif;
}

/* =============================================
   LANÇAMENTOS — COMPONENTES ESPECÍFICOS
   ============================================= */

.tipo-btn {
    border-radius: var(--radius-md) !important;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 10px 8px;
    letter-spacing: 0.02em;
}

.comanda-block {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    transition: border-color var(--t-fast);
}

.comanda-block:hover { border-color: var(--border-strong); }

.comanda-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-top: 1px solid var(--border);
    font-size: 0.83rem;
    color: var(--text);
}

.pagto-badge {
    display: inline-block;
    background: var(--surface-3);
    border-radius: var(--radius-sm);
    padding: 3px 9px;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Carrinho footer */
#carrinhoFooter {
    border-top: 1px solid var(--border) !important;
    margin-top: 12px;
    padding-top: 14px;
}

#carrinhoFooter label {
    color: var(--text-muted) !important;
}

/* =============================================
   BARBEIRO-DADOS — AVATAR E UPLOAD
   ============================================= */

.dados-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dados-avatar {
    border-radius: var(--radius-xl);
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-gold);
    max-width: 200px;
    width: 100%;
    height: auto;
}

.dados-avatar-icon {
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.35;
}

.dados-upload-label {
    display: inline-block;
    background: var(--primary-glow);
    border: 1px solid rgba(212,168,83,0.28);
    color: var(--primary);
    padding: 8px 22px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
}

.dados-upload-label:hover { background: var(--primary-glow-strong); }

/* =============================================
   RELATÓRIO GERENCIAL
   ============================================= */

.relatorio-destaques {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 480px) { .relatorio-destaques { grid-template-columns: 1fr; } }

.destaque-card {
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    color: white;
    border: 1px solid var(--border);
}

.destaque-receita { background: linear-gradient(135deg, var(--info), #1a5a8a); }
.destaque-lucro   { background: linear-gradient(135deg, var(--success), #186030); }
.destaque-despesa { background: linear-gradient(135deg, var(--danger), #a01e12); }

.destaque-label { font-size: 0.63rem; font-weight: 700; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.06em; }
.destaque-mes   { font-size: 1rem; font-weight: 700; margin: 4px 0; }
.destaque-valor { font-size: 0.82rem; opacity: 0.9; }

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

.relatorio-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    white-space: nowrap;
}

.relatorio-table th {
    background: var(--surface-2);
    padding: 9px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-strong);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.relatorio-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
}

.relatorio-table tbody tr:hover { background: var(--surface-2); }
.relatorio-row-vazio td { color: var(--text-muted); }
.relatorio-row-destaque { background: rgba(39,174,96,0.06) !important; }

.relatorio-total td {
    background: var(--surface-2);
    border-top: 2px solid var(--border-strong);
    color: var(--primary);
    font-size: 0.82rem;
    padding: 10px 12px;
    font-weight: 700;
}

/* =============================================
   LOGIN PAGE (index.php)
   ============================================= */

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: var(--bg);
}

.login-logo {
    margin-bottom: 28px;
    text-align: center;
}

.login-logo img {
    width: 190px;
    max-width: 75vw;
    height: auto;
}

.login-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 10px;
    display: block;
    letter-spacing: 0.02em;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
}

.login-card h2 {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.login-error {
    background: var(--danger-bg);
    border: 1px solid rgba(231,76,60,0.22);
    border-radius: var(--radius-md);
    color: var(--danger);
    padding: 12px 16px;
    font-size: 0.84rem;
    margin-bottom: 20px;
    text-align: center;
}

.login-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 0 20px;
}

/* =============================================
   RESPONSIVIDADE
   ============================================= */

@media (min-width: 480px) {
    .card-container { padding: 0 20px; }
    .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .card-container { max-width: 680px; margin: 0 auto; }
    .dash-header, .profile-header { padding: 36px 30px 30px; }
    .dash-title { font-size: 1.5rem; }
    .login-card { padding: 44px 38px; }
    .menu-grid { grid-template-columns: repeat(3, 1fr); }
    #toast-container { right: 28px; bottom: 28px; }
}
