/* ============================================================
   نظام إدارة مواعيد وفعاليات المدير العام
   Modern Executive Design System - RTL
   ============================================================ */

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

:root {
    --primary: #0a2558;
    --primary-light: #1e3a8a;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --success: #059669;
    --warning: #d97706;
    --info: #0284c7;
    
    --bg-main: #f8fafc;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.85);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border-subtle: #e2e8f0;
    --border-strong: #cbd5e1;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -3px rgba(10, 37, 88, 0.08), 0 4px 6px -4px rgba(10, 37, 88, 0.04);
    --shadow-hover: 0 20px 30px -10px rgba(10, 37, 88, 0.14);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --bg-main: #0b1329;
    --surface: #131f3d;
    --surface-glass: rgba(19, 31, 61, 0.85);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border-subtle: #1e293b;
    --border-strong: #334155;
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 20px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    direction: rtl;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar-modern {
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.2rem;
    color: #ffffff !important;
    letter-spacing: -0.3px;
}

.navbar-brand img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}

.theme-toggle-nav {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    width: 38px;
    height: 38px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(20deg);
}

.user-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-badge .avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero-banner {
    background: linear-gradient(135deg, #07152d 0%, #0a2558 50%, #1e3a8a 100%);
    color: #ffffff;
    padding: 3rem 0 4rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    position: relative;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(10, 37, 88, 0.15);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-banner .hero-title {
    font-size: 2.1rem;
    font-weight: 900;
    margin-bottom: 0.4rem;
    letter-spacing: -0.5px;
}

.hero-banner .hero-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    font-weight: 400;
}

.hero-date-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================================
   Cards & Widgets
   ============================================================ */
.widget-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.widget-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 99, 235, 0.3);
}

.widget-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.widget-card:hover .widget-icon {
    transform: scale(1.08);
}

.widget-icon.success { background: #ecfdf5; color: #059669; }
.widget-icon.warning { background: #fffbeb; color: #d97706; }
.widget-icon.primary { background: #eff6ff; color: #2563eb; }
.widget-icon.info { background: #f0f9ff; color: #0284c7; }

body.dark-mode .widget-icon.success { background: rgba(5, 150, 105, 0.15); color: #34d399; }
body.dark-mode .widget-icon.warning { background: rgba(217, 119, 6, 0.15); color: #fbbf24; }
body.dark-mode .widget-icon.primary { background: rgba(37, 99, 235, 0.15); color: #60a5fa; }
body.dark-mode .widget-icon.info { background: rgba(2, 132, 199, 0.15); color: #38bdf8; }

.widget-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.widget-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
}

.btn-action.success {
    background: #ecfdf5;
    color: #059669;
}
.btn-action.success:hover {
    background: #059669;
    color: #ffffff;
}

.btn-action.warning {
    background: #fffbeb;
    color: #d97706;
}
.btn-action.warning:hover {
    background: #d97706;
    color: #ffffff;
}

body.dark-mode .btn-action.success {
    background: rgba(5, 150, 105, 0.2);
    color: #34d399;
}
body.dark-mode .btn-action.success:hover {
    background: #059669;
    color: #ffffff;
}

body.dark-mode .btn-action.warning {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
}
body.dark-mode .btn-action.warning:hover {
    background: #d97706;
    color: #ffffff;
}

/* ============================================================
   Contact Directory Widget
   ============================================================ */
.contact-select {
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.9rem;
    width: 100%;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: var(--transition);
    appearance: auto;
}

.contact-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.contact-result-card {
    background: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    margin-top: 0.9rem;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--border-subtle);
    font-size: 0.85rem;
}

.contact-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.contact-val {
    font-weight: 700;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-copy {
    border: none;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    background: var(--accent);
    color: #ffffff;
}

.btn-copy.copied {
    background: var(--success);
    color: #ffffff;
}

/* ============================================================
   Quick Event Form
   ============================================================ */
.quick-input {
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-main);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
    width: 100%;
    transition: var(--transition);
}

.quick-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.btn-submit-quick {
    background: linear-gradient(135deg, #0a2558 0%, #1e3a8a 100%);
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit-quick:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 37, 88, 0.2);
}

/* ============================================================
   Advertisements
   ============================================================ */
.ad-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.ad-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.ad-card img {
    width: 100%;
    object-fit: cover;
}

.ad-card-body {
    padding: 1rem 1.25rem;
}

.ad-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.ad-card-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================
   Footer
   ============================================================ */
.footer-modern {
    background: #07152d;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.65);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-link {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: #ffffff;
}

/* ============================================================
   Responsive Tweaks
   ============================================================ */
@media (max-width: 991px) {
    .hero-banner {
        padding: 2.25rem 0 3rem;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    .hero-banner .hero-title {
        font-size: 1.6rem;
    }
}