/* =============================================
   فارما هب - النمط الرئيسي
   PharmaHub Main Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&display=swap');

/* ---- Variables ---- */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #dbeafe;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #0f172a;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    direction: rtl;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ========== NAVBAR ========== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 20px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}
.nav-logo .logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}
.nav-logo span { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}
.nav-search {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 6px 16px;
    gap: 8px;
    transition: var(--transition);
    min-width: 220px;
}
.nav-search:focus-within {
    border-color: var(--primary);
    background: white;
}
.nav-search input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.9rem;
    color: var(--text);
    width: 100%;
}
.nav-search i { color: var(--text-muted); }
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
    cursor: pointer;
}
.nav-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: white; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    border: 1px solid var(--border);
    display: none;
    overflow: hidden;
    z-index: 2000;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text);
}
.dropdown-menu a:hover { background: var(--bg); color: var(--primary); }
.dropdown-menu .divider { height: 1px; background: var(--border); margin: 4px 0; }
.notification-badge {
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 50px;
    margin-right: auto;
}

/* ========== HERO ========== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}
.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-title span { color: var(--accent); }
.hero-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 500px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-btns .btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-white { background: white; color: var(--primary); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.btn-outline-white { border: 2px solid rgba(255,255,255,0.6); color: white; background: transparent; }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
}
.hero-stat .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}
.hero-stat .label { font-size: 0.85rem; opacity: 0.8; }
.hero-visual {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 300px;
}
.hero-card {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}
.hero-card:hover { background: rgba(255,255,255,0.25); transform: scale(1.05); }
.hero-card i { font-size: 2rem; margin-bottom: 8px; }
.hero-card p { font-size: 0.8rem; }

/* ========== SECTIONS ========== */
.section { padding: 60px 0; }
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}
.view-all {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.view-all:hover { gap: 10px; }

/* ========== CARDS ========== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

/* Article Card */
.article-card .card-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}
.article-card .card-img-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), #e0f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
}
.card-body { padding: 20px; }
.card-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    background: var(--primary-light);
    color: var(--primary);
}
.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title a:hover { color: var(--primary); }
.card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.card-meta .author { display: flex; align-items: center; gap: 6px; }
.card-meta img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.card-stats { display: flex; gap: 12px; }
.card-stats span { display: flex; align-items: center; gap: 4px; }

/* Drug Card */
.drug-card .drug-icon {
    height: 140px;
    background: linear-gradient(135deg, var(--primary-light), #e0f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--primary);
}
.drug-card .drug-form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-muted);
    margin-top: 6px;
}
.drug-card .scientific { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin-bottom: 4px; }
.drug-rx {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}
.drug-otc {
    background: #d1fae5;
    color: #065f46;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Category Cards */
.cat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}
.cat-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.cat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 12px;
}
.cat-name { font-weight: 700; font-size: 0.9rem; color: var(--dark); }
.cat-count { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ========== FEATURED ========== */
.featured-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    color: white;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.featured-card::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}
.featured-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.featured-excerpt { opacity: 0.85; margin-bottom: 20px; }
.featured-btn {
    background: white;
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.featured-btn:hover { background: var(--accent); color: white; }

/* ========== SIDEBAR ========== */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
}
.widget-title i { color: var(--primary); }
.widget-body { padding: 16px 20px; }
.widget-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.widget-list li:last-child { border-bottom: none; }
.widget-list a { color: var(--text); }
.widget-list a:hover { color: var(--primary); }
.trending-num {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary-light);
    min-width: 30px;
    text-align: center;
}
.trending-num:first-child { color: var(--accent); }

/* ========== FORMS ========== */
.form-group { margin-bottom: 20px; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--text); }
label .required { color: var(--danger); margin-right: 2px; }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
    color: var(--text);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}
.form-control.error { border-color: var(--danger); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}
.btn-primary-solid {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}
.btn-primary-solid:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-secondary { background: var(--bg); color: var(--text); border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-sm); }

/* ========== ALERTS ========== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background: #e0f2fe; color: #0c4a6e; border: 1px solid #7dd3fc; }

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

/* ========== AUTH PAGES ========== */
.auth-page {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #dbeafe 100%);
}
.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 50px 40px;
    width: 100%;
    max-width: 480px;
}
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}
.auth-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin: 0 auto 12px;
}
.auth-logo h1 { font-size: 1.6rem; font-weight: 800; color: var(--dark); }
.auth-logo p { color: var(--text-muted); font-size: 0.9rem; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ========== DASHBOARD ========== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 70px);
}
.sidebar-nav {
    background: white;
    border-left: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}
.sidebar-nav .nav-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 12px 24px 6px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
}
.sidebar-nav a i { width: 18px; text-align: center; }
.sidebar-nav a:hover, .sidebar-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}
.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}
.dashboard-content {
    padding: 32px;
    overflow-x: hidden;
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.page-title { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.page-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-top: 2px; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--dark); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ========== TABLE ========== */
.table-wrapper {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.table-header h3 { font-weight: 700; font-size: 1rem; }
table { width: 100%; border-collapse: collapse; }
th {
    background: var(--bg);
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: right;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 14px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}
.page-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: white;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
}
.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========== ARTICLE DETAIL ========== */
.article-hero {
    background: var(--dark);
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}
.article-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}
.article-hero .content { position: relative; z-index: 1; max-width: 800px; }
.article-content {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border);
}
.article-content h1, .article-content h2, .article-content h3 {
    color: var(--dark);
    margin: 1.5em 0 0.5em;
    font-weight: 700;
}
.article-content p { margin-bottom: 1em; line-height: 1.9; }
.article-content ul, .article-content ol { margin: 1em 0 1em 2em; }
.article-content li { margin-bottom: 0.5em; }
.article-content blockquote {
    border-right: 4px solid var(--primary);
    padding: 16px 20px;
    margin: 1.5em 0;
    background: var(--primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--primary-dark);
}

/* ========== DRUG DETAIL ========== */
.drug-detail-header {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 24px;
}
.drug-icon-lg {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-light), #e0f2fe);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--primary);
    border: 2px solid var(--border);
}
.info-tabs {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}
.tab-headers {
    display: flex;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.tab-btn {
    padding: 14px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: var(--transition);
    background: none;
    border-top: none;
    border-right: none;
    border-left: none;
    font-family: inherit;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { padding: 24px; display: none; }
.tab-content.active { display: block; }

/* ========== SEARCH RESULTS ========== */
.search-bar-lg {
    background: white;
    border-radius: var(--radius-lg);
    padding: 8px 8px 8px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    border: 2px solid var(--border);
    max-width: 700px;
    margin: 0 auto 40px;
    transition: var(--transition);
}
.search-bar-lg:focus-within { border-color: var(--primary); }
.search-bar-lg input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
}
.search-bar-lg button {
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== FILTER BAR ========== */
.filter-bar {
    background: white;
    border-radius: var(--radius);
    padding: 16px 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.filter-label { font-weight: 600; font-size: 0.875rem; color: var(--text-muted); }
.filter-btn {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.filter-btn:hover, .filter-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.filter-select {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}
.filter-select:focus { border-color: var(--primary); }

/* ========== COMMENTS ========== */
.comment {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.comment-author { font-weight: 700; font-size: 0.9rem; }
.comment-time { font-size: 0.8rem; color: var(--text-muted); margin-right: 8px; }
.comment-text { font-size: 0.9rem; color: var(--text); margin-top: 6px; line-height: 1.7; }

/* ========== FOOTER ========== */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-brand .logo { font-size: 1.4rem; font-weight: 800; color: white; margin-bottom: 12px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.8; }
.footer-col h4 { font-weight: 700; color: white; margin-bottom: 16px; font-size: 0.95rem; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: 0.875rem; color: rgba(255,255,255,0.6); }
.footer-col ul a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.social-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}
.social-btn:hover { background: var(--primary); transform: translateY(-2px); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.825rem;
    color: rgba(255,255,255,0.4);
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 24px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 4rem; margin-bottom: 16px; color: var(--border); }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; }

/* ========== LOADING ========== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-container { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-search { display: none; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.8rem; }
    .hero-stats { gap: 16px; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar-nav { display: none; }
    .drug-detail-header { grid-template-columns: 1fr; }
    .featured-card { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 32px 20px; }
    .article-content { padding: 20px; }
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-bold { font-weight: 700; }
.fw-black { font-weight: 900; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.hidden { display: none; }
.show { display: block; }

/* ========== PRINT ========== */
@media print {
    .navbar, footer, .sidebar, .sidebar-nav, .btn { display: none !important; }
    body { background: white; color: black; }
}
