/* Shared auth pages style (login / register / forgot password) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body { height: 100%; }

body {
    font-family: 'Vazirmatn', system-ui, sans-serif;
    background: radial-gradient(at 0% 0%, #1e1b4b 0%, #0b1020 45%, #050816 100%);
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 520px;
    height: 520px;
    background: rgba(var(--primary-rgb), 0.35);
    top: -200px;
    right: -120px;
    animation: aFloat1 18s ease-in-out infinite;
}

body::after {
    width: 420px;
    height: 420px;
    background: rgba(139, 92, 246, 0.28);
    bottom: -180px;
    left: -100px;
    animation: aFloat2 22s ease-in-out infinite;
}

@keyframes aFloat1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, 30px); }
}

@keyframes aFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -20px); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    z-index: 0;
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: rgba(20, 27, 46, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: aCardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes aCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-head {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-mark {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.2rem;
    background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.7));
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.4);
}

.brand-mark::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.4), transparent);
    z-index: -1;
    filter: blur(12px);
}

.brand-mark i {
    font-size: 2.1rem;
    color: white;
}

.auth-head h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.45rem;
}

.auth-head p {
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid transparent;
}

.alert i {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

.alert-info {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}

/* Form */
.form-group {
    margin-bottom: 1.1rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.86rem;
    font-weight: 500;
    color: #cbd5e1;
}

.input-wrap {
    position: relative;
}

.input-wrap > i {
    position: absolute;
    right: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrap input {
    width: 100%;
    padding: 0.95rem 2.85rem 0.95rem 2.85rem;
    background: rgba(15, 22, 41, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    color: #f1f5f9;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-wrap input::placeholder {
    color: #475569;
}

.input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 22, 41, 0.95);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.18);
}

.password-toggle {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    padding: 0.25rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.85));
    color: white;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.4);
    transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(var(--primary-rgb), 0.55);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit i {
    font-size: 1.15rem;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    text-align: center;
    color: #94a3b8;
    font-size: 0.88rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-right: 0.25rem;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 1rem;
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--primary);
}

/* Mobile */
@media (max-width: 480px) {
    .auth-card { padding: 2rem 1.4rem; border-radius: 18px; }
    .brand-mark { width: 64px; height: 64px; }
    .brand-mark i { font-size: 1.85rem; }
    .auth-head h1 { font-size: 1.25rem; }
    .form-grid-2 { grid-template-columns: 1fr; }
}
