/* =============================================
   Supalates – Stylesheet
   ============================================= */

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

:root {
    --primary:    #29ABE2;
    --primary-d:  #1a96cc;
    --primary-l:  #e8f6fd;
    --dark:       #0f0e17;
    --text:       #111827;
    --text-2:     #374151;
    --muted:      #6b7280;
    --muted-l:    #9ca3af;
    --bg:         #f9fafb;
    --white:      #ffffff;
    --border:     #e5e7eb;
    --danger:     #ef4444;
    --danger-d:   #dc2626;
    --radius:     6px;
    --radius-lg:  12px;
    --radius-xl:  18px;
    --shadow-sm:  0 1px 2px rgba(0,0,0,.06);
    --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:  0 4px 12px rgba(0,0,0,.08);
    --shadow-lg:  0 10px 30px rgba(0,0,0,.12);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--text); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Announce Bar */
.announce-bar { background: var(--dark); color: #d1d5db; text-align: center; padding: .6rem 1rem; font-size: .82rem; letter-spacing: .01em; }
.announce-bar strong { color: var(--white); }
.announce-bar a { color: #7dd3fa; font-weight: 600; margin-left: .3rem; }
.announce-bar a:hover { color: var(--white); text-decoration: none; }

/* Navbar */
.navbar { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; box-shadow: var(--shadow-sm); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; height: auto; gap: 2rem; }
.nav-brand { display: flex; align-items: center; white-space: nowrap; }
.nav-brand img { height: 70px; width: auto; display: block; padding: 6px 0; }
.nav-brand:hover { text-decoration: none; opacity: .88; }
.nav-links { list-style: none; display: flex; justify-content: center; gap: 2rem; }
.nav-links a { color: var(--text-2); font-size: .875rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 1rem; justify-content: flex-end; white-space: nowrap; }
.nav-user { font-size: .85rem; color: var(--muted); font-weight: 500; }
.nav-text-link { font-size: .875rem; font-weight: 500; color: var(--text-2); }
.nav-text-link:hover { color: var(--primary); text-decoration: none; }
.btn-nav-cta { background: var(--dark); color: var(--white) !important; padding: .5rem 1.2rem; border-radius: var(--radius); font-size: .875rem; font-weight: 600; transition: background .15s; }
.btn-nav-cta:hover { background: var(--primary); text-decoration: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .6rem 1.35rem; border-radius: var(--radius); font-size: .9rem; font-weight: 600; cursor: pointer; border: none; transition: all .15s; letter-spacing: .01em; line-height: 1.4; font-family: inherit; }
.btn:active { transform: scale(.98); }
.btn-primary  { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-d); text-decoration: none; }
.btn-secondary { background: var(--white); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-2); text-decoration: none; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: var(--danger-d); text-decoration: none; }
.btn-hero-white { background: var(--white); color: var(--dark); }
.btn-hero-white:hover { background: #f3f4f6; text-decoration: none; }
.btn-hero-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6); }
.btn-hero-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); text-decoration: none; }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: .8rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }

/* Hero */
.hero {
    position: relative;
    min-height: 88vh;
    background-image:
        linear-gradient(to bottom, rgba(10,9,22,.58) 0%, rgba(10,9,22,.48) 60%, rgba(10,9,22,.72) 100%),
        url('https://images.unsplash.com/photo-1518611012118-696072aa579a?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center 35%;
    display: flex;
    align-items: center;
}
.hero-overlay { width: 100%; padding: 5rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.hero-eyebrow { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: #7dd3fa; margin-bottom: 1rem; }
.hero-content { max-width: 620px; }
.hero-content h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); font-weight: 900; line-height: 1.1; color: var(--white); letter-spacing: -.03em; }
.hero-content h1 strong { color: var(--white); font-weight: 900; }
.hero-sub { color: rgba(255,255,255,.75); font-size: 1.1rem; margin: 1.25rem 0 2rem; max-width: 500px; line-height: 1.65; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Class Types Strip */
.class-types-strip { background: var(--dark); }
.class-types-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.class-type-tile { padding: 1.75rem 1.5rem; color: var(--white); border-right: 1px solid rgba(255,255,255,.07); transition: background .2s; cursor: pointer; }
.class-type-tile:last-child { border-right: none; }
.class-type-tile:hover { background: var(--tile-color); text-decoration: none; }
.tile-label { font-size: 1.2rem; font-weight: 800; color: var(--white); line-height: 1.2; }
.tile-sub { font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.45); margin-top: .2rem; }

/* Home sections */
.home-schedule { padding: 4rem 0; background: var(--bg); }

/* Why Section */
.why-section { padding: 5rem 0; background: var(--white); }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.section-eyebrow { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--primary); margin-bottom: .75rem; }
.why-text h2 { font-size: 2rem; font-weight: 800; line-height: 1.2; letter-spacing: -.03em; margin-bottom: 1rem; }
.why-text p { color: var(--muted); line-height: 1.75; }
.why-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.stat-card { background: var(--bg); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; border: 1px solid var(--border); }
.stat-num { font-size: 2.25rem; font-weight: 900; color: var(--primary); letter-spacing: -.03em; line-height: 1; }
.stat-label { font-size: .75rem; color: var(--muted); font-weight: 600; margin-top: .4rem; text-transform: uppercase; letter-spacing: .06em; }

/* CTA Banner */
.cta-banner { background: linear-gradient(135deg, #1a78b8 0%, #29ABE2 100%); padding: 4rem 0; }
.cta-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-banner h2 { font-size: 1.75rem; font-weight: 800; color: var(--white); letter-spacing: -.03em; }
.cta-banner p { color: rgba(255,255,255,.75); margin-top: .35rem; }

/* Section Header */
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.5rem; }
.section-header h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.see-all { font-size: .875rem; color: var(--primary); font-weight: 600; }
.see-all:hover { text-decoration: underline; }

/* Page Header */
.page-header { margin-bottom: 2rem; padding-top: 2.5rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; }
.page-subtitle { color: var(--muted); margin-top: .4rem; }

/* Back Link */
.back-link { margin-bottom: 1.5rem; padding-top: 1.75rem; }
.back-link a { font-size: .875rem; color: var(--muted); font-weight: 500; }
.back-link a:hover { color: var(--primary); text-decoration: none; }

/* Alerts */
.alert { padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .875rem; }
.alert-flash { margin: 1.5rem 0 0; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert ul { padding-left: 1.2rem; }

/* Class Grid */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.class-card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; transition: transform .18s, box-shadow .18s; color: var(--text); }
.class-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.class-card--booked { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.class-card-bar { height: 5px; flex-shrink: 0; }
.class-card-body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.class-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .15rem; }
.class-type-badge { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.class-type-badge--lg { font-size: .78rem; }
.booked-tag { font-size: .65rem; font-weight: 700; background: var(--primary-l); color: var(--primary); border-radius: 20px; padding: .15rem .55rem; white-space: nowrap; }
.class-time { font-size: .95rem; font-weight: 700; color: var(--text); }
.class-instructor { font-size: .78rem; color: var(--muted); }
.class-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .65rem; border-top: 1px solid var(--border); font-size: .75rem; color: var(--muted-l); }
.spots { font-weight: 600; color: var(--muted); }
.spots-low  { color: #d97706; }
.spots-full { color: var(--danger); }

/* Schedule Day */
.schedule-day { margin-bottom: 2.5rem; }
.day-heading { font-size: .85rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: baseline; gap: .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.day-date { font-size: .82rem; font-weight: 400; color: var(--muted-l); text-transform: none; letter-spacing: 0; }

/* Class Detail */
.class-detail { background: var(--white); border-radius: var(--radius-xl); border: 1px solid var(--border); box-shadow: var(--shadow-md); overflow: hidden; margin-bottom: 3rem; }
.class-detail-header { padding: 2rem 2.25rem; border-bottom: 1px solid var(--border); }
.class-detail-header h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; margin: .35rem 0 .2rem; }
.class-detail-subtitle { color: var(--muted); }
.class-detail-body { display: grid; grid-template-columns: 1fr 300px; }
.class-detail-info { padding: 2rem 2.25rem; }
.class-detail-action { padding: 2rem; border-left: 1px solid var(--border); background: var(--bg); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2rem; margin-bottom: 2rem; }
.info-item { display: flex; flex-direction: column; gap: .2rem; }
.info-label { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; }
.info-value { font-size: .95rem; font-weight: 600; color: var(--text); }
.class-description h3 { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; margin-bottom: .6rem; }
.class-description p { color: var(--text-2); line-height: 1.75; }
.action-box { display: flex; flex-direction: column; gap: .85rem; }
.action-box p { font-size: .875rem; color: var(--muted); }
.action-box--muted { opacity: .7; }
.action-box--booked { background: #f0fdf4; border-radius: var(--radius-lg); padding: 1.25rem; border: 1px solid #bbf7d0; }
.booked-confirm { font-size: 1.05rem; font-weight: 800; color: #166534; }
.action-price { font-size: .875rem; font-weight: 700; color: var(--text) !important; }

/* Bookings */
.bookings-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.75rem; }
.tab-btn { background: none; border: none; padding: .75rem 1.25rem; font-size: .875rem; font-weight: 600; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s; font-family: inherit; }
.tab-btn--active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count { background: var(--border); color: var(--muted); border-radius: 20px; padding: .1rem .5rem; font-size: .72rem; margin-left: .4rem; }
.tab-panel--hidden { display: none; }
.bookings-list { display: flex; flex-direction: column; gap: .75rem; padding-bottom: 3rem; }
.booking-row { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; align-items: center; gap: 1rem; overflow: hidden; box-shadow: var(--shadow-sm); }
.booking-row--cancelled { opacity: .6; }
.booking-color { width: 5px; min-height: 76px; align-self: stretch; flex-shrink: 0; }
.booking-info { flex: 1; padding: 1rem 0; }
.booking-type { font-weight: 700; font-size: .95rem; }
.booking-when { font-size: .82rem; color: var(--muted); margin: .2rem 0; }
.booking-instructor { font-size: .78rem; color: var(--muted-l); }
.booking-actions { padding-right: 1.25rem; display: flex; gap: .5rem; }
.booking-status { padding-right: 1.25rem; }
.status-badge { font-size: .68rem; font-weight: 700; padding: .25rem .65rem; border-radius: 20px; text-transform: uppercase; letter-spacing: .05em; }
.status-badge--confirmed  { background: #dcfce7; color: #166534; }
.status-badge--cancelled  { background: #fee2e2; color: #991b1b; }
.status-badge--waitlisted { background: #fef9c3; color: #92400e; }

/* Empty State */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty-state p { margin-bottom: 1.25rem; }

/* Forms */
.form-container { max-width: 460px; margin: 3rem auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2.25rem; box-shadow: var(--shadow-lg); }
.form-container h2 { margin-bottom: 1.75rem; font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.form-group  { margin-bottom: 1.1rem; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-size: .7rem; font-weight: 700; margin-bottom: .4rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
input[type='text'], input[type='email'], input[type='password'], input[type='tel'], select, textarea {
    width: 100%; padding: .65rem .9rem; border: 1.5px solid var(--border); border-radius: var(--radius);
    font-size: .95rem; background: var(--white); color: var(--text); transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(41,171,226,.15); }
.form-footer { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--muted); }

/* Google Sign-In Button */
.btn-google { display: flex; align-items: center; justify-content: center; gap: .7rem; width: 100%; padding: .65rem 1rem; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .9rem; font-weight: 600; color: var(--text); cursor: pointer; transition: border-color .15s, box-shadow .15s; font-family: inherit; margin-bottom: .25rem; }
.btn-google:hover { border-color: #4285F4; box-shadow: 0 0 0 3px rgba(66,133,244,.12); text-decoration: none; color: var(--text); }
.btn-google-icon { width: 18px; height: 18px; flex-shrink: 0; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.1rem 0; color: var(--muted-l); font-size: .78rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Footer */
.footer { background: var(--dark); padding: 2.5rem 1.5rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-brand { font-size: 1rem; font-weight: 900; color: var(--white); text-transform: uppercase; letter-spacing: .06em; }
.footer span:not(.footer-brand) { color: #6b7280; font-size: .8rem; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { font-size: .8rem; color: #6b7280; }
.footer-nav a:hover { color: var(--white); text-decoration: none; }

/* 404 */
.error-page { text-align: center; padding: 8rem 1rem; }
.error-page h1 { font-size: 6rem; color: var(--primary); font-weight: 900; letter-spacing: -.05em; }
.error-page p { color: var(--muted); margin: 1rem 0; }

/* ── Admin ───────────────────────────────────────────────────── */
.admin-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.admin-page-header h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }

.admin-back { margin-bottom: 1.5rem; }
.admin-back a { font-size: .875rem; color: var(--muted); font-weight: 500; }
.admin-back a:hover { color: var(--primary); text-decoration: none; }

/* Admin stat tiles */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-tile { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem 1.75rem; box-shadow: var(--shadow-sm); }
.stat-tile-num { font-size: 2.25rem; font-weight: 900; color: var(--primary); letter-spacing: -.04em; line-height: 1; }
.stat-tile-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-top: .4rem; }

/* Quick-link cards */
.admin-quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.admin-ql-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1rem; text-align: center; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.admin-ql-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); text-decoration: none; }
.admin-ql-icon { font-size: 1.5rem; }
.admin-ql-label { font-size: .82rem; font-weight: 600; color: var(--text-2); }

/* Section */
.admin-section { margin-top: 2rem; }
.admin-section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.admin-section-header h2 { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }

/* Admin table */
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; background: var(--white); }
.admin-table thead th { background: var(--bg); color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table tbody td { padding: .85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg); }
.admin-row-muted td { opacity: .55; }
.admin-row-actions { display: flex; gap: .4rem; justify-content: flex-end; white-space: nowrap; }

/* Admin form */
.admin-form-wrap { max-width: 640px; }
.admin-form-wrap h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 1.75rem; }
.admin-form-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

/* Misc helpers */
.ct-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .45rem; flex-shrink: 0; }
.color-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: .35rem; vertical-align: middle; border: 1px solid rgba(0,0,0,.1); }
.booking-pill { display: inline-flex; align-items: center; background: var(--primary-l); color: var(--primary); font-size: .75rem; font-weight: 700; border-radius: 20px; padding: .2rem .7rem; white-space: nowrap; }
.booking-pill:hover { text-decoration: none; opacity: .85; }
.text-muted { color: var(--muted); }
input[type='date'], input[type='time'], input[type='color'] { font-family: inherit; }
textarea { resize: vertical; min-height: 80px; }

@media (max-width: 900px) {
    .admin-stats { grid-template-columns: repeat(3, 1fr); }
    .admin-quick-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .admin-quick-links { grid-template-columns: repeat(2, 1fr); }
    .admin-page-header { flex-direction: column; }
}

/* Responsive */
@media (max-width: 900px) {
    .why-grid { grid-template-columns: 1fr; gap: 3rem; }
    .class-types-grid { grid-template-columns: repeat(2, 1fr); }
    .class-type-tile:nth-child(2) { border-right: none; }
    .class-detail-body { grid-template-columns: 1fr; }
    .class-detail-action { border-left: none; border-top: 1px solid var(--border); }
    .cta-banner-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-container { grid-template-columns: auto auto; }
    .hero { min-height: 75vh; }
    .hero-content h1 { font-size: 2.2rem; }
    .info-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
}
