/* ================================
   نظام الإستثمار - Modern Login
   ================================= */

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

:root {
    --bg-dark: #0a1628;
    --bg-card: rgba(15, 30, 50, 0.85);
    --border-gold: linear-gradient(135deg, #d4af37, #f4e6c3, #d4af37);
    --teal-primary: #14b8a6;
    --teal-glow: rgba(20, 184, 166, 0.4);
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 30, 50, 0.6);
    --input-border: rgba(148, 163, 184, 0.2);
}

/* ================================= */

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

html,
body {
    width: 100%;
    height: 100%;
    font-family: 'Cairo', sans-serif;
    overflow-y: auto;
    overflow-x: hidden;
}

/* قاعدة قوية لإزالة كل الخلفيات من Filament */
body,
body>*,
body>*>*,
body>*>*>*,
body>*>*>*>*,
[class*="fi-"] {
    background: transparent !important;
}

/* استثناءات للعناصر التي تحتاج خلفية */
.premium-card,
.fi-input-wrp,
.fi-btn-primary {
    background: revert !important;
}

/* إخفاء الهيدر الافتراضي من Filament فقط */
.fi-simple-header,
.fi-logo {
    display: none !important;
}

.fi-simple-main-ctn {
    padding: 0 !important;
    background: transparent !important;
}

.fi-simple-page {
    padding: 0 !important;
    display: block !important;
    background: transparent !important;
}

/* إزالة الخلفية السوداء من الحاوية */
.fi-simple-main,
[class*="fi-simple"] {
    background: transparent !important;
}

/* إزالة wrapper filament تماماً */
.fi-simple-main>div,
.fi-simple-main>section,
.fi-simple-page>section,
.fi-simple-page>div:not(.modern-login-page) {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

/* ================================= */

.fi-simple-layout {
    min-height: 100vh;
    background: url('/images/login-background.svg') center center / cover no-repeat !important;
    position: relative;
    overflow: hidden;
    padding: 0 !important;
}

/* إخفاء عناصر filament الافتراضية العلوية */
.fi-simple-layout>.fi-logo,
.fi-simple-layout>header {
    display: none !important;
}

/* ================================= */

.modern-login-page {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    padding: 20px;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ================================= */
/* الخلفية المتحركة */
/* ================================= */

.animated-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.wave-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--teal-primary),
            transparent);
    opacity: 0.3;
    filter: blur(1px);
}

.wave-1 {
    top: 20%;
    left: -50%;
    animation: wave-move 15s infinite linear;
}

.wave-2 {
    top: 50%;
    left: -50%;
    animation: wave-move 20s infinite linear reverse;
    opacity: 0.2;
}

.wave-3 {
    bottom: 25%;
    left: -50%;
    animation: wave-move 18s infinite linear;
    opacity: 0.15;
}

@keyframes wave-move {
    0% {
        transform: translateX(0) scaleX(1);
    }

    50% {
        transform: translateX(100%) scaleX(1.5);
    }

    100% {
        transform: translateX(0) scaleX(1);
    }
}

/* ================================= */

.glow-dot {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle,
            var(--teal-glow) 0%,
            transparent 70%);
    filter: blur(60px);
    animation: float-glow 12s infinite ease-in-out;
}

.dot-1 {
    top: 10%;
    right: 15%;
    animation-delay: 0s;
}

.dot-2 {
    bottom: 20%;
    left: 10%;
    animation-delay: 4s;
}

.dot-3 {
    top: 60%;
    right: 25%;
    width: 200px;
    height: 200px;
    animation-delay: 8s;
}

@keyframes float-glow {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translate(30px, -30px) scale(1.2);
        opacity: 0.6;
    }
}

/* ================================= */
/* البطاقة الرئيسية */
/* ================================= */

.premium-card {
    position: relative;
    width: 520px;
    max-width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 50px 45px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

/* إزالة أي wrapper أسود حول البطاقة */
.premium-card>form,
.premium-card>div>form {
    background: transparent !important;
}

/* ================================= */
/* الحواف الذهبية */
/* ================================= */

.golden-border {
    position: absolute;
    inset: -2px;
    border-radius: 32px;
    padding: 2px;
    background: var(--border-gold);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
    pointer-events: none;
}

/* ================================= */
/* الشعار */
/* ================================= */

.logo-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.logo-section img {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(20, 184, 166, 0.3));
}

/* ================================= */
/* النص الترحيبي */
/* ================================= */

.welcome-text {
    text-align: center;
    margin-bottom: 35px;
}

.welcome-text h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    line-height: 1.2;
}

.welcome-text .highlight {
    color: var(--teal-primary);
    text-shadow: 0 0 20px var(--teal-glow);
}

.welcome-text p {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ================================= */
/* النموذج */
/* ================================= */

.modern-form {
    margin-bottom: 25px;
}

/* تنسيق الحقول */
.fi-fo-field-wrp {
    margin-bottom: 20px;
}

.fi-fo-field-wrp-label {
    margin-bottom: 8px;
}

.fi-fo-field-wrp-label .fi-fo-field-wrp-label-text {
    color: var(--text-light) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* حقول الإدخال */
.fi-input-wrp {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 14px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.fi-input-wrp:focus-within {
    border-color: var(--teal-primary) !important;
    box-shadow:
        0 0 0 3px var(--teal-glow),
        0 8px 20px rgba(20, 184, 166, 0.15) !important;
    transform: translateY(-2px);
}

.fi-input {
    color: var(--text-light) !important;
    font-size: 15px !important;
    text-align: right !important;
}

.fi-input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.6;
}

/* أيقونة البريد والقفل */
.fi-input-wrp svg {
    color: var(--text-muted) !important;
}

.fi-checkbox-wrp:checked {
    background: var(--teal-primary) !important;
    border-color: var(--teal-primary) !important;
}

.fi-fo-checkbox label {
    color: var(--text-light) !important;
}

/* زر تسجيل الدخول */
.fi-btn-primary,
button[type="submit"] {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: white !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-top: 20px;
    box-shadow:
        0 4px 14px rgba(13, 148, 136, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

/* تأثير التوهج عند التحويم */
.fi-btn-primary::before,
button[type="submit"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.fi-btn-primary:hover,
button[type="submit"]:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 8px 24px rgba(13, 148, 136, 0.5),
        0 0 0 1px rgba(13, 148, 136, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.fi-btn-primary:hover::before,
button[type="submit"]:hover::before {
    opacity: 1;
}

.fi-btn-primary:active,
button[type="submit"]:active {
    transform: translateY(0) scale(0.98);
    box-shadow:
        0 2px 8px rgba(13, 148, 136, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

/* أيقونة الزر */
.fi-btn-primary svg,
button[type="submit"] svg {
    width: 18px;
    height: 18px;
    transition: transform 0.35s ease;
}

.fi-btn-primary:hover svg,
button[type="submit"]:hover svg {
    transform: translateX(-3px);
}

/* حالة التحميل */
.fi-btn-primary:disabled,
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ================================= */
/* الفاصل */
/* ================================= */

.form-divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            var(--input-border),
            transparent);
}

.form-divider::before {
    right: 0;
}

.form-divider::after {
    left: 0;
}

.form-divider span {
    display: inline-block;
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--bg-card);
}

/* ================================= */
/* الخيارات الإضافية */
/* ================================= */

.additional-options {
    text-align: center;
}

.reset-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--teal-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.reset-link svg {
    width: 18px;
    height: 18px;
}

.reset-link:hover {
    color: #0d9488;
    gap: 8px;
}

/* ================================= */
/* معلومات النظام */
/* ================================= */

.system-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    color: var(--text-muted);
    font-size: 14px;
    z-index: 10;
}

.system-info svg {
    width: 20px;
    height: 20px;
    color: var(--teal-primary);
}

/* ================================= */
/* Responsive */
/* ================================= */

@media (max-width: 640px) {
    .premium-card {
        padding: 35px 25px;
        border-radius: 24px;
    }

    .welcome-text h1 {
        font-size: 32px;
    }

    .logo-section img {
        width: 75px;
    }

    .golden-border {
        border-radius: 24px;
    }
}


/* ================================= */
/* Notifications Styles */
/* ================================= */

.fi-no-notifications {
    position: fixed;
    top: 20px;
    left: 20px;
    right: auto;
    z-index: 9999;
    max-width: 420px;
}

.fi-no-notification {
    background: rgba(15, 30, 50, 0.95) !important;
    backdrop-filter: blur(25px) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(20, 184, 166, 0.3) !important;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(20, 184, 166, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    padding: 20px !important;
    margin-bottom: 12px;
    animation: slideInFromTop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Success Notification */
.fi-no-notification.fi-color-success {
    border-left: 4px solid #10B981 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(15, 30, 50, 0.95) 30%) !important;
}

/* Info Notification */
.fi-no-notification.fi-color-info {
    border-left: 4px solid #14b8a6 !important;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(15, 30, 50, 0.95) 30%) !important;
}

/* Warning Notification */
.fi-no-notification.fi-color-warning {
    border-left: 4px solid #F59E0B !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(15, 30, 50, 0.95) 30%) !important;
}

/* Danger Notification */
.fi-no-notification.fi-color-danger {
    border-left: 4px solid #EF4444 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(15, 30, 50, 0.95) 30%) !important;
}

/* Notification Icon */
.fi-no-notification .fi-no-notification-icon {
    width: 28px !important;
    height: 28px !important;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fi-no-notification.fi-color-success .fi-no-notification-icon {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #10B981 !important;
}

.fi-no-notification.fi-color-info .fi-no-notification-icon {
    background: rgba(20, 184, 166, 0.2) !important;
    color: #14b8a6 !important;
}

.fi-no-notification.fi-color-warning .fi-no-notification-icon {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #F59E0B !important;
}

.fi-no-notification.fi-color-danger .fi-no-notification-icon {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #EF4444 !important;
}

/* Notification Title */
.fi-no-notification .fi-no-notification-title {
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    line-height: 1.4;
    margin: 0 !important;
}

/* Notification Body */
.fi-no-notification .fi-no-notification-body {
    color: #FFFFFF !important;
    font-size: 14px !important;
    line-height: 1.5;
    margin-top: 4px !important;
    opacity: 0.95;
}

/* Close Button */
.fi-no-notification .fi-no-notification-close {
    color: #FFFFFF !important;
    transition: all 0.3s ease !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 8px !important;
    opacity: 0.8;
}

.fi-no-notification .fi-no-notification-close:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
    transform: rotate(90deg) !important;
    opacity: 1;
}

/* Progress Bar for Auto-close */
.fi-no-notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #14b8a6, #10B981);
    border-radius: 0 0 16px 16px;
    animation: notification-progress 5s linear;
}

@keyframes notification-progress {
    0% {
        width: 100%;
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        width: 0%;
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .fi-no-notifications {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .fi-no-notification {
        padding: 16px !important;
    }
}

/* ================================= */
/* Light Mode Styles */
/* ================================= */

html:not(.dark) .fi-simple-layout {
    background: #FFFFFF !important;
}

html:not(.dark) .animated-bg {
    display: none;
}

html:not(.dark) .premium-card {
    background: #FFFFFF !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #E5E7EB !important;
}

html:not(.dark) .golden-border {
    display: none;
}

html:not(.dark) .welcome-text h1 {
    color: #1F2937 !important;
}

html:not(.dark) .welcome-text .highlight {
    color: #0d9488 !important;
    text-shadow: none !important;
}

html:not(.dark) .welcome-text p {
    color: #6B7280 !important;
}

html:not(.dark) .fi-fo-field-wrp-label .fi-fo-field-wrp-label-text {
    color: #374151 !important;
}

html:not(.dark) .fi-input-wrp {
    background: #FFFFFF !important;
    border: 1px solid #D1D5DB !important;
}

html:not(.dark) .fi-input-wrp:focus-within {
    border-color: #0d9488 !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1) !important;
}

html:not(.dark) .fi-input {
    color: #1F2937 !important;
}

html:not(.dark) .fi-input::placeholder {
    color: #9CA3AF !important;
}

html:not(.dark) .fi-input-wrp svg {
    color: #6B7280 !important;
}

html:not(.dark) .fi-fo-checkbox label {
    color: #374151 !important;
}

html:not(.dark) .form-divider span {
    background: #FFFFFF !important;
    color: #6B7280 !important;
}

html:not(.dark) .reset-link {
    color: #0d9488 !important;
}

html:not(.dark) .system-info {
    color: #6B7280 !important;
}

html:not(.dark) .system-info svg {
    color: #0d9488 !important;
}

/* ================================= */
/* Notifications Light Mode */
/* ================================= */

html:not(.dark) .fi-no-notification {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid #E5E7EB !important;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .fi-no-notification.fi-color-success {
    border-left: 4px solid #10B981 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(255, 255, 255, 0.98) 30%) !important;
}

html:not(.dark) .fi-no-notification.fi-color-info {
    border-left: 4px solid #14b8a6 !important;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(255, 255, 255, 0.98) 30%) !important;
}

html:not(.dark) .fi-no-notification.fi-color-warning {
    border-left: 4px solid #F59E0B !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(255, 255, 255, 0.98) 30%) !important;
}

html:not(.dark) .fi-no-notification.fi-color-danger {
    border-left: 4px solid #EF4444 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(255, 255, 255, 0.98) 30%) !important;
}

html:not(.dark) .fi-no-notification .fi-no-notification-title {
    color: #1F2937 !important;
}

html:not(.dark) .fi-no-notification .fi-no-notification-body {
    color: #6B7280 !important;
}

html:not(.dark) .fi-no-notification .fi-no-notification-close {
    color: #6B7280 !important;
}

html:not(.dark) .fi-no-notification .fi-no-notification-close:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1F2937 !important;
}
