/* ============================================================
   Client Portal Stylesheet — Yoga Studio
   ============================================================ */

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

:root {
    --green: #2f6f4e;
    --green-dk: #1f5138;
    --green-lt: #e8f5ee;
    --gold: #e4ad5b;
    --bg: #fbfaf5;
    --card: #ffffff;
    --text: #1a2e25;
    --muted: #6b7f74;
    --border: #e0e8e2;
    --danger: #c0392b;
    --ok: #16a34a;
    --warn: #d97706;
    --radius: 12px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER / NAV ===== */
.portal-header {
    background: var(--green-dk);
    color: #fff;
    position: sticky;
    top: 0; z-index: 200;
}

.portal-nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 12px 0;
    margin-right: auto;
}
.portal-brand-mark {
    width: 34px; height: 34px;
    background: var(--gold);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px;
    color: var(--green-dk);
}
.portal-brand-name { color: rgba(255,255,255,.95); font-size: 14px; font-weight: 600; }

.portal-nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    color: rgba(255,255,255,.75);
    font-size: 13px;
    font-weight: 500;
    border-radius: 7px;
    text-decoration: none;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.portal-nav-link svg { width: 15px; height: 15px; }
.portal-nav-link:hover, .portal-nav-link.active { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }

.portal-nav-mobile-btn {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,.85);
    padding: 8px;
    cursor: pointer;
    border-radius: 7px;
}
.portal-nav-mobile-btn svg { width: 22px; height: 22px; display: block; }
.portal-nav-mobile-btn:hover { background: rgba(255,255,255,.1); }

.portal-mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--green-dk);
    padding: 8px 12px 16px;
    border-top: 1px solid rgba(255,255,255,.1);
}
.portal-mobile-nav.open { display: flex; }
.portal-mobile-nav .portal-nav-link { padding: 10px 12px; }

/* ===== WRAP ===== */
.portal-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ===== WELCOME BANNER ===== */
.welcome-banner {
    background: linear-gradient(135deg, var(--green-dk) 0%, var(--green) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.welcome-text h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.welcome-text p  { font-size: 13.5px; color: rgba(255,255,255,.8); }
.welcome-badge {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 12px 18px;
    text-align: center;
}
.welcome-badge-val  { font-size: 22px; font-weight: 800; color: var(--gold); }
.welcome-badge-lbl  { font-size: 11px; color: rgba(255,255,255,.75); margin-top: 2px; }

/* ===== DASHBOARD GRID ===== */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.dash-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}
.dash-card-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.dash-card-icon svg { width: 20px; height: 20px; }
.dci-green  { background: #dcfce7; color: #16a34a; }
.dci-blue   { background: #dbeafe; color: #2563eb; }
.dci-gold   { background: #fef3c7; color: #b45309; }
.dci-red    { background: #fee2e2; color: #dc2626; }
.dash-card-val { font-size: 22px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.dash-card-lbl { font-size: 12.5px; color: var(--muted); }

/* ===== CARDS ===== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}
.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.card-head h2, .card-head h3 { font-size: 14px; font-weight: 600; }
.card-body { padding: 18px; }

/* ===== MEMBERSHIP STATUS ===== */
.mem-status {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.mem-status-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mem-plan-name { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.mem-dates { font-size: 12.5px; color: var(--muted); }
.mem-bar-wrap { background: #f1f5f2; border-radius: 20px; height: 8px; overflow: hidden; }
.mem-bar { height: 100%; border-radius: 20px; background: var(--green); transition: width .3s; }
.mem-bar.warn { background: var(--warn); }
.mem-bar.bad  { background: var(--danger); }
.mem-bar-info { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--muted); }

/* ===== TABLES ===== */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    background: #f8faf9;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 13.5px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8faf9; }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.b-green  { background: #dcfce7; color: #16a34a; }
.b-red    { background: #fee2e2; color: #dc2626; }
.b-orange { background: #ffedd5; color: #c2410c; }
.b-blue   { background: #dbeafe; color: #1d4ed8; }
.b-gray   { background: #f1f5f9; color: #475569; }
.b-gold   { background: #fef3c7; color: #92400e; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-family: inherit;
    transition: filter .12s;
    white-space: nowrap;
}
.btn:hover { filter: brightness(.92); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-danger  { background: #fee2e2; color: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-sm svg { width: 14px; height: 14px; }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-label { font-size: 12.5px; font-weight: 600; }
.req { color: var(--danger); }
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--text);
    background: #fff;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,111,78,.12); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint  { font-size: 11.5px; color: var(--muted); }
.form-error { font-size: 12px; color: var(--danger); }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; font-weight: 500; display: flex; align-items: flex-start; gap: 8px; }
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-ok   { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-err  { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* ===== CLASS SCHEDULE CARDS ===== */
.class-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.class-slot {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    background: var(--card);
    position: relative;
    transition: border-color .15s, box-shadow .15s;
}
.class-slot:hover { border-color: var(--green); box-shadow: 0 2px 12px rgba(47,111,78,.1); }
.class-slot.booked { border-color: var(--green); background: #f0faf4; }
.cs-day  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.cs-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.cs-time { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.cs-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cs-booked-badge { position: absolute; top: 12px; right: 12px; background: var(--green); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }

/* ===== EMPTY STATE ===== */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 36px 24px; text-align: center; color: var(--muted); }
.empty svg { width: 48px; height: 48px; stroke: #c5d3cc; flex-shrink: 0; }
.empty p { margin: 0; font-size: .88rem; }

/* ===== VIDEO MODAL ===== */
.vid-modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 2000; align-items: center; justify-content: center; padding: 20px; }
.vid-modal-bg.open { display: flex; }
.vid-modal { position: relative; width: 100%; max-width: 860px; }
.vid-modal-close { position: absolute; top: -40px; right: 0; background: none; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; line-height: 1; padding: 4px 8px; }
.vid-modal-close:hover { color: #e4ad5b; }
.vid-modal iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 10px; display: block; }
.video-play-btn { cursor: pointer; border: none; background: rgba(255,255,255,.9); }
.video-play-btn:hover { background: #fff; transform: scale(1.1); }

/* ===== VIDEO CARDS ===== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.video-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s; }
.video-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.video-thumb { aspect-ratio: 16/9; background: var(--green-dk); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-play-btn { position: absolute; width: 44px; height: 44px; background: rgba(255,255,255,.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--green-dk); }
.video-play-btn svg { width: 20px; height: 20px; margin-left: 3px; }
.video-info { padding: 14px; }
.video-title { font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.video-meta  { display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.video-lock  { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: rgba(255,255,255,.7); font-size: 12px; }
.video-lock svg { width: 24px; height: 24px; }

/* ===== LOGIN ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; }
.login-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 36px; width: 100%; max-width: 380px; box-shadow: 0 4px 24px rgba(0,0,0,.07); }
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.login-logo-mark { width: 42px; height: 42px; background: var(--green-dk); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--gold); font-weight: 800; font-size: 18px; }
.login-logo-text .t1 { font-size: 14px; font-weight: 700; color: var(--green-dk); }
.login-logo-text .t2 { font-size: 11px; color: var(--muted); }
.login-h { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.login-sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; }

/* ===== PROFILE ===== */
.profile-sec { max-width: 600px; }
.profile-avatar-wrap { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-ava { width: 70px; height: 70px; border-radius: 50%; background: var(--gold); color: var(--green-dk); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; text-transform: uppercase; }

/* ===== UTILITY ===== */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.text-right { text-align: right; }
.font-bold { font-weight: 600; }
.text-ok  { color: var(--ok); }
.text-err { color: var(--danger); }
.text-warn { color: var(--warn); }
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.w-full { width: 100%; }

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
    .dash-grid { grid-template-columns: 1fr; }
    .portal-nav-link { display: none; }
    .portal-nav-mobile-btn { display: flex; }
    .welcome-banner { padding: 20px; }
    .card-body { padding: 14px; }
}
