/* ===== OMNEYA PLATFORM - MODERN DESIGN v4 ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #0f172a;
    --gray: #64748b;
    --card-shadow: 0 10px 40px rgba(37,99,235,0.10);
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    --radius: 16px;
}

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

body {
    direction: rtl;
    font-family: 'Cairo', 'Tahoma', sans-serif;
    background: var(--light);
    color: var(--dark);
    min-height: 100vh;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(15, 23, 42, 0.97) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.navbar-brand {
    font-size: 1.3rem !important;
    font-weight: 900 !important;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 600 !important;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: var(--transition) !important;
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.9rem !important;
}

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

.nav-link.active {
    color: #60a5fa !important;
    background: rgba(96,165,250,0.1) !important;
}

.btn-nav-logout {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    padding: 6px 14px !important;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #1e3a5f 100%);
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124,58,237,0.25) 0%, transparent 70%);
    animation: pulse-glow 4s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
    animation: pulse-glow 4s ease-in-out infinite 2s;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(96,165,250,0.15);
    border: 1px solid rgba(96,165,250,0.3);
    color: #93c5fd;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: white;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero h1 span {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    max-width: 550px;
    line-height: 1.8;
    margin-bottom: 36px;
}

.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-hero-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(37,99,235,0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(37,99,235,0.5);
    color: white;
}

.btn-hero-secondary {
    background: rgba(255,255,255,0.08);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-item { text-align: center; }
.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    display: block;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.6); font-weight: 500; }

/* ===== FLOATING CARDS (hero decoration) ===== */
.hero-visual {
    position: relative;
    z-index: 2;
}

.floating-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 20px 24px;
    color: white;
    margin-bottom: 16px;
    animation: float-up 6s ease-in-out infinite;
}

.floating-card:nth-child(2) { animation-delay: 2s; margin-right: 30px; }
.floating-card:nth-child(3) { animation-delay: 4s; }

@keyframes float-up {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ===== SECTION GENERAL ===== */
.section { padding: 90px 0; }
.section-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
}
.section-subtitle {
    color: var(--gray);
    font-size: 1.05rem;
    margin-bottom: 50px;
}
.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(37,99,235,0.08);
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 12px;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    background: white;
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(37,99,235,0.18);
    border-color: var(--primary);
}

.feature-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.icon-blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.icon-purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.icon-amber { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.icon-green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }

.feature-card h5 { font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; color: var(--dark); }
.feature-card p { color: var(--gray); font-size: 0.92rem; line-height: 1.7; }

/* ===== AUTH CARDS ===== */
.auth-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 20px 80px rgba(37,99,235,0.12);
    border: 1px solid #e2e8f0;
    max-width: 460px;
    margin: auto;
    width: 100%;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 24px;
    box-shadow: 0 10px 30px rgba(37,99,235,0.35);
}

.auth-card h2 { font-weight: 900; font-size: 1.6rem; color: var(--dark); }
.auth-card .subtitle { color: var(--gray); font-size: 0.95rem; margin-bottom: 32px; }

.form-label { font-weight: 700; color: var(--dark); font-size: 0.9rem; margin-bottom: 6px; }

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    background: #f8fafc;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
    background: white;
    outline: none;
}

/* ===== BUTTONS ===== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(37,99,235,0.35);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37,99,235,0.45);
}

/* ===== DASHBOARD ===== */
.dashboard-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: 24px;
    padding: 48px;
    color: white;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124,58,237,0.2), transparent 70%);
}

.dashboard-hero h1 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 8px;
}
.dashboard-hero p { color: rgba(255,255,255,0.7); font-size: 1rem; }

.action-card {
    background: white;
    border-radius: 20px;
    padding: 36px 24px;
    text-align: center;
    box-shadow: var(--card-shadow);
    text-decoration: none !important;
    color: var(--dark) !important;
    display: block;
    border: 2px solid transparent;
    transition: var(--transition);
    height: 100%;
}

.action-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(37,99,235,0.18);
}

.action-card .icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.action-card h4 { font-weight: 800; margin-bottom: 8px; font-size: 1.1rem; }
.action-card p { color: var(--gray); font-size: 0.88rem; }

/* ===== TABLES ===== */
.modern-table {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
}

.modern-table table { margin: 0; }
.modern-table thead th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    font-weight: 800;
    color: var(--dark);
    font-size: 0.88rem;
    padding: 16px 20px;
    border: none;
    border-bottom: 2px solid #e2e8f0;
}

.modern-table tbody td {
    padding: 16px 20px;
    border-color: #f1f5f9;
    font-size: 0.92rem;
    vertical-align: middle;
}

.modern-table tbody tr:hover { background: #f8fafc; }

.badge-custom {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ===== ALERTS ===== */
.alert-custom {
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 600;
    border: none;
    font-size: 0.9rem;
}

.alert-success-custom {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger-custom {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning-custom {
    background: #fef3c7;
    color: #92400e;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    box-shadow: var(--card-shadow);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ===== UPLOAD ===== */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #f8fafc;
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(37,99,235,0.04);
}

.upload-icon { font-size: 3.5rem; margin-bottom: 16px; }
.upload-zone h5 { font-weight: 700; color: var(--dark); }
.upload-zone p { color: var(--gray); font-size: 0.9rem; }

/* ===== CERTIFICATE ===== */
.cert-wrapper {
    background: #f0f4ff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.cert-card {
    background: white;
    border-radius: 24px;
    padding: 60px 50px;
    max-width: 750px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(37,99,235,0.15);
    border: 3px solid transparent;
    background-image: linear-gradient(white, white),
                      linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* ===== CHATBOT ===== */
#chatbot-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
}

#chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 8px 24px rgba(37,99,235,0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce-chat 3s ease-in-out infinite;
}

@keyframes bounce-chat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

#chat-toggle:hover { transform: scale(1.1); box-shadow: 0 12px 32px rgba(37,99,235,0.5); }

#chat-window {
    position: absolute;
    bottom: 76px;
    left: 0;
    width: 320px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: none;
    animation: slide-up 0.3s ease;
}

@keyframes slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 16px 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header h6 { margin: 0; font-weight: 700; font-size: 0.95rem; }
.chat-header small { opacity: 0.8; font-size: 0.75rem; }
.chat-avatar { font-size: 1.5rem; }

#chat-messages {
    height: 240px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.87rem;
    line-height: 1.5;
}

.msg-bot {
    background: #f1f5f9;
    color: var(--dark);
    align-self: flex-start;
    border-radius: 14px 14px 14px 4px;
}

.msg-user {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    align-self: flex-end;
    border-radius: 14px 14px 4px 14px;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.88rem;
    outline: none;
}

.chat-input-area input:focus { border-color: var(--primary); }

.chat-send-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.chat-send-btn:hover { transform: scale(1.05); }

/* ===== FOOTER ===== */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 0 24px;
    margin-top: auto;
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 24px 0 16px;
}

footer small { font-size: 0.82rem; }

/* ===== CV SECTION ===== */
.cv-section {
    background: white;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.cv-header {
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    padding: 50px 40px;
    text-align: center;
    color: white;
}

.cv-header h2 { font-weight: 900; font-size: 1.8rem; }
.cv-header p { color: rgba(255,255,255,0.7); }

.cv-body { padding: 40px; }

.cv-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

.cv-item:last-child { border-bottom: none; }

.cv-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
}

.cv-item h6 { font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.cv-item p { color: var(--gray); font-size: 0.9rem; margin: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero { min-height: auto; padding: 60px 0; }
    .hero h1 { font-size: 1.8rem; }
    .hero-stats { gap: 20px; }
    .auth-card { padding: 32px 24px; }
    .dashboard-hero { padding: 32px 24px; }
    .cert-card { padding: 40px 24px; }
    #chat-window { width: 280px; }
}

/* ===== PAGE TRANSITIONS ===== */
.page-enter { animation: page-in 0.4s ease; }
@keyframes page-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
