/* ========================================
   Hodari — Auth pages stylesheet
   ======================================== */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f7;
    color: #111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Main container */
.login-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 980px;
    min-height: 620px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px -12px rgba(0,0,0,0.15), 0 4px 12px -4px rgba(0,0,0,0.08);
}

/* ----- Hero (left) ----- */
.login-hero {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    overflow: hidden;
}

.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.22) 0%, transparent 50%);
    pointer-events: none;
}

.hero-deco {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    opacity: 0.10;
    pointer-events: none;
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-text {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.3px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 30px;
    font-weight: 500;
    line-height: 1.25;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.hero-sub {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 32px;
    max-width: 380px;
}

.hero-stats {
    display: flex;
    gap: 36px;
    padding-top: 28px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.14);
}

.hero-stat-num {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.3px;
}

.hero-stat-lbl {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 2px;
}

.hero-footer {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

/* ----- Form (right) ----- */
.login-form {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.form-inner {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
}

.mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.mobile-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-logo-text {
    font-size: 17px;
    font-weight: 600;
    color: #4f46e5;
    letter-spacing: -0.3px;
}

.form-title {
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 6px;
    color: #111;
    letter-spacing: -0.3px;
}

.form-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 26px;
}

/* Alerts */
.alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 0.5px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 0.5px solid #fecaca;
}

/* Fields */
.field {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    display: flex;
    pointer-events: none;
}

.field-input {
    width: 100%;
    height: 44px;
    padding: 0 12px 0 38px;
    border: 0.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    color: #111;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.field-input::placeholder {
    color: #9ca3af;
}

.field-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.field-input--with-toggle {
    padding-right: 42px;
}

.field-input--error {
    border-color: #ef4444;
}

.field-input--error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #9ca3af;
    display: flex;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.pw-toggle:hover {
    color: #4b5563;
    background: #f3f4f6;
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.forgot-link {
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
    text-decoration: none;
}

.forgot-link:hover {
    color: #4338ca;
}

/* Remember me */
.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.remember input {
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
    cursor: pointer;
}

.remember span {
    font-size: 13px;
    color: #4b5563;
}

/* Submit */
.submit {
    width: 100%;
    height: 46px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s, transform 0.08s;
    font-family: inherit;
}

.submit:hover {
    background: #4338ca;
}

.submit:active {
    transform: scale(0.985);
}

/* Support line */
.support {
    text-align: center;
    margin: 20px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.support a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.support a:hover {
    color: #4338ca;
}

/* =========================================
   Responsive: collapse to single column
   ========================================= */
@media (max-width: 860px) {
    .auth-page { padding: 0; }
    .login-wrap {
        grid-template-columns: 1fr;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
    }
    .login-hero {
        min-height: 180px;
        padding: 1.75rem 1.5rem;
        justify-content: center;
    }
    .hero-title {
        font-size: 20px;
        margin: 0 0 8px;
    }
    .hero-sub, .hero-stats, .hero-footer, .hero-deco {
        display: none;
    }
    .hero-content {
        padding: 0.5rem 0;
    }
    .login-form {
        padding: 2rem 1.5rem;
    }
    .mobile-logo {
        display: flex;
    }
    /* Hide the hero-side logo on mobile since we show mobile-logo instead */
    .logo-row { display: none; }
}

@media (max-width: 480px) {
    .login-hero { display: none; }
    .form-title { font-size: 22px; }
}