/**
 * TARABA CONNECT - Main Stylesheet
 * "Taraba's Digital Home"
 * Mobile-First PWA Design
 */

/* ============================================================
   CSS VARIABLES & THEME
   ============================================================ */
:root {
    --primary: #198754;
    --primary-dark: #146c43;
    --primary-light: #d1e7dd;
    --secondary: #0d6efd;
    --accent: #ffc107;
    --danger: #dc3545;
    --warning: #fd7e14;
    --info: #0dcaf0;
    --success: #20c997;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --bg: #f8f9fa;
    --white: #ffffff;
    --card-bg: #ffffff;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --bottom-nav-height: 65px;
    --header-height: 56px;
    --transition: all 0.3s ease;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg: #121212;
    --card-bg: #1e1e1e;
    --text: #e9ecef;
    --text-muted: #adb5bd;
    --border: #343a40;
    --light-gray: #2d2d2d;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
#splash-screen {
    position: fixed;
    inset: 0;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s;
}
#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-logo {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: splashPulse 1.5s ease infinite;
}
.splash-logo i {
    font-size: 48px;
    color: var(--primary);
}
.splash-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
}
.splash-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-top: 8px;
}
.splash-loader {
    margin-top: 30px;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes splashPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   HEADER / TOP NAV
   ============================================================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    backdrop-filter: blur(10px);
}
.app-header .menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text);
    transition: var(--transition);
}
.app-header .menu-btn:active { background: var(--light-gray); }
.app-header .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}
.app-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.app-header .notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text);
}
.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 11px;
    transition: var(--transition);
    flex: 1;
    height: 100%;
    position: relative;
}
.bottom-nav .nav-item i {
    font-size: 22px;
    transition: var(--transition);
}
.bottom-nav .nav-item.active {
    color: var(--primary);
}
.bottom-nav .nav-item.active i {
    transform: translateY(-2px);
}
.bottom-nav .fab-btn {
    position: relative;
    top: -20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(25,135,84,0.4);
    border: 4px solid var(--bg);
    font-size: 24px;
    transition: var(--transition);
}
.bottom-nav .fab-btn:active {
    transform: scale(0.95);
}

/* ============================================================
   HERO / WELCOME BANNER
   ============================================================ */
.hero-banner {
    background: var(--primary);
    border-radius: var(--radius-lg);
    margin: 16px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    align-items: center;
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: 50px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-content h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.hero-content p {
    font-size: 13px;
    opacity: 0.9;
}
.hero-image {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.3);
    z-index: 1;
}
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================================
   FEATURE GRID
   ============================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 16px;
    margin: 16px 0;
}
.feature-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border);
}
.feature-card:active {
    transform: scale(0.97);
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 24px;
    color: white;
}
.feature-icon.student { background: #4f46e5; }
.feature-icon.scholarship { background: var(--primary); }
.feature-icon.jobs { background: var(--warning); }
.feature-icon.news { background: #7c3aed; }
.feature-icon.marketplace { background: #0891b2; }
.feature-icon.events { background: #e11d48; }
.feature-icon.talent { background: #ca8a04; }
.feature-icon.ai { background: #2563eb; }
.feature-icon.forum { background: #059669; }

.feature-card span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    display: block;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    margin: 20px 0 12px;
}
.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.section-header .view-all {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
   NEWS CARDS
   ============================================================ */
.news-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 0 16px 12px;
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.news-card:active { background: var(--light-gray); }
.news-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-content {
    flex: 1;
    min-width: 0;
}
.news-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}
.news-meta .category-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

/* ============================================================
   GLASSMORPHISM CARDS
   ============================================================ */
.glass-card {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 16px;
    box-shadow: var(--shadow);
}
[data-theme="dark"] .glass-card {
    background: rgba(30,30,30,0.8);
    border-color: rgba(255,255,255,0.1);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 12px;
}
.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.card-body { padding: 16px; }
.card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.form-control, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
    -webkit-appearance: none;
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25,135,84,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    width: 100%;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover, .btn-primary:active { background: var(--primary-dark); }
.btn-secondary {
    background: var(--secondary);
    color: white;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-round { border-radius: 50px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}
.auth-header {
    background: var(--primary);
    padding: 40px 24px;
    text-align: center;
    color: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.auth-header .auth-logo {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.auth-header .auth-logo i { font-size: 36px; color: var(--primary); }
.auth-header h1 { font-size: 24px; font-weight: 700; }
.auth-header p { opacity: 0.9; font-size: 14px; margin-top: 4px; }
.auth-body {
    padding: 24px 20px;
    flex: 1;
}
.auth-footer {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-footer a { color: var(--primary); font-weight: 600; }

/* Social login */
.social-login { display: flex; gap: 12px; margin: 20px 0; }
.social-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
}
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* OTP Input */
.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}
.otp-input {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
}
.otp-input:focus {
    border-color: var(--primary);
    outline: none;
}

/* ============================================================
   SIDE MENU / DRAWER
   ============================================================ */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.menu-overlay.active { opacity: 1; visibility: visible; }
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--card-bg);
    z-index: 2001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.side-menu.active { transform: translateX(0); }
.menu-header {
    background: var(--primary);
    padding: 24px;
    color: white;
}
.menu-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}
.menu-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
}
.menu-avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu-user-info h4 { font-size: 15px; font-weight: 600; }
.menu-user-info p { font-size: 12px; opacity: 0.8; }
.menu-nav { padding: 12px 0; }
.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
}
.menu-item i { font-size: 20px; color: var(--primary); width: 24px; text-align: center; }
.menu-item:active { background: var(--light-gray); }
.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 16px;
}

/* ============================================================
   LIST ITEMS
   ============================================================ */
.list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.list-item:active { background: var(--light-gray); }
.list-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
}
.list-content { flex: 1; min-width: 0; }
.list-content h4 { font-size: 14px; font-weight: 600; }
.list-content p { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   CHAT STYLES
   ============================================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.4;
}
.chat-bubble.sent {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}
.chat-bubble.received {
    align-self: flex-start;
    background: var(--light-gray);
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.chat-bubble .time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
}
.chat-input-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg);
    font-size: 14px;
}
.chat-input-bar button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* ============================================================
   AI CHAT
   ============================================================ */
.ai-chat-container {
    height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    background: #efeae2;
}
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.ai-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}
.ai-bubble.user {
    background: #d9fdd3;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 0;
}
.ai-bubble.bot {
    background: white;
    border-bottom-left-radius: 0;
}
.ai-bubble .sender {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    width: fit-content;
    margin-bottom: 8px;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.animate-fade { animation: fadeIn 0.4s ease; }
.animate-slide-up { animation: slideUp 0.3s ease; }

/* ============================================================
   FLOATING ACTION BUTTON
   ============================================================ */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(25,135,84,0.4);
    z-index: 100;
    transition: var(--transition);
}
.fab:active { transform: scale(0.95); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 90%;
    max-width: 400px;
}
.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.3s ease;
}
.toast.success { background: var(--primary); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.info { background: var(--secondary); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ============================================================
   PULL TO REFRESH
   ============================================================ */
.ptr-indicator {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 13px;
    display: none;
}
.ptr-indicator.visible { display: block; }
.ptr-indicator i { animation: spin 1s linear infinite; margin-right: 8px; }

/* ============================================================
   INSTALL PROMPT
   ============================================================ */
.install-prompt {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 10px);
    left: 16px;
    right: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 1500;
    display: none;
    border: 1px solid var(--border);
}
.install-prompt.show { display: block; animation: slideUp 0.3s ease; }
.install-prompt .install-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.install-prompt .install-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 22px;
}
.install-prompt .install-actions {
    display: flex;
    gap: 8px;
}
.install-prompt .install-actions button { flex: 1; }

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--light-gray) 25%, var(--border) 50%, var(--light-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 56px;
    color: var(--light-gray);
    margin-bottom: 16px;
}
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 13px; }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--header-height);
    z-index: 100;
}
.search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg);
    font-size: 14px;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--light-gray);
    border-radius: var(--radius-sm);
    margin: 0 16px 16px;
}
.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.tab.active {
    background: var(--card-bg);
    color: var(--text);
    box-shadow: var(--shadow);
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-header {
    position: relative;
    background: var(--primary);
    padding: 40px 20px 60px;
    text-align: center;
    color: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid white;
    overflow: hidden;
    margin: 0 auto 12px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 16px;
}
.profile-stats .stat {
    text-align: center;
}
.profile-stats .stat-value {
    font-size: 20px;
    font-weight: 700;
}
.profile-stats .stat-label {
    font-size: 11px;
    opacity: 0.8;
}
.profile-info-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    margin: -30px 16px 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
}

/* ============================================================
   RESPONSIVE - Tablet/Desktop
   ============================================================ */
@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 600px;
        margin: 16px auto;
    }
    .hero-banner {
        max-width: 600px;
        margin: 16px auto;
    }
    .news-card, .section-header {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border: 1px solid var(--border);
        border-bottom: none;
    }
    .app-header {
        max-width: 600px;
        margin: 0 auto;
        border-radius: 0 0 var(--radius) var(--radius);
    }
    .auth-header {
        border-radius: 0 0 30px 30px;
    }
    .side-menu {
        width: 320px;
    }
}

/* ============================================================
   DARK MODE TOGGLE
   ============================================================ */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text);
    transition: var(--transition);
}
.theme-toggle:active { background: var(--light-gray); }

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 18px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.rounded { border-radius: var(--radius); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
