:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --primary-lighter: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --primary-subtle: rgba(99, 102, 241, 0.12);
    --secondary: #0f172a;
    --accent: #a78bfa;
    --surface: #1e1e2e;
    --surface-light: #2a2a3e;
    --background: #0a0a0f;
    --border: #2e2e42;
    --border-light: #3e3e56;
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    --warning: #f59e0b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    direction: rtl;
    overflow-x: hidden;
    position: relative;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; }

/* === Background Effects === */
.auth-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.45;
}

.bg-orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
    top: -200px; right: -200px;
    animation: orbFloat1 20s ease-in-out infinite;
}

.bg-orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    bottom: -150px; left: -150px;
    animation: orbFloat2 25s ease-in-out infinite;
}

.bg-orb-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.2) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat3 18s ease-in-out infinite;
}

.bg-grid {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.bg-noise {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 30px) scale(1.1); }
    66% { transform: translate(20px, -20px) scale(0.9); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -20px) scale(1.15); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* === Main Layout === */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 100px 40px 40px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* === Card === */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: rgba(30, 30, 46, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(46, 46, 66, 0.5);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: cardEntry 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
}

@keyframes cardEntry {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-glow {
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.15) 0%,
        transparent 40%,
        transparent 60%,
        rgba(139, 92, 246, 0.1) 100%);
    z-index: -1;
    pointer-events: none;
}

.card-border-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.5) 50%,
        transparent 100%);
    z-index: 1;
}

/* === Header === */
.auth-header {
    text-align: center;
    padding: 40px 32px 28px;
    position: relative;
    background: linear-gradient(180deg,
        rgba(79, 70, 229, 0.12) 0%,
        transparent 100%);
}

.header-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.icon-ring {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 8px 32px var(--primary-glow);
    position: relative;
    z-index: 1;
    animation: iconPulse 3s ease-in-out infinite;
    overflow: hidden;
}

.icon-ring-img { background: var(--primary-light); padding: 0; }

.icon-ring-img-src {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.icon-pulse {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    animation: pulseRing 2s ease-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulseRing {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--success);
    margin-top: 14px;
}

.header-badge i { font-size: 0.75rem; }

/* === Form Body === */
.auth-body {
    padding: 4px 32px 32px;
}

/* === Input Groups === */
.input-group {
    margin-bottom: 22px;
    animation: inputSlideIn 400ms ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.input-group:nth-child(1) { animation-delay: 100ms; }
.input-group:nth-child(2) { animation-delay: 150ms; }
.input-group:nth-child(3) { animation-delay: 200ms; }
.input-group:nth-child(4) { animation-delay: 250ms; }
.input-group:nth-child(5) { animation-delay: 300ms; }
.input-group:nth-child(6) { animation-delay: 350ms; }

@keyframes inputSlideIn {
    to { opacity: 1; transform: translateY(0); }
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.input-group label i {
    font-size: 0.85rem;
    color: var(--primary-light);
}

.input-group:focus-within label { color: var(--text); }

/* === Input Wrapper === */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 14px 16px;
    padding-right: 48px;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.95rem;
    transition: all var(--transition-smooth);
    outline: none;
}

.input-wrapper input:focus,
.select-wrapper select:focus {
    border-color: var(--primary-light);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px var(--primary-subtle);
}

.input-group.is-valid .input-wrapper input,
.input-group.is-valid .select-wrapper select {
    border-color: var(--success);
    box-shadow: 0 0 0 4px var(--success-glow);
}

.input-group.is-invalid .input-wrapper input,
.input-group.is-invalid .select-wrapper select {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px var(--danger-glow);
    animation: inputShake 400ms ease;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.input-icon-status {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.input-icon-status .status-valid,
.input-icon-status .status-invalid {
    font-size: 1rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.input-group.is-valid .status-valid { opacity: 1; color: var(--success); }
.input-group.is-invalid .status-invalid { opacity: 1; color: var(--danger); }

/* Select */
.select-wrapper { position: relative; }

.select-wrapper select {
    width: 100%;
    padding: 14px 48px 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.95rem;
    transition: all var(--transition-smooth);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.select-wrapper select option {
    background: var(--surface);
    color: var(--text);
    padding: 12px 16px;
}

.select-wrapper select option:checked {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
}

.select-wrapper select option[value^="grade"] {
    padding-right: 28px;
    position: relative;
}

.select-wrapper select option[value="grade5"],
.select-wrapper select option[value="grade6"] {
    border-right: 3px solid #10b981;
}

.select-wrapper select option[value="grade7"],
.select-wrapper select option[value="grade8"],
.select-wrapper select option[value="grade9"] {
    border-right: 3px solid #f59e0b;
}

.select-wrapper select option[value="grade10"],
.select-wrapper select option[value="grade11"],
.select-wrapper select option[value="grade12"] {
    border-right: 3px solid #6366f1;
}

.select-arrow {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.select-wrapper:focus-within .select-arrow { color: var(--primary-light); }

/* Input with prefix (phone) */
.input-with-prefix { display: flex; align-items: center; }

.input-prefix {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
}

.input-with-prefix input { padding-right: 60px; }

/* Input Hints */
.input-hint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.input-hint i { font-size: 0.7rem; }

.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    z-index: 2;
}

.password-toggle:hover {
    color: var(--text);
    background: rgba(99, 102, 241, 0.1);
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.strength-bars { display: flex; gap: 4px; flex: 1; }

.strength-bar {
    height: 4px;
    flex: 1;
    background: var(--border);
    border-radius: 2px;
    transition: all var(--transition-smooth);
}

.strength-bar.active { background: var(--danger); }
.strength-bar.active[data-level="2"] { background: var(--warning); }
.strength-bar.active[data-level="3"] { background: var(--primary-light); }
.strength-bar.active[data-level="4"] { background: var(--success); }

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 80px;
    text-align: left;
}

/* Password Requirements */
.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color var(--transition-base);
}

.requirement i {
    font-size: 0.5rem;
    transition: all var(--transition-base);
}

.requirement.met { color: var(--success); }
.requirement.met i { color: var(--success); transform: scale(1.2); }

/* Form Options (Remember Me) */
.form-options {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-wrapper input { display: none; }

.custom-checkbox {
    width: 20px; height: 20px;
    min-width: 20px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
}

.custom-checkbox i {
    font-size: 0.65rem;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-smooth);
}

.checkbox-wrapper input:checked + .custom-checkbox {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.checkbox-wrapper input:checked + .custom-checkbox i {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Terms Row */
.terms-row { margin-bottom: 24px; }

.terms-row .checkbox-wrapper {
    align-items: flex-start;
}

.terms-row .custom-checkbox {
    margin-top: 2px;
}

.terms-link {
    color: var(--primary-light);
    font-weight: 600;
    transition: color var(--transition-base);
}

.terms-link:hover { color: var(--primary-lighter); text-decoration: underline; }

/* === Submit Button === */
.auth-btn {
    position: relative;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    overflow: hidden;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 16px var(--primary-glow);
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
}

.auth-btn:active:not(:disabled) { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-content, .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-loading { display: none; }
.auth-btn.loading .btn-content { display: none; }
.auth-btn.loading .btn-loading { display: flex; }

.btn-ripple {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 500ms ease;
    pointer-events: none;
}

.auth-btn:active .btn-ripple {
    opacity: 1;
    transform: scale(2);
    transition: 0ms;
}

/* === Footer Link === */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(46, 46, 66, 0.5);
}

.auth-footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-light);
    font-weight: 700;
    transition: color var(--transition-base);
}

.auth-footer a:hover { color: var(--primary-lighter); text-decoration: underline; }

/* === Side Info (Desktop) === */
.auth-side-info {
    display: none;
    max-width: 400px;
}

.side-content {
    animation: sideFadeIn 800ms ease 300ms forwards;
    opacity: 0;
}

@keyframes sideFadeIn { to { opacity: 1; } }

.side-illustration {
    position: relative;
    width: 200px; height: 200px;
    margin: 0 auto 40px;
}

.illustration-circle {
    width: 140px; height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 40px var(--primary-glow);
    overflow: hidden;
    background: var(--primary-light);
}

.illustration-icon-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.floating-badge {
    position: absolute;
    width: 48px; height: 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.badge-1 { top: 10px; right: 20px; animation: floatBadge 4s ease-in-out infinite; }
.badge-2 { bottom: 20px; right: 0; animation: floatBadge 4s ease-in-out infinite 1s; }
.badge-3 { bottom: 10px; left: 20px; animation: floatBadge 4s ease-in-out infinite 2s; }

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.side-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 12px;
}

.side-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.7;
    margin-bottom: 32px;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.features-list li i { color: var(--success); font-size: 0.85rem; }

/* === Toast === */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    color: var(--text);
    min-width: 300px;
    animation: toastIn 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: translateX(120%);
}

.toast.removing { animation: toastOut 300ms ease forwards; }

.toast-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.toast-info .toast-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

.toast-message { flex: 1; }

.toast-close {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-base);
}

.toast-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

@keyframes toastIn { to { transform: translateX(0); } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* === Success Modal === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.modal-overlay.visible { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-bounce);
}

.modal-overlay.visible .modal-content { transform: scale(1) translateY(0); }

.modal-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 24px;
}

.modal-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 2px solid var(--success);
    animation: modalIconPop 500ms cubic-bezier(0.34, 1.56, 0.64, 1) 200ms forwards;
    transform: scale(0);
}

@keyframes modalIconPop { to { transform: scale(1); } }

.modal-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.modal-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--success);
    border-radius: 2px;
    width: 0;
    animation: progressFill 2s ease forwards;
}

@keyframes progressFill { to { width: 100%; } }

/* === Responsive === */

@media (min-width: 1024px) {
    .auth-main {
        align-items: flex-start;
        padding-top: 80px;
    }
    .auth-side-info {
        display: flex;
        flex: 1;
        max-width: 400px;
        align-items: flex-start;
        padding-top: 0;
    }
    .side-content { width: 100%; }

    /* Signup: wider card + 2-column grid */
    .is-signup {
        align-items: flex-start;
        padding-top: 80px;
    }

    .is-signup .auth-card {
        max-width: 720px;
    }

    .is-signup .auth-header {
        padding: 36px 40px 24px;
    }

    .is-signup .auth-body {
        padding: 8px 40px 32px;
    }

    .is-signup form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px 24px;
    }

    .is-signup .input-group {
        margin-bottom: 0;
    }

    .is-signup .input-group:nth-child(1) { grid-column: 1; }
    .is-signup .input-group:nth-child(2) { grid-column: 2; }
    .is-signup .input-group:nth-child(3) { grid-column: 1; }
    .is-signup .input-group:nth-child(4) { grid-column: 2; }
    .is-signup .input-group:nth-child(5) { grid-column: 1 / -1; }
    .is-signup .auth-btn { grid-column: 1 / -1; }
    .is-signup .auth-footer { grid-column: 1 / -1; }

    .is-signup .auth-side-info {
        padding-top: 0;
        align-items: flex-start;
    }

    .is-signup .side-illustration {
        margin-bottom: 32px;
    }
}

@media (max-width: 1023px) {
    .auth-main {
        padding: 100px 20px 40px;
    }
    .auth-card {
        max-width: 440px;
    }
    .auth-side-info {
        display: none;
    }
}

@media (max-width: 640px) {
    .auth-main {
        padding: 80px 16px 24px;
        align-items: flex-start;
    }
    .auth-card {
        border-radius: var(--radius-xl);
    }
    .auth-header {
        padding: 32px 24px 24px;
    }
    .icon-ring {
        width: 64px; height: 64px;
        font-size: 26px;
    }
    .icon-pulse {
        width: 64px; height: 64px;
    }
    .header-title {
        font-size: 1.4rem;
    }
    .auth-body {
        padding: 4px 24px 24px;
    }
    .password-requirements {
        grid-template-columns: 1fr;
    }
    .toast {
        min-width: auto;
        max-width: calc(100vw - 48px);
    }
    .toast-container {
        right: 16px;
        left: 16px;
    }
}

@media (max-width: 380px) {
    .auth-header {
        padding: 24px 20px 20px;
    }
    .auth-body {
        padding: 4px 20px 20px;
    }
    .header-badge {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
}
