/* =====================================================================
   BARBEARIA PREMIUM - MVP
   Tema: Dark Premium com detalhes em amarelo-oliva/dourado
   ===================================================================== */

:root {
    --bg-app: #1e1e24;
    --bg-card: #282830;
    --bg-card-hover: #2f2f38;
    --accent: #a3b11a;
    --accent-dark: #828d15;
    --text-title: #ffffff;
    --text-subtitle: #a0a0a5;
    --danger: #e05a5a;
    --success: #3ecf6a;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-pill: 999px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-app);
    color: var(--text-title);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.app-shell {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 20px 100px;
    min-height: 100vh;
    position: relative;
}

.app-shell.wide {
    max-width: 960px;
}

/* ---------------------------------------------------------------------
   Cabeçalho
   --------------------------------------------------------------------- */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.brand-text h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
}

.brand-text p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--text-subtitle);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin: 8px 0 4px;
    color: var(--text-title);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-subtitle);
    margin: 0 0 24px;
}

/* ---------------------------------------------------------------------
   Seções
   --------------------------------------------------------------------- */
.section {
    margin-bottom: 28px;
}

.section-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-step {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #1e1e24;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------------------
   Inputs e Autocomplete
   --------------------------------------------------------------------- */
.field {
    position: relative;
    margin-bottom: 12px;
}

.field label {
    display: block;
    font-size: 12px;
    color: var(--text-subtitle);
    margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="date"],
.field select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-title);
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
    appearance: none;
}

.field input::placeholder {
    color: #6f6f78;
}

.field input:focus,
.field select:focus {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.field select {
    background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
        linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.autocomplete-box {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card-hover);
    border-radius: var(--radius-md);
    overflow: hidden;
    z-index: 30;
    box-shadow: 0 12px 28px rgba(0,0,0,0.45);
    display: none;
}

.autocomplete-box.show {
    display: block;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: rgba(163, 177, 26, 0.15);
}

.autocomplete-item .nome {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-title);
}

.autocomplete-item .tel {
    font-size: 12px;
    color: var(--text-subtitle);
}

.autocomplete-empty {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-subtitle);
}

.new-client-badge {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(163,177,26,0.12);
    border: 1px solid rgba(163,177,26,0.4);
    color: var(--accent);
    font-size: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.new-client-badge.show {
    display: flex;
}

.selected-client-badge {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(163,177,26,0.12);
    border: 1px solid rgba(163,177,26,0.4);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-top: 8px;
    font-size: 13px;
}

.selected-client-badge.show {
    display: flex;
}

.selected-client-badge button {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 12px;
    cursor: pointer;
    font-weight: 700;
}

/* ---------------------------------------------------------------------
   Cards de Serviço
   --------------------------------------------------------------------- */
.service-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.service-card:hover {
    background: var(--bg-card-hover);
}

.service-card.selected {
    border-color: var(--accent);
    background: rgba(163,177,26,0.10);
}

.service-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: var(--radius-sm);
    background: rgba(163,177,26,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.service-info {
    flex: 1;
    min-width: 0;
}

.service-info .service-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-title);
    margin: 0 0 2px;
}

.service-info .service-desc {
    font-size: 12px;
    color: var(--text-subtitle);
    margin: 0 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
}

.service-meta span.duracao {
    color: var(--text-subtitle);
    font-weight: 400;
}

.service-toggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: #35353f;
    color: #a0a0a5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    transition: background 0.15s ease, color 0.15s ease;
}

.service-card.selected .service-toggle {
    background: var(--success);
    color: #10281a;
}

/* ---------------------------------------------------------------------
   Cards de Barbeiro
   --------------------------------------------------------------------- */
.barber-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.barber-card {
    flex: 0 0 auto;
    width: 100px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.barber-card.selected {
    border-color: var(--accent);
    background: rgba(163,177,26,0.10);
}

.barber-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #1e1e24;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.barber-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-title);
    line-height: 1.3;
}

/* ---------------------------------------------------------------------
   Grade de Horários
   --------------------------------------------------------------------- */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.slot-btn {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-pill);
    padding: 12px 0;
    color: var(--text-title);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: center;
}

.slot-btn:hover {
    background: var(--bg-card-hover);
}

.slot-btn.selected {
    background: var(--accent);
    color: #17170f;
}

.slot-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

.slots-empty {
    grid-column: 1 / -1;
    color: var(--text-subtitle);
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}

/* ---------------------------------------------------------------------
   Resumo e botão de confirmação
   --------------------------------------------------------------------- */
.summary-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row .label {
    color: var(--text-subtitle);
}

.summary-row .value {
    color: var(--text-title);
    font-weight: 600;
    text-align: right;
}

.summary-row.total .value {
    color: var(--accent);
    font-size: 16px;
}

.btn-primary {
    display: block;
    width: 100%;
    background: var(--accent);
    color: #17170f;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-block;
    background: var(--bg-card);
    color: var(--text-title);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

/* ---------------------------------------------------------------------
   Toast de feedback
   --------------------------------------------------------------------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    color: var(--text-title);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
    font-size: 14px;
    max-width: 90%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 999;
    border-left: 4px solid var(--accent);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    border-left-color: var(--danger);
}

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

/* ---------------------------------------------------------------------
   Painel do Barbeiro
   --------------------------------------------------------------------- */
.admin-topbar {
    background: linear-gradient(135deg, rgba(163,177,26,0.16), rgba(163,177,26,0.04));
    border: 1px solid rgba(163,177,26,0.35);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.admin-topbar .info {
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-subtitle);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--bg-card);
    color: var(--text-subtitle);
    border: none;
    border-radius: var(--radius-pill);
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--accent);
    color: #17170f;
}

.appointment-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 12px;
}

.appointment-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.appointment-client {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-title);
}

.appointment-service {
    font-size: 12px;
    color: var(--text-subtitle);
    margin-top: 2px;
}

.appointment-time {
    text-align: right;
}

.appointment-time .hora {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
}

.appointment-time .data {
    font-size: 11px;
    color: var(--text-subtitle);
}

.status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.pendente {
    background: rgba(255,193,7,0.15);
    color: #ffc107;
}

.status-badge.confirmado {
    background: rgba(52,152,219,0.15);
    color: #3498db;
}

.status-badge.concluido {
    background: rgba(62,207,106,0.15);
    color: var(--success);
}

.status-badge.cancelado {
    background: rgba(224,90,90,0.15);
    color: var(--danger);
}

.appointment-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-action {
    flex: 1;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.btn-action.approve {
    background: var(--accent);
    color: #17170f;
}

.btn-action.complete {
    background: var(--success);
    color: #10281a;
}

.btn-action.cancel {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(224,90,90,0.4);
}

.empty-state {
    text-align: center;
    color: var(--text-subtitle);
    font-size: 13px;
    padding: 40px 0;
}

/* ---------------------------------------------------------------------
   Painel do Dono
   --------------------------------------------------------------------- */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 800px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

.panel-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.panel-box h3 {
    margin: 0 0 16px;
    color: var(--text-title);
    font-size: 16px;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

table.data-table th {
    text-align: left;
    color: var(--text-subtitle);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    text-transform: uppercase;
}

table.data-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-title);
}

.pill-yes {
    color: var(--success);
    font-weight: 700;
}

.pill-no {
    color: var(--text-subtitle);
}

.alert-flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    border-left: 4px solid var(--accent);
    background: rgba(163,177,26,0.1);
    color: var(--text-title);
}

.alert-flash.error {
    border-left-color: var(--danger);
    background: rgba(224,90,90,0.1);
}

a {
    color: var(--accent);
}

::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(163,177,26,0.4);
    border-radius: 10px;
}

/* =====================================================================
   ATUALIZAÇÃO — Wizard do Cliente, Calendário, Inbox, CRUD Admin, Financeiro
   ===================================================================== */

/* ---------------------------------------------------------------------
   Wizard (index.php)
   --------------------------------------------------------------------- */
.wizard-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 26px;
}

.wizard-dot {
    flex: 1;
    height: 4px;
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    transition: background 0.25s ease;
}

.wizard-dot.done,
.wizard-dot.active {
    background: var(--accent);
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: wizardFadeIn 0.25s ease;
}

@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-step-header {
    margin-bottom: 20px;
}

.wizard-step-header .kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin: 0 0 6px;
}

.wizard-step-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    color: var(--text-title);
}

.wizard-step-header p {
    margin: 0;
    font-size: 13px;
    color: var(--text-subtitle);
}

.wizard-nav {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.wizard-nav .btn-back {
    flex: 0 0 auto;
    background: var(--bg-card);
    color: var(--text-subtitle);
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.wizard-nav .btn-back:hover {
    background: var(--bg-card-hover);
}

.wizard-nav .btn-primary {
    flex: 1;
}

.identity-status {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-top: 10px;
}

.identity-status.show {
    display: flex;
}

.identity-status.novo {
    background: rgba(163,177,26,0.12);
    border: 1px solid rgba(163,177,26,0.4);
    color: var(--accent);
}

.identity-status.encontrado {
    background: rgba(62,207,106,0.12);
    border: 1px solid rgba(62,207,106,0.4);
    color: var(--success);
}

/* ---------------------------------------------------------------------
   Calendário compacto
   --------------------------------------------------------------------- */
.calendar-widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calendar-header .month-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-title);
    text-transform: capitalize;
}

.calendar-nav-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-card-hover);
    border: none;
    color: var(--accent);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 10px;
    color: var(--text-subtitle);
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-title);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.calendar-day:hover:not(:disabled):not(.empty) {
    background: var(--bg-card-hover);
}

.calendar-day.empty {
    visibility: hidden;
    cursor: default;
}

.calendar-day.today {
    border: 1px solid var(--accent);
}

.calendar-day.selected {
    background: var(--accent);
    color: #17170f;
}

.calendar-day:disabled {
    color: #4a4a52;
    cursor: not-allowed;
}

/* ---------------------------------------------------------------------
   Inbox atemporal de pendentes (barbeiro.php)
   --------------------------------------------------------------------- */
.inbox-pendente {
    background: linear-gradient(135deg, rgba(163,177,26,0.14), rgba(163,177,26,0.03));
    border: 1px solid rgba(163,177,26,0.4);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 26px;
}

.inbox-pendente .inbox-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.inbox-pendente .inbox-title h2 {
    margin: 0;
    font-size: 15px;
    color: var(--text-title);
    display: flex;
    align-items: center;
    gap: 8px;
}

.inbox-count {
    background: var(--accent);
    color: #17170f;
    font-size: 12px;
    font-weight: 800;
    border-radius: var(--radius-pill);
    padding: 2px 10px;
}

.appointment-card.inbox-card {
    background: var(--bg-app);
    border: 1px solid rgba(255,255,255,0.06);
}

/* ---------------------------------------------------------------------
   Cadastro rápido de cliente (barbeiro.php)
   --------------------------------------------------------------------- */
.quick-add-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    color: var(--accent);
    border: 1px dashed rgba(163,177,26,0.5);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    text-align: left;
    margin-bottom: 12px;
}

.quick-add-toggle:hover {
    background: var(--bg-card-hover);
}

.quick-add-panel {
    display: none;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.quick-add-panel.show {
    display: block;
}

.quick-add-panel .row {
    display: flex;
    gap: 10px;
}

.quick-add-panel .row .field {
    flex: 1;
}

/* ---------------------------------------------------------------------
   Filtros financeiros
   --------------------------------------------------------------------- */
.finance-filters {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
}

.finance-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.finance-filter-tab {
    background: var(--bg-app);
    color: var(--text-subtitle);
    border: none;
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.finance-filter-tab.active {
    background: var(--accent);
    color: #17170f;
}

.finance-filter-form {
    display: none;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.finance-filter-form.show {
    display: flex;
}

.finance-filter-form .field {
    margin-bottom: 0;
    min-width: 130px;
    flex: 1;
}

.finance-filter-form button {
    background: var(--accent);
    color: #17170f;
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 18px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.finance-period-label {
    font-size: 12px;
    color: var(--text-subtitle);
    margin: 6px 0 18px;
}

.finance-period-label strong {
    color: var(--accent);
}

/* ---------------------------------------------------------------------
   Seletor de barbeiro auditado (dono)
   --------------------------------------------------------------------- */
.dono-audit-box {
    background: rgba(163,177,26,0.08);
    border: 1px solid rgba(163,177,26,0.35);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 20px;
}

.dono-audit-box label {
    display: block;
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 8px;
}

.dono-audit-box select {
    width: 100%;
    background: var(--bg-app);
    border: 1px solid rgba(163,177,26,0.3);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-title);
    font-size: 14px;
}

/* ---------------------------------------------------------------------
   CRUD administrativo (painel-dono.php)
   --------------------------------------------------------------------- */
.panel-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-box-header h3 {
    margin: 0;
}

.edit-mode-badge {
    background: rgba(163,177,26,0.15);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
}

.form-actions-row {
    display: flex;
    gap: 10px;
}

.form-actions-row .btn-primary {
    flex: 1;
}

.btn-link-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-subtitle);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.btn-link-cancel:hover {
    background: var(--bg-card-hover);
}

.table-actions {
    display: flex;
    gap: 6px;
}

.btn-tiny {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.btn-tiny.edit {
    background: rgba(163,177,26,0.15);
    color: var(--accent);
}

.btn-tiny.toggle-on {
    background: rgba(62,207,106,0.15);
    color: var(--success);
}

.btn-tiny.toggle-off {
    background: rgba(224,90,90,0.15);
    color: var(--danger);
}

/* ---------------------------------------------------------------------
   Acesso negado
   --------------------------------------------------------------------- */
.access-denied-box {
    max-width: 420px;
    margin: 80px auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
}

.access-denied-box .icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.access-denied-box h2 {
    color: var(--text-title);
    margin: 0 0 8px;
}

.access-denied-box p {
    color: var(--text-subtitle);
    font-size: 14px;
    margin: 0 0 20px;
}

/* =====================================================================
   ATUALIZAÇÃO 2 — Abas sem reload, Modal Overdelivery, Gráfico, Sucesso
   ===================================================================== */

/* ---------------------------------------------------------------------
   Painéis de aba principal (barbeiro.php / painel-dono.php)
   --------------------------------------------------------------------- */
.tab-panel-main {
    animation: wizardFadeIn 0.2s ease;
}

.main-tabs {
    position: sticky;
    top: 0;
    background: var(--bg-app);
    z-index: 20;
    padding: 4px 0 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.sub-tabs {
    margin-top: 4px;
}

.row-inline {
    display: flex;
    gap: 10px;
}

.row-inline .field {
    flex: 1;
}

/* ---------------------------------------------------------------------
   Modal (Concluir serviço / Overdelivery)
   --------------------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 420px;
    width: 100%;
    animation: wizardFadeIn 0.2s ease;
}

.modal-box h3 {
    margin: 0 0 10px;
    color: var(--text-title);
    font-size: 18px;
}

.modal-desc {
    color: var(--text-subtitle);
    font-size: 13px;
    margin: 0 0 16px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.modal-actions .btn-back {
    flex: 0 0 auto;
    background: var(--bg-app);
}

.modal-actions .btn-primary {
    flex: 1;
}

/* ---------------------------------------------------------------------
   Gráfico simples de barras (faturamento — últimos 7 dias)
   --------------------------------------------------------------------- */
.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    height: 160px;
    padding-top: 20px;
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    gap: 4px;
}

.chart-valor {
    font-size: 9px;
    color: var(--accent);
    font-weight: 700;
    white-space: nowrap;
}

.chart-bar {
    width: 100%;
    max-width: 28px;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    border-radius: 6px 6px 2px 2px;
    min-height: 4px;
    transition: height 0.3s ease;
}

.chart-dia {
    font-size: 10px;
    color: var(--text-subtitle);
    margin-top: 2px;
}

/* ---------------------------------------------------------------------
   Tela de sucesso do wizard
   --------------------------------------------------------------------- */
#wizard-container {
    transition: opacity 0.35s ease;
    opacity: 1;
}

#wizard-container.fade-out {
    opacity: 0;
}

.success-screen {
    display: none;
    min-height: 60vh;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.success-screen.show {
    display: flex;
    animation: wizardFadeIn 0.4s ease;
}

.success-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    text-align: center;
    max-width: 380px;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.success-card h2 {
    color: var(--text-title);
    margin: 0 0 12px;
    font-size: 20px;
}

.success-card p {
    color: var(--text-subtitle);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px;
}

.success-card .btn-secondary {
    display: inline-block;
    text-decoration: none;
}
