@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-deep: #2d1b42;
    --accent-red: #dc4c4c;
    --kicker-yellow: #f8e71c;
    --white: #ffffff;
    --success-green: #7eb36d;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { background: var(--bg-deep); height: 100vh; overflow: hidden; }

.login-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    height: 100vh;
}

/* MEDIA LEFT */
.login-media { padding: 25px; height: 100vh; }
.media-inner { width: 100%; height: 100%; border-radius: 20px; overflow: hidden; }
.media-inner img { width: 100%; height: 100%; object-fit: cover; }

/* CONTENT RIGHT */
.login-content {
    color: var(--white);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.content-wrapper { width: 100%; max-width: 440px; margin: auto 0; text-align: center; }

.logo-box {
  padding: 12px 24px; border-radius: 4px; display: inline-block; margin-bottom: 40px;
}
.logo-box img { height: 50px; display: block; }

/* SLIDER LOGIC */
.auth-slider { position: relative; width: 100%; min-height: 500px; }

.auth-section {
    display: none;
    width: 100%;
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-section.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* FORM ELEMENTS */
.auth-header h1 { font-size: 30px; margin-bottom: 15px; line-height: 1.2; }
.kicker { color: var(--kicker-yellow); font-size: 14px; font-weight: 600; margin-bottom: 8px; display: block; }
.sub-text { opacity: 0.7; font-size: 14px; line-height: 1.6; margin-bottom: 30px; }

.form-group { text-align: left; margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 8px; }
.form-group input {
    width: 100%; padding: 14px 18px; border-radius: 8px; border: none; background: #f8f9fa; font-size: 15px;
}

.phone-input-row { display: flex; gap: 10px; }
.flag-box {
    background: #f8f9fa; padding: 0 15px; border-radius: 8px; display: flex; align-items: center; gap: 8px; color: #333; font-weight: 500;
}
.flag-box img { width: 20px; }

.btn-primary {
    width: 100%; padding: 16px; background: var(--accent-red); color: white; border: none; border-radius: 8px; font-weight: 600; font-size: 16px; cursor: pointer; margin-top: 10px;
}

.otp-resend-row {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.otp-timer {
    font-size: 13px;
    opacity: 0.7;
}

.btn-text:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    text-decoration: none;
}

.otp-box.is-error {
    box-shadow: 0 0 0 3px rgba(220, 76, 76, 0.55);
}

.otp-box.is-success {
    box-shadow: 0 0 0 3px rgba(126, 179, 109, 0.55);
}

.auth-page .auth-feedback {
    text-align: left;
}

.auth-page .auth-feedback.is-error {
    background: rgba(220, 76, 76, 0.18);
    border: 1px solid rgba(220, 76, 76, 0.45);
    color: #ffd7d7;
}

.auth-page .auth-feedback.is-success {
    background: rgba(126, 179, 109, 0.18);
    border: 1px solid rgba(126, 179, 109, 0.45);
    color: #dff5d4;
}

/* OTP GRID */
/* 1. Limit the width of the total grid and center it */
.otp-grid {
    display: grid;
    grid-template-columns: repeat(6, 50px); /* Fixed width for each column */
    gap: 12px;
    justify-content: center; /* Centers the 6 boxes in the middle */
    margin: 0 auto 30px auto; /* Centers the grid block itself */
}

/* 2. Make the boxes perfect squares */
.otp-box {
    width: 50px;
    height: 60px; /* Slightly taller than wide looks better */
    background: white;
    border: none;
    border-radius: 8px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    outline: none;
    transition: box-shadow 0.2s;
}

/* 3. Add a focus effect so the user knows which box they are in */
.otp-box:focus {
    box-shadow: 0 0 0 3px rgba(220, 76, 76, 0.4);
}

/* SUCCESS CHECKMARK ANIMATION */
.success-visual { margin-bottom: 30px; }
.checkmark-svg { width: 80px; height: 80px; display: block; margin: 0 auto; }
.checkmark-circle {
    stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 2; stroke-miterlimit: 10; stroke: var(--success-green); fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark-check {
    transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; stroke: var(--success-green); stroke-width: 4;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke { 100% { stroke-dashoffset: 0; } }

/* DIVIDER & GOOGLE */
.divider { margin: 30px 0; position: relative; }
.divider::after { content: ''; position: absolute; width: 100%; height: 1px; background: rgba(255,255,255,0.1); top: 50%; left: 0; }
.divider span { background: var(--bg-deep); padding: 0 15px; position: relative; z-index: 2; font-size: 12px; opacity: 0.6; }

.btn-google {
    width: 100%; padding: 12px; background: white; border: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 500; cursor: pointer;
}
.btn-google img { height: 18px; }

.auth-footer-links { margin-top: 30px; font-size: 14px; }
.auth-footer-links a { color: white; text-decoration: underline; }
.back-link { display: inline-block; margin-top: 15px; }

.legal-footer { margin-top: 60px; font-size: 11px; opacity: 0.5; }

/* MOBILE */
@media (max-width: 992px) {
    .login-container { grid-template-columns: 1fr; }
    .login-media { display: none; }
}