/* ============================================
   منصة أنس الطبية - التصميم المتكامل النهائي
   Anas Medical Platform - Complete Final Style
   ============================================ */

:root {
    --primary: #0891B2;
    --primary-light: #22D3EE;
    --primary-dark: #0E7490;
    --primary-gradient: linear-gradient(135deg, #0891B2 0%, #0E7490 100%);
    --secondary: #10B981;
    --secondary-light: #34D399;
    --secondary-dark: #059669;
    --accent: #8B5CF6;
    --warning: #F59E0B;
    --error: #EF4444;
    --success: #10B981;
    --info: #3B82F6;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow: 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);
    --shadow-medical: 0 10px 40px -12px rgba(8,145,178,0.25);
    --font-family: 'Inter', 'Tajawal', 'Segoe UI', system-ui, sans-serif;
    --transition-fast: 0.2s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    color: var(--gray-700);
    line-height: 1.6;
    min-height: 100vh;
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
}

.section-title i {
    color: var(--primary);
    margin-left: 10px;
}

/* ============================================
   شريط التنقل
   ============================================ */

.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    border-bottom: 2px solid rgba(8, 145, 178, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo i {
    color: var(--primary);
    background: none;
}

.logo a {
    color: inherit;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    color: var(--gray-600);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
    background: rgba(8, 145, 178, 0.08);
}

.user-welcome {
    padding: 0.5rem 1rem;
    background: rgba(8, 145, 178, 0.1);
    border-radius: 12px;
    color: var(--primary);
    font-weight: 600;
}

.btn-logout {
    background: linear-gradient(135deg, var(--error), #DC2626);
    color: white !important;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   الأزرار
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.875rem 1.5rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--error), #DC2626);
    color: white;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: 10px;
}

/* ============================================
   البطاقات
   ============================================ */

.card {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(8, 145, 178, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), var(--shadow-medical);
}

/* ============================================
   النماذج والحقول
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-control,
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--gray-50);
    font-family: inherit;
}

.form-control:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-200);
    color: var(--primary);
}

/* ============================================
   معاينة الصور
   ============================================ */

.image-preview {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--gray-200);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-img {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 12px;
}

/* ============================================
   حاويات المصادقة
   ============================================ */

.auth-container {
    max-width: 460px;
    margin: 60px auto;
    background: white;
    border-radius: 32px;
    padding: 2rem;
    box-shadow: var(--shadow-xl), var(--shadow-medical);
    animation: fadeInUp 0.5s ease;
}

.auth-container h2 {
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ============================================
   التصنيفات
   ============================================ */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.category-card {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), var(--shadow-medical);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* ============================================
   المنتجات
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-placeholder {
    width: 100%;
    height: 220px;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-placeholder i {
    font-size: 3rem;
    color: var(--gray-400);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.product-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    margin: 10px 0;
}

.old-price {
    text-decoration: line-through;
    color: var(--gray-400);
    font-size: 0.9rem;
    margin-left: 8px;
}

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--error), #DC2626);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1;
}

/* ============================================
   مميزات المنصة
   ============================================ */

.features-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.feature-card i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-card p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* ============================================
   صفحة المنتجات - قائمة وتفاصيل
   ============================================ */

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.filters-sidebar .card {
    position: sticky;
    top: 100px;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list a {
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.category-list a i {
    font-size: 8px;
    color: var(--gray-400);
}

.category-list a.active i {
    color: var(--primary);
}

.category-list a.active {
    color: var(--primary);
    font-weight: bold;
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.empty-products {
    text-align: center;
    padding: 60px;
    background: white;
    border-radius: 24px;
}

.empty-products i {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.product-gallery {
    background: white;
    border-radius: 24px;
    padding: 20px;
}

.product-main-image {
    width: 100%;
    border-radius: 16px;
}

.product-brand {
    color: var(--gray-500);
    margin-bottom: 15px;
}

.product-prices {
    margin-bottom: 20px;
}

.current-price {
    color: var(--primary);
    font-size: 2rem;
    font-weight: bold;
}

.stock-status {
    margin-bottom: 20px;
}

.in-stock {
    color: var(--success);
}

.out-of-stock {
    color: var(--error);
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.product-specifications {
    margin-bottom: 30px;
}

.specs-list {
    list-style: none;
    padding: 0;
}

.specs-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.quantity-selector {
    display: flex;
    gap: 15px;
    align-items: center;
}

.quantity-input {
    width: 80px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--gray-300);
    text-align: center;
}

.related-products {
    margin-top: 60px;
}

/* ============================================
   سلة التسوق
   ============================================ */

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    display: flex;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    align-items: center;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
}

.cart-item-image-placeholder {
    width: 100px;
    height: 100px;
    background: var(--gray-200);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image-placeholder i {
    font-size: 2rem;
    color: var(--gray-400);
}

.cart-item-info {
    flex: 1;
}

.cart-item-price {
    font-weight: bold;
    color: var(--primary);
    margin: 8px 0;
}

.cart-item-total {
    text-align: left;
    min-width: 120px;
}

.quantity-control {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 24px;
}

.empty-cart i {
    font-size: 5rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.empty-cart h2 {
    margin: 20px 0;
}

.empty-cart p {
    color: var(--gray-500);
    margin-bottom: 30px;
}

.order-summary {
    background: white;
    padding: 25px;
    border-radius: 20px;
    position: sticky;
    top: 100px;
}

.summary-details {
    margin: 15px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.total-price {
    color: var(--primary);
}

/* ============================================
   إتمام الطلب
   ============================================ */

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.payment-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.secure-info {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--gray-500);
    text-align: center;
}

/* ============================================
   الطلبات
   ============================================ */

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.order-number {
    font-weight: bold;
    color: var(--primary);
}

.order-date {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background: #FEF3C7;
    color: #D97706;
}

.status-confirmed {
    background: #DBEAFE;
    color: #2563EB;
}

.status-shipped {
    background: #E0E7FF;
    color: #4338CA;
}

.status-delivered {
    background: #D1FAE5;
    color: #059669;
}

.status-cancelled {
    background: #FEE2E2;
    color: #DC2626;
}

.order-total {
    font-weight: bold;
    font-size: 1.1rem;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-200);
}

.empty-orders {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 24px;
}

.empty-orders i {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

/* ============================================
   لوحات التحكم
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.stat-info h2 {
    font-size: 2rem;
    color: var(--gray-800);
    font-weight: 800;
}

.stat-icon {
    width: 55px;
    height: 55px;
    background: var(--primary-gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.dashboard-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
}

.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.role-admin {
    background: #EF4444;
    color: white;
}

.role-manager {
    background: #F59E0B;
    color: white;
}

.role-staff {
    background: #10B981;
    color: white;
}

.role-customer {
    background: #6B7280;
    color: white;
}

.quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 12px 24px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.quick-btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.quick-btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
}

.quick-btn-accent {
    background: linear-gradient(135deg, var(--accent), #7C3AED);
    color: white;
}

.quick-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.grid-2cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

/* ============================================
   إدارة الموظفين
   ============================================ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.page-header h1 {
    margin: 0;
}

.page-description {
    color: var(--gray-500);
    margin-top: 5px;
}

.add-btn {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.table-responsive {
    overflow-x: auto;
}

.actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-view {
    background: var(--info);
    color: white;
}

.btn-edit {
    background: var(--warning);
    color: white;
}

.btn-delete {
    background: var(--error);
    color: white;
}

.btn-action:hover {
    transform: translateY(-2px);
    filter: brightness(0.9);
}

.performance-bar {
    background: var(--gray-200);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.performance-fill {
    background: var(--primary);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.empty-table {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

/* ============================================
   رسائل التنبيه
   ============================================ */

.messages-container {
    max-width: 600px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInUp 0.3s ease;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-right: 4px solid var(--success);
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-right: 4px solid var(--error);
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-right: 4px solid var(--warning);
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-right: 4px solid var(--info);
}

.alert-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: auto;
    color: inherit;
    opacity: 0.6;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   الترقيم (Pagination)
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination .current-page {
    padding: 8px 16px;
    border-radius: 10px;
    background: white;
    color: var(--gray-700);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
}

.pagination .current-page {
    background: var(--primary);
    color: white;
}

/* ============================================
   الفوتر ومنتجات الفوتر
   ============================================ */

.footer {
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
    color: white;
    padding: 60px 20px 30px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    color: var(--primary-light);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gray-300);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
    font-size: 0.85rem;
}

.footer-products-section {
    background: linear-gradient(135deg, #0F172A, #1E293B);
    padding: 50px 20px;
}

.footer-products-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-products-header {
    text-align: center;
    margin-bottom: 40px;
}

.footer-products-title {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 10px;
}

.footer-products-title i:first-child {
    color: #F59E0B;
}

.footer-products-title i:last-child {
    color: #EF4444;
}

.footer-products-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.footer-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.footer-product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.footer-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.footer-product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #EF4444;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 1;
}

.footer-product-image {
    width: 100%;
    height: 180px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-product-image i {
    font-size: 3rem;
    color: #0891B2;
}

.footer-product-info {
    padding: 15px;
    text-align: center;
}

.footer-product-info h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.current-price {
    color: #0891B2;
    font-weight: bold;
}

.old-price {
    text-decoration: line-through;
    color: #aaa;
    font-size: 0.8rem;
    margin-right: 8px;
}

.footer-product-btn {
    width: calc(100% - 30px);
    margin: 0 15px 15px;
    padding: 8px;
    background: linear-gradient(135deg, #0891B2, #0E7490);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.footer-product-btn:hover {
    transform: translateY(-2px);
}

/* ============================================
   طرق الدفع
   ============================================ */

.payment-section {
    background: #f8fafc;
    padding: 60px 20px;
    position: relative;
}

.payment-container {
    max-width: 1200px;
    margin: 0 auto;
}

.payment-header {
    text-align: center;
    margin-bottom: 50px;
}

.payment-header-icon {
    width: 60px;
    height: 60px;
    background: rgba(8, 145, 178, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.payment-header-icon i {
    font-size: 28px;
    color: var(--primary);
}

.payment-main-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 10px;
}

.payment-subtitle {
    display: block;
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--gray-500);
}

.payment-header-line {
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    margin: 20px auto 0;
    border-radius: 3px;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.payment-card {
    background: white;
    border-radius: 20px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(8, 145, 178, 0.1);
}

.payment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.payment-card:hover::before {
    opacity: 1;
}

.payment-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -12px rgba(8, 145, 178, 0.3);
}

.payment-icon-wrapper,
.payment-name,
.payment-desc,
.payment-badge {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.payment-icon-wrapper {
    width: 55px;
    height: 55px;
    background: rgba(8, 145, 178, 0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.3s ease;
}

.payment-icon-wrapper i {
    font-size: 24px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.payment-card:hover .payment-icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05) rotate(5deg);
}

.payment-card:hover .payment-icon-wrapper i {
    color: white;
}

.payment-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.payment-card:hover .payment-name {
    color: white;
}

.payment-desc {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.payment-card:hover .payment-desc {
    color: rgba(255, 255, 255, 0.8);
}

.payment-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.65rem;
    font-weight: 600;
}

.success-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.speed-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #D97706;
}

.instant-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #2563EB;
}

.easy-badge {
    background: rgba(139, 92, 246, 0.15);
    color: #7C3AED;
}

.global-badge {
    background: rgba(236, 72, 153, 0.15);
    color: #DB2777;
}

.payment-card:hover .payment-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.trust-badge {
    background: white;
    border-radius: 60px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(8, 145, 178, 0.1);
}

.trust-badge i:first-child {
    font-size: 1.5rem;
    color: var(--primary);
}

.trust-text {
    flex: 1;
}

.trust-text strong {
    display: block;
    color: var(--gray-800);
    font-size: 0.85rem;
}

.trust-text span {
    font-size: 0.7rem;
    color: var(--gray-500);
}

.trust-icons {
    display: flex;
    gap: 12px;
}

.trust-icons i {
    font-size: 1.3rem;
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.trust-icons i:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* ============================================
   الأزرار الثابتة (اللغة + واتساب)
   ============================================ */

.fixed-buttons {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lang-fixed {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(8, 145, 178, 0.2);
}

.lang-single-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: none;
    background: transparent;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.lang-single-btn:hover {
    background: rgba(8, 145, 178, 0.1);
    transform: translateY(-2px);
}

.whatsapp-fixed {
    position: relative;
}

.whatsapp-circle-btn {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-circle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-popup-fixed {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 280px;
    background: white;
    border-radius: 20px;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
    overflow: hidden;
    z-index: 1001;
}

.whatsapp-popup-fixed.active {
    display: block !important;
}

.whatsapp-header-fixed {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 15px;
    text-align: center;
    position: relative;
}

.close-popup-fixed {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
}

.close-popup-fixed:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.whatsapp-body-fixed {
    padding: 10px;
}

.whatsapp-dept {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: #333;
    border-radius: 12px;
    transition: all 0.3s;
}

.whatsapp-dept:hover {
    background: #E8F5E9;
    transform: translateX(-5px);
}

.dept-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* ============================================
   صفحة الخطأ 404
   ============================================ */

.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.error-container {
    text-align: center;
    max-width: 500px;
}

.error-icon {
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.5;
    margin-bottom: 20px;
}

.error-code {
    font-size: 6rem;
    color: var(--primary);
    margin: 20px 0;
    font-weight: 800;
}

.error-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.error-message {
    color: var(--gray-500);
    margin-bottom: 30px;
}

/* ============================================
   أنيميشن
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* ============================================
   تصميم متجاوب
   ============================================ */

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    .products-layout,
    .cart-layout,
    .checkout-layout,
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
    .filters-sidebar .card {
        position: static;
    }
    .grid-2cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .nav-links {
        justify-content: center;
    }
    .auth-container {
        margin: 20px;
        padding: 1.5rem;
    }
    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .cart-item-total {
        text-align: center;
    }
    .fixed-buttons {
        bottom: 20px;
        left: 20px;
    }
    .lang-single-btn .lang-name {
        display: none;
    }
    .lang-single-btn {
        padding: 8px 12px;
    }
    .whatsapp-circle-btn {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    .row {
        grid-template-columns: 1fr;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
    .payment-methods-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 15px;
    }
    .payment-section {
        padding: 40px 15px;
    }
    .payment-card {
        padding: 15px 10px;
    }
    .trust-badge {
        flex-direction: column;
        text-align: center;
        border-radius: 24px;
    }
    .payment-main-title {
        font-size: 1.5rem;
    }
    .footer-products-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 15px;
    }
    .payment-methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   شريط التمرير
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   القائمة المنسدلة
   ============================================ */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    background: rgba(8, 145, 178, 0.1);
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.3s ease;
}

.dropdown-trigger:hover {
    background: rgba(8, 145, 178, 0.2);
    transform: translateY(-2px);
}

.dropdown-trigger i:first-child {
    font-size: 1.2rem;
    color: var(--primary);
}

.dropdown-trigger i:last-child {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-trigger i:last-child {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 240px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid rgba(8, 145, 178, 0.1);
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-700);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
}

.dropdown-menu a i {
    width: 22px;
    font-size: 1rem;
    color: var(--gray-500);
    transition: all 0.25s ease;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.08), transparent);
    padding-right: 28px;
}

.dropdown-menu a:hover i {
    color: var(--primary);
    transform: translateX(-3px);
}

.dropdown-menu hr {
    margin: 8px 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}

.dropdown-menu .logout-link {
    color: var(--error);
}

.dropdown-menu .logout-link i {
    color: var(--error);
}

.dropdown-menu .logout-link:hover {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), transparent);
}

.dropdown-menu .logout-link:hover i {
    color: var(--error);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    border-top: 1px solid rgba(8, 145, 178, 0.1);
    border-left: 1px solid rgba(8, 145, 178, 0.1);
    z-index: -1;
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }
    .dropdown.active .dropdown-menu {
        transform: translateY(0);
    }
    .dropdown-menu::before {
        display: none;
    }
    .dropdown-menu a {
        padding: 16px 20px;
        justify-content: center;
    }
}

/* ============================================
   فئات إضافية
   ============================================ */

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.cart-badge {
    background: var(--error);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-right: 5px;
}

.warning-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #D97706;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
}

.text-muted {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.category-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.footer-bottom-links a {
    color: var(--gray-400);
    font-size: 0.75rem;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--primary-light);
}

.ssl-badge {
    margin-top: 15px;
    font-size: 0.7rem;
    color: var(--gray-500);
}



/* ============================================
   مساعد أنس الطبي - التصميم المتكامل
   Anas Medical Bot - Complete Style
   ============================================ */

/* ============================================
   المتغيرات الخاصة بالبوت
   ============================================ */

:root {
    --bot-primary: #0891B2;
    --bot-primary-dark: #0E7490;
    --bot-primary-light: #22D3EE;
    --bot-gradient: linear-gradient(135deg, #0891B2 0%, #0E7490 100%);
    --bot-secondary: #10B981;
    --bot-warning: #F59E0B;
    --bot-error: #EF4444;
    --bot-gray-50: #F8FAFC;
    --bot-gray-100: #F1F5F9;
    --bot-gray-200: #E2E8F0;
    --bot-gray-300: #CBD5E1;
    --bot-gray-400: #94A3B8;
    --bot-gray-500: #64748B;
    --bot-gray-600: #475569;
    --bot-gray-700: #334155;
    --bot-gray-800: #1E293B;
    --bot-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --bot-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --bot-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --bot-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --bot-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Header
   ============================================ */

.bot-header {
    background: var(--bot-gradient);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-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: 1.2rem;
}

.bot-header-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.bot-status {
    font-size: 0.7rem;
    margin: 4px 0 0;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #10B981;
    box-shadow: 0 0 5px #10B981;
    animation: pulse 1.5s infinite;
}

.status-dot.offline {
    background: #EF4444;
}

.status-dot.waiting {
    background: #F59E0B;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.bot-header-actions button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bot-header-actions button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* ============================================
   Messages Container
   ============================================ */

.bot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bot-gray-50);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Custom Scrollbar */
.bot-messages::-webkit-scrollbar {
    width: 5px;
}

.bot-messages::-webkit-scrollbar-track {
    background: var(--bot-gray-200);
    border-radius: 10px;
}

.bot-messages::-webkit-scrollbar-thumb {
    background: var(--bot-primary);
    border-radius: 10px;
}

/* Message Styles */
.message {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: var(--bot-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.user-avatar {
    background: var(--bot-gray-400);
}

.message-content {
    max-width: 80%;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-top-right-radius: 4px;
    box-shadow: var(--bot-shadow-sm);
}

.message-content p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--bot-gray-700);
}

.message-content ul, 
.message-content ol {
    margin: 5px 0 0;
    padding-right: 20px;
}

.message-content li {
    font-size: 0.8rem;
    color: var(--bot-gray-600);
    margin: 5px 0;
}

.message-content strong {
    color: var(--bot-primary);
}

.message-content a {
    color: var(--bot-primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--bot-primary);
}

.message-content a:hover {
    color: var(--bot-primary-dark);
}

.message-time {
    font-size: 0.6rem;
    color: var(--bot-gray-400);
    margin-top: 6px !important;
    text-align: left;
}

/* User Message */
.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: var(--bot-gradient);
    color: white;
    border-top-left-radius: 4px;
    border-top-right-radius: 18px;
}

.user-message .message-content p {
    color: white;
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

.user-message .message-avatar {
    order: 2;
}

/* Bot Message */
.bot-message .message-content {
    background: white;
    border-top-right-radius: 18px;
    border-top-left-radius: 4px;
}

/* ============================================
   Typing Indicator
   ============================================ */

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border-radius: 20px;
    width: fit-content;
    margin: 0 0 10px 50px;
    box-shadow: var(--bot-shadow-sm);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--bot-gray-400);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

.typing-indicator span {
    font-size: 0.7rem;
    color: var(--bot-gray-500);
}

/* ============================================
   Quick Actions
   ============================================ */

.bot-quick-actions {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid var(--bot-gray-200);
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}

.bot-quick-actions::-webkit-scrollbar {
    height: 3px;
}

.quick-action-btn {
    background: var(--bot-gray-100);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bot-gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.quick-action-btn i {
    font-size: 0.7rem;
    color: var(--bot-primary);
}

.quick-action-btn:hover {
    background: var(--bot-primary);
    color: white;
}

.quick-action-btn:hover i {
    color: white;
}

/* ============================================
   Input Area
   ============================================ */

.bot-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--bot-gray-200);
    display: flex;
    gap: 12px;
    align-items: center;
}

.bot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--bot-gray-200);
    border-radius: 24px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bot-gray-50);
}

.bot-input:focus {
    outline: none;
    border-color: var(--bot-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.bot-send-btn {
    width: 44px;
    height: 44px;
    background: var(--bot-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--bot-shadow-md);
}

.bot-send-btn:active {
    transform: scale(0.95);
}

/* ============================================
   Staff Dashboard Styles
   ============================================ */

.staff-chat-container {
    display: flex;
    height: calc(100vh - 120px);
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--bot-shadow-xl);
}

.staff-sidebar {
    width: 320px;
    background: var(--bot-gray-50);
    border-left: 1px solid var(--bot-gray-200);
    display: flex;
    flex-direction: column;
}

.staff-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--bot-gray-200);
}

.staff-sidebar-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.staff-sidebar-header p {
    font-size: 0.75rem;
    color: var(--bot-gray-500);
}

.requests-list,
.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.request-item,
.conversation-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bot-gray-200);
    cursor: pointer;
    transition: all 0.3s ease;
}

.request-item:hover,
.conversation-item:hover {
    background: var(--bot-gray-100);
}

.request-item.active,
.conversation-item.active {
    background: rgba(8, 145, 178, 0.08);
    border-right: 3px solid var(--bot-primary);
}

.request-name,
.conversation-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.request-message,
.conversation-last-message {
    font-size: 0.7rem;
    color: var(--bot-gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-time,
.conversation-time {
    font-size: 0.6rem;
    color: var(--bot-gray-400);
    margin-top: 4px;
}

.request-badge {
    display: inline-block;
    background: #F59E0B;
    color: white;
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 6px;
}

.request-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.btn-accept,
.btn-reject {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-accept {
    background: #10B981;
    color: white;
}

.btn-accept:hover {
    background: #059669;
}

.btn-reject {
    background: #EF4444;
    color: white;
}

.btn-reject:hover {
    background: #DC2626;
}

/* Staff Chat Area */
.staff-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bot-gray-50);
}

.staff-chat-header {
    padding: 20px;
    background: white;
    border-bottom: 1px solid var(--bot-gray-200);
}

.staff-chat-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.staff-chat-header p {
    font-size: 0.75rem;
    color: var(--bot-gray-500);
    margin-top: 4px;
}

.staff-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.staff-message {
    display: flex;
    gap: 12px;
}

.staff-message.staff {
    justify-content: flex-end;
}

.staff-message.staff .message-content {
    background: var(--bot-gradient);
    color: white;
}

.staff-message.staff .message-content p {
    color: white;
}

.staff-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--bot-gray-200);
    display: flex;
    gap: 12px;
}

.staff-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--bot-gray-200);
    border-radius: 24px;
    font-size: 0.85rem;
    font-family: inherit;
}

.staff-input:focus {
    outline: none;
    border-color: var(--bot-primary);
}

.staff-send-btn {
    padding: 10px 24px;
    background: var(--bot-gradient);
    border: none;
    border-radius: 24px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.staff-send-btn:hover {
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--bot-gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.85rem;
}

/* Unread Badge */
.unread-badge {
    background: var(--bot-error);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .staff-chat-container {
        flex-direction: column;
        height: auto;
        border-radius: 0;
    }
    
    .staff-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .staff-chat-area {
        height: 500px;
    }
}



/* ============================================
   تحسينات التوافق مع الجوال
   ============================================ */

@media (max-width: 768px) {
    /* قائمة جانبية للتنقل على الموبايل */
    .mobile-nav-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 12px;
        padding: 10px;
        cursor: pointer;
    }
    
    .navbar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1000;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 60px;
    }
    
    .navbar.open {
        transform: translateX(0);
    }
}

/* ============================================
   أنيميشن للـ Toast
   ============================================ */

.toast-container {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 10000;
    max-width: 350px;
}

/* ============================================
   تحسينات PWA (لما تضيف PWA)
   ============================================ */

@supports (display: block) {
    @media (display-mode: standalone) {
        body {
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}