:root {
    --bg: #0a0b14;
    --panel: #181729;
    --panel-soft: #1c1a36;
    --panel-border: rgba(255, 255, 255, 0.06);
    --text: #ffffff;
    --muted: #94a3b8;
    --field-bg: #ffffff;
    --field-text: #0f172a;
    --button-gradient: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
    --button-secondary: #334155;
    --pill: #1e293b;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.page-shell {
    width: min(1740px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 40px;
    background: rgba(21, 20, 43, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
    border-left: 1px solid var(--panel-border);
    border-right: 1px solid var(--panel-border);
    border-radius: 0 0 24px 24px;
    margin-top: 0;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
    position: relative;
    z-index: 10;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}




.nav-logo-slot {
    width: 180px;
    min-height: 32px;
    display: flex;
    align-items: center;
}

.nav-logo-slot img {
    max-height: 32px;
    width: auto;
}

.topbar-actions {
    display: flex;
    gap: 16px;
}

.topbar-button {
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    background: #4353ff;
    border: none;
    transition: all 0.3s ease;
}

.topbar-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.topbar-button.secondary {
    background: #cf70f1;
}

.main {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: calc(100vh - 60px);
    padding-top: 30px;
}

.login-card {
    width: min(1000px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    padding: 40px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
}

/* Blur/Glow Border effect */
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.5), transparent, rgba(207, 112, 241, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.showcase {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.title-large-slot {
    width: 100%;
    max-width: 440px;
    margin-bottom: 20px;
}

.visual-slot {
    border-radius: 18px;
    overflow: hidden;
}

.visual-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
}

.form-side {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 20px;
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.form-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--button-secondary);
    border-radius: 10px;
    color: #f3f5ff;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: #475569;
}

.field-group {
    margin-bottom: 24px;
}

.field-label {
    display: block;
    margin-bottom: 10px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
}

.field-input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    background: var(--button-gradient);
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
    margin-top: 10px;
}

.submit-button:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.submit-button:disabled,
.resend-button:disabled {
    cursor: wait;
    opacity: 0.78;
    transform: none;
}

.button-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 999px;
    animation: buttonSpin 0.75s linear infinite;
    flex: 0 0 16px;
}

.is-loading .button-spinner {
    display: inline-block;
}

@keyframes buttonSpin {
    to {
        transform: rotate(360deg);
    }
}

/* OTP Styling */
.otp-container {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    margin: 20px 0 32px;
}

.otp-input {
    width: 48px;
    height: 60px;
    background: #334155;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.otp-input:focus {
    background: #475569;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.otp-separator {
    width: 12px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1100px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    .visual-slot { display: none; }
}

@media (max-width: 600px) {
    .otp-input {
        width: 38px;
        height: 50px;
        font-size: 20px;
    }
    .otp-container {
        gap: 6px;
    }
}





/* OTP Timer & Resend Button */
.otp-footer {
    margin-top: 10px;
    text-align: center;
    min-height: 40px;
}

.otp-timer {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.otp-timer span {
    color: #6366f1;
    font-weight: 700;
}

.resend-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    color: #f3f5ff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resend-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.resend-button:active {
    transform: translateY(0);
}

.resend-button i {
    font-size: 16px;
    color: #6366f1;
}

.d-none {
    display: none !important;
}
