/* ============================================================
   PhysioHyd — Main Stylesheet v3
   Frontend + Admin Panel
   ============================================================ */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
    /* Brand colors */
    --navy:        #0b1f3a;
    --navy2:       #132d52;
    --blue:        #1755a6;
    --sky:         #3b82f6;
    --teal:        #0d9488;
    --gold:        #d4a843;
    --gold2:       #f0c660;
    /* UI */
    --cream:       #faf8f4;
    --light:       #f1f5f9;
    --border:      #e2e8f0;
    --gray:        #64748b;
    --white:       #ffffff;
    /* Admin legacy */
    --primary:     #1755a6;
    --primary-dark:#0f3d80;
    --light-bg:    #f1f5f9;
    --card-shadow: 0 2px 15px rgba(11,31,58,0.08);
    --border-radius: 12px;
}

/* ── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    background: #fff;
    color: var(--navy);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', serif; }

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

/* ── TYPOGRAPHY HELPERS ─────────────────────────────────────── */
.sec-eyebrow {
    display: inline-block;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--teal); margin-bottom: 10px;
}
.sec-title {
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 800; color: var(--navy);
    line-height: 1.2; letter-spacing: -.02em;
}
.sec-title em { font-style: italic; color: var(--teal); }
.sec-sub { font-size: .95rem; color: var(--gray); line-height: 1.7; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn-primary-grad {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: #fff; font-weight: 700; font-size: .92rem;
    padding: 12px 28px; border-radius: 50px; text-decoration: none;
    box-shadow: 0 5px 18px rgba(23,85,166,.3);
    transition: transform .2s, box-shadow .2s;
    border: none; cursor: pointer;
}
.btn-primary-grad:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(23,85,166,.4);
    color: #fff;
}
.btn-gold {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: var(--navy); font-weight: 800; font-size: .92rem;
    padding: 13px 30px; border-radius: 50px; text-decoration: none;
    box-shadow: 0 5px 18px rgba(212,168,67,.35);
    transition: transform .2s, box-shadow .2s;
    border: none; cursor: pointer;
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(212,168,67,.5);
    color: var(--navy);
}

/* ── FORM ELEMENTS ──────────────────────────────────────────── */
.form-label { font-size: .82rem; font-weight: 600; color: var(--navy); }
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    padding: 10px 14px;
    background: var(--cream);
    color: var(--navy);
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
    background: #fff;
    outline: none;
}
.alert { border-radius: 12px; font-size: .9rem; }
.badge { font-size: .75rem; padding: 5px 10px; border-radius: 6px; }
.breadcrumb { font-size: .85rem; }
.form-check-input:checked {
    background-color: var(--blue);
    border-color: var(--blue);
}

/* ── CARDS & SURFACES ───────────────────────────────────────── */
.card-surface {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(11,31,58,.06);
}

/* ── THERAPIST AVATAR ───────────────────────────────────────── */
.therapist-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 800; color: #fff;
    font-family: 'Playfair Display', serif;
    flex-shrink: 0;
    overflow: hidden;
}
.therapist-avatar img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}

/* ── WA FLOAT ───────────────────────────────────────────────── */
.wa-float { position: fixed; bottom: 26px; right: 26px; z-index: 9999; }
.wa-fab {
    width: 56px; height: 56px; border-radius: 50%;
    background: #25D366;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.6rem; text-decoration: none;
    box-shadow: 0 6px 24px rgba(37,211,102,.5);
    transition: transform .25s;
    position: relative;
}
.wa-fab:hover { transform: scale(1.1); color: #fff; }
.wa-ripple {
    position: absolute; inset: -8px; border-radius: 50%;
    border: 2px solid rgba(37,211,102,.4);
    animation: waRipple 2s infinite;
}
.wa-ripple:nth-child(2) { animation-delay: .5s; }
@keyframes waRipple {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.7); opacity: 0; }
}

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fu  { animation: fadeUp .6s ease both; }
.d1  { animation-delay: .1s; }
.d2  { animation-delay: .2s; }
.d3  { animation-delay: .3s; }

/* ============================================================
   ADMIN / THERAPIST PANEL STYLES
   ============================================================ */

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.panel-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;   /* same as therapist: bottom:0 NOT height:100vh */
    width: 250px;
    background: #1a2942;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.panel-sidebar .sidebar-brand {
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;                /* never shrink */
}
.panel-sidebar .sidebar-brand h5 {
    color: #fff; font-weight: 700; margin: 0;
    font-size: 1.05rem; font-family: 'DM Sans', sans-serif;
}
.panel-sidebar .sidebar-brand small {
    color: rgba(255,255,255,.45); font-size: .7rem;
}
.sidebar-bottom {
    flex-shrink: 0;                /* never shrink — always visible */
    border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-nav {
    flex: 1;                       /* grow to fill remaining space */
    min-height: 0;                 /* allow shrink below content */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.2);
    border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,.4);
}

/* ── PANEL MAIN ──────────────────────────────────────────────── */
.panel-main {
    margin-left: 250px;
    min-height: 100vh;
    background: var(--light-bg);
}
.panel-topbar {
    background: #fff;
    padding: 14px 28px;
    border-bottom: 1px solid #e8eef5;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 1px 5px rgba(0,0,0,.05);
}
.panel-topbar h6 { margin: 0; font-weight: 700; color: #1a2942; font-family: 'DM Sans', sans-serif; }
.panel-content { padding: 28px; }

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid #e8eef5;
    box-shadow: var(--card-shadow);
    display: flex; align-items: center; gap: 18px;
}
.stat-card .stat-icon {
    width: 54px; height: 54px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}
.stat-card .stat-num { font-size: 1.8rem; font-weight: 800; color: #1a2942; line-height: 1; }
.stat-card .stat-lbl { font-size: .82rem; color: #6c8092; font-weight: 500; margin-top: 4px; }

/* ── PANEL TABLES ────────────────────────────────────────────── */
.panel-table-card {
    background: #fff;
    border-radius: var(--border-radius);
    border: 1px solid #e8eef5;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.panel-table-card .table { margin: 0; }
.panel-table-card .table th {
    background: var(--light-bg);
    font-size: .8rem; text-transform: uppercase;
    letter-spacing: .06em; color: #6c8092; font-weight: 600;
    border-bottom: 1px solid #e8eef5; padding: 14px 16px;
}
.panel-table-card .table td { padding: 13px 16px; font-size: .9rem; vertical-align: middle; }
.panel-table-card .table tbody tr:hover { background: var(--light-bg); }

/* ── LOGIN PAGE ──────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #e8f4fd 0%, #eafaf1 100%);
    display: flex; align-items: center; justify-content: center;
}
.login-card {
    background: #fff; border-radius: 16px; padding: 40px;
    width: 100%; max-width: 420px;
    box-shadow: 0 10px 40px rgba(23,85,166,.15);
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .panel-sidebar { display: none; }
    .panel-main    { margin-left: 0; }
    .panel-content { padding: 16px; }
}
