/* -----------------------------------------------------------
   1. الأساسيات والمتغيرات - iOS Style (نفس ألوان التسجيل)
----------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

:root {
    /* الهوية البصرية - FastDrop (نفس ألوان التسجيل) */
    --primary: #ff6b35;
    --primary-dark: #e55a2a;
    --primary-light: #FF8A5C;
    --secondary: #FF9500;
    --dark: #1C1C1E;
    --dark-gray: #2C2C2E;
    --light: #F9F9FB;
    --white: #FFFFFF;
    --gray-bg: #F2F2F7;
    --gray-text: #8E8E93;
    --gray-border: #E5E5EA;

    /* iOS System Colors */
    --ios-success: #34C759;
    --ios-error: #FF3B30;
    --ios-blue: #007AFF;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 8px 20px rgba(255, 107, 53, 0.25);

    /* Radius */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transition */
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
    background: var(--gray-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

/* -----------------------------------------------------------
   2. Flash Notifications - iOS Style (نفس نظام التسجيل)
----------------------------------------------------------- */
.flash-container {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: auto;
    max-width: 90%;
    pointer-events: none;
}

.flash-box {
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    animation: toastIn 0.3s ease;
}

.flash-box i {
    font-size: 16px;
}

.flash-box.success i {
    color: var(--ios-success);
}

.flash-box.error i {
    color: var(--ios-error);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px) translateX(-50%);
    }

    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

/* -----------------------------------------------------------
   3. Auth Container
----------------------------------------------------------- */
.auth-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
}

/* -----------------------------------------------------------
   4. Brand Header
----------------------------------------------------------- */
.brand-logo-ios {
    text-align: center;
    margin-bottom: 24px;
}

.brand-logo-ios img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.login-panel h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 28px;
    letter-spacing: -0.5px;
}

/* -----------------------------------------------------------
   5. Floating Inputs (نفس تنسيق التسجيل)
----------------------------------------------------------- */
.form-group.floating {
    position: relative;
    background: var(--gray-bg);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.form-group.floating:focus-within {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group.floating input {
    width: 100%;
    padding: 20px 48px 8px 48px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
    font-family: inherit;
}

.form-group.floating label {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--gray-text);
    pointer-events: none;
    transition: var(--transition);
    font-weight: 400;
}

.form-group.floating input:focus~label,
.form-group.floating input:not(:placeholder-shown)~label {
    top: 8px;
    font-size: 10px;
    color: var(--primary);
    font-weight: 500;
}

/* الأيقونات */
.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-text);
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-text);
    cursor: pointer;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary);
}

/* -----------------------------------------------------------
   6. Form Footer & Links
----------------------------------------------------------- */
.form-footer {
    text-align: left;
    margin: 16px 0 24px;
}

.ios-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.ios-link:hover {
    text-decoration: underline;
}

/* -----------------------------------------------------------
   7. Login Button
----------------------------------------------------------- */
.btn-login {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
}

.btn-login:active {
    transform: scale(0.98);
    background: var(--primary-dark);
}

/* -----------------------------------------------------------
   8. Switch Account & Security Info
----------------------------------------------------------- */
.ios-switch-account {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray-text);
}

.ios-switch-account a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.security-info {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: var(--gray-text);
    padding-top: 16px;
    border-top: 0.5px solid var(--gray-border);
}

.security-info i {
    color: var(--primary);
    font-size: 12px;
}

/* -----------------------------------------------------------
   9. RTL Support
----------------------------------------------------------- */
[dir="rtl"] .input-icon {
    left: auto;
    right: 16px;
}

[dir="rtl"] .password-toggle {
    right: auto;
    left: 16px;
}

[dir="rtl"] .form-group.floating label {
    right: auto;
    left: 48px;
}

[dir="rtl"] .form-footer {
    text-align: right;
}

/* -----------------------------------------------------------
   10. Responsive
----------------------------------------------------------- */
@media (max-width: 560px) {
    body {
        padding: 16px;
    }

    .login-container {
        padding: 24px 20px;
    }

    .login-panel h1 {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .brand-logo-ios img {
        width: 52px;
        height: 52px;
    }

    .btn-login {
        padding: 12px 16px;
    }

    .form-group.floating input {
        padding: 20px 42px 8px 42px;
    }

    .input-icon {
        left: 14px;
    }

    .password-toggle {
        right: 14px;
    }

    .form-group.floating label {
        right: 42px;
    }

    [dir="rtl"] .form-group.floating label {
        left: 42px;
    }

    [dir="rtl"] .input-icon {
        right: 14px;
    }

    [dir="rtl"] .password-toggle {
        left: 14px;
    }
}

/* -----------------------------------------------------------
   11. Hide Scrollbar
----------------------------------------------------------- */
::-webkit-scrollbar {
    display: none;
}

html,
body {
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}