/* Theme Tokens */
:root {
    --bg-primary: #242424;
    --bg-secondary: #1b1b1b;
    --bg-elevated: #2f2f2f;
    --bg-overlay: rgba(20, 20, 20, 0.8);
    --text-primary: #f9ba5b;
    --text-muted: rgba(249, 186, 91, 0.7);
    --text-contrast: #242424;
    --accent: #f9ba5b;
    --accent-strong: #ffce85;
    --accent-success: #7ed957;
    --border-color: rgba(249, 186, 91, 0.2);
    --shadow-soft: 0 15px 45px rgba(0, 0, 0, 0.35);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

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

html, body {
    font-family: 'Merriweather', 'Georgia', serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

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

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

button {
    font: inherit;
}

.page-wrapper {
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, rgba(249, 186, 91, 0.08), transparent 50%), var(--bg-primary);
}

main {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: clamp(1.5rem, 3vw, 3rem) clamp(0.75rem, 4vw, 2.5rem) 3rem;
}

main > * {
    width: 100%;
}

/* Header & Navigation */
header {
    background: var(--bg-overlay);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    gap: 0.75rem;
}

.logo img {
    width: clamp(48px, 5vw, 64px);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.salon-name {
    font-family: 'Georgia', 'Times New Roman', 'Merriweather', serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    letter-spacing: 0.18em;
    text-transform: capitalize;
    color: var(--accent);
    text-align: center;
    font-style: italic;
    font-weight: bold;
}

.navbar-buttons {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
}

.panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.panel a {
    position: relative;
    padding: 0.35rem 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.panel a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.panel a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.panel a:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.auth-button:hover {
    color: var(--accent);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.auth-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.auth-form {
    margin: 0;
    display: flex;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Primary Content Shell */
.main-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent), var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.5rem, 4vw, 3rem);
    margin: 0 auto;
    width: min(1100px, 100%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.main-content h1,
.main-content h2,
.main-content h3 {
    color: var(--accent);
    letter-spacing: 0.05em;
}

.main-content p {
    color: var(--text-muted);
}

/* Hero / actions */
#available-slots {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-book-button {
    background: linear-gradient(120deg, rgba(249, 186, 91, 0.25), rgba(249, 186, 91, 0.05));
    border: 1px solid rgba(249, 186, 91, 0.4);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

.main-book-button button {
    background: var(--accent);
    color: var(--text-contrast);
    border: none;
    border-radius: 999px;
    padding: 0.85rem 2.75rem;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.main-book-button button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(249, 186, 91, 0.25);
}

.profile,
.service-card,
.stub,
.accordion-item,
.overlay,
.card-panel {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: clamp(1rem, 3vw, 1.75rem);
}

.profile {
    text-align: center;
}

.profile p {
    font-size: 1.05rem;
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.service-card h3 {
    margin-bottom: 0.35rem;
}

/* Utility buttons */
.button,
.button-back,
.booking-buttons button {
    background: var(--accent);
    color: var(--text-contrast);
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.button-back:hover,
.booking-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(249, 186, 91, 0.3);
}

.booking-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Stub */
.stub {
    align-items: center;
    text-align: center;
}

.stub h1 {
    font-family: 'Georgia', 'Merriweather', serif;
    font-style: italic;
}

.shop-stub {
    font-size: 1.1rem;
}

/* Slots & schedules */
.schedule-list,
.timeslot-list {
    list-style: none;
    padding: 0;
}

.date-item {
    margin: 1.25rem 0 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.slot-container,
.timeslot-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.6rem;
}

.timeslot,
.time-item,
.timeslot-label {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.timeslot:hover,
.time-item:hover .timeslot-label,
.timeslot-label:hover {
    background: rgba(249, 186, 91, 0.08);
    transform: translateY(-1px);
}

.timeslot.reserved {
    opacity: 0.35;
    cursor: not-allowed;
}

.submit-button {
    margin-top: 1rem;
    align-self: flex-start;
}

.success-message {
    color: #7ed957;
    font-weight: 600;
}

/* Overlay-based sections */
.overlay {
    text-align: center;
    color: var(--text-primary);
}

.slots ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.5rem;
    list-style: none;
}

/* Accordion */
.accordion-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.accordion-item {
    border-color: rgba(249, 186, 91, 0.25);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.75rem 0;
    color: var(--accent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.accordion-toggle {
    display: none;
}

.accordion-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease;
    padding-top: 0;
}

.accordion-toggle:checked + .accordion-header {
    color: var(--accent-strong);
}

.accordion-toggle:checked + .accordion-header + .accordion-content {
    max-height: 1200px;
    opacity: 1;
    padding-top: 0.75rem;
}

.slot-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.submit-button {
    background: var(--accent);
    color: var(--text-contrast);
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(249, 186, 91, 0.3);
}

.slots-page {
    gap: 1.5rem;
}

.slots-header {
    text-align: center;
}

.slots-header p {
    color: var(--text-muted);
}

/* Footer */
footer {
    margin-top: auto;
    background: var(--bg-secondary);
    padding: 2rem 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.footer-content p {
    margin: 0.4rem 0;
}

/* Responsive */
@media (min-width: 900px) {
    .navbar-top {
        flex-direction: row;
        justify-content: space-evenly;
        padding: 1rem 2rem;
    }

    .panel {
        gap: 1.5rem;
        padding: 0.75rem 2rem;
    }

    .auth-icon-button {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 1.25rem;
    }

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

    .booking-buttons {
        flex-direction: column;
    }
}

/* Dashboard */
.dashboard-page {
    gap: 1.5rem;
}

.dashboard-hero {
    text-align: center;
}

.dashboard-hero h1 {
    margin-bottom: 0.5rem;
}

.dashboard-hero p {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 1rem;
}

.dashboard-hero .button {
    margin: 0 auto;
}

.no-appointments {
    text-align: center;
}

.appointment-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.appointment-card {
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.appointment-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.appointment-service {
    font-weight: 600;
    letter-spacing: 0.05em;
}

.appointment-datetime {
    color: var(--accent-strong);
    font-size: 0.95rem;
}

.status-badge {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    background: rgba(249, 186, 91, 0.15);
    color: var(--accent);
}

.card-actions {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
}

.ghost-button {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(249, 186, 91, 0.6);
    border-radius: 999px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.ghost-button:hover {
    background: rgba(249, 186, 91, 0.15);
    color: var(--text-primary);
}

.hide-btn,
.unhide-btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.4rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.hide-btn {
    background: #f28482;
    color: #242424;
}

.unhide-btn {
    background: #80ed99;
    color: #242424;
}

.hide-btn:hover,
.unhide-btn:hover {
    opacity: 0.85;
}

/* Tabular data */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(249, 186, 91, 0.08);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}

.empty-row {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
}

.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.section-eyebrow--success {
  font-style: var(--accent-success);
}

/* Admin layout */
.admin-page {
    gap: 1.75rem;
}

.admin-hero {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.admin-hero h1 {
    margin-bottom: 0.35rem;
}

.admin-hero p {
    color: var(--text-muted);
}

.admin-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.success-page {
    gap: 1.5rem;
}

.success-hero {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.success-hero h1 {
    margin-bottom: 0.35rem;
}

.success-hero p {
    color: var(--text-muted);
}

.success-layout {
    display: grid;
    gap: 1.25rem;
}

.success-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.success-icon {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: rgba(126, 217, 87, 0.15);
    color: #7ed957;
    border: 1px solid rgba(126, 217, 87, 0.35);
}

.success-card-copy {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.success-card .success-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: #7ed957;
}

.success-subtext {
    color: var(--text-muted);
}

.success-actions {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.success-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    width: 100%;
}

.success-action.secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(249, 186, 91, 0.4);
}

@media (min-width: 768px) {
    .success-layout {
        grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
        align-items: stretch;
    }

    .success-actions {
        align-self: stretch;
    }
}

.confirmation-wrapper {
    width: 100%;
    padding: 1rem 0;
}

.confirmation-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.confirmation-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(126, 217, 87, 0.15);
    border: 1px solid rgba(126, 217, 87, 0.35);
    color: #7ed957;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.confirmation-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.confirmation-title {
    font-weight: 600;
    color: #7ed957;
}

.confirmation-note {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.admin-action-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.admin-action-card:hover {
    border-color: rgba(249, 186, 91, 0.5);
    transform: translateY(-3px);
}

.admin-card-icon {
    font-size: 1.5rem;
}

.admin-card-footer {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
}

.admin-section-header p {
    color: var(--text-muted);
}

.back-row {
    display: flex;
    justify-content: flex-end;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.form-grid label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.date-input,
input[type="date"] {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    appearance: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.info-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem;
    text-align: center;
    color: var(--text-muted);
}

.inline-alert {
    margin-top: 0.5rem;
    color: var(--accent-strong);
}

.admin-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: -0.35rem;
}

.admin-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-accordion .accordion-item {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-accordion .accordion-content {
    padding: 1rem 0;
}

.slot-table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tag-available {
    color: #7ed957;
    border-color: rgba(126, 217, 87, 0.4);
}

.tag-hidden {
    color: #f0815c;
    border-color: rgba(240, 129, 92, 0.4);
}

/* Auth pages */
.auth-page {
    align-items: center;
    gap: 1.5rem;
}

.auth-card {
    width: min(480px, 100%);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.45);
}

.auth-header {
    text-align: center;
}

.auth-header p {
    color: var(--text-muted);
    margin-top: 0.35rem;
}

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

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-input-group label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.auth-input,
.auth-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.auth-input:focus,
.auth-select:focus {
    outline: none;
    border-color: rgba(249, 186, 91, 0.6);
    box-shadow: 0 0 0 2px rgba(249, 186, 91, 0.25);
}

.auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-checkbox input {
    accent-color: var(--accent);
}

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

.auth-tertiary a {
    color: var(--accent);
    text-decoration: underline;
}

.auth-alert {
    font-size: 0.9rem;
    color: #f38ba0;
}

.auth-success {
    color: #7ed957;
}
