/* =====================================================
   PHARMASYS - Professional UI Theme
   Version: 3.0 (Pharmacy Vibe Hero)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =====================================================
   ROOT VARIABLES
   ===================================================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary: #8b5cf6;
    --secondary-dark: #7c3aed;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #4f46e5 0%, #7c3aed 100%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --border: #e2e8f0;
    --border-focus: #6366f1;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --sidebar-width: 260px;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: white;
    padding: 24px 0;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 4px 0 24px rgba(79, 70, 229, 0.15);
}

.sidebar-brand {
    padding: 0 24px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}

.sidebar-brand .brand-icon {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    backdrop-filter: blur(10px);
}

.sidebar-brand h2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar-user {
    padding: 12px 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user .user-avatar {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.3);
}

.sidebar-user .user-info .user-name { font-size: 13px; font-weight: 600; }
.sidebar-user .user-info .user-role {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav { padding: 0 12px; }

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    margin: 2px 0;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    position: relative;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(4px);
    text-decoration: none;
}

.sidebar a.active {
    background: rgba(255,255,255,0.18);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sidebar a.active::before {
    content: '';
    position: absolute;
    left: -12px; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 60%;
    background: white;
    border-radius: 0 4px 4px 0;
}

.sidebar a .badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main {
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    min-height: 100vh;
}

.topbar {
    background: var(--bg-card);
    padding: 18px 26px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
    border: 1px solid var(--border);
}

.topbar h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar .user-info {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar .user-info strong { color: var(--primary); font-weight: 700; }

/* =====================================================
   ROLE BADGES
   ===================================================== */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.admin { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.role-badge.pharmacist { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.role-badge.cashier { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.role-badge.client { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #5b21b6; }

/* =====================================================
   CARDS
   ===================================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
}

.card:hover { box-shadow: var(--shadow-md); }

.card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

/* =====================================================
   STAT CARDS
   ===================================================== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stat-card .icon {
    width: 58px; height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: var(--radius-md);
    font-size: 26px;
    flex-shrink: 0;
}

.stat-card .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-card .value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.stat-card.purple .icon { background: linear-gradient(135deg, #eef2ff, #e0e7ff); }
.stat-card.purple::before { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.stat-card.green .icon { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.stat-card.green::before { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card.blue .icon { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.stat-card.blue::before { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-card.orange .icon { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.stat-card.orange::before { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card.red .icon { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.stat-card.red::before { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-card.gray .icon { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); }
.stat-card.gray::before { background: linear-gradient(135deg, #94a3b8, #64748b); }

/* =====================================================
   TABLES
   ===================================================== */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }

thead th {
    text-align: left;
    padding: 14px 16px;
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    border-bottom: 2px solid var(--border);
}

tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: #f8fafc; }
tbody tr:last-child td { border-bottom: none; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary { background: var(--primary-gradient); color: white; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); color: white; text-decoration: none; }

.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4); color: white; text-decoration: none; }

.btn-secondary { background: #f1f5f9; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e2e8f0; color: var(--text-primary); text-decoration: none; }

.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4); color: white; text-decoration: none; }

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.btn-view { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3); }
.btn-view:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); color: white; text-decoration: none; }

.btn-edit { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3); }
.btn-edit:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4); color: white; text-decoration: none; }

.btn-delete { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3); }
.btn-delete:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); color: white; text-decoration: none; }

/* =====================================================
   BADGES
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.5);
}

.badge-active, .badge-instock, .badge-approved { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.badge-inactive, .badge-noaccount { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.badge-suspended, .badge-out, .badge-rejected, .badge-expired { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #991b1b; }
.badge-low { background: linear-gradient(135deg, #ffedd5, #fed7aa); color: #9a3412; }
.badge-admin { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #831843; }
.badge-pharmacist { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.badge-cashier { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.badge-client { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #5b21b6; }
.badge-cat { background: #f1f5f9; color: #475569; }
.badge-cat::before { display: none; }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group label .req { color: var(--danger); }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-section {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px;
    background: linear-gradient(90deg, #eef2ff, transparent);
    border-left: 4px solid var(--primary);
    margin: 24px 0 16px;
    border-radius: var(--radius-sm);
}

.form-section:first-of-type { margin-top: 0; }

/* =====================================================
   FILTERS
   ===================================================== */
.filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 24px;
}

.filters input,
.filters select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: all 0.2s ease;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.filters button {
    padding: 12px 26px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filters button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); }

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    background: white;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    min-width: 42px;
    text-align: center;
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); text-decoration: none; }
.pagination .active { background: var(--primary-gradient); color: white; border-color: transparent; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }

.modal-box {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 750px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.modal-header h3 { font-size: 20px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; margin: 0; }

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { background: var(--danger-light); color: var(--danger); transform: rotate(90deg); }

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.btn-cancel {
    padding: 12px 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-cancel:hover { background: #f8fafc; color: var(--text-primary); }

.btn-save {
    padding: 12px 26px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-save:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); }

/* =====================================================
   DETAIL GRID
   ===================================================== */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.detail-item { padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.detail-item.full { grid-column: 1 / -1; }
.detail-item label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.detail-item p { font-size: 15px; color: var(--text-primary); font-weight: 500; word-wrap: break-word; }
.detail-item p strong { color: var(--primary); font-size: 17px; font-weight: 700; }

/* =====================================================
   LOADING
   ===================================================== */
.modal-loading { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 14px; }

.spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatEmoji { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes floatOrb { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, 50px) scale(1.15); } }
@keyframes floatPill { 0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.12; } 50% { transform: translateY(-30px) rotate(15deg); opacity: 0.2; } }

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; border-left-color: var(--success); }
.alert-error { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #991b1b; border-left-color: var(--danger); }
.alert-warning { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; border-left-color: var(--warning); }
.alert-info { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; border-left-color: var(--info); }

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty { text-align: center; color: var(--text-muted); padding: 60px 20px; font-size: 14px; }
.empty::before { content: '📭'; display: block; font-size: 60px; margin-bottom: 16px; opacity: 0.5; }

/* =====================================================
   HERO SECTION (Pharmacy Vibe — CSS Only)
   ===================================================== */
.hero {
    background:
        linear-gradient(rgba(35, 25, 90, 0.55), rgba(35, 25, 90, 0.55)),
        url("../images/landing-hero.webp") center / cover no-repeat,
        linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #8b5cf6 100%);
    color: white;
    padding: 140px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Pharmacy shelves pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(90deg, 
            transparent 0%, transparent 19.8%, 
            rgba(255,255,255,0.06) 19.8%, rgba(255,255,255,0.06) 20%,
            transparent 20%, transparent 39.8%, 
            rgba(255,255,255,0.06) 39.8%, rgba(255,255,255,0.06) 40%,
            transparent 40%, transparent 59.8%, 
            rgba(255,255,255,0.06) 59.8%, rgba(255,255,255,0.06) 60%,
            transparent 60%, transparent 79.8%, 
            rgba(255,255,255,0.06) 79.8%, rgba(255,255,255,0.06) 80%,
            transparent 80%, transparent 100%
        ),
        linear-gradient(0deg, 
            transparent 0%, transparent 24.8%, 
            rgba(255,255,255,0.04) 24.8%, rgba(255,255,255,0.04) 25%,
            transparent 25%, transparent 49.8%, 
            rgba(255,255,255,0.04) 49.8%, rgba(255,255,255,0.04) 50%,
            transparent 50%, transparent 74.8%, 
            rgba(255,255,255,0.04) 74.8%, rgba(255,255,255,0.04) 75%,
            transparent 75%, transparent 100%
        );
    pointer-events: none;
}

/* Radial spotlight */
.hero::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(167, 139, 250, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.25) 0%, transparent 40%);
    animation: floatOrb 20s ease-in-out infinite;
    pointer-events: none;
}

.hero-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }

/* Floating pharmacy decorations */
.hero-decorations {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.hero-decorations .pill {
    position: absolute;
    font-size: 42px;
    opacity: 0.12;
    animation: floatPill 8s ease-in-out infinite;
    filter: blur(0.5px);
}

.hero-decorations .pill:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; font-size: 52px; }
.hero-decorations .pill:nth-child(2) { top: 70%; left: 15%; animation-delay: 1.5s; font-size: 38px; }
.hero-decorations .pill:nth-child(3) { top: 25%; right: 10%; animation-delay: 3s; font-size: 46px; }
.hero-decorations .pill:nth-child(4) { top: 80%; right: 20%; animation-delay: 4.5s; font-size: 40px; }
.hero-decorations .pill:nth-child(5) { top: 50%; left: 5%; animation-delay: 2s; font-size: 34px; }

.hero .hero-emoji {
    font-size: 80px;
    margin-bottom: 24px;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
    animation: floatEmoji 3s ease-in-out infinite;
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
    letter-spacing: -1.5px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 36px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-hero {
    padding: 16px 36px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-primary { background: white; color: var(--primary); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.btn-hero-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.35); color: var(--primary); text-decoration: none; }

.btn-hero-secondary { background: rgba(255,255,255,0.15); color: white; border: 2px solid rgba(255,255,255,0.4); backdrop-filter: blur(10px); }
.btn-hero-secondary:hover { background: white; color: var(--primary); border-color: white; text-decoration: none; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .main { margin-left: 0; padding: 20px; }
    .form-row, .form-row-3, .detail-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr; }
    .hero { padding: 90px 20px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .hero .hero-emoji { font-size: 60px; }
    .hero-decorations .pill { display: none; }
}

/* =====================================================
   ENHANCED FILTERS
   ===================================================== */
.filter-card {
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
    border: 1px solid #c7d2fe;
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.filter-form input[type="text"],
.filter-form input[name="search"] {
    padding: 12px 18px 12px 42px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
    width: 100%;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.filter-form input[type="text"]:focus,
.filter-form input[name="search"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.filter-form select {
    padding: 12px 38px 12px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 14px) center;
}

.filter-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.filter-form button {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.filter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

@media (max-width: 900px) {
    .filter-form {
        grid-template-columns: 1fr;
    }
}