/**
 * EasyCount - نظام محاسبة ذكي
 * ملف التصميم الرئيسي
 * تصميم عصري وغير تقليدي مع ألوان مثيرة
 */

/* ==========================================
   المتغيرات والألوان
   ========================================== */
:root {
    /* الألوان الرئيسية - مستوحاة من الطبيعة والهدوء */
    --primary-blue: #4A90E2;
    --primary-green: #50C878;
    --accent-purple: #9B59B6;
    --accent-orange: #FF6B6B;
    --accent-teal: #1ABC9C;
    
    /* الألوان المتدرجة الحديثة */
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* الألوان الداكنة */
    --dark-bg: #1A1D29;
    --dark-card: #252936;
    --dark-text: #E4E7EB;
    
    /* الألوان الفاتحة */
    --light-bg: #F8F9FA;
    --light-card: #FFFFFF;
    --light-text: #2D3748;
    
    /* الألوان الوظيفية */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* الظلال العصرية */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    
    /* الظلال الملونة */
    --shadow-blue: 0 10px 40px rgba(74, 144, 226, 0.3);
    --shadow-green: 0 10px 40px rgba(80, 200, 120, 0.3);
    --shadow-purple: 0 10px 40px rgba(155, 89, 182, 0.3);
    
    /* الانتقالات السلسة */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* نصف القطر */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* الخطوط */
    --font-primary: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* ==========================================
   إعادة التعيين والأساسيات
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--light-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* خلفية متحركة مثيرة */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(74, 144, 226, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(80, 200, 120, 0.08) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-5%, 5%) rotate(120deg); }
    66% { transform: translate(5%, -5%) rotate(240deg); }
}

/* ==========================================
   شريط التنقل العصري
   ========================================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--light-text);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: var(--transition-fast);
    z-index: -1;
}

.nav-item:hover::before,
.nav-item.active::before {
    opacity: 1;
}

.nav-item:hover,
.nav-item.active {
    color: white;
    transform: translateY(-2px);
}

.nav-item i {
    font-size: 1.1rem;
}

/* ==========================================
   منطقة المستخدم والإشعارات
   ========================================== */
.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications-icon {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
    background: var(--gradient-3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.notifications-icon:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-blue);
}

.notifications-icon i {
    color: white;
    font-size: 1.2rem;
}

.notifications-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.user-dropdown {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--light-bg);
    cursor: pointer;
    transition: var(--transition-fast);
}

.user-info:hover {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 2px solid white;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--light-text);
    transition: var(--transition-fast);
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-blue);
}

.dropdown-menu a:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ==========================================
   لوحة الإشعارات
   ========================================== */
.notifications-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px);
    transition: var(--transition-normal);
    z-index: 999;
    overflow: hidden;
}

.notifications-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.panel-header {
    padding: 20px;
    background: var(--gradient-1);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.panel-body {
    max-height: 420px;
    overflow-y: auto;
    padding: 15px;
}

.panel-body::-webkit-scrollbar {
    width: 6px;
}

.panel-body::-webkit-scrollbar-track {
    background: var(--light-bg);
}

.panel-body::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: var(--radius-full);
}

.notification-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: var(--radius-md);
    background: var(--light-bg);
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-item:hover {
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.notification-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.tax {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.notification-icon.invoice {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.notification-icon.reminder {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.notification-icon i {
    color: white;
    font-size: 1.2rem;
}

.notification-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--light-text);
}

.notification-content p {
    font-size: 0.85rem;
    color: #6B7280;
    margin-bottom: 8px;
}

.notification-time {
    font-size: 0.75rem;
    color: #9CA3AF;
}

.no-notifications {
    text-align: center;
    padding: 40px 20px;
    color: #9CA3AF;
}

/* ==========================================
   المحتوى الرئيسي
   ========================================== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

/* ==========================================
   التذييل
   ========================================== */
.footer {
    background: var(--dark-bg);
    color: var(--dark-text);
    padding: 30px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--dark-text);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-blue);
}

/* ==========================================
   الأزرار العصرية
   ========================================== */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-purple);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(155, 89, 182, 0.4);
}

.btn-success {
    background: var(--gradient-4);
    color: white;
    box-shadow: var(--shadow-green);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(80, 200, 120, 0.4);
}

.btn-danger {
    background: var(--gradient-2);
    color: white;
    box-shadow: 0 10px 40px rgba(245, 87, 108, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(245, 87, 108, 0.4);
}

.btn-info {
    background: var(--gradient-3);
    color: white;
    box-shadow: var(--shadow-blue);
}

.btn-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(74, 144, 226, 0.4);
}

/* ==========================================
   البطاقات الحديثة
   ========================================== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    transform: scaleX(1);
}

/* ==========================================
   الرسائل التنبيهية
   ========================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-left: 4px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-left: 4px solid var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left: 4px solid var(--warning);
    color: var(--warning);
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left: 4px solid var(--info);
    color: var(--info);
}
