/* ============================================================
   PHONE-LAND | Auth Page Styles 2026
   Complete Rewrite - Preserving All Classes
   ============================================================ */

/* ============================================================
   1. ROOT VARIABLES - بر اساس لوگو فون‌لند
   ============================================================ */
:root {
    /* --- Brand Colors --- */
    --brand-teal: #00a3a3;
    --brand-teal-dark: #007a7a;
    --brand-teal-light: #00cccc;
    --brand-orange: #f08020;
    --brand-orange-dark: #c96315;
    --brand-orange-light: #ffa347;

    /* --- Auth Variables (Preserved) --- */
    --auth-primary: #007a7a;
    --auth-accent: #f08020;
    --auth-light: #f8fafb;
    --auth-border: #e8ecef;
    --auth-success: #20b26c;
    --auth-shadow: 0 20px 60px rgba(0, 122, 122, 0.12);
    --auth-radius: 24px;
}

/* ============================================================
   2. BODY - پس‌زمینه صفحه احراز هویت
   ============================================================ */
body {
    padding-top: 0 !important;
    background: linear-gradient(145deg, #f0f4f8 0%, #e8f4f4 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'samim', sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* --- الگوی تزئینی بالا - نارنجی برند --- */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(240, 128, 32, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: floatSlow 12s ease-in-out infinite;
}

/* --- الگوی تزئینی پایین - فیروزه‌ای برند --- */
body::after {
    content: '';
    position: fixed;
    bottom: -50%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 163, 163, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: floatSlow 15s ease-in-out infinite reverse;
}

@keyframes floatSlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-20px, -30px) scale(1.08);
    }
}

/* ============================================================
   3. AUTH WRAPPER - کانتینر اصلی
   ============================================================ */
.auth-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* ============================================================
   4. AUTH CARD - کارت اصلی احراز هویت
   ============================================================ */
.auth-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--auth-radius);
    box-shadow: 
        0 20px 60px rgba(0, 122, 122, 0.12),
        0 4px 16px rgba(0, 122, 122, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 48px 36px;
    border: 1px solid rgba(0, 163, 163, 0.1);
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* --- نوار گرادیان بالای کارت --- */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-orange), var(--brand-teal-dark));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   5. AUTH HEADER - هدر لوگو
   ============================================================ */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    height: 75px;
    width: auto;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 122, 122, 0.15));
}

.auth-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 16px rgba(240, 128, 32, 0.25));
}

.auth-header h2 {
    color: var(--brand-teal-dark);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

.auth-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 50%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-orange));
    border-radius: 4px;
}

.auth-header p {
    color: #6c757d;
    font-size: 15px;
    margin-top: 20px;
}

/* ============================================================
   6. FORM MODERN GROUP - فرم مدرن با لیبل شناور
   ============================================================ */
.form-modern-group {
    position: relative;
    margin-bottom: 28px;
}

.form-modern-group .input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.form-modern-group input {
    width: 100%;
    padding: 18px 50px 18px 18px;
    border: 2px solid var(--auth-border);
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--auth-light);
    color: var(--brand-teal-dark);
    font-weight: 600;
    font-family: inherit;
    outline: none;
}

.form-modern-group input:hover {
    border-color: rgba(0, 163, 163, 0.25);
}

.form-modern-group input:focus {
    border-color: var(--brand-orange);
    background: #ffffff;
    box-shadow: 
        0 0 0 6px rgba(240, 128, 32, 0.08),
        0 4px 12px rgba(240, 128, 32, 0.1);
    padding-right: 50px;
}

.form-modern-group input:focus + .input-icon,
.form-modern-group input:not(:placeholder-shown) + .input-icon {
    color: var(--brand-orange);
    transform: translateY(-50%) scale(1.1);
}

.form-modern-group label {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    padding: 0 8px;
    color: #adb5bd;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border-radius: 20px;
}

.form-modern-group input:focus ~ label,
.form-modern-group input:not(:placeholder-shown) ~ label {
    top: 0;
    right: 30px;
    font-size: 12px;
    color: var(--brand-orange);
    background: #ffffff;
    padding: 0 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ============================================================
   7. BUTTON AUTH MODERN - دکمه ورود مدرن
   ============================================================ */
.btn-auth-modern {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--brand-teal), var(--brand-teal-dark));
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    letter-spacing: 1px;
    box-shadow: 0 10px 24px rgba(0, 122, 122, 0.28);
    font-family: inherit;
}

.btn-auth-modern i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-auth-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 36px rgba(240, 128, 32, 0.38);
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-dark));
}

.btn-auth-modern:hover i {
    transform: translateX(-6px);
}

.btn-auth-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: translateX(-100%);
}

.btn-auth-modern:hover::after {
    transform: translateX(100%);
    transition: transform 0.8s ease;
}

.btn-auth-modern.loading {
    opacity: 0.9;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-auth-modern.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner-border-sm {
    width: 1.3rem;
    height: 1.3rem;
    border-width: 0.2em;
}

/* ============================================================
   8. AUTH LINKS - لینک‌های پایین فرم
   ============================================================ */
.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding: 0 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-link {
    color: #6c757d;
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
}

.auth-link i {
    font-size: 14px;
    color: var(--brand-orange);
    transition: all 0.25s ease;
}

.auth-link:hover {
    color: var(--brand-orange-dark);
    background: rgba(240, 128, 32, 0.08);
    transform: translateY(-2px);
}

.auth-link:hover i {
    transform: scale(1.15);
    color: var(--brand-orange-dark);
}

/* ============================================================
   9. AUTH FOOTER - فوتر قوانین
   ============================================================ */
.auth-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 2px dashed rgba(240, 128, 32, 0.2);
    text-align: center;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.8;
}

.auth-footer a {
    color: var(--brand-orange);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed var(--brand-orange);
    transition: all 0.25s ease;
    padding: 0 4px;
}

.auth-footer a:hover {
    color: var(--brand-teal-dark);
    border-bottom-color: var(--brand-teal-dark);
    border-bottom-style: solid;
}

/* ============================================================
   10. AUTH DECORATION - دکوراسیون تزئینی
   ============================================================ */
.auth-decoration {
    position: absolute;
    bottom: 20px;
    left: 20px;
    opacity: 0.35;
    z-index: 5;
    pointer-events: none;
}

.auth-decoration i {
    font-size: 40px;
    color: var(--brand-orange);
    margin: 0 5px;
    animation: floatIcon 4s ease-in-out infinite;
}

.auth-decoration i:nth-child(2) {
    animation-delay: 0.5s;
    color: var(--brand-teal);
}

.auth-decoration i:nth-child(3) {
    animation-delay: 1s;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

/* ============================================================
   11. RESPONSIVE - ریسپانسیو
   ============================================================ */
@media (max-width: 576px) {
    .auth-wrapper {
        padding: 16px;
    }

    .auth-card {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .auth-header h2 {
        font-size: 22px;
    }

    .auth-logo {
        height: 60px;
    }

    .form-modern-group input {
        padding: 16px 45px 16px 16px;
        font-size: 15px;
    }

    .form-modern-group label {
        right: 45px;
        font-size: 14px;
    }

    .form-modern-group input:focus ~ label,
    .form-modern-group input:not(:placeholder-shown) ~ label {
        right: 26px;
        font-size: 11px;
    }

    .btn-auth-modern {
        padding: 16px;
        font-size: 16px;
    }

    .auth-links {
        justify-content: center;
        gap: 10px;
    }

    .auth-link {
        font-size: 12px;
        padding: 6px 10px;
    }

    .auth-footer {
        font-size: 12px;
        margin-top: 28px;
        padding-top: 20px;
    }

    .auth-decoration {
        display: none;
    }
}

@media (max-width: 380px) {
    .auth-card {
        padding: 28px 18px;
    }

    .auth-header h2 {
        font-size: 20px;
    }

    .auth-header p {
        font-size: 13px;
    }

    .form-modern-group {
        margin-bottom: 22px;
    }

    .form-modern-group input {
        padding: 14px 42px 14px 14px;
        font-size: 14px;
    }

    .btn-auth-modern {
        padding: 14px;
        font-size: 15px;
    }
}

/* ============================================================
   12. DARK MODE - حالت دارک مود
   ============================================================ */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(145deg, #0f1a1a, #1a1410);
    }

    body::before {
        background: radial-gradient(circle, rgba(240, 128, 32, 0.08) 0%, transparent 70%);
    }

    body::after {
        background: radial-gradient(circle, rgba(0, 163, 163, 0.08) 0%, transparent 70%);
    }

    .auth-card {
        background: rgba(26, 35, 35, 0.95);
        border-color: rgba(0, 163, 163, 0.15);
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .auth-header h2 {
        color: var(--brand-teal-light);
    }

    .auth-header p,
    .auth-footer,
    .auth-link {
        color: #adb5bd;
    }

    .form-modern-group input {
        background: #1a2323;
        border-color: rgba(0, 163, 163, 0.2);
        color: #ffffff;
    }

    .form-modern-group input:hover {
        border-color: rgba(0, 163, 163, 0.35);
    }

    .form-modern-group input:focus {
        background: #1f2a2a;
        border-color: var(--brand-orange);
    }

    .form-modern-group label {
        color: #8899a0;
    }

    .form-modern-group input:focus ~ label,
    .form-modern-group input:not(:placeholder-shown) ~ label {
        background: #1f2a2a;
        color: var(--brand-orange-light);
    }

    .auth-footer {
        border-top-color: rgba(240, 128, 32, 0.15);
    }
}

/* ============================================================
   END OF AUTH PAGE STYLES
   ============================================================ */