﻿:root {
    --auth-primary: #1f4e79;
    --auth-accent: #de7525;
    --auth-light: #f8fafc;
    --auth-border: #e9ecef;
    --auth-success: #28a745;
    --auth-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    --auth-radius: 24px;
}

body {
    padding-top: 0 !important;
    background: linear-gradient(145deg, #f0f4f8 0%, #e9ecef 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(222, 117, 37, 0.03) 0%, transparent 70%);
        border-radius: 50%;
        z-index: 0;
    }

    body::after {
        content: '';
        position: fixed;
        bottom: -50%;
        left: -20%;
        width: 80%;
        height: 80%;
        background: radial-gradient(circle, rgba(31, 78, 121, 0.03) 0%, transparent 70%);
        border-radius: 50%;
        z-index: 0;
    }

.auth-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* کارت اصلی - مدرن با شیشه‌ای */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    padding: 48px 36px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    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(--auth-accent), var(--auth-primary), var(--auth-accent));
        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);
    }
}

/* هدر لوگو */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    height: 75px;
    width: auto;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

    .auth-logo:hover {
        transform: scale(1.05);
    }

.auth-header h2 {
    color: var(--auth-primary);
    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: 60px;
        height: 4px;
        background: linear-gradient(90deg, var(--auth-accent), #e87c2c);
        border-radius: 4px;
    }

.auth-header p {
    color: #6c757d;
    font-size: 15px;
    margin-top: 20px;
}

/* ===== فرم مدرن با لیبل شناور ===== */
.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.2s ease;
        z-index: 5;
    }

    .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(--auth-primary);
        font-weight: 500;
    }

        .form-modern-group input:focus {
            border-color: var(--auth-accent);
            outline: none;
            background: white;
            box-shadow: 0 0 0 6px rgba(222, 117, 37, 0.08);
            padding-right: 50px;
        }

            .form-modern-group input:focus + .input-icon,
            .form-modern-group input:not(:placeholder-shown) + .input-icon {
                color: var(--auth-accent);
            }

    .form-modern-group label {
        position: absolute;
        right: 50px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        padding: 0 8px;
        color: #adb5bd;
        font-size: 15px;
        transition: all 0.2s ease;
        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(--auth-accent);
        background: white;
        padding: 0 10px;
        font-weight: 600;
    }

/* دکمه ورود مدرن */
.btn-auth-modern {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--auth-accent), #e87c2c);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    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 20px rgba(222, 117, 37, 0.2);
}

    .btn-auth-modern i {
        font-size: 18px;
        transition: transform 0.3s ease;
    }

    .btn-auth-modern:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(222, 117, 37, 0.35);
        background: linear-gradient(135deg, #e87c2c, var(--auth-accent));
    }

        .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.2), 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;
    }

        .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;
}

/* لینک‌های پایین فرم */
.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding: 0 8px;
}

.auth-link {
    color: #6c757d;
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    padding: 6px 12px;
    border-radius: 20px;
}

    .auth-link i {
        font-size: 14px;
        color: var(--auth-accent);
    }

    .auth-link:hover {
        color: var(--auth-accent);
        background: rgba(222, 117, 37, 0.08);
    }

/* فوتر قوانین */
.auth-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 2px dashed rgba(222, 117, 37, 0.2);
    text-align: center;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.8;
}

    .auth-footer a {
        color: var(--auth-accent);
        font-weight: 700;
        text-decoration: none;
        border-bottom: 1px dashed var(--auth-accent);
        transition: all 0.2s;
        padding: 0 4px;
    }

        .auth-footer a:hover {
            color: var(--auth-primary);
            border-bottom-color: var(--auth-primary);
        }

/* دموگرافیک تزئینی */
.auth-decoration {
    position: absolute;
    bottom: 20px;
    left: 20px;
    opacity: 0.3;
    z-index: 5;
}

    .auth-decoration i {
        font-size: 40px;
        color: var(--auth-accent);
        margin: 0 5px;
    }

/* ===== ریسپانسیو ===== */
@media (max-width: 576px) {
    .auth-card {
        padding: 36px 24px;
    }

    .auth-header h2 {
        font-size: 22px;
    }

    .auth-logo {
        height: 60px;
    }

    .form-modern-group input {
        padding: 16px 45px 16px 16px;
    }

    .btn-auth-modern {
        padding: 16px;
        font-size: 16px;
    }
}

/* حالت دارک مود خفیف (اختیاری) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(145deg, #1a1e24, #15191e);
    }

    .auth-card {
        background: rgba(30, 35, 40, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .auth-header h2 {
        color: #ffffff;
    }

    .auth-header p,
    .auth-footer,
    .auth-link {
        color: #adb5bd;
    }

    .form-modern-group input {
        background: #252a30;
        border-color: #3a4048;
        color: white;
    }

        .form-modern-group input:focus {
            background: #2d3238;
        }
}
