/* ============================================
   AUTH PAGES — CSS Variables
   ============================================ */
:root {
    --auth-bg: #f8fafc;
    --auth-card: #ffffff;
    --auth-border: #e2e8f0;
    --auth-text: #0f172a;
    --auth-text-muted: #64748b;
    --auth-text-soft: #94a3b8;
    
    --auth-accent: #7c3aed;
    --auth-accent-hover: #6d28d9;
    --auth-accent-soft: #ede9fe;
    
    --auth-success: #10b981;
    --auth-success-soft: #d1fae5;
    --auth-danger: #ef4444;
    --auth-danger-soft: #fef2f2;
    
    --auth-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --auth-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --auth-shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
    
    --auth-radius: 20px;
    --auth-radius-sm: 14px;
    --auth-radius-xs: 10px;
    
    --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --auth-bg: #0a0a0f;
    --auth-card: #14141b;
    --auth-border: #27273a;
    --auth-text: #e4e4e7;
    --auth-text-muted: #71717a;
    --auth-text-soft: #52525b;
    
    --auth-accent: #a78bfa;
    --auth-accent-hover: #c4b5fd;
    --auth-accent-soft: #2e1065;
    
    --auth-success: #34d399;
    --auth-success-soft: #064e3b;
    --auth-danger: #f87171;
    --auth-danger-soft: #450a0a;
    
    --auth-shadow: 0 1px 3px rgba(0,0,0,0.4);
    --auth-shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --auth-shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   BASE
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--auth-bg);
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
}

[data-theme="dark"] .auth-page {
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(167, 139, 250, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(167, 139, 250, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(167, 139, 250, 0.05) 0%, transparent 50%);
}

/* ============================================
   SHELL
   ============================================ */
.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 960px;
    width: 100%;
    background: var(--auth-card);
    border-radius: var(--auth-radius);
    overflow: hidden;
    box-shadow: var(--auth-shadow-lg);
    border: 1px solid var(--auth-border);
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   LEFT PANEL
   ============================================ */
.auth-left {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 50%, #4c1d95 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -30%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    pointer-events: none;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.auth-brand {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    animation: fadeInLeft 0.6s ease-out;
}

.auth-tag {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin-bottom: 36px;
    max-width: 380px;
    position: relative;
    z-index: 1;
    animation: fadeInLeft 0.6s ease-out 0.1s both;
}

.auth-points {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.auth-point {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--auth-radius-sm);
    backdrop-filter: blur(10px);
    transition: var(--auth-transition);
    animation: fadeInLeft 0.6s ease-out both;
}

.auth-point:nth-child(1) { animation-delay: 0.2s; }
.auth-point:nth-child(2) { animation-delay: 0.3s; }
.auth-point:nth-child(3) { animation-delay: 0.4s; }

.auth-point:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(4px);
}

.auth-point b {
    font-size: 13px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

.auth-point span {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    line-height: 1.4;
}

/* ============================================
   RIGHT PANEL
   ============================================ */
.auth-right {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeInRight 0.6s ease-out;
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--auth-text);
    margin-bottom: 6px;
}

.auth-sub {
    font-size: 14px;
    color: var(--auth-text-muted);
    margin-bottom: 24px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--auth-radius-xs);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.alert.err {
    background: var(--auth-danger-soft);
    color: var(--auth-danger);
    border: 1px solid var(--auth-danger);
}

.alert.ok {
    background: var(--auth-success-soft);
    color: var(--auth-success);
    border: 1px solid var(--auth-success);
}

/* ============================================
   FORM
   ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form label {
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: -10px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-xs);
    background: var(--auth-card);
    color: var(--auth-text);
    font-size: 14px;
    font-family: inherit;
    transition: var(--auth-transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.auth-form input::placeholder {
    color: var(--auth-text-soft);
}

/* ============================================
   PASSWORD FIELD
   ============================================ */
.field {
    position: relative;
}

.field input {
    padding-right: 48px !important;
}

.togglepass {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--auth-text-muted);
    border-radius: 8px;
    transition: var(--auth-transition);
}

.togglepass:hover {
    color: var(--auth-accent);
    background: var(--auth-accent-soft);
}

.togglepass svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   BUTTON
   ============================================ */
.auth-actions {
    margin-top: 4px;
}

.auth-actions .btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    border: none;
    border-radius: var(--auth-radius-xs);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--auth-transition);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.auth-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.auth-actions .btn:active {
    transform: translateY(0);
}

.auth-actions .btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   FOOTER
   ============================================ */
.auth-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--auth-text-muted);
    text-align: center;
}

.auth-link {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--auth-transition);
}

.auth-link:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

/* ============================================
   RESET PAGE SPECIFIC
   ============================================ */
.reset-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--auth-bg);
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.03) 0%, transparent 50%);
}

.reset-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 960px;
    width: 100%;
    background: var(--auth-card);
    border-radius: var(--auth-radius);
    overflow: hidden;
    box-shadow: var(--auth-shadow-lg);
    border: 1px solid var(--auth-border);
    animation: fadeInUp 0.6s ease-out;
}

.reset-left {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 50%, #4c1d95 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.reset-left::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -30%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    pointer-events: none;
}

.reset-brand {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    animation: fadeInLeft 0.6s ease-out;
}

.reset-tag {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin-bottom: 36px;
    max-width: 380px;
    position: relative;
    z-index: 1;
    animation: fadeInLeft 0.6s ease-out 0.1s both;
}

.reset-points {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.reset-point {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--auth-radius-sm);
    backdrop-filter: blur(10px);
    transition: var(--auth-transition);
    animation: fadeInLeft 0.6s ease-out both;
}

.reset-point:nth-child(1) { animation-delay: 0.2s; }
.reset-point:nth-child(2) { animation-delay: 0.3s; }
.reset-point:nth-child(3) { animation-delay: 0.4s; }

.reset-point:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(4px);
}

.reset-point b {
    font-size: 13px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

.reset-point span {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    line-height: 1.4;
}

.reset-right {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeInRight 0.6s ease-out;
}

.reset-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--auth-text);
    margin-bottom: 6px;
}

.reset-sub {
    font-size: 14px;
    color: var(--auth-text-muted);
    margin-bottom: 24px;
}

.reset-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reset-form label {
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: -10px;
}

.reset-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-xs);
    background: var(--auth-card);
    color: var(--auth-text);
    font-size: 14px;
    font-family: inherit;
    transition: var(--auth-transition);
}

.reset-form input:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.reset-form input::placeholder {
    color: var(--auth-text-soft);
}

.reset-actions {
    margin-top: 4px;
}

.reset-actions .btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    border: none;
    border-radius: var(--auth-radius-xs);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--auth-transition);
    position: relative;
    overflow: hidden;
}

.reset-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.reset-actions .btn:active {
    transform: translateY(0);
}

.reset-actions .btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

.reset-footer {
    text-align: center;
    margin-top: 8px;
    font-size: 13px;
    color: var(--auth-text-muted);
}

.reset-link {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--auth-transition);
}

.reset-link:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .auth-shell,
    .reset-shell {
        grid-template-columns: 1fr;
    }
    
    .auth-left,
    .reset-left {
        padding: 36px 28px;
    }
    
    .auth-right,
    .reset-right {
        padding: 36px 28px;
    }
    
    .auth-brand,
    .reset-brand {
        font-size: 28px;
    }
    
    .auth-title,
    .reset-title {
        font-size: 24px;
    }
    
    .auth-points,
    .reset-points {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .auth-page,
    .reset-page {
        padding: 12px;
    }
    
    .auth-left,
    .reset-left {
        padding: 24px 20px;
    }
    
    .auth-right,
    .reset-right {
        padding: 24px 20px;
    }
    
    .auth-brand,
    .reset-brand {
        font-size: 24px;
    }
    
    .auth-tag,
    .reset-tag {
        font-size: 13px;
    }
}