:root {
    --bg: #0a0a0a;
    --bg-soft: #121212;
    --panel: #181818;
    --panel-2: #1d1d1d;
    --gold: #d4af37;
    --gold-soft: #f3d87a;
    --text: #f5f5f5;
    --muted: #c7c7c7;
    --border: rgba(212, 175, 55, 0.3);
    --success: #2ec27e;
    --danger: #ff5a5f;
    --card: rgba(255,255,255,0.03);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at top, rgba(212,175,55,0.15), transparent 28%),
        linear-gradient(180deg, #070707 0%, #111111 100%);
    color: var(--text);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #8c6d1f);
    color: #111;
    font-weight: 800;
}

.brand strong {
    display: block;
    font-size: 0.96rem;
}

.brand small {
    color: var(--muted);
}

nav {
    display: flex;
    gap: 1.2rem;
    color: var(--muted);
}

nav a:hover { color: var(--gold-soft); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 1.3rem;
    cursor: pointer;
}

.nav-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    font: inherit;
    min-height: 46px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #b88f19);
    color: #121212;
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.2);
}

.btn-outline {
    border-color: var(--border);
    color: var(--text);
    background: transparent;
}

.btn-danger {
    background: linear-gradient(135deg, rgba(255,90,95,0.18), rgba(255,90,95,0.08));
    border-color: rgba(255,90,95,0.45);
    color: #ffdada;
}

.btn-danger:hover {
    box-shadow: 0 12px 30px rgba(255,90,95,0.16);
}

.btn-small {
    padding: 0.6rem 0.9rem;
    min-height: 36px;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.full { width: 100%; }

.hero {
    padding: 6rem 0 3rem;
    background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.18), transparent 35%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 2rem;
}

h1, h2, h3, h4, h5 {
    margin: 0 0 0.75rem;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.04em;
}

h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 0.96;
}

h2 {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    text-align: center;
}

.eyebrow {
    color: var(--gold-soft);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.center { text-align: center; }

.lead {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 560px;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.stats {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stats li {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
}

.stats strong {
    display: block;
    font-size: 1.5rem;
    color: var(--gold-soft);
}

.stats span {
    color: var(--muted);
    font-size: 0.8rem;
}

.hero-card {
    display: flex;
    justify-content: center;
}

.booking-card {
    width: min(100%, 420px);
    background: linear-gradient(180deg, rgba(26,26,26,0.96), rgba(18,18,18,0.92));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 40px rgba(0,0,0,0.28);
}

.tiny-label {
    margin: 0 0 1rem;
    color: var(--gold-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.booking-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

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

.section {
    padding: 4rem 0;
}

.dark-panel {
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.feature-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.feature-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.5rem;
}

.icon {
    font-size: 2rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title-wrap {
    margin-bottom: 2rem;
}

.benefits-grid,
.cards-grid,
.testimonies-grid {
    display: grid;
    gap: 1.5rem;
}

.benefits-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.benefit-card,
.price-card,
.testimonial-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
}

.benefit-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.06));
    color: var(--gold-soft);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.price-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-card.featured {
    transform: scale(1.02);
    box-shadow: 0 18px 40px rgba(212, 175, 55, 0.12);
}

.tag {
    align-self: flex-start;
    display: inline-flex;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(212,175,55,0.12);
    border: 1px solid var(--border);
    color: var(--gold-soft);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(212,175,55,0.25);
    background: rgba(212,175,55,0.12);
    color: var(--gold-soft);
}

.status-badge.pending {
    background: rgba(212,175,55,0.12);
    border-color: rgba(212,175,55,0.25);
    color: var(--gold-soft);
}

.status-badge.confirmed {
    background: rgba(46,194,126,0.12);
    border-color: rgba(46,194,126,0.4);
    color: #dff9ea;
}

.status-badge.concluded {
    background: rgba(100, 150, 255, 0.12);
    border-color: rgba(100,150,255,0.35);
    color: #dfeaff;
}

.status-badge.cancelled {
    background: rgba(255,90,95,0.12);
    border-color: rgba(255,90,95,0.45);
    color: #ffdada;
}

.muted-text {
    color: var(--muted);
    font-size: 0.9rem;
}

.price {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--gold-soft);
}

.price-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--muted);
}

.testimonies-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.testimonial-card p {
    color: var(--muted);
    line-height: 1.7;
}

.person {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 1rem;
}

.person span {
    color: var(--gold-soft);
    font-size: 0.82rem;
}

.cta-band {
    padding-top: 0;
}

.cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(255,255,255,0.02));
}

.footer {
    padding: 2rem 0 3rem;
    border-top: 1px solid rgba(212,175,55,.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    color: var(--muted);
}

.auth-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.auth-shell {
    width: min(480px, 100%);
}

.auth-card {
    background: rgba(20,20,20,0.96);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 18px 35px rgba(0,0,0,0.26);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h1 {
    font-size: 2.8rem;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--muted);
}

input {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font: inherit;
}

@media (max-width: 980px) {
    .hero-grid,
    .benefits-grid,
    .cards-grid,
    .testimonies-grid,
    .feature-row,
    .footer-grid,
    .cta-box {
        grid-template-columns: 1fr 1fr;
    }

    .hero-grid {
        display: grid;
    }

    .benefits-grid,
    .cards-grid,
    .testimonies-grid,
    .feature-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cta-box {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Cabeçalho com menu ☰ em celular e tablet */
@media (max-width: 980px) {
    .nav {
        position: relative;
        min-height: 70px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        padding: 0;
    }

    .nav-menu {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 0.5rem);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        background: #0c0c0c;
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 0.75rem;
        box-shadow: 0 18px 40px rgba(0,0,0,0.5);
        z-index: 20;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu > a {
        padding: 0.8rem 0.75rem;
        border-radius: 10px;
        color: var(--text);
    }

    .nav-menu > a:hover,
    .nav-menu > a:focus-visible {
        background: rgba(212,175,55,0.1);
    }

    .nav-menu .nav-actions {
        flex-direction: row;
        margin: 0.5rem 0 0;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .nav-menu .nav-actions .btn {
        flex: 1;
    }
}

@media (max-width: 700px) {
    .stats,
    .benefits-grid,
    .cards-grid,
    .testimonies-grid,
    .feature-row,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 4rem;
    }

    .cta-group {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-group .btn,
    form .btn,
    .modal-actions .btn,
    .cta-box .btn {
        width: 100%;
    }
}

input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,.15);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.page-shell {
    padding: 3rem 0 4rem;
}

.panel-intro {
    margin-bottom: 2rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 0.7rem;
}

.stat-card strong {
    font-size: 2rem;
    color: var(--gold-soft);
}

.accent {
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(255,255,255,0.02));
}

.agenda-panel {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.5rem;
}

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.history-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    background: rgba(0,0,0,0.12);
}

.history-list small {
    display: block;
    color: var(--muted);
}

.tag {
    background: rgba(212,175,55,0.12);
    color: var(--gold-soft);
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
}

.empty-state {
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px dashed rgba(212,175,55,0.3);
    color: var(--muted);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: left;
    vertical-align: middle;
}

.data-table td:last-child {
    white-space: nowrap;
}

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

.table-scroll .data-table {
    min-width: 640px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.team-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
    text-align: center;
    overflow: hidden;
}

.team-photo {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 1rem;
    display: block;
}

.avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--gold), #a17813);
    color: #111;
    font-weight: 800;
    font-size: 1.6rem;
}

.barber-showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.barber-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 35px rgba(0,0,0,0.18);
}

.barber-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.barber-info {
    padding: 1.2rem 1rem 1.5rem;
}

.barber-info h3 {
    margin-bottom: 0.3rem;
}

.barber-info p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 768px) {
    .hero-grid,
    .three-columns,
    .cards-grid,
    .team-grid,
    .barber-showcase,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

/* ---------- Complementos da versão Supabase ---------- */

select,
textarea {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font: inherit;
    width: 100%;
}

select option { background: #151515; color: var(--text); }

select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,.15);
}

input[type="date"] { color-scheme: dark; }

.service-highlight {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
}

.service-highlight .icon { font-size: 1.8rem; }
.service-highlight p { color: var(--muted); }

.notice {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid;
}

.notice-success { background: rgba(46,194,126,0.12); border-color: rgba(46,194,126,0.4); color: #dff9ea; }
.notice-error { background: rgba(255,90,95,0.12); border-color: rgba(255,90,95,0.4); color: #ffe2e3; }

.config-warning {
    background: #7a1f1f;
    color: #fff;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.block { display: block; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 0.75rem;
    margin-top: 1rem;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: grid;
    place-items: center;
    z-index: 30;
    padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-card {
    width: min(500px, 100%);
    background: #151515;
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 22px;
    padding: 1.5rem;
}

.modal-actions { display: flex; gap: 1rem; }
.modal-actions .btn { flex: 1; }

@media (max-width: 768px) {
    .admin-grid,
    .inline-form { grid-template-columns: 1fr; }

    .auth-links { flex-wrap: wrap; gap: 0.75rem; }
    .auth-header h1 { font-size: 2.2rem; }
}

.agenda-panel h2,
.cta-box h2 { text-align: left; }

.inline-form input { width: 100%; min-width: 0; }

.auth-page .config-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

/* Botões dentro do menu: o hover de link não pode mudar a cor do texto do botão */
.nav-menu .nav-actions { margin-left: 0.6rem; }
nav a.btn-primary:hover { color: #121212; }
nav a.btn-outline:hover { color: var(--gold-soft); }

/* Botões e campos: área de toque confortável e sem estourar o layout */
.btn { white-space: nowrap; }
.btn:disabled { cursor: not-allowed; transform: none; }
.btn:focus-visible,
.nav-toggle:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
input, select, textarea { max-width: 100%; }
.data-table select { min-width: 175px; padding: 0.6rem 0.8rem; }

h1, h2, h3 { overflow-wrap: break-word; }

/* Tabelas viram cartões no celular */
@media (max-width: 700px) {
    .table-scroll .tabela-cards { min-width: 0; }

    .tabela-cards thead { display: none; }

    .tabela-cards,
    .tabela-cards tbody,
    .tabela-cards tr,
    .tabela-cards td {
        display: block;
        width: 100%;
    }

    .tabela-cards tr {
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 14px;
        padding: 0.4rem 1rem;
        margin-bottom: 0.75rem;
        background: rgba(0,0,0,0.15);
    }

    .tabela-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.6rem 0;
        text-align: right;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .tabela-cards td:last-child {
        border-bottom: 0;
        white-space: normal;
    }

    .tabela-cards td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.85rem;
        text-align: left;
        flex: none;
    }

    .tabela-cards td[colspan] { justify-content: center; }
    .tabela-cards td[colspan]::before { content: none; }

    .tabela-cards select { width: auto; min-width: 150px; }

    .admin-grid { grid-template-columns: 1fr; }
    .history-list li { gap: 0.75rem; }
}

/* Celulares pequenos */
@media (max-width: 480px) {
    h1 { font-size: 2.4rem; line-height: 1.05; }
    h2 { font-size: 2rem; }
    .auth-card { padding: 1.5rem; }
    .agenda-panel { padding: 1.1rem; }
    .brand strong { font-size: 0.9rem; }
}

/* Links para seções (#agendamentos etc.) não ficam escondidos atrás do cabeçalho fixo */
section[id] { scroll-margin-top: 96px; }

select:disabled { opacity: 0.6; cursor: wait; }
.notice:empty { display: none; }
