/* =============================================
   ROKTOJODDHA - Complete Stylesheet
   ============================================= */

/* --- CSS Variables & Themes --- */
:root {
    --font-en: 'Inter', sans-serif;
    --font-bn: 'Hind Siliguri', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 64px;
    --mobile-top-height: 56px;
    --bottom-nav-height: 72px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
    --bg-primary: #030712;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --bg-input: #1f2937;
    --bg-overlay: rgba(0,0,0,0.6);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-inverse: #111827;
    --border-color: #1f2937;
    --border-color-hover: #374151;
    --accent: #dc2626;
    --accent-hover: #ef4444;
    --accent-glow: rgba(220,38,38,0.2);
    --accent-subtle: rgba(220,38,38,0.1);
    --success: #22c55e;
    --success-bg: rgba(34,197,94,0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245,158,11,0.1);
    --info: #3b82f6;
    --info-bg: rgba(59,130,246,0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239,68,68,0.1);
    --skeleton-base: #1f2937;
    --skeleton-shine: #374151;
    --scrollbar-thumb: #374151;
    --scrollbar-track: #111827;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --bg-input: #f3f4f6;
    --bg-overlay: rgba(0,0,0,0.4);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-inverse: #f9fafb;
    --border-color: #e5e7eb;
    --border-color-hover: #d1d5db;
    --accent: #dc2626;
    --accent-hover: #b91c1c;
    --accent-glow: rgba(220,38,38,0.15);
    --accent-subtle: rgba(220,38,38,0.05);
    --success: #16a34a;
    --success-bg: rgba(22,163,74,0.08);
    --warning: #d97706;
    --warning-bg: rgba(217,119,6,0.08);
    --info: #2563eb;
    --info-bg: rgba(37,99,235,0.08);
    --danger: #dc2626;
    --danger-bg: rgba(220,38,38,0.08);
    --skeleton-base: #e5e7eb;
    --skeleton-shine: #f3f4f6;
    --scrollbar-thumb: #d1d5db;
    --scrollbar-track: #f3f4f6;
    color-scheme: light;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-bn);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[lang="en"] body { font-family: var(--font-en); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

input, select, textarea {
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236b7280' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
textarea { resize: vertical; min-height: 100px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Utility Classes --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-red { color: var(--danger) !important; }
.text-green { color: var(--success) !important; }
.text-yellow { color: var(--warning) !important; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition);
    white-space: nowrap;
    border: 2px solid transparent;
    cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 4px 15px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border-color); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-subtle); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    color: var(--text-secondary);
}
.icon-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }

/* --- Theme Icon Toggle --- */
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* --- Toast --- */
#toast-container {
    position: fixed;
    top: calc(var(--mobile-top-height) + 12px);
    right: 12px;
    left: 12px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
@media (min-width: 769px) {
    #toast-container { top: 80px; left: auto; width: 380px; }
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.35s ease forwards;
    pointer-events: auto;
    font-size: 14px;
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-icon { flex-shrink: 0; margin-top: 1px; }
@keyframes toastIn { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(30px); } }

/* --- Skeleton Loading --- */
.skeleton {
    background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeletonShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- Mobile Top Bar --- */
.mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: var(--mobile-top-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: var(--safe-top);
}
.mobile-logo { height: 30px; width: auto; object-fit: contain; }
.mobile-top-bar-right { display: flex; align-items: center; gap: 4px; }
.lang-toggle-text { font-size: 13px; font-weight: 700; }
.notification-btn { position: relative; }
.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

@media (min-width: 769px) { .mobile-top-bar { display: none; } }

/* --- Desktop Navigation --- */
.desktop-nav {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
@media (min-width: 769px) { .desktop-nav { display: block; } }

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.nav-link.active { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.mobile-menu-toggle { display: none; }
@media (max-width: 900px) {
    .nav-links { display: none; }
    .mobile-menu-toggle { display: flex; }
}
.mobile-menu {
    display: none;
    padding: 12px 24px 16px;
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    gap: 2px;
}
.mobile-menu.open { display: flex; }
.mobile-menu-link {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.mobile-menu-link:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.mobile-menu-divider { height: 1px; background: var(--border-color); margin: 6px 0; }

/* --- Notification Panel --- */
.notification-panel {
    position: fixed;
    top: var(--nav-height);
    right: 16px;
    width: 360px;
    max-height: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
@media (max-width: 768px) {
    .notification-panel {
        top: auto;
        bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 8px);
        left: 12px;
        right: 12px;
        width: auto;
        max-height: 50vh;
    }
}
.notification-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.notification-panel-header h3 { font-size: 15px; font-weight: 600; }
.notification-panel-body { overflow-y: auto; padding: 8px; }
.notif-item {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}
.notif-item:hover { background: var(--bg-tertiary); }
.notif-item.unread { background: var(--accent-subtle); }
.notif-item p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.notif-item time { font-size: 11px; color: var(--text-muted); }

/* --- Main Content --- */
.main-content {
    min-height: calc(100vh - var(--bottom-nav-height) - var(--mobile-top-height) - var(--safe-bottom) - var(--safe-top));
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 16px);
}
@media (min-width: 769px) {
    .main-content {
        min-height: calc(100vh - var(--nav-height) - 200px);
        padding-bottom: 0;
    }
}

/* --- Page Transition --- */
.page-enter { animation: pageEnter 0.3s ease forwards; }
@keyframes pageEnter { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

/* --- Mobile Bottom Navigation --- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
@media (min-width: 769px) { .mobile-bottom-nav { display: none; } }

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    color: var(--text-muted);
    transition: color var(--transition);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 0;
    text-decoration: none;
    position: relative;
}
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item:hover { color: var(--text-primary); }

.bottom-nav-center-icon {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-top: -20px;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: all var(--transition);
}
.bottom-nav-center:hover .bottom-nav-center-icon {
    transform: scale(1.08);
    box-shadow: 0 6px 20px var(--accent-glow);
}
.bottom-nav-center:hover { color: var(--accent); }

/* --- Mobile More Menu --- */
.mobile-more-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}
.mobile-more-overlay.open { opacity: 1; visibility: visible; }

.mobile-more-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 151;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    max-height: 70vh;
    overflow-y: auto;
    padding-bottom: var(--safe-bottom);
}
.mobile-more-menu.open { transform: translateY(0); }
.mobile-more-header {
    padding: 20px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}
.mobile-more-header h3 { font-size: 16px; font-weight: 600; }
.more-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: background var(--transition);
    cursor: pointer;
}
.more-menu-item:hover { background: var(--bg-tertiary); }
.more-menu-item.no-hover:hover { background: transparent; }
.more-menu-item a { color: inherit; display: flex; align-items: center; gap: 14px; width: 100%; }
.more-menu-divider { height: 1px; background: var(--border-color); margin: 4px 20px; }

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    z-index: 501;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; }

@media (max-width: 768px) {
    .modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        transform: translateY(100%);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-height: 90vh;
    }
    .modal.open { transform: translateY(0); }
}

/* --- Desktop Footer --- */
.desktop-footer {
    display: none;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}
@media (min-width: 769px) { .desktop-footer { display: block; } }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { margin-bottom: 12px; }
.footer-desc { font-size: 14px; color: var(--text-secondary); max-width: 280px; line-height: 1.7; }
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--text-primary); }
.footer-col a { display: block; font-size: 13px; color: var(--text-secondary); padding: 4px 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-col p { font-size: 13px; color: var(--text-secondary); padding: 4px 0; }
.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 20px; text-align: center; }
.footer-bottom p { font-size: 13px; color: var(--text-muted); }

/* =============================================
   HOME PAGE
   ============================================= */

/* Hero Section */
.hero-section {
    position: relative;
    padding: 40px 20px 32px;
    text-align: center;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 24px;
    line-height: 1.7;
}
.hero-search {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}
.hero-search input {
    padding: 14px 50px 14px 20px;
    border-radius: var(--radius-full);
    font-size: 15px;
    box-shadow: var(--shadow-md);
}
.hero-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all var(--transition);
}
.hero-search-btn:hover { background: var(--accent-hover); transform: translateY(-50%) scale(1.05); }

@media (min-width: 769px) {
    .hero-section { padding: 60px 24px 48px; }
    .hero-title { font-size: 42px; }
    .hero-subtitle { font-size: 17px; }
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 20px 32px;
}
@media (min-width: 769px) { .stats-section { grid-template-columns: repeat(4, 1fr); padding: 0 24px 40px; max-width: 1200px; margin: 0 auto; } }

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all var(--transition);
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-number { font-size: 28px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* Section Common */
.section { padding: 0 20px 32px; }
@media (min-width: 769px) { .section { padding: 0 24px 48px; max-width: 1200px; margin: 0 auto; } }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-title { font-size: 18px; font-weight: 600; }
.section-link { font-size: 13px; font-weight: 500; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.section-link:hover { gap: 8px; }

/* How It Works */
.how-section { background: var(--bg-secondary); padding: 32px 20px; margin-bottom: 32px; }
@media (min-width: 769px) { .how-section { padding: 48px 24px; margin-bottom: 0; } }
.how-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}
@media (min-width: 769px) { .how-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.how-card { text-align: center; padding: 16px 12px; }
.how-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--accent);
}
.how-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.how-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* CTA Section */
.cta-section {
    margin: 0 20px 32px;
    padding: 32px 24px;
    background: linear-gradient(135deg, var(--accent) 0%, #991b1b 100%);
    border-radius: var(--radius-xl);
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.cta-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; position: relative; }
.cta-desc { font-size: 14px; opacity: 0.9; max-width: 440px; margin: 0 auto 20px; line-height: 1.7; position: relative; }
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #fff;
    color: var(--accent);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition);
    position: relative;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }

@media (min-width: 769px) {
    .cta-section { margin: 0 24px 48px; padding: 48px 32px; }
    .cta-title { font-size: 28px; }
}

/* Donor Cards Grid */
.donors-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 600px) { .donors-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .donors-grid { grid-template-columns: repeat(3, 1fr); } }

.donor-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}
.donor-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.donor-card:active { transform: scale(0.98); }

.donor-card-avatar {
    position: relative;
    flex-shrink: 0;
}
.donor-card-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}
.avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    border: 2px solid var(--border-color);
}
.blood-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}
.blood-badge.large { padding: 4px 12px; font-size: 13px; }
.donor-card-avatar .blood-badge {
    position: absolute;
    bottom: -4px;
    right: -6px;
    font-size: 10px;
    padding: 1px 6px;
    box-shadow: var(--shadow-sm);
}
.donor-card-info { flex: 1; min-width: 0; }
.donor-card-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donor-card-location { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.donor-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--text-secondary); }
.availability-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.availability-dot.available { background: var(--success); box-shadow: 0 0 6px var(--success); }
.availability-dot.unavailable { background: var(--text-muted); }
.donation-count { background: var(--accent-subtle); color: var(--accent); padding: 1px 8px; border-radius: var(--radius-full); font-weight: 600; font-size: 10px; }
.donor-card-call {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}
.donor-card-call:hover { background: var(--success); color: #fff; transform: scale(1.08); }

/* Blood Request Cards */
.requests-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 600px) { .requests-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .requests-grid { grid-template-columns: repeat(3, 1fr); } }

.request-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.request-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.request-card.critical-pulse { border-color: var(--danger); }
.request-card.critical-pulse::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-md);
    border: 1px solid var(--danger);
    animation: criticalPulse 2s infinite;
}
@keyframes criticalPulse { 0%, 100% { opacity: 0; } 50% { opacity: 0.5; } }

.request-card-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.urgency-badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}
.status-badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-active { background: var(--success-bg); color: var(--success); }
.status-fulfilled { background: var(--info-bg); color: var(--info); }
.status-cancelled { background: var(--danger-bg); color: var(--danger); }
.status-expired { background: var(--warning-bg); color: var(--warning); }

.request-card-body h3 { font-size: 15px; font-weight: 600; }
.request-hospital, .request-location, .request-units { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.request-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.request-time { font-size: 11px; color: var(--text-muted); }
.request-stats { display: flex; gap: 10px; font-size: 11px; color: var(--text-muted); }
.request-stats span { display: flex; align-items: center; gap: 3px; }

/* =============================================
   FIND DONORS PAGE
   ============================================= */
.search-page { padding: 24px 20px 32px; }
@media (min-width: 769px) { .search-page { padding: 32px 24px; max-width: 1200px; margin: 0 auto; } }

.search-filters {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}
.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (min-width: 600px) { .filter-grid { grid-template-columns: repeat(4, 1fr); } }
.filter-actions { display: flex; gap: 8px; margin-top: 16px; }
.search-results-count { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }

/* =============================================
   BLOOD REQUESTS PAGE
   ============================================= */
.requests-page { padding: 24px 20px 32px; }
@media (min-width: 769px) { .requests-page { padding: 32px 24px; max-width: 1200px; margin: 0 auto; } }

.requests-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.requests-tabs::-webkit-scrollbar { display: none; }
.requests-tab {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    transition: all var(--transition);
    cursor: pointer;
}
.requests-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.requests-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-page {
    min-height: calc(100vh - var(--bottom-nav-height) - var(--mobile-top-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}
@media (min-width: 769px) { .auth-page { min-height: calc(100vh - var(--nav-height)); } }

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    box-shadow: var(--shadow-lg);
}
.auth-card h2 { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.auth-card .auth-subtitle { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.auth-logo { display: block; margin: 0 auto 16px; height: 40px; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 1px; flex-shrink: 0; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-footer a { font-weight: 600; }

.password-wrapper { position: relative; }
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}
.password-toggle:hover { color: var(--text-primary); }

/* Verify Code Input */
.verify-code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 24px 0;
}
.verify-code-inputs input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border-radius: var(--radius-md);
    padding: 0;
    letter-spacing: 0;
}

/* =============================================
   DONOR PROFILE PAGE
   ============================================= */
.profile-page { padding: 0 0 32px; }
@media (min-width: 769px) { .profile-page { padding: 0 24px 48px; max-width: 900px; margin: 0 auto; } }

.profile-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--accent) 0%, #991b1b 50%, #111827 100%);
    position: relative;
    overflow: hidden;
}
@media (min-width: 769px) { .profile-cover { height: 240px; border-radius: var(--radius-xl); margin-bottom: 0; } }
.profile-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--bg-primary));
}
.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -48px;
    position: relative;
    z-index: 1;
    padding: 0 20px;
}
@media (min-width: 769px) {
    .profile-avatar-section {
        flex-direction: row;
        gap: 24px;
        margin-top: -48px;
        padding: 0 32px;
    }
}
.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}
.profile-avatar-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    background: var(--accent-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
}
.profile-name { font-size: 22px; font-weight: 700; margin-top: 8px; text-align: center; }
@media (min-width: 769px) { .profile-name { margin-top: 24px; text-align: left; } }
.profile-username { font-size: 13px; color: var(--text-muted); }
.profile-bio { font-size: 14px; color: var(--text-secondary); margin-top: 8px; text-align: center; max-width: 500px; line-height: 1.7; }
@media (min-width: 769px) { .profile-bio { text-align: left; } }

.profile-actions-bar {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
@media (min-width: 769px) { .profile-actions-bar { justify-content: flex-start; } }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 20px;
    margin-top: 20px;
}
@media (min-width: 769px) { .profile-stats { padding: 16px 0; } }
.profile-stat {
    text-align: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.profile-stat-value { font-size: 22px; font-weight: 700; color: var(--accent); }
.profile-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.profile-details {
    padding: 16px 20px;
    margin-top: 8px;
}
@media (min-width: 769px) { .profile-details { padding: 16px 0; } }
.profile-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}
.profile-detail-item:last-child { border-bottom: none; }
.profile-detail-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.profile-detail-label { font-size: 12px; color: var(--text-muted); }
.profile-detail-value { font-weight: 500; }

/* =============================================
   BLOOD REQUEST DETAIL PAGE
   ============================================= */
.request-detail-page { padding: 20px 20px 32px; }
@media (min-width: 769px) { .request-detail-page { padding: 24px; max-width: 800px; margin: 0 auto; } }

.request-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.request-detail-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.request-detail-body { padding: 24px; }
.request-detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
@media (min-width: 600px) { .request-detail-info { grid-template-columns: 1fr 1fr 1fr; } }
.request-info-item { }
.request-info-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.request-info-value { font-size: 14px; font-weight: 500; }
.request-detail-description { margin-top: 20px; font-size: 14px; color: var(--text-secondary); line-height: 1.7; white-space: pre-wrap; }
.request-detail-actions {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =============================================
   DASHBOARD
   ============================================= */
.dashboard-page { padding: 24px 20px 32px; }
@media (min-width: 769px) { .dashboard-page { padding: 32px 24px; max-width: 1000px; margin: 0 auto; } }

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.dashboard-header h1 { font-size: 24px; font-weight: 700; }

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
@media (min-width: 600px) { .dashboard-stats { grid-template-columns: repeat(4, 1fr); } }
.dash-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}
.dash-stat-value { font-size: 24px; font-weight: 700; }
.dash-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.dashboard-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.dashboard-tabs::-webkit-scrollbar { display: none; }
.dash-tab {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all var(--transition);
    cursor: pointer;
}
.dash-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.dash-tab:hover { color: var(--text-primary); }

.dash-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition);
}
.dash-list-item:hover { border-color: var(--accent); }
.dash-list-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-list-info { flex: 1; min-width: 0; }
.dash-list-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-list-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.dash-list-action { flex-shrink: 0; }

/* =============================================
   STATIC PAGES (About, Contact, Terms, Privacy)
   ============================================= */
.static-page { padding: 24px 20px 32px; }
@media (min-width: 769px) { .static-page { padding: 40px 24px; max-width: 800px; margin: 0 auto; } }
.static-page h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.static-page .page-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.static-page h2 { font-size: 18px; font-weight: 600; margin: 28px 0 12px; }
.static-page h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; }
.static-page p { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; }
.static-page ul, .static-page ol { padding-left: 20px; margin-bottom: 12px; }
.static-page li { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 4px; }
.static-page a { color: var(--accent); text-decoration: underline; }

.contact-form { max-width: 600px; margin-top: 24px; }

/* =============================================
   404 & ERROR PAGES
   ============================================= */
.error-page {
    min-height: calc(100vh - var(--bottom-nav-height) - var(--mobile-top-height) - var(--safe-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    text-align: center;
}
@media (min-width: 769px) { .error-page { min-height: calc(100vh - var(--nav-height)); } }
.error-code { font-size: 100px; font-weight: 800; color: var(--accent); line-height: 1; opacity: 0.3; }
.error-title { font-size: 24px; font-weight: 700; margin: 16px 0 8px; }
.error-desc { font-size: 15px; color: var(--text-muted); max-width: 400px; margin-bottom: 24px; }

/* Offline page specific */
.offline-icon { font-size: 64px; margin-bottom: 16px; }

/* =============================================
   Empty State
   ============================================= */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.empty-state-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* =============================================
   Badges & Misc
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.divider { height: 1px; background: var(--border-color); margin: 24px 0; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Loading Spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Share Actions */
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all var(--transition);
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* =============================================
   Print Styles
   ============================================= */
@media print {
    .mobile-top-bar, .mobile-bottom-nav, .desktop-nav, .desktop-footer,
    .notification-panel, .btn, .share-actions, .modal-overlay, .modal { display: none !important; }
    .main-content { padding-bottom: 0 !important; }
    body { background: #fff; color: #000; }
}