/* ==========================================================================
   YEHAI — Premium Educational AI Platform | Mobile-First, Light Theme
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #EEF2FF;
    --accent: #06B6D4;
    --green: #10B981;
    --orange: #F97316;
    --red: #EF4444;
    --bg: #FAFBFF;
    --bg-card: #FFFFFF;
    --bg-subtle: #F1F5F9;
    --text: #0F172A;
    --text-2: #334155;
    --text-3: #64748B;
    --text-4: #94A3B8;
    --border: #E2E8F0;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    --shadow-xs: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow-sm: 0 4px 12px rgba(15,23,42,.06);
    --shadow-md: 0 8px 24px rgba(15,23,42,.08);
    --shadow-lg: 0 20px 48px rgba(15,23,42,.12);
    --shadow-glow: 0 0 0 4px rgba(79,70,229,.15);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --header-h: 60px;
    --tab-h: 68px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg); color: var(--text);
    line-height: 1.6; -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}
img, video { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ─ Header ─ */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-h);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226,232,240,0.8);
    display: flex; align-items: center; padding: 0 16px; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 17px; font-weight: 800; letter-spacing: -0.5px;
    box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
.logo-name {
    font-size: 18px; font-weight: 800; letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.header-spacer { flex: 1; }
.header-cta { display: flex; gap: 8px; align-items: center; }

/* ─ Buttons ─ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 14px; font-weight: 600; padding: 9px 18px;
    border-radius: var(--radius-full); transition: var(--transition);
    white-space: nowrap; border: 1.5px solid transparent; line-height: 1.3;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white; box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79,70,229,.4); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { color: var(--text-2); background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-subtle); border-color: var(--primary); color: var(--primary); }
.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #0891B2 100%);
    color: white; box-shadow: 0 2px 8px rgba(6,182,212,.3);
}
.btn-accent:hover { transform: translateY(-1px); }
.btn-lg { font-size: 16px; padding: 14px 28px; }
.btn-sm { font-size: 13px; padding: 7px 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ─ Layout ─ */
.main-content { padding-top: var(--header-h); }

/* ─ Bottom Tab Bar ─ */
.tab-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 99;
    height: var(--tab-h);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 8px 4px; color: var(--text-4);
    transition: var(--transition); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.tab-item.active { color: var(--primary); }
.tab-item svg { width: 22px; height: 22px; }
.tab-label { font-size: 10px; font-weight: 600; letter-spacing: 0.2px; }
.tab-item:active { opacity: 0.7; }

/* ─ Pages ─ */
.page {
    min-height: calc(100vh - var(--header-h) - var(--tab-h));
    padding-bottom: 24px; display: none;
}
.page.active { display: block; }
#page-practice { display: none; flex-direction: column; height: calc(100vh - var(--header-h) - var(--tab-h)); }
#page-practice.active { display: flex; }

/* ─ Hero ─ */
.hero-section { padding: 28px 16px 20px; text-align: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary-light); color: var(--primary);
    font-size: 11px; font-weight: 700; padding: 5px 12px;
    border-radius: var(--radius-full); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 14px;
}
.hero-badge-dot { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; display: inline-block; }
.hero-title { font-size: 28px; font-weight: 900; letter-spacing: -0.8px; line-height: 1.15; margin-bottom: 12px; }
.hero-title .grad {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc { font-size: 14px; color: var(--text-3); line-height: 1.7; margin-bottom: 22px; max-width: 340px; margin-left: auto; margin-right: auto; }
.hero-cta-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }

/* ─ Stats ─ */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 16px 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 10px; text-align: center; box-shadow: var(--shadow-xs); }
.stat-num { font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; line-height: 1.1; }
.stat-label { font-size: 10px; color: var(--text-3); font-weight: 500; margin-top: 3px; line-height: 1.3; }

/* ─ Section Header ─ */
.section-header { padding: 0 16px 16px; }
.section-title { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.section-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }

/* ─ Feature Cards ─ */
.features-list { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px;
    display: flex; gap: 14px; align-items: flex-start;
    box-shadow: var(--shadow-xs); transition: var(--transition);
}
.feature-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.feature-icon-wrap { width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 22px; }
.fi-purple { background: #EDE9FE; }
.fi-cyan   { background: #ECFEFF; }
.fi-green  { background: #DCFCE7; }
.fi-orange { background: #FEF3C7; }
.fi-blue   { background: #DBEAFE; }
.fi-pink   { background: #FCE7F3; }
.feature-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.feature-desc  { font-size: 13px; color: var(--text-3); line-height: 1.6; }

/* ─ Level Cards (Scroll) ─ */
.scroll-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-row::-webkit-scrollbar { display: none; }
.level-card {
    flex: 0 0 200px; background: var(--bg-card); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px 16px;
    transition: var(--transition); cursor: pointer; position: relative; overflow: hidden;
}
.level-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.level-card.beginner::before    { background: linear-gradient(90deg, var(--green), #34D399); }
.level-card.intermediate::before { background: linear-gradient(90deg, var(--accent), var(--primary)); }
.level-card.advanced::before    { background: linear-gradient(90deg, var(--orange), #EF4444); }
.level-card.business::before    { background: linear-gradient(90deg, #8B5CF6, var(--primary)); }
.level-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.level-emoji  { font-size: 28px; margin-bottom: 10px; }
.level-name   { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.level-target { font-size: 12px; color: var(--text-3); line-height: 1.5; margin-bottom: 8px; }
.level-tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }
.tag-green  { background: #DCFCE7; color: #16A34A; }
.tag-blue   { background: var(--primary-light); color: var(--primary); }
.tag-orange { background: #FEF3C7; color: #B45309; }
.tag-purple { background: #EDE9FE; color: #7C3AED; }

/* ─ Chat Demo ─ */
.chat-demo { margin: 0 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); }
.chat-demo-header { padding: 14px 18px; background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%); color: white; display: flex; align-items: center; gap: 12px; }
.ai-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.ai-name { font-size: 14px; font-weight: 700; }
.ai-status { font-size: 11px; opacity: 0.8; display: flex; align-items: center; gap: 4px; }
.ai-status::before { content: ''; width: 6px; height: 6px; background: #4ADE80; border-radius: 50%; display: inline-block; }
.chat-demo-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 180px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; animation: bubbleIn 0.3s ease; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.bubble-ai   { background: var(--bg-subtle); color: var(--text); border-radius: 4px 16px 16px 16px; align-self: flex-start; }
.bubble-user { background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%); color: white; border-radius: 16px 16px 4px 16px; align-self: flex-end; }
.bubble-correction { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(0,0,0,0.06); }
.chat-demo-input { border-top: 1px solid var(--border); padding: 12px 16px; display: flex; gap: 10px; align-items: center; }
.chat-input-mock { flex: 1; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 9px 14px; font-size: 13px; color: var(--text-3); }
.mic-btn { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; box-shadow: 0 2px 8px rgba(79,70,229,.3); }
.mic-btn.recording { background: linear-gradient(135deg, #EF4444, #F97316); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,.0); } }

/* ─ Practice Chat Page ─ */
.chat-window { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.chat-input-bar {
    padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: var(--bg-card); border-top: 1px solid var(--border);
    display: flex; gap: 10px; align-items: flex-end;
}
.chat-textarea {
    flex: 1; border: 1.5px solid var(--border); border-radius: 20px;
    padding: 10px 16px; font-size: 14px; font-family: inherit;
    background: var(--bg-subtle); color: var(--text);
    resize: none; outline: none; max-height: 120px; overflow-y: auto;
    transition: var(--transition); line-height: 1.5;
}
.chat-textarea:focus { border-color: var(--primary); background: white; box-shadow: var(--shadow-glow); }
.send-btn {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7C3AED);
    color: white; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 2px 8px rgba(79,70,229,.3); transition: var(--transition);
}
.send-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(79,70,229,.4); }
.send-btn:disabled { opacity: 0.4; transform: none; }
.bubble-row { display: flex; gap: 8px; align-items: flex-end; }
.bubble-row.user-row { flex-direction: row-reverse; }
.bubble-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.bubble-avatar.ai   { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; }
.bubble-avatar.user { background: var(--bg-subtle); color: var(--text-2); border: 1px solid var(--border); }
.bubble-content { max-width: 78%; }
.bubble-sender { font-size: 10px; font-weight: 600; color: var(--text-4); margin-bottom: 3px; }
.user-row .bubble-sender { text-align: right; }
.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 10px 14px; background: var(--bg-subtle); border-radius: 4px 16px 16px 16px; width: fit-content; }
.typing-dot { width: 7px; height: 7px; background: var(--text-4); border-radius: 50%; animation: typing 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ─ Topic Grid ─ */
.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px; }
.topic-card { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 14px; text-align: center; cursor: pointer; transition: var(--transition); -webkit-tap-highlight-color: transparent; }
.topic-card:hover, .topic-card:active { border-color: var(--primary); background: var(--primary-light); transform: scale(0.98); }
.topic-emoji { font-size: 24px; margin-bottom: 6px; }
.topic-name  { font-size: 12px; font-weight: 600; color: var(--text-2); }

/* ─ Testimonials ─ */
.testimonials-list { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.testimonial-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-xs); }
.testi-header { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.testi-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); display: flex; align-items: center; justify-content: center; color: white; font-size: 17px; font-weight: 700; flex-shrink: 0; }
.testi-name  { font-size: 14px; font-weight: 700; color: var(--text); }
.testi-role  { font-size: 12px; color: var(--text-3); }
.testi-stars { color: #FBBF24; font-size: 13px; margin-bottom: 8px; }
.testi-text  { font-size: 13.5px; color: var(--text-2); line-height: 1.65; font-style: italic; }

/* ─ Pricing ─ */
.pricing-cards { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.price-card { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 22px; position: relative; overflow: hidden; transition: var(--transition); }
.price-card.popular { border-color: var(--primary); box-shadow: var(--shadow-md); }
.price-popular-badge { position: absolute; top: 14px; right: 14px; background: linear-gradient(135deg, var(--primary), #7C3AED); color: white; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full); }
.price-plan   { font-size: 13px; font-weight: 600; color: var(--text-3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.price-amount { font-size: 32px; font-weight: 900; color: var(--text); letter-spacing: -1px; line-height: 1.1; margin-bottom: 4px; }
.price-amount span { font-size: 16px; font-weight: 600; color: var(--text-3); }
.price-period { font-size: 12px; color: var(--text-3); margin-bottom: 16px; }
.price-features { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.price-features li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.check-icon { color: var(--green); font-size: 15px; flex-shrink: 0; font-weight: 700; }

/* ─ Curriculum ─ */
.curriculum-list { padding: 0 16px; display: flex; flex-direction: column; }
.curriculum-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.curriculum-item:last-child { border-bottom: none; }
.curriculum-step { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 8px rgba(79,70,229,.2); }
.curriculum-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.curriculum-desc  { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.curriculum-tags  { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.ctag { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: var(--radius-full); background: var(--primary-light); color: var(--primary); }

/* ─ Progress / Skill Bars ─ */
.progress-summary { margin: 0 16px 20px; background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%); border-radius: var(--radius-xl); padding: 22px 20px; color: white; }
.progress-summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.prog-stat { text-align: center; }
.prog-stat-num   { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.prog-stat-label { font-size: 10px; opacity: 0.8; margin-top: 2px; font-weight: 500; }
.streak-bar { margin: 0 16px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-xs); }
.streak-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 12px; }
.streak-days { display: flex; gap: 6px; justify-content: space-between; }
.streak-day { flex: 1; text-align: center; }
.streak-circle { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 4px; background: var(--bg-subtle); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.streak-circle.done  { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; }
.streak-circle.today { border-color: var(--primary); background: var(--primary-light); }
.streak-day-label { font-size: 9px; color: var(--text-4); font-weight: 600; }
.skill-bars { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.skill-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.skill-bar-name  { font-size: 13px; font-weight: 600; color: var(--text-2); }
.skill-bar-pct   { font-size: 12px; font-weight: 700; color: var(--primary); }
.skill-bar-track { height: 7px; background: var(--bg-subtle); border-radius: var(--radius-full); overflow: hidden; }
.skill-bar-fill  { height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }

/* ─ Toast ─ */
.toast {
    position: fixed; bottom: calc(var(--tab-h) + 16px); left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text); color: white; font-size: 13px; font-weight: 500;
    padding: 10px 18px; border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
    transition: var(--transition); white-space: nowrap; z-index: 200;
    max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─ FAQ ─ */
.faq-list { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; gap: 10px; user-select: none; }
.faq-chevron { width: 18px; height: 18px; color: var(--text-4); flex-shrink: 0; transition: transform 0.25s; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; font-size: 13px; color: var(--text-3); line-height: 1.65; }
.faq-a-inner { padding: 0 16px 14px; }
.faq-item.open .faq-a { max-height: 300px; }

/* ─ Spinner ─ */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─ About ─ */
.about-header { padding: 24px 16px; text-align: center; }
.about-logo-big { width: 72px; height: 72px; background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 900; color: white; letter-spacing: -1px; margin: 0 auto 14px; box-shadow: var(--shadow-md); }
.about-brand   { font-size: 26px; font-weight: 900; letter-spacing: -0.7px; margin-bottom: 4px; }
.about-tagline { font-size: 14px; color: var(--text-3); margin-bottom: 20px; }
.about-desc-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin: 0 16px 16px; font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.about-contact { margin: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.contact-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 13px; color: var(--text-2); transition: var(--transition); }
.contact-item:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.contact-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }

/* ─ Utilities ─ */
.divider   { height: 8px; background: var(--bg-subtle); margin: 8px 0; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.text-center { text-align: center; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--text-3); }
.empty-icon  { font-size: 40px; margin-bottom: 12px; }
.empty-text  { font-size: 14px; font-weight: 500; }

@media (min-width: 768px) {
    .hero-title { font-size: 36px; }
}

/* ─ Forms & Inputs ─ */
.form-group { margin-bottom: 14px; text-align: left; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-input, .form-select {
    width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-md);
    padding: 10px 14px; font-size: 14px; color: var(--text); background: var(--bg-card);
    outline: none; transition: var(--transition);
}
.form-input:focus, .form-select:focus { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.form-hint { font-size: 11px; color: var(--text-4); margin-top: 4px; }

/* ─ Modals / Bottom Sheets ─ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
    display: none; align-items: flex-end; justify-content: center;
    opacity: 0; transition: opacity 0.25s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-sheet {
    background: var(--bg-card); width: 100%; max-width: 480px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px 20px 32px; box-shadow: var(--shadow-lg);
    transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh; overflow-y: auto; position: relative;
}
.modal-overlay.active .modal-sheet { transform: translateY(0); }
.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 99px; margin: 0 auto 16px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-title { font-size: 18px; font-weight: 800; color: var(--text); }
.modal-close {
    width: 32px; height: 32px; border-radius: 50%; background: var(--bg-subtle);
    display: flex; align-items: center; justify-content: center; font-size: 16px;
    color: var(--text-3); cursor: pointer;
}

/* ─ Device Cards ─ */
.device-card {
    background: var(--bg-card); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px;
    box-shadow: var(--shadow-xs); transition: var(--transition);
}
.device-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.device-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.device-info-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.device-info-mac { font-size: 12px; font-family: monospace; color: var(--text-3); }
.device-meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; color: var(--text-3); }
.device-actions { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 10px; }

/* ─ Badges ─ */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full); }
.badge-online { background: #DCFCE7; color: #16A34A; }
.badge-online::before { content:''; width:6px; height:6px; border-radius:50%; background:#16A34A; }
.badge-offline { background: #F1F5F9; color: #64748B; }
.badge-pro { background: #EDE9FE; color: #7C3AED; }
.badge-warning { background: #FEF3C7; color: #B45309; }
.badge-danger { background: #FEE2E2; color: #DC2626; }

/* ─ Tabs Bar active pill ─ */
.level-pill-row { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; }
.level-pill-row::-webkit-scrollbar { display: none; }
.level-pill {
    padding: 6px 14px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600;
    background: var(--bg-card); border: 1.5px solid var(--border); color: var(--text-3);
    white-space: nowrap; cursor: pointer; transition: var(--transition);
}
.level-pill.active { background: var(--primary); color: white; border-color: var(--primary); }

