* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 30%, #2c5364 60%, #1e3c72 100%);
    position: relative;
}

.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(240, 192, 64, 0.1);
    animation: particleFloat 8s ease-in-out infinite;
}

.bg-particle:nth-child(1) { width: 200px; height: 200px; top: 10%; left: 10%; }
.bg-particle:nth-child(2) { width: 150px; height: 150px; top: 60%; left: 70%; animation-delay: 2s; background: rgba(44, 95, 138, 0.15); }
.bg-particle:nth-child(3) { width: 100px; height: 100px; top: 30%; left: 50%; animation-delay: 4s; }
.bg-particle:nth-child(4) { width: 120px; height: 120px; top: 80%; left: 20%; animation-delay: 6s; background: rgba(255, 255, 255, 0.08); }

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.1); }
    50% { transform: translate(-20px, -50px) scale(0.9); }
    75% { transform: translate(-30px, 20px) scale(1.05); }
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 35px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 2;
}

.auth-logo {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo-icon img {
    width: 50px;
    height: 50px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 26px;
    color: #f0c040;
}

.auth-logo h3 {
    color: #1e3a5f;
    font-weight: 700;
    font-size: 20px;
    margin: 0;
}

.auth-welcome {
    text-align: center;
    margin-bottom: 25px;
}

.auth-welcome h2 {
    color: #1e3a5f;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 4px;
}

.auth-welcome p {
    color: #6b7280;
    font-size: 13px;
    margin: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

.input-wrapper {
    display: flex;
    align-items: stretch;
    border: 2px solid #dde2e8;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #2c5f8a;
    box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.08);
}

.input-wrapper .input-icon {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #8896a6;
    font-size: 15px;
}

.input-wrapper input {
    flex: 1;
    border: none;
    padding: 12px 0;
    font-size: 14px;
    background: transparent;
    outline: none;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.input-wrapper input::placeholder {
    color: #b0bac5;
}

.input-wrapper .toggle-pass {
    display: flex;
    align-items: center;
    padding: 0 14px;
    cursor: pointer;
    color: #8896a6;
    background: none;
    border: none;
    font-size: 15px;
    transition: color 0.2s;
}

.input-wrapper .toggle-pass:hover {
    color: #1e3a5f;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding-right: 0;
    padding-left: 1.5em;
}

.form-check span {
    color: #374151;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1e3a5f;
    cursor: pointer;
}

.form-check label {
    font-size: 13px;
    color: #3d4f5f;
    cursor: pointer;
}

.forgot-link {
    font-size: 13px;
    color: #0dcaf0;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    color: #6edff6;
    text-decoration: underline;
}

.btn-login {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5f8a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.btn-login:hover {
    background: linear-gradient(135deg, #152d4a 0%, #214a6e 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.3);
}

.btn-register {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #b3860d 0%, #f0c040 100%);
    color: green;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    text-decoration: none;
    text-align: center;
}

.btn-register:hover {
    background: linear-gradient(135deg, #ac8007 0%, #ecb210 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: #6b7280;
}

.auth-footer a {
    color: #0dcaf0;
    text-decoration: none;
    font-weight: 700;
}

.auth-footer a:hover {
    color: #6edff6;
    text-decoration: underline;
}

.alert {
    border-radius: 10px;
    font-size: 13px;
    padding: 12px 14px;
    border: none;
    margin-bottom: 18px;
}

.alert-danger {
    background: #fff0f0;
    color: #b91c1c;
}

.alert-success {
    background: #f0fdf4;
    color: #15803d;
}

.alert-warning {
    background: #fffbeb;
    color: #a16207;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.alert ul {
    margin: 0;
    padding-right: 18px;
}

.alert .btn-close {
    font-size: 10px;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        align-items: flex-start;
        padding-top: 15px;
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-card {
        padding: 22px 14px;
        border-radius: 14px;
    }

    .auth-logo-icon {
        font-size: 22px;
        border-radius: 12px;
    }

    .auth-logo h3 {
        font-size: 18px;
    }

    .auth-welcome h2 {
        font-size: 18px;
    }

    .auth-welcome p {
        font-size: 12px;
    }

    .input-wrapper .input-icon {
        padding: 0 10px;
        font-size: 13px;
    }

    .input-wrapper input {
        padding: 10px 0;
        font-size: 13px;
    }

    .input-wrapper .toggle-pass {
        padding: 0 10px;
        font-size: 13px;
    }

    .form-label {
        font-size: 12px;
    }

    .form-check label {
        font-size: 12px;
    }

    .forgot-link {
        font-size: 12px;
    }

    .btn-login {
        padding: 12px;
        font-size: 14px;
    }

    .auth-footer {
        font-size: 12px;
    }
}

@media (max-width: 350px) {
    .auth-card {
        padding: 18px 10px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}