/* ─────────────────────────────────────────────────────────────
 * login.css — i-SENSE unified sign-in page
 *
 * Two-column layout overlaid on /img/login-bg.png:
 *   LEFT  → marketing hero (headline + sub + store badges + 3 feature pills)
 *   RIGHT → white sign-in card
 *
 * The bg image carries only the food display + warehouse photo; all
 * text/badges/feature pills are HTML overlays so they are crisp and
 * responsive.
 *
 * Mobile: stacks vertically with the card on top.
 * ─────────────────────────────────────────────────────────── */

:root {
    --signin-green:        #4CAF50;
    --signin-green-deep:   #2d8c50;
    --signin-input-bg:     #eef4fc;
    --signin-input-border: #dbe6f4;
    --signin-link-blue:    #2196f3;
    --signin-dark:         #0c1a2b;
}

.login-body {
    margin: 0;
    background: #f3f6fb;
    color: #1d2532;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.login-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background-color: #f3f6fb;
    background-image: url('/img/login-bg.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 24px;
    box-sizing: border-box;
}
/* Soft white wash on the left so the hero copy stays crisp even when
 * the food image shifts behind it on certain aspect ratios. */
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.88) 0%,
        rgba(255,255,255,0.70) 22%,
        rgba(255,255,255,0.00) 48%);
    z-index: 0;
    pointer-events: none;
}
@media (min-width: 768px)  { .login-page { padding: 40px 56px; } }
@media (min-width: 1280px) { .login-page { padding: 56px 96px; } }

/* ─────────────────────────────────────────────────────────────
 * LEFT — marketing hero
 * ───────────────────────────────────────────────────────────── */
.login-hero {
    flex: 1 1 520px;
    max-width: 600px;
    position: relative;
    z-index: 1;
}
.login-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-hero__title {
    margin: 0;
    font-size: clamp(2rem, 3.4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.015em;
}
.login-hero__title-green { color: var(--signin-green); }
.login-hero__title-dark  { color: var(--signin-dark); }

.login-hero__sub {
    margin: 0;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: #3d4a5f;
    max-width: 480px;
    line-height: 1.55;
}

.login-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.store-badge {
    display: inline-flex;
    text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.store-badge:hover  { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.24); }
.store-badge svg    { display: block; height: 44px; width: auto; }

.login-hero__features {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
}
.feature-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    text-align: center;
}
.feature-pill__icon {
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.feature-pill__icon svg {
    width: 44px;
    height: 44px;
    stroke: #2d6b3f;
    stroke-width: 2;
    fill: none;
}
.feature-pill__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}
.feature-pill__text strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d6b3f;
    letter-spacing: -0.01em;
}
.feature-pill__text small {
    font-size: 0.92rem;
    color: #4a5568;
    margin-top: 2px;
    font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────
 * RIGHT — sign-in card
 * ───────────────────────────────────────────────────────────── */
.signin-card {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 30px 26px;
    box-shadow: 0 24px 60px rgba(20, 30, 50, 0.18);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}
@media (max-width: 480px) {
    .signin-card { padding: 26px 22px 22px; border-radius: 16px; }
}

.signin-card__head { text-align: center; margin-bottom: 4px; }
.brand-logo {
    display: flex;
    justify-content: center;
    margin: 0 auto 6px;
    min-height: 70px;
}
.brand-logo img {
    max-width: 240px;
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

.signin-card__sub {
    margin: 4px 0 8px;
    font-size: 0.875rem;
    color: #5d6878;
    text-align: center;
}

/* ── Sign-in inputs ─────────────────────────────────────────── */
.signin-field { position: relative; margin: 0; }
.signin-field__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #5d6878;
    display: grid;
    place-items: center;
    pointer-events: none;
}
.signin-input.input {
    width: 100%;
    background: var(--signin-input-bg);
    border: 1px solid var(--signin-input-border);
    color: #0c1a2b;
    padding: 12px 14px 12px 46px;
    height: 48px;
    border-radius: 10px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
    -webkit-appearance: none;
    appearance: none;
}
.signin-input.input::placeholder { color: #8a98ac; }
.signin-input.input:focus {
    background: #ffffff;
    border-color: var(--signin-green);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
    outline: none;
}

/* ── Remember Me + Forgot password row ──────────────────────── */
.signin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 4px 0 10px;
}
.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #5d6878;
    user-select: none;
    cursor: pointer;
    margin: 0;
}
.check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--signin-green);
    margin: 0;
}
.signin-forgot {
    font-size: 0.875rem;
    color: var(--signin-link-blue);
    text-decoration: none;
}
.signin-forgot:hover { text-decoration: underline; }

/* ── Sign-in submit button ──────────────────────────────────── */
.btn-signin {
    width: 100%;
    background: linear-gradient(135deg, #6fc44b 0%, #2d8c50 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.02rem;
    padding: 14px 18px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(45, 140, 80, 0.32);
    transition: filter 120ms ease, transform 80ms ease, box-shadow 120ms ease;
    min-height: 52px;
}
.btn-signin:hover  { filter: brightness(1.05); box-shadow: 0 10px 22px rgba(45, 140, 80, 0.40); }
.btn-signin:active { transform: translateY(1px); }
.btn-signin:focus-visible {
    outline: 3px solid rgba(76, 175, 80, 0.45);
    outline-offset: 2px;
}

/* ── Flash error inside the card ────────────────────────────── */
.signin-card .alert.alert-danger {
    background: rgba(251, 23, 23, 0.08);
    color: #b71c1c;
    border: 1px solid rgba(251, 23, 23, 0.18);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.875rem;
    margin: 0;
}

/* ── Screen-reader-only label ───────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ─────────────────────────────────────────────────────────────
 * Responsive — tablet + mobile
 * ───────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .login-page {
        flex-direction: column;
        justify-content: flex-start;
        gap: 24px;
        padding: 32px 24px;
        background-size: cover;
        background-position: center;
    }
    .login-page::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.82) 100%);
        z-index: 0;
    }
    .login-hero {
        flex: 0 0 auto;
        max-width: 100%;
        text-align: center;
    }
    .login-hero__copy { align-items: center; }
    .login-hero__sub  { margin-left: auto; margin-right: auto; }
    .login-hero__badges,
    .login-hero__features { justify-content: center; }
    .signin-card { max-width: 460px; margin: 0 auto; }
}
@media (max-width: 767px) {
    .login-page { padding: 24px 16px; }
    .login-hero__title { font-size: clamp(1.5rem, 6vw, 2rem); }
    .login-hero__sub   { font-size: 0.95rem; }
    .feature-pill      { padding: 8px 12px 8px 8px; }
    .feature-pill__icon { width: 32px; height: 32px; }
    .feature-pill__text strong { font-size: 0.85rem; }
    .feature-pill__text small  { font-size: 0.72rem; }
    .store-badge svg   { height: 40px; }
}
@media (max-width: 480px) {
    .login-page { padding: 16px 12px; gap: 18px; }
    .login-hero__features { gap: 8px; }
    .feature-pill { gap: 8px; }
}
