@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;700&family=Bebas+Neue&display=swap');

:root {
    --bg: #0e0e0e;
    --surface: #181818;
    --surface-strong: #212121;
    --card: #1f1f1f;
    --line: rgba(255, 255, 255, 0.09);
    --text: #f4efe8;
    --muted: #c8b8a4;
    --primary: #caa269;
    --primary-strong: #d8b37a;
    --primary-contrast: #17120c;
    --dark: #0c0c0c;
    --success: #6ac087;
    --error: #f08b81;
    --warning: #f1bf6b;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: 'Barlow', 'Segoe UI', Tahoma, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, #262018 0%, rgba(38, 32, 24, 0.4) 32%, transparent 64%),
        radial-gradient(circle at bottom left, #1d1b19 0%, rgba(29, 27, 25, 0.3) 30%, transparent 60%),
        var(--bg);
}

h1,
h2,
h3,
.brand strong,
.btn {
    font-family: 'Bebas Neue', 'Impact', sans-serif;
    letter-spacing: 0.03em;
}

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

.hidden {
    display: none !important;
}

.bg-shape {
    position: fixed;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.bg-shape-1 {
    top: -70px;
    right: -40px;
    background: rgba(202, 162, 105, 0.22);
}

.bg-shape-2 {
    bottom: -90px;
    left: -70px;
    background: rgba(0, 0, 0, 0.3);
}

.app-shell {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 16px 16px 96px;
}

.topbar {
    background: linear-gradient(140deg, #171717, #0d0d0d);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 0 0 2px rgba(202, 162, 105, 0.25);
}

.brand strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1;
}

.brand small {
    color: var(--muted);
    font-size: 0.75rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.screen {
    margin-top: 16px;
    display: grid;
    gap: 14px;
}

.panel {
    background: linear-gradient(150deg, var(--surface), var(--card));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 10px 28px rgba(32, 21, 13, 0.08);
}

.hero {
    background: linear-gradient(160deg, rgba(20, 20, 20, 0.95), rgba(12, 12, 12, 0.95));
    color: var(--text);
}

.hero .muted,
.hero .eyebrow {
    color: var(--muted);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.68rem;
    color: var(--muted);
    margin: 0 0 8px;
}

h1,
h2,
h3 {
    margin: 0 0 8px;
    line-height: 1.1;
}

.panel > h1,
.panel > h2,
.panel > h3 {
    color: var(--primary-strong);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

p {
    margin: 0;
}

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

.demo-tip {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.85rem;
}

.hero-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cards {
    display: grid;
    gap: 10px;
}

.card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.combo-card strong {
    font-size: 1.3rem;
}

.stats-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card {
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    color: var(--primary-strong);
}

.stat-card span,
.stat-card small {
    color: var(--muted);
}

.list-stack {
    display: grid;
    gap: 10px;
}

.list-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    border: 1px solid var(--line);
}

.list-item.appointment-focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(202, 162, 105, 0.25);
}

.list-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.list-item strong {
    display: block;
}

.list-item-head > div {
    width: 100%;
}

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

.list-item-payment {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(106, 192, 135, 0.25);
    background: rgba(106, 192, 135, 0.08);
}

.list-item-payment strong {
    color: #b7f2cc;
}

.list-meta {
    text-align: right;
}

.list-meta time {
    display: block;
    font-size: 0.86rem;
    color: var(--muted);
}

.list-item-actions {
    width: 100%;
    display: grid;
    gap: 8px;
}

.list-item-reschedule-form {
    display: grid;
    gap: 6px;
}

.list-item-current-slot {
    display: grid;
    gap: 2px;
}

.list-item-current-slot small {
    color: var(--muted);
    font-size: 0.8rem;
}

.list-item-current-slot strong {
    color: var(--primary-strong);
}

.list-item-reschedule-fields {
    display: grid;
    gap: 8px;
}

.list-item-reschedule-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.list-item-cancel-form {
    justify-self: end;
}

.list-item-deadline {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
}

.tag {
    font-size: 0.75rem;
    display: inline-block;
    margin-top: 3px;
    background: rgba(202, 162, 105, 0.18);
    color: var(--primary-strong);
    padding: 2px 8px;
    border-radius: 999px;
}

.tag.tag-status-agendado {
    background: rgba(106, 192, 135, 0.24);
    color: #b7f2cc;
}

.tag.tag-status-confirmado {
    background: rgba(107, 160, 242, 0.24);
    color: #d2e4ff;
}

.tag.tag-status-concluido {
    background: rgba(202, 162, 105, 0.24);
    color: #ffe3b8;
}

.tag.tag-status-cancelado {
    background: rgba(240, 139, 129, 0.24);
    color: #ffd6d2;
}

.tag.tag-status-faltou,
.tag.tag-status-encerrado {
    background: rgba(241, 191, 107, 0.24);
    color: #ffe4b3;
}

.tag.tag-payment-paid {
    background: rgba(106, 192, 135, 0.24);
    color: #b7f2cc;
}

.form-grid {
    display: grid;
    gap: 11px;
}

label {
    display: grid;
    gap: 5px;
    font-weight: 600;
    font-size: 0.92rem;
}

input,
select,
textarea {
    width: 100%;
    font: inherit;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #141414;
    color: var(--text);
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(202, 162, 105, 0.35);
    border-color: var(--primary);
}

.hint {
    color: var(--muted);
    font-size: 0.85rem;
}

.schedule-note {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-size: 0.9rem;
}

.schedule-note strong {
    color: var(--primary-strong);
}

.schedule-note ul {
    margin: 8px 0 0 18px;
    padding: 0;
    display: grid;
    gap: 4px;
}

.session-grid {
    display: grid;
    gap: 10px;
}

.session-item {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.session-item strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-strong);
}

.session-item-inputs {
    display: grid;
    gap: 8px;
}

.payment-history-row {
    display: grid;
    gap: 10px;
}

.payment-history-row small {
    color: var(--muted);
}

.payment-history-row strong {
    color: var(--primary-strong);
}

.btn {
    border: 0;
    border-radius: 11px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 10px 14px;
    font-size: 1rem;
}

.btn-small {
    padding: 7px 11px;
    font-size: 0.87rem;
}

.btn[disabled],
input[disabled],
select[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(140deg, var(--primary), #b98f53);
    color: var(--primary-contrast);
}

.btn-dark {
    background: #111111;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-light {
    background: transparent;
    color: var(--primary-strong);
    border: 1px solid rgba(202, 162, 105, 0.5);
}

.auth-panel {
    max-width: 520px;
    margin: 0 auto;
}

.auth-links {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.meta-list {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    display: grid;
    gap: 6px;
}

.alert {
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(59, 124, 78, 0.2);
    color: #a7e4bb;
}

.alert-error {
    background: rgba(157, 45, 37, 0.2);
    color: #ffd1cc;
}

.alert-warning {
    background: rgba(202, 162, 105, 0.22);
    color: #ffe2be;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 10px;
    width: min(92vw, 560px);
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    background: rgba(12, 12, 12, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.bottom-nav a {
    color: var(--muted);
    text-decoration: none;
    text-align: center;
    padding: 8px 6px;
    border-radius: 10px;
    font-size: 0.85rem;
}

.bottom-nav a.active {
    background: linear-gradient(150deg, var(--primary), #b98f53);
    color: #17120c;
}

@media (min-width: 780px) {
    .app-shell {
        padding-bottom: 30px;
    }

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

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

    .form-grid > *:last-child,
    .form-grid > .hint,
    .form-grid > .schedule-note,
    .form-grid > #singleFields,
    .form-grid > #comboFields,
    .form-grid > #singleDateTimeFields,
    .form-grid > #comboSequentialFields,
    .form-grid > #comboMultipleFields,
    .form-grid > label:nth-last-child(2) {
        grid-column: 1 / -1;
    }

    .session-item-inputs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .payment-history-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .list-item-reschedule-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bottom-nav {
        position: sticky;
        transform: none;
        left: auto;
        width: 100%;
        margin-top: 8px;
        bottom: 0;
    }
}
