/**
 * 🎨 Nawader Design System V2
 * نظام تصميم احترافي موحّد - الألوان والخطوط
 */

:root {
    /* الألوان الأساسية - Identity */
    --nw-gold-primary: #C9A961;        /* الذهبي الأساسي */
    --nw-gold-light: #E8C77E;          /* ذهبي فاتح */
    --nw-gold-dark: #A88B47;           /* ذهبي داكن */
    --nw-gold-accent: #F0D689;         /* ذهبي للتأثيرات */
    
    /* الألوان الطبيعية */
    --nw-cream: #F5EBE0;               /* كريمي - النصوص */
    --nw-cream-soft: #EDE0D0;          /* كريمي ناعم */
    --nw-warm-bg: #2C3329;             /* البني الدافئ - الخلفية */
    --nw-warm-darker: #1F2419;         /* أغمق */
    --nw-warm-gray: #4A4842;           /* رمادي دافئ */
    --nw-soft-brown: #B8956A;          /* بني ناعم */
    
    /* الأخضر الطبيعي */
    --nw-sage: #87A96B;                /* أخضر سيج - النجاح */
    --nw-sage-light: #A8C28A;          /* أخضر فاتح */
    --nw-sage-dark: #6B8E51;           /* أخضر داكن */
    
    /* الأزرق المهدئ */
    --nw-misty: #8FA8B8;               /* أزرق ضبابي */
    --nw-misty-dark: #6F8898;          /* أزرق داكن */
    
    /* ألوان الحالات */
    --nw-success: #2ecc71;
    --nw-success-bg: rgba(46, 204, 113, 0.15);
    --nw-warning: #F4B942;
    --nw-warning-bg: rgba(244, 185, 66, 0.15);
    --nw-danger: #E74C3C;
    --nw-danger-bg: rgba(231, 76, 60, 0.15);
    --nw-info: #3498DB;
    --nw-info-bg: rgba(52, 152, 219, 0.15);
    
    /* الشفافية - Glassmorphism */
    --nw-glass: rgba(245, 235, 224, 0.08);
    --nw-glass-hover: rgba(245, 235, 224, 0.12);
    --nw-glass-active: rgba(201, 169, 97, 0.15);
    --nw-border: rgba(201, 169, 97, 0.25);
    --nw-border-strong: rgba(201, 169, 97, 0.45);
    
    /* الظلال */
    --nw-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
    --nw-shadow-md: 0 10px 25px rgba(0, 0, 0, 0.20);
    --nw-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.30);
    --nw-shadow-gold: 0 10px 30px rgba(201, 169, 97, 0.35);
    --nw-shadow-sage: 0 10px 30px rgba(135, 169, 107, 0.35);
    
    /* المسافات */
    --nw-space-xs: 4px;
    --nw-space-sm: 8px;
    --nw-space-md: 15px;
    --nw-space-lg: 25px;
    --nw-space-xl: 40px;
    
    /* الزوايا */
    --nw-radius-sm: 8px;
    --nw-radius-md: 14px;
    --nw-radius-lg: 20px;
    --nw-radius-xl: 28px;
    --nw-radius-full: 50px;
    
    /* الخطوط */
    --nw-font-primary: 'Cairo', 'Tajawal', sans-serif;
    --nw-font-display: 'Cairo', 'Almarai', sans-serif;
    
    /* أحجام الخطوط */
    --nw-text-xs: 0.75rem;       /* 12px */
    --nw-text-sm: 0.875rem;      /* 14px */
    --nw-text-base: 1rem;        /* 16px */
    --nw-text-lg: 1.125rem;      /* 18px */
    --nw-text-xl: 1.25rem;       /* 20px */
    --nw-text-2xl: 1.5rem;       /* 24px */
    --nw-text-3xl: 1.875rem;     /* 30px */
    --nw-text-4xl: 2.25rem;      /* 36px */
    --nw-text-5xl: 3rem;         /* 48px */
    
    /* الانتقالات */
    --nw-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nw-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ Reset & Base ═══ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--nw-font-primary);
    font-size: var(--nw-text-base);
    line-height: 1.7;
    color: var(--nw-cream);
    direction: rtl;
}

/* ═══ Headings ═══ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--nw-font-display);
    font-weight: 800;
    line-height: 1.3;
    color: var(--nw-cream);
    margin-bottom: var(--nw-space-md);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--nw-text-4xl); color: var(--nw-gold-primary); }
h2 { font-size: var(--nw-text-3xl); color: var(--nw-gold-primary); }
h3 { font-size: var(--nw-text-2xl); color: var(--nw-gold-primary); }
h4 { font-size: var(--nw-text-xl); }
h5 { font-size: var(--nw-text-lg); }
h6 { font-size: var(--nw-text-base); }

/* ═══ Paragraphs & Text ═══ */
p {
    color: var(--nw-cream);
    line-height: 1.8;
    margin-bottom: var(--nw-space-md);
}

a {
    color: var(--nw-gold-primary);
    text-decoration: none;
    transition: var(--nw-transition);
}

a:hover {
    color: var(--nw-gold-light);
}

/* ═══ Buttons ═══ */
.nw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--nw-radius-full);
    font-family: var(--nw-font-primary);
    font-size: var(--nw-text-base);
    font-weight: 700;
    cursor: pointer;
    transition: var(--nw-transition);
    text-decoration: none;
}

.nw-btn-gold {
    background: linear-gradient(135deg, var(--nw-gold-primary), var(--nw-gold-light));
    color: var(--nw-warm-bg);
    box-shadow: var(--nw-shadow-gold);
}

.nw-btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(201, 169, 97, 0.5);
}

.nw-btn-sage {
    background: linear-gradient(135deg, var(--nw-sage), var(--nw-sage-dark));
    color: white;
    box-shadow: var(--nw-shadow-sage);
}

.nw-btn-sage:hover {
    transform: translateY(-2px);
}

.nw-btn-outline {
    background: transparent;
    color: var(--nw-gold-primary);
    border: 2px solid var(--nw-gold-primary);
}

.nw-btn-outline:hover {
    background: var(--nw-gold-primary);
    color: var(--nw-warm-bg);
}

/* ═══ Cards ═══ */
.nw-card {
    background: var(--nw-glass);
    border: 1px solid var(--nw-border);
    border-radius: var(--nw-radius-lg);
    padding: var(--nw-space-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--nw-transition);
    box-shadow: var(--nw-shadow-sm);
}

.nw-card:hover {
    background: var(--nw-glass-hover);
    border-color: var(--nw-gold-primary);
    transform: translateY(-3px);
    box-shadow: var(--nw-shadow-md);
}

/* ═══ Forms ═══ */
.nw-input,
.nw-select,
.nw-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1.5px solid var(--nw-border);
    border-radius: var(--nw-radius-md);
    padding: 12px 16px;
    color: var(--nw-cream);
    font-family: var(--nw-font-primary);
    font-size: var(--nw-text-base);
    transition: var(--nw-transition);
}

.nw-input:focus,
.nw-select:focus,
.nw-textarea:focus {
    outline: none;
    border-color: var(--nw-gold-primary);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

.nw-label {
    display: block;
    color: var(--nw-gold-primary);
    font-weight: 700;
    font-size: var(--nw-text-sm);
    margin-bottom: 6px;
}

/* ═══ Badges ═══ */
.nw-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--nw-radius-full);
    font-size: var(--nw-text-xs);
    font-weight: 700;
}

.nw-badge-success {
    background: var(--nw-success-bg);
    color: var(--nw-success);
}

.nw-badge-warning {
    background: var(--nw-warning-bg);
    color: var(--nw-warning);
}

.nw-badge-danger {
    background: var(--nw-danger-bg);
    color: var(--nw-danger);
}

.nw-badge-gold {
    background: rgba(201, 169, 97, 0.15);
    color: var(--nw-gold-primary);
}

/* ═══ Stats Cards ═══ */
.nw-stat {
    background: var(--nw-glass);
    border: 1px solid var(--nw-border);
    border-radius: var(--nw-radius-md);
    padding: var(--nw-space-lg);
    backdrop-filter: blur(15px);
    transition: var(--nw-transition);
}

.nw-stat:hover {
    transform: translateY(-3px);
    border-color: var(--nw-gold-primary);
}

.nw-stat-icon {
    font-size: var(--nw-text-3xl);
    color: var(--nw-gold-primary);
    margin-bottom: var(--nw-space-sm);
}

.nw-stat-num {
    font-size: var(--nw-text-3xl);
    font-weight: 900;
    color: var(--nw-cream);
    line-height: 1;
}

.nw-stat-label {
    color: var(--nw-cream-soft);
    font-size: var(--nw-text-sm);
    margin-top: 6px;
    opacity: 0.85;
}

/* ═══ Tables ═══ */
.nw-table {
    width: 100%;
    background: var(--nw-glass);
    border-radius: var(--nw-radius-md);
    overflow: hidden;
    backdrop-filter: blur(15px);
    border-collapse: collapse;
}

.nw-table thead th {
    background: rgba(201, 169, 97, 0.20);
    color: var(--nw-gold-primary);
    padding: 14px;
    text-align: right;
    font-weight: 800;
    font-size: var(--nw-text-sm);
    border-bottom: 2px solid var(--nw-gold-primary);
}

.nw-table tbody td {
    padding: 14px;
    color: var(--nw-cream);
    font-size: var(--nw-text-sm);
    border-bottom: 1px solid rgba(245, 235, 224, 0.05);
}

.nw-table tbody tr:hover {
    background: rgba(201, 169, 97, 0.05);
}

/* ═══ Animations ═══ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.nw-fade-in { animation: fadeIn 0.5s ease-out; }
.nw-slide-in { animation: slideIn 0.5s ease-out; }
.nw-pulse { animation: pulse 2s infinite; }

/* ═══ Utilities ═══ */
.nw-text-gold { color: var(--nw-gold-primary); }
.nw-text-sage { color: var(--nw-sage); }
.nw-text-cream { color: var(--nw-cream); }
.nw-text-success { color: var(--nw-success); }
.nw-text-warning { color: var(--nw-warning); }
.nw-text-danger { color: var(--nw-danger); }

.nw-bg-glass { background: var(--nw-glass); }
.nw-bg-glass-strong { background: var(--nw-glass-active); }

.nw-rounded-md { border-radius: var(--nw-radius-md); }
.nw-rounded-lg { border-radius: var(--nw-radius-lg); }
.nw-rounded-full { border-radius: var(--nw-radius-full); }

.nw-shadow-sm { box-shadow: var(--nw-shadow-sm); }
.nw-shadow-md { box-shadow: var(--nw-shadow-md); }
.nw-shadow-lg { box-shadow: var(--nw-shadow-lg); }

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(44, 51, 41, 0.3);
}

::-webkit-scrollbar-thumb {
    background: var(--nw-gold-primary);
    border-radius: var(--nw-radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--nw-gold-light);
}

/* ═══ Selection ═══ */
::selection {
    background: var(--nw-gold-primary);
    color: var(--nw-warm-bg);
}

/* ═══ Mobile ═══ */
@media (max-width: 768px) {
    h1 { font-size: var(--nw-text-3xl); }
    h2 { font-size: var(--nw-text-2xl); }
    h3 { font-size: var(--nw-text-xl); }
    
    .nw-card { padding: var(--nw-space-md); }
    .nw-btn { padding: 10px 22px; font-size: var(--nw-text-sm); }
}
