
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
}

h1,h2,h3,.brand { font-family: 'Playfair Display', serif; }

/* ── Navbar ── */
.navbar-barb {
    background: var(--surface);
    border-bottom: 2px solid var(--gold);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.navbar-barb .brand { color: var(--gold); font-size: 1.3rem; }
.navbar-barb img { height: 40px; }

/* ── Cards barbeiro ── */
.barber-card {
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: var(--radius);
    width: 160px; height: 160px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px; cursor: pointer;
    transition: border-color .2s, transform .15s, box-shadow .2s;
    text-decoration: none; color: var(--text);
}
.barber-card:hover, .barber-card:focus {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(201,168,76,.25);
    color: var(--text);
}
.barber-avatar {
    width: 72px; height: 72px;
    background: var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem; font-weight: 700;
    color: #0D0D0D;
}
.barber-name { font-size: .9rem; text-align: center; padding: 0 8px; }

/* ── Grid barbeiros ── */
.barbers-grid {
    display: flex; flex-wrap: wrap;
    justify-content: center; gap: 20px;
    padding: 32px 20px;
}

/* ── Toggle serviços ── */
.service-item {
    background: var(--surface);
    border: 2px solid var(--surface2);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex; align-items: center;
    justify-content: space-between;
    transition: border-color .2s;
    margin-bottom: 10px;
}
.service-item.selected { border-color: var(--gold); }
.service-info { flex: 1; }
.service-name { font-size: 1rem; font-weight: 600; }
.service-cat  { font-size: .78rem; color: var(--muted); }
.service-price { color: var(--gold); font-weight: 700; font-size: 1rem; margin: 0 16px; }
.qty-ctrl { display: flex; align-items: center; gap: 10px; }
.qty-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: none; cursor: pointer;
    font-size: 1.2rem; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.qty-btn.minus { background: var(--surface2); color: var(--muted); }
.qty-btn.plus  { background: var(--gold); color: #0D0D0D; }
.qty-btn.plus:hover { background: var(--gold-dim); }
.qty-val { min-width: 24px; text-align: center; font-weight: 700; }

/* ── Pagamento cards ── */
.pay-card {
    background: var(--surface);
    border: 3px solid var(--surface2);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center; cursor: pointer;
    transition: border-color .2s, transform .15s;
    flex: 1; min-width: 120px;
}
.pay-card:hover  { border-color: var(--gold-dim); transform: translateY(-2px); }
.pay-card.active { border-color: var(--gold); background: rgba(201,168,76,.1); }
.pay-icon { font-size: 2.2rem; margin-bottom: 8px; }
.pay-label { font-weight: 600; font-size: .95rem; }

/* ── Rodapé fixo total ── */
.footer-total {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 2px solid var(--gold);
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
    z-index: 100;
}
.total-label { font-size: .9rem; color: var(--muted); }
.total-val   { font-size: 1.5rem; font-weight: 700; color: var(--gold); font-family: 'Playfair Display', serif; }

/* ── Botões ── */
.btn-gold {
    background: var(--gold); color: #0D0D0D;
    border: none; border-radius: var(--radius);
    min-height: 64px; font-size: 1.1rem; font-weight: 700;
    cursor: pointer; width: 100%;
    transition: background .2s;
}
.btn-gold:hover { background: var(--gold-dim); }
.btn-outline-gold {
    background: transparent; color: var(--gold);
    border: 2px solid var(--gold); border-radius: var(--radius);
    min-height: 48px; padding: 8px 20px;
    font-size: .95rem; font-weight: 600; cursor: pointer;
    transition: background .2s, color .2s;
}
.btn-outline-gold:hover { background: var(--gold); color: #0D0D0D; }

/* ── Confirmação animada ── */
.confirm-wrap {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 100vh; gap: 24px;
}
.check-circle {
    width: 140px; height: 140px; position: relative;
}
.check-circle svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.circle-bg   { fill: none; stroke: var(--surface2); stroke-width: 6; }
.circle-prog {
    fill: none; stroke: var(--gold); stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 408;
    stroke-dashoffset: 408;
    animation: drawCircle 1.2s ease forwards;
}
.check-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    font-size: 3rem; color: var(--gold);
    opacity: 0; animation: fadeCheck .3s .9s ease forwards;
}
@keyframes drawCircle {
    to { stroke-dashoffset: 0; }
}
@keyframes fadeCheck {
    to { opacity: 1; }
}
.confirm-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem; color: var(--gold);
}

/* ── Admin ── */
.sidebar {
    background: var(--surface);
    border-right: 2px solid var(--gold);
    min-height: 100vh; width: 220px;
    padding: 20px 0; position: fixed;
    top: 0; left: 0; z-index: 50;
}
.sidebar-brand {
    color: var(--gold); font-family: 'Playfair Display', serif;
    font-size: 1.1rem; padding: 0 20px 20px;
    border-bottom: 1px solid var(--surface2);
    margin-bottom: 16px;
}
.sidebar a {
    display: block; padding: 12px 20px;
    color: var(--muted); text-decoration: none;
    font-size: .95rem; transition: color .2s, background .2s;
}
.sidebar a:hover, .sidebar a.active {
    color: var(--gold); background: rgba(201,168,76,.08);
}
.admin-main {
    margin-left: 220px; padding: 24px;
    min-height: 100vh;
}
.stat-card {
    background: var(--surface); border-radius: var(--radius);
    padding: 20px; border-left: 4px solid var(--gold);
}
.stat-label { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-val   { font-size: 1.9rem; font-weight: 700; color: var(--gold); font-family: 'Playfair Display', serif; }
.stat-sub   { font-size: .85rem; color: var(--muted); margin-top: 4px; }

.table-dark-custom {
    background: var(--surface); border-radius: var(--radius);
    overflow: hidden; width: 100%;
    border-collapse: collapse;
}
.table-dark-custom th {
    background: var(--surface2); color: var(--gold);
    padding: 12px 16px; font-size: .82rem;
    text-transform: uppercase; letter-spacing: .05em;
    text-align: left;
}
.table-dark-custom td {
    padding: 12px 16px; border-bottom: 1px solid var(--surface2);
    color: var(--text); font-size: .9rem;
}
.table-dark-custom tr:last-child td { border-bottom: none; }
.table-dark-custom tr:hover td { background: rgba(201,168,76,.04); }

.badge-pay {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.badge-dinheiro { background: rgba(76,175,125,.15); color: #4CAF7D; }
.badge-cartao   { background: rgba(100,149,237,.15); color: #6495ED; }
.badge-pix      { background: rgba(201,168,76,.15);  color: var(--gold); }

/* ── Modal ── */
.modal-content {
    background: var(--surface) !important;
    border: 1px solid var(--gold) !important;
    color: var(--text) !important;
}
.modal-header { border-bottom-color: var(--surface2) !important; }
.modal-footer { border-top-color: var(--surface2) !important; }
.form-control, .form-select {
    background: var(--surface2) !important;
    border-color: var(--surface2) !important;
    color: var(--text) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 .2rem rgba(201,168,76,.2) !important;
}
.form-label { color: var(--muted); font-size: .85rem; }

/* ── Desconto input ── */
.desconto-wrap {
    background: var(--surface); border-radius: var(--radius);
    padding: 16px 20px;
}
.desconto-wrap label { color: var(--muted); font-size: .85rem; margin-bottom: 6px; display: block; }
.desconto-input {
    background: var(--surface2); border: 2px solid var(--surface2);
    color: var(--text); border-radius: 8px;
    padding: 10px 14px; font-size: 1.1rem; width: 100%;
    transition: border-color .2s;
}
.desconto-input:focus { outline: none; border-color: var(--gold); }

/* ── Chart ── */
.chart-bar-wrap { display: flex; align-items: flex-end; gap: 10px; height: 200px; }
.chart-bar-col  { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.chart-bar {
    width: 100%; background: var(--gold); border-radius: 4px 4px 0 0;
    transition: height .6s ease;
    min-height: 4px;
}
.chart-bar-label { font-size: .7rem; color: var(--muted); text-align: center; }
.chart-bar-val   { font-size: .75rem; color: var(--gold); font-weight: 700; }

/* ── Mobile topbar ── */
.mobile-topbar {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    background: var(--surface);
    border-bottom: 2px solid var(--gold);
    padding: 12px 16px;
    align-items: center; justify-content: space-between;
    height: 56px;
}
.hamburger {
    background: none; border: none; color: var(--gold);
    font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0;
}

/* ── Sidebar overlay ── */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); z-index: 149;
}
.sidebar-overlay.show { display: block; }

/* ── Bottom nav ── */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 2px solid var(--gold);
    z-index: 200;
    justify-content: space-around;
    padding: 6px 0;
}
.bottom-nav a {
    display: flex; flex-direction: column;
    align-items: center; gap: 2px;
    color: var(--muted); text-decoration: none;
    flex: 1; padding: 4px 2px;
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--gold); }
.bn-icon  { font-size: 1.3rem; line-height: 1; }
.bn-label { font-size: .6rem; }

/* ── Tabela scroll ── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }

/* ── Responsive mobile ── */
@media (max-width: 768px) {
    .mobile-topbar { display: flex !important; }
    .bottom-nav    { display: flex !important; }
    .sidebar {
        display: flex !important;
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 150; top: 0;
    }
    .sidebar.open { transform: translateX(0); }
    .admin-main {
        margin-left: 0 !important;
        padding: 68px 14px 80px !important;
    }
    .stat-val { font-size: 1.35rem; }
    .stat-card { padding: 14px 12px; }
    .row.g-3 > [class*='col-'] { padding: 6px; }
}
@media (min-width: 769px) {
    .mobile-topbar { display: none !important; }
    .bottom-nav    { display: none !important; }
    .sidebar { transform: none !important; }
}
