/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE - eyecloud
   Based on Figma Log In design
   ═══════════════════════════════════════════════════════════ */

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

html,
body.login-page {
    height: 100%;
}

.login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    background: #1558cc; /* fallback if image fails */
}

/* Main container - full viewport split layout */
.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
}

/* ═══ LEFT PANEL - Branding with bg image ═══ */
.login-brand {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 48px 40px;
    min-height: 100vh;
    /* Background image fills left panel (URL set via Blade @push for Laravel asset()) */
    background: url("../figma/ecrane/log in image.png") center center / cover no-repeat;
    overflow: hidden;
}

/* Blue tint overlay so text stays readable */
.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(14, 68, 175, 0.52);
    z-index: 0;
}

.login-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 96px); /* account for panel padding */
}

/* Logo - eyecloud-white-logo.png
   The PNG canvas is wider than the visible mark, so constrain by max-width */
.login-logo {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.2s;
}

.login-logo:hover {
    opacity: 0.85;
}

.login-logo-img {
    display: block;
    max-width: 154px;   /* crop the excess canvas whitespace */
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

/* Tagline section - pushed to bottom, wrapped in a semi-transparent card */
.login-tagline {
    margin-top: auto;
    /* Semi-transparent dark-blue box matching the Figma design */
    background: rgb(200 212 241 / 17%);
    border: 1px solid #fff;
    border-radius: 35px;
    padding: 22px 24px 2px 24px;
    max-width: 520px;
}

/* "We build the future…" white-text PNG (transparent bg → shows on dark box) */
.login-tagline-img {
    display: block;
    max-width: 360px;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left top;
    /* Preserve the image's own intrinsic padding — no overflow clipping */
    margin-bottom: 10px;
}

.login-tagline p {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    color: #FFF;
    padding-top: 10px;
}

/* ═══ RIGHT PANEL - Form ═══ */
.login-form-panel {
    flex: 0 0 46%;
    min-width: 420px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 56px;
}

.login-form-inner {
    width: 100%;
    max-width: 340px;
}

.login-welcome {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    margin-bottom: 28px;
}

/* Form groups */
.login-form .form-group {
    margin-bottom: 18px;
}

.login-form .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 42px;
}

.login-form input::placeholder {
    color: #9ca3af;
}

.login-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Remember me checkbox row */
.form-row {
    margin-bottom: 22px;
    margin-top: 4px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #374151;
    user-select: none;
}

/* Native checkbox — display:none removes it from layout entirely (no overlap) */
.checkbox-label input[type="checkbox"] {
    display: none;
}

/* Custom visual checkbox */
.checkbox-custom {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}

.checkbox-label input:checked + .checkbox-custom {
    background: #2563eb;
    border-color: #2563eb;
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-weight: 400;
    line-height: 1.4;
}

/* Log In button */
.btn-login {
    width: 100%;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.05s;
    height: 42px;
}

.btn-login:hover {
    background: #1d4ed8;
}

.btn-login:active {
    transform: scale(0.99);
}

/* Forgot password link */
.forgot-password {
    display: block;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ═══ Forgot Password page extras ═══ */

/* Back to Log In link */
.fp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.fp-back-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Success state */
.fp-success-box {
    text-align: center;
}

.fp-success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.fp-success-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.fp-success-msg {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 28px;
}

.fp-back-btn {
    display: block;
    text-decoration: none;
    line-height: 42px;
    padding: 0 24px;
}

/* ═══ Responsive ═══ */

/* Tablet – stack vertically */
@media screen and (max-width: 960px) {
    .login-container {
        flex-direction: column;
    }

    .login-brand {
        flex: none;
        min-height: auto;
        padding: 28px 24px;
    }

    .login-brand-content {
        min-height: auto;
        height: auto;
        align-items: center;     /* center logo + tagline horizontally */
    }

    .login-logo {
        margin-bottom: 20px;
    }

    .login-tagline {
        margin-top: 0;           /* no longer pushed to bottom */
        max-width: 460px;
        width: 100%;
        text-align: center;
    }

    .login-tagline-img {
        margin-left: auto;
        margin-right: auto;
    }

    .login-tagline p {
        max-width: 100%;
    }

    .login-form-panel {
        flex: 1;
        min-width: 0;
        width: 100%;
        padding: 40px 32px;
    }
}

/* Mobile phone */
@media screen and (max-width: 640px) {
    .login-brand {
        padding: 22px 16px;
    }

    .login-logo-img {
        max-width: 120px;
    }

    .login-tagline {
        max-width: 340px;
        border-radius: 16px;
        padding: 14px 16px 12px;
    }

    .login-tagline-img {
        max-width: 200px;
    }

    .login-tagline p {
        font-size: 13px;
    }

    .login-form-panel {
        padding: 32px 20px;
    }

    .login-form-inner {
        max-width: 100%;
    }

    .login-welcome {
        font-size: 22px;
    }

    .login-subtitle {
        margin-bottom: 22px;
    }
}

/* Small phones (≤375px) */
@media screen and (max-width: 375px) {
    .login-brand {
        padding: 18px 12px;
    }

    .login-tagline {
        max-width: 100%;
        padding: 12px 14px 10px;
    }

    .login-tagline-img {
        max-width: 170px;
    }

    .login-form-panel {
        padding: 28px 16px;
    }

    .login-welcome {
        font-size: 20px;
    }

    .login-form input[type="email"],
    .login-form input[type="password"],
    .btn-login {
        height: 44px;
        font-size: 16px;         /* prevents iOS auto-zoom on focus */
    }
}
