/* =====================================================
   SmileGuard — Global Stylesheet
   ===================================================== */

:root {
    --primary: #1d6fc4;
    --primary-dark: #1558a0;
    --primary-light: #e8f2ff;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --secondary-light: #d1fae5;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f97316;
    --warning-light: #ffedd5;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-focus: #1d6fc4;
    --bg: #f0f7ff;
    --bg-card: #ffffff;
    --bg-dark: #0f172a;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
    --transition: .2s ease;
    --nav-h: 70px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        top: auto;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    
    /* Extra debugging - ensure hamburger icon is visible */
    @media (max-width: 768px) {
        .mobile-menu-toggle i {
            color: white !important;
            font-size: 1.5rem !important;
            display: block !important;
        }
        
        .mobile-menu-toggle:hover i {
            color: white !important;
        }
    }
}
button { cursor: pointer; font-family: inherit; }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-h);
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    flex-shrink: 0;
    text-decoration: none;
}
.nav-logo i { font-size: 1.5rem; color: var(--primary); }
.nav-logo strong { color: var(--secondary); }
.nav-links {
    display: flex;
    gap: .2rem;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}
.nav-links a {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .75rem;
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
    background: var(--primary-light);
    color: var(--primary);
}
.nav-links a i { font-size: .85rem; }
.nav-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}
.user-name { font-size: .85rem; font-weight: 500; color: var(--text); }
.btn-logout {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--danger-light);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    transition: all var(--transition);
}
.btn-logout:hover { background: var(--danger); color: #fff; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text);
    margin-left: auto;
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
    flex: 1;
}
.main-content.with-nav {
    min-height: calc(100vh - var(--nav-h));
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* =====================================================
   PAGE HEADER
   ===================================================== */
.page-header {
    background: #fff;
    color: var(--text);
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-header h1 { font-size: 1.75rem; font-weight: 700; display: flex; align-items: center; gap: .75rem; color: var(--text); }
.page-header p { color: var(--text-muted); margin-top: .3rem; font-size: .95rem; }
.header-icon {
    width: 60px; height: 60px;
    border-radius: var(--radius);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.card-header h2, .card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--text);
}
.card-header i { color: var(--primary); }
.card-body { padding: 1.5rem; }
.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

/* =====================================================
   GRID LAYOUTS
   ===================================================== */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 1.5rem; }

/* =====================================================
   STAT CARDS
   ===================================================== */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon.blue   { background: var(--primary-light);   color: var(--primary); }
.stat-icon.green  { background: var(--secondary-light); color: var(--secondary-dark); }
.stat-icon.yellow { background: var(--accent-light);    color: var(--accent); }
.stat-icon.red    { background: var(--danger-light);    color: var(--danger); }
.stat-icon.orange { background: var(--warning-light);   color: var(--warning); }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1; color: var(--text); }
.stat-label { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: .4rem;
}
.form-label .required { color: var(--danger); margin-left: .2rem; }
.form-control {
    width: 100%;
    padding: .65rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(29,111,196,.12);
}
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.4rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary   { background: var(--primary);   color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-dark); color: #fff; }
.btn-accent    { background: var(--accent);    color: #fff; }
.btn-danger    { background: var(--danger);    color: #fff; }
.btn-outline   { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost     { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm  { padding: .4rem 1rem; font-size: .82rem; }
.btn-lg  { padding: .85rem 2rem; font-size: 1rem; }
.btn-full{ width: 100%; justify-content: center; }
.btn-icon{ width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; }

/* =====================================================
   BADGES
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .7rem;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--secondary-light); color: var(--secondary-dark); }
.badge-warning { background: var(--accent-light); color: #b45309; }
.badge-danger  { background: var(--danger-light); color: var(--danger); }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-gray    { background: #f1f5f9; color: var(--text-muted); }

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
    padding: .9rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .9rem;
    border-left: 4px solid;
}
.alert i { margin-top: .1rem; flex-shrink: 0; }
.alert-success { background: var(--secondary-light); color: var(--secondary-dark); border-color: var(--secondary); }
.alert-danger  { background: var(--danger-light);    color: var(--danger);         border-color: var(--danger); }
.alert-warning { background: var(--accent-light);    color: #b45309;               border-color: var(--accent); }
.alert-info    { background: var(--primary-light);   color: var(--primary-dark);   border-color: var(--primary); }

/* =====================================================
   TABLES
   ===================================================== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    background: var(--bg);
    padding: .75rem 1rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
tbody td {
    padding: .9rem 1rem;
    font-size: .9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

/* =====================================================
   PROGRESS BARS
   ===================================================== */
.progress { background: var(--bg); border-radius: 100px; height: 10px; overflow: hidden; }
.progress-bar {
    height: 100%;
    border-radius: 100px;
    transition: width .5s ease;
}
.progress-bar.blue   { background: var(--primary); }
.progress-bar.green  { background: var(--secondary); }
.progress-bar.yellow { background: var(--accent); }
.progress-bar.red    { background: var(--danger); }

/* =====================================================
   LANDING PAGE
   ===================================================== */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a6e 50%, #1d6fc4 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.hero-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.hero-logo {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}
.hero-logo i { font-size: 1.8rem; color: var(--primary); }
.hero-nav-links { display: flex; gap: 1rem; }
.hero-nav-links a {
    padding: .5rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition);
}
.hero-nav-links a:hover { color: var(--primary); background: var(--primary-light); }
.hero-nav-links a.btn-hero-cta { background: var(--secondary); color: #fff; }
.hero-nav-links a.btn-hero-cta:hover { background: var(--secondary-dark); }
.hero-body {
    flex: 1;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 4rem 2rem;
    gap: 4rem;
}
.hero-text { flex: 1; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    padding: .4rem 1rem;
    border-radius: 100px;
    font-size: .82rem;
    color: #a5f3fc;
    margin-bottom: 1.5rem;
}
.hero-text h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}
.hero-text h1 span { color: #60d0f0; }
.hero-text p { font-size: 1.1rem; opacity: .8; margin-bottom: 2rem; max-width: 520px; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-hero { padding: .9rem 2.2rem; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 600; border: none; cursor: pointer; transition: all var(--transition); }
.btn-hero-primary { background: var(--secondary); color: #fff; }
.btn-hero-primary:hover { background: var(--secondary-dark); transform: translateY(-2px); }
.btn-hero-outline { background: transparent; border: 2px solid rgba(255,255,255,.4); color: #fff; }
.btn-hero-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.hero-visual { flex: 1; display: flex; justify-content: center; }
.hero-card {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}
.hero-card h3 { color: #fff; margin-bottom: 1.25rem; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    margin-bottom: .75rem;
}
.feature-item i { font-size: 1.3rem; color: #60d0f0; width: 30px; text-align: center; }
.feature-item span { color: rgba(255,255,255,.9); font-size: .9rem; font-weight: 500; }

/* Features section */
.section { padding: 5rem 2rem; }
.section-dark { background: #f8fafc; }
.section-title {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: .75rem;
    color: var(--text);
}
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 3rem; font-size: 1.05rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.features-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 1.5rem; }
.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card-icon {
    width: 64px; height: 64px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.feature-card p { font-size: .85rem; color: var(--text-muted); }

/* =====================================================
   AUTH PAGES
   ===================================================== */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a6e 60%, #1d6fc4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.auth-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-logo i { font-size: 2.5rem; color: var(--primary); }
.auth-logo h1 { font-size: 1.5rem; font-weight: 700; margin-top: .5rem; }
.auth-logo h1 span { color: var(--secondary); }
.auth-logo p { color: var(--text-muted); font-size: .9rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .88rem; color: var(--text-muted); }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.25rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: .82rem; color: var(--text-light); }

/* =====================================================
   DASHBOARD
   ===================================================== */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: #fff;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.welcome-text h1 { font-size: 1.5rem; font-weight: 700; }
.welcome-text p { opacity: .8; margin-top: .3rem; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.quick-action {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: block;
}
.quick-action:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.quick-action i { font-size: 1.8rem; color: var(--primary); margin-bottom: .5rem; }
.quick-action span { font-size: .85rem; font-weight: 500; color: var(--text); display: block; }

/* =====================================================
   TÉLÉCONSULTATION
   ===================================================== */
.telecons-call-wrap {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}
.telecons-call-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.telecons-call-header h2 { font-size: 1.2rem; margin: 0; }
.telecons-call-header p  { margin: .2rem 0 0; opacity: .9; font-size: .9rem; }
.telecons-call-actions   { display: flex; gap: .5rem; flex-wrap: wrap; }
.jitsi-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    background: #111;
}
.jitsi-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.share-link-box {
    background: var(--bg-page);
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    font-size: .9rem;
}
.share-link-box input {
    flex: 1;
    min-width: 200px;
    font-family: monospace;
    font-size: .85rem;
    padding: .4rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
}
.btn-whatsapp {
    background: #25D366;
    color: #fff;
    border: none;
}
.btn-whatsapp:hover { background: #1ebe5d; color: #fff; }
.how-it-works .step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}
.step-num {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 auto 1rem;
}
.step-card h4 { margin-bottom: .5rem; }
.step-card p  { font-size: .9rem; color: var(--text-muted); margin: 0; }
.tech-info-bar {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    padding: .85rem 1.25rem;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}
.alt-platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}
.alt-platform-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.alt-platform-icon { font-size: 2rem; margin-bottom: .25rem; }
.alt-platform-card p    { font-size: .8rem; color: var(--text-muted); margin: 0; }
.alt-platform-card img  { height: 2rem; object-fit: contain; }
.browser-compat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}
.browser-compat h4 { margin-bottom: .75rem; }
.compat-list { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.compat-item { display: flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 500; }
.compat-item.ok   { color: var(--success); }
.compat-item.warn { color: var(--danger); }
/* join.php — pre-join screen */
.pre-join-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    max-width: 520px;
    margin: 2rem auto;
}
.pre-join-card h3 { margin-bottom: .5rem; }
.pre-join-form {
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}
.pre-join-form .form-control { flex: 1; min-width: 200px; }
.join-info-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.join-info-icon { font-size: 2.5rem; }
.join-info-card h2 { margin: 0; font-size: 1.3rem; }
.join-info-card p  { margin: .3rem 0 0; opacity: .9; }
.join-error-wrap {
    text-align: center;
    padding: 4rem 2rem;
}
.join-error-icon {
    font-size: 4rem;
    color: var(--danger);
    margin-bottom: 1rem;
}
/* Copy toast notification */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp .3s ease;
    z-index: 9999;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(1rem); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Video option cards (teleconsultation) */
.video-option-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    text-align: center;
    transition: box-shadow var(--transition);
}
.video-option-card:hover { box-shadow: var(--shadow); }
.video-option-card h4    { margin: 0; font-size: 1.05rem; }
.video-option-card p     { font-size: .88rem; color: var(--text-muted); margin: 0; flex: 1; }
.video-option-icon {
    width: 3.5rem; height: 3.5rem;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center;
}
.video-option-link { width: 100%; }
/* WebRTC / HTTP note bar */
.webrtc-note {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .9rem;
    line-height: 1.6;
}
.webrtc-note-icon { font-size: 1.4rem; color: #f59e0b; flex-shrink: 0; margin-top: .1rem; }
/* Async consultation messages */
.async-msg-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.async-msg-item:last-child { border-bottom: none; }
.async-msg-meta { font-size: .82rem; color: var(--text-muted); margin-bottom: .5rem; }
.async-msg-text { background: var(--bg-page); border-radius: var(--radius-sm); padding: .75rem 1rem; font-size: .92rem; margin-bottom: .75rem; }
.async-msg-photo img { max-height: 220px; border-radius: var(--radius); border: 2px solid var(--primary); cursor: zoom-in; transition: max-height .3s; margin-bottom: .75rem; }
.async-ia-response { background: linear-gradient(135deg,#f0f9ff,#e0f2fe); border-left: 4px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem; margin-top: .5rem; }
.async-ia-header   { font-size: .85rem; color: var(--primary); margin-bottom: .5rem; }
.async-ia-body     { font-size: .9rem; line-height: 1.65; white-space: pre-line; }

/* =====================================================
   DOCTOR SEARCH & BOOKING (teleconsultation)
   ===================================================== */
.doctor-card {
    transition: all var(--transition);
}
.doctor-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
/* Notification bar for patient */
.notif-bar { display: flex; flex-direction: column; gap: .6rem; }
/* Copy toast */
.copy-toast {
    position: fixed;
    bottom: 2rem; right: 2rem;
    background: #1e293b; color: #fff;
    padding: .6rem 1.2rem;
    border-radius: 9999px;
    font-size: .88rem;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp .25s ease;
}

/* =====================================================
   ENFANT CARD
   ===================================================== */
.enfant-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.enfant-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.enfant-card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg,var(--primary-light),#e0f2fe);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.enfant-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}
.enfant-name { font-size: 1.1rem; font-weight: 600; }
.enfant-meta { font-size: .82rem; color: var(--text-muted); }
.enfant-card-body { padding: 1rem 1.5rem; }
.enfant-card-actions { display: flex; gap: .5rem; padding: 1rem 1.5rem; border-top: 1px solid var(--border); }

/* =====================================================
   RISQUE INDICATORS
   ===================================================== */
.risque-faible  { background: var(--secondary-light); color: var(--secondary-dark); }
.risque-moyen   { background: var(--accent-light);    color: #b45309; }
.risque-eleve   { background: var(--danger-light);    color: var(--danger); }
.risque-gauge {
    position: relative;
    width: 120px; height: 60px;
    overflow: hidden;
    margin: 0 auto;
}

/* =====================================================
   CHAT
   ===================================================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nav-h) - 120px);
    max-height: 700px;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.chat-message {
    display: flex;
    gap: .75rem;
    max-width: 80%;
}
.chat-message.user { flex-direction: row-reverse; align-self: flex-end; }
.chat-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
}
.chat-message.ai .chat-avatar { background: var(--primary-light); color: var(--primary); }
.chat-message.user .chat-avatar { background: var(--secondary); color: #fff; }
.chat-bubble {
    padding: .75rem 1rem;
    border-radius: 18px;
    font-size: .9rem;
    line-height: 1.6;
    white-space: pre-line;
}
.chat-message.ai .chat-bubble { background: var(--bg); border: 1px solid var(--border); border-top-left-radius: 4px; }
.chat-message.user .chat-bubble { background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.chat-input-bar {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: .75rem;
    align-items: center;
}
.chat-input {
    flex: 1;
    padding: .65rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--primary); }
.chat-send {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.chat-send:hover { background: var(--primary-dark); }
.chat-typing {
    display: flex;
    gap: .3rem;
    align-items: center;
    padding: .5rem 1rem;
}
.typing-dot {
    width: 8px; height: 8px;
    background: var(--text-light);
    border-radius: 50%;
    animation: typing 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }

/* =====================================================
   PREDICTION / AI ANALYSIS
   ===================================================== */
.risk-indicator {
    text-align: center;
    padding: 2rem;
}
.risk-circle {
    width: 120px; height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border: 6px solid;
    font-weight: 700;
}
.risk-circle.faible { border-color: var(--secondary); color: var(--secondary-dark); }
.risk-circle.moyen  { border-color: var(--accent);    color: #b45309; }
.risk-circle.eleve  { border-color: var(--danger);    color: var(--danger); }
.risk-score { font-size: 2rem; line-height: 1; }
.risk-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }

/* =====================================================
   UPLOAD ZONE
   ===================================================== */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: #f8fafc;
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-zone i { font-size: 2.5rem; color: var(--text-light); margin-bottom: 1rem; }
.upload-zone p { color: var(--text-muted); font-size: .9rem; }
.upload-zone.drag-over { border-color: var(--primary); background: var(--primary-light); }

/* =====================================================
   TABS
   ===================================================== */
.tabs { border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-list { display: flex; gap: 0; overflow-x: auto; }
.tab-btn {
    padding: .75rem 1.5rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* =====================================================
   TIMELINE
   ===================================================== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: '';
    position: absolute;
    left: .6rem;
    top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-dot {
    position: absolute;
    left: -1.85rem;
    top: .4rem;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary);
    background: var(--primary);
}
.timeline-date { font-size: .78rem; color: var(--text-muted); margin-bottom: .25rem; }
.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
}
.timeline-card h4 { font-size: .9rem; font-weight: 600; margin-bottom: .4rem; }

/* =====================================================
   BRUSHING TIMER
   ===================================================== */
.timer-display {
    text-align: center;
    padding: 2rem;
}
.timer-circle {
    width: 160px; height: 160px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) var(--progress, 0%), #e2e8f0 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}
.timer-inner {
    width: 130px; height: 130px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}
.timer-inner span { font-size: .75rem; font-weight: 400; color: var(--text-muted); }

/* =====================================================
   MAPS PLACEHOLDER
   ===================================================== */
.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    color: var(--text-muted);
    text-align: center;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,.6);
    padding: 2rem;
    margin-top: auto;
}
.footer-container { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: .6rem; color: #fff; font-size: 1.1rem; font-weight: 600; margin-bottom: .5rem; }
.footer-logo i { color: #60d0f0; }
.footer-tagline { font-size: .88rem; margin-bottom: .75rem; }
.footer-credits { font-size: .82rem; margin-bottom: .5rem; }
.footer-copy { font-size: .78rem; color: rgba(255,255,255,.3); }

/* =====================================================
   UTILITIES
   ===================================================== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-success{ color: var(--secondary-dark); }
.text-danger { color: var(--danger); }
.text-warning{ color: var(--warning); }
.text-primary{ color: var(--primary); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm  { font-size: .85rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.d-none { display: none; }
.loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: .3; }
.empty-state h3 { font-size: 1.05rem; margin-bottom: .5rem; color: var(--text); }

/* =====================================================
   RESPONSIVE — Mobile-first
   ===================================================== */

/* ── 1200px : Large tablet / small laptop ── */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .admin-stats-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ── 1100px : Nav collapses to hamburger ── */
@media (max-width: 1100px) {
    .nav-links  { display: none; }
    .nav-toggle { display: block; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        padding: .75rem;
        z-index: 1100;
        box-shadow: 0 12px 40px rgba(0,0,0,.15);
        max-height: calc(100vh - var(--nav-h));
        overflow-y: auto;
    }
    .nav-links.open li a {
        padding: .8rem 1rem;
        border-radius: var(--radius-sm);
        font-size: .95rem;
    }
    .nav-links.open li a:hover { background: var(--primary-light); }
}

/* ── 900px : Tablet ── */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .page-header-inner { flex-wrap: wrap; gap: .75rem; }
    .page-header-inner > div:first-child { flex: 1; }
    /* admin */
    .admin-sidebar  { display: none; }
    .admin-main     { padding: 1rem; }
    /* mobile admin sidebar drawer */
    .admin-sidebar.mob-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 260px;
        z-index: 2000;
        box-shadow: 4px 0 30px rgba(0,0,0,.4);
        overflow-y: auto;
    }
    .admin-overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 1999;
        backdrop-filter: blur(2px);
    }
    .admin-overlay.show { display: block; }
    /* show mobile menu button in admin topbar */
    .admin-mob-toggle { display: flex !important; }
}

/* ── 768px : Mobile ── */
@media (max-width: 768px) {
    :root { --nav-h: 60px; }

    /* Grids → single column */
    .grid-2, .grid-3, .grid-4, .grid-auto {
        grid-template-columns: 1fr;
    }
    /* Except stat cards: 2 columns */
    .stats-grid, .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Forms */
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .btn[type=submit], .btn-full-mob { width: 100%; justify-content: center; }

    /* Navbar */
    .nav-user .user-name { display: none; }
    .navbar { height: var(--nav-h); }

    /* Page header */
    .page-header { padding: 1.25rem 0; }
    .page-header h1 { font-size: 1.2rem; }
    .page-header p  { font-size: .85rem; }
    .page-header-inner { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .page-header-inner > div:last-child { align-self: stretch; }
    .page-header-inner .btn { width: 100%; justify-content: center; }
    .header-icon { display: none; }

    /* Cards */
    .card-header { flex-wrap: wrap; gap: .5rem; }
    .card-header h2 { font-size: 1rem; }

    /* Container padding */
    .container, .container-wide { padding: 1rem .85rem; }

    /* Stat cards */
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.6rem; }

    /* Tables — horizontal scroll */
    .table-container, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 600px; }

    /* Hero */
    .hero-body   { flex-direction: column; padding: 2rem 1rem; gap: 1.5rem; }
    .hero-visual { display: none; }
    .hero-nav    { padding: .75rem 1rem; flex-wrap: wrap; gap: .5rem; }
    .hero-nav-links { gap: .5rem; flex-wrap: wrap; }

    /* Chat */
    .chat-container { height: calc(100dvh - var(--nav-h) - 56px); max-height: none; }

    /* Bottom nav spacing */
    .main-content { padding-bottom: 70px; }

    /* Auth */
    .auth-box { padding: 1.75rem 1.25rem; margin: 1rem; }

    /* Partners grid: 2 at tablet, 1 at mobile */
    .partners-main-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Flex wrap helpers */
    .flex-between { flex-wrap: wrap; gap: .5rem; }
    .flex-between > * { flex-shrink: 0; }

    /* Education cards */
    .education-grid, .tip-cards { grid-template-columns: 1fr !important; }
}

/* ── 480px : Small phone ── */
@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4, .stats-grid, .admin-stats-grid {
        grid-template-columns: 1fr !important;
    }
    .auth-box  { padding: 1.5rem 1rem; margin: 0; border-radius: 0; min-height: 100dvh; }
    .container { padding: .75rem; }
    .card-body { padding: 1rem; }
    .card      { border-radius: var(--radius-sm); }
    .stat-value { font-size: 1.4rem; }
    .btn { padding: .6rem 1rem; font-size: .875rem; }
    .page-header h1 { font-size: 1.05rem; }
    .badge { font-size: .7rem; }
    /* Touch targets min 44px */
    .btn, .form-control, select, input[type=text], input[type=email],
    input[type=password], input[type=tel], input[type=datetime-local] {
        min-height: 44px;
    }
    /* Prediction cards */
    .risk-card, .pred-card { padding: 1rem; }
    /* bottom nav labels always visible */
    .mob-nav-label { font-size: .65rem; }
}

/* =====================================================
   MOBILE BOTTOM NAVIGATION
   ===================================================== */
.mob-bottom-nav {
    display: none;
}
@media (max-width: 768px) {
    .mob-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 62px;
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 20px rgba(0,0,0,.1);
        z-index: 900;
        align-items: stretch;
        padding: 0 .25rem;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mob-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .2rem;
        text-decoration: none;
        color: var(--text-muted);
        font-size: .68rem;
        font-weight: 500;
        padding: .3rem .2rem;
        border-radius: var(--radius-sm);
        transition: color .18s, background .18s;
        position: relative;
    }
    .mob-nav-item i {
        font-size: 1.15rem;
        transition: transform .18s;
    }
    .mob-nav-item:hover, .mob-nav-item.active {
        color: var(--primary);
    }
    .mob-nav-item.active i {
        transform: translateY(-2px);
    }
    .mob-nav-item.active::after {
        content: '';
        position: absolute;
        top: 4px;
        width: 4px; height: 4px;
        background: var(--primary);
        border-radius: 50%;
    }
    .mob-nav-dot {
        position: absolute;
        top: 6px; right: calc(50% - 14px);
        width: 8px; height: 8px;
        background: var(--danger);
        border: 2px solid var(--bg-card);
        border-radius: 50%;
    }
    /* hide top nav user name on mobile to save space */
    .nav-user .user-name { display: none; }
}

/* =====================================================
   ADMIN PANEL
   ===================================================== */
.admin-topbar {
    background: #fff;
    color: var(--text);
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    border-bottom: 1px solid var(--border);
}
.admin-topbar-inner {
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}
.admin-topbar-brand i   { font-size: 1.4rem; color: var(--primary); }
.admin-topbar-right     { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.admin-user             { font-size: .85rem; color: var(--text-muted); }
.admin-badge {
    background: var(--danger);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .6rem;
    border-radius: 20px;
    letter-spacing: .05em;
}
.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}
/* Sidebar */
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    padding: 1.25rem 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    border-right: 1px solid var(--border);
}
.admin-nav             { display: flex; flex-direction: column; }
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: all .18s;
    border-left: 3px solid transparent;
}
.admin-nav-item:hover  { background: var(--primary-light); color: var(--primary); }
.admin-nav-item.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.admin-nav-item i      { width: 16px; text-align: center; }
.nav-count {
    margin-left: auto;
    background: var(--border);
    color: var(--text-muted);
    font-size: .7rem;
    padding: .15rem .5rem;
    border-radius: 10px;
    font-weight: 600;
}
/* Main area */
.admin-main {
    flex: 1;
    padding: 1.75rem 2rem;
    background: #f8fafc;
    overflow-x: auto;
}
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}
.admin-page-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}
/* Stats grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-stat-card {
    background: #fff;
    border-radius: var(--radius);
    border-left: 4px solid var(--c, var(--primary));
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.asc-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--c, var(--primary)) 15%, transparent);
    color: var(--c, var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.asc-val   { font-size: 1.75rem; font-weight: 800; line-height: 1; display: block; }
.asc-label { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; display: block; }
/* Admin cards */
.admin-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden;
}
/* Horizontal scroll for wide tables */
.admin-card .admin-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 100%;
}
.admin-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}
.admin-card-header h3 { margin: 0; font-size: .95rem; }
.admin-card-body   { padding: 1.25rem; }
/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.admin-table thead tr { background: #f1f5f9; }
.admin-table th {
    padding: .65rem 1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    white-space: nowrap;
}
.admin-table td {
    padding: .65rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td      { background: #f8fafc; }
/* Progress bar in predictions */
.admin-progress {
    width: 80px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
.admin-progress div {
    height: 100%;
    border-radius: 3px;
    transition: width .4s;
}
/* Table pill (settings) */
.admin-table-pill {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .5rem .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
}
/* Responsive admin — handled in main @media blocks above */
/* Mobile menu toggle button (hidden on desktop) */
.admin-mob-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.12);
    color: #fff;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .18s;
}
.admin-mob-toggle:hover { background: rgba(255,255,255,.22); }
/* Form grid for admin forms */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 700px) {
    .form-grid-2 { grid-template-columns: 1fr; }
    .admin-page-header { flex-direction: column; align-items: flex-start; }
    .admin-page-header .btn { width: 100%; justify-content: center; }
    .admin-table th, .admin-table td { padding: .5rem .65rem; font-size: .78rem; }
    .admin-stats-grid { grid-template-columns: repeat(2,1fr) !important; }
}
.mb-4 { margin-bottom: 1.5rem; }

/* Partner cards */
.part-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.part-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); }
.part-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
}
.part-type-pill {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-radius: 20px;
    padding: .2rem .7rem;
    display: inline-block;
    margin-bottom: .3rem;
}
.part-name {
    display: block;
    font-size: 1.05rem;
    color: var(--text-primary);
}
.part-actions { display: flex; gap: .3rem; flex-shrink: 0; }
.part-desc { font-size: .87rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.part-products strong { display: block; margin-bottom: .3rem; }
.part-products ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: .85rem;
    color: var(--text-secondary);
}
.part-products ul li { margin-bottom: .15rem; }
.part-promo {
    background: linear-gradient(90deg,#ecfdf5,#d1fae5);
    border: 1px solid #6ee7b7;
    border-radius: var(--radius-sm);
    color: #065f46;
    font-size: .83rem;
    font-weight: 600;
    padding: .45rem .85rem;
}
.part-footer {
    display: flex;
    gap: 1rem;
    font-size: .82rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: .6rem;
    align-items: center;
    flex-wrap: wrap;
}
.part-footer i { margin-right: .25rem; }
