/*
 * GM Insurance — Login page (rebuild).
 * Standalone stylesheet for resources/views/auth/login.blade.php only —
 * scoped entirely under .gm-login-* / .gm-* so it never collides with the
 * dashboard's styles elsewhere in this CSS folder.
 */

:root {
    --gm-orange: #FF6B00;
    --gm-orange-a: #FF7A18;
    --gm-orange-b: #FF5A00;
    --gm-blue: #123A8F;
    --gm-navy: #0B2554;
    --gm-page-bg: #F3F6FB;
    --gm-text: #0F172A;
    --gm-text-muted: #64748B;
    --gm-border: #E5E7EB;
    --gm-r-sm: 14px;
    --gm-r-md: 20px;
    --gm-r-lg: 28px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--gm-text);
}

body.gm-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--gm-page-bg);
}

/* ---------- Card shell — CSS Grid, 2 equal columns, 1450 x 860 ---------- */

.gm-login-shell {
    width: 100%;
    max-width: 1450px;
    height: min(860px, calc(100vh - 48px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border-radius: var(--gm-r-lg);
    box-shadow: 0 30px 70px -12px rgba(15, 23, 42, .22), 0 10px 24px -8px rgba(15, 23, 42, .1);
    overflow: hidden;
}

/* ---------- Left hero panel — real office photo + navy overlay ---------- */

.gm-login-left {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 48px 40px;
    color: #fff;
    height: 100%;
    overflow-y: auto;

    background-image:
        linear-gradient(rgba(8, 32, 74, .58), rgba(8, 32, 74, .58)),
        url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1400&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.gm-login-left > * {
    position: relative;
    z-index: 1;
}

/* ---------- Top brand row ---------- */

.gm-login-top-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.gm-brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gm-brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--gm-orange-a), var(--gm-orange-b));
    box-shadow: 0 10px 24px -8px rgba(255, 107, 0, .6);
    flex-shrink: 0;
}

.gm-brand-name {
    font-weight: 800;
    letter-spacing: .5px;
    font-size: 18px;
    margin: 0;
    line-height: 1.2;
}

.gm-brand-sub {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .8);
    margin: 2px 0 8px;
}

.gm-version-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 107, 0, .4);
    border: 1px solid rgba(255, 138, 61, .6);
    padding: 4px 11px;
    border-radius: 999px;
}

.gm-login-tagline-top {
    text-align: right;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    color: rgba(255, 255, 255, .92);
    margin: 0;
}

.gm-login-tagline-top .gm-tagline-rule {
    display: block;
    width: 34px;
    height: 2px;
    background: var(--gm-orange-a);
    margin: 6px 0 0 auto;
    border-radius: 2px;
}

/* ---------- Headline / feature block ---------- */

.gm-login-headline {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.18;
    margin: 0 0 14px;
    max-width: 440px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.gm-login-desc {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .88);
    max-width: 430px;
    margin: 0 0 26px;
}

.gm-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.gm-feature-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .24);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.gm-feature-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, .2);
    box-shadow: 0 14px 28px -12px rgba(0, 0, 0, .45);
}

.gm-feature-card i {
    font-size: 1.25rem;
    color: var(--gm-orange-a);
    flex-shrink: 0;
}

.gm-feature-card span {
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

/* ---------- Bottom quote + stats ---------- */

.gm-login-signature {
    font-family: 'Caveat', 'Segoe Script', cursive;
    font-style: italic;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 4px;
}

.gm-login-signature-underline {
    display: block;
    width: 96px;
    height: 3px;
    border-radius: 3px;
    background: var(--gm-orange-a);
    margin: 2px 0 18px;
    transform: rotate(-2deg);
}

.gm-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .28);
}

.gm-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gm-stat-icon {
    font-size: 1.05rem;
    color: var(--gm-orange-a);
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .24);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gm-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.15;
}

.gm-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, .8);
    margin: 1px 0 0;
}

/* ---------- Right panel — login form ---------- */

.gm-login-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 60px 32px;
    background: #fff;
    height: 100%;
    overflow-y: auto;
}

.gm-login-top-row {
    display: flex;
    justify-content: flex-end;
}

.gm-login-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gm-lang-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gm-text);
    background: #fff;
    border: 1px solid var(--gm-border);
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
    transition: box-shadow .25s ease, border-color .25s ease;
    cursor: pointer;
}

.gm-lang-select:hover {
    border-color: var(--gm-orange);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.gm-lang-select i:first-child { color: var(--gm-text-muted); }
.gm-lang-select i:last-child { color: var(--gm-text-muted); font-size: 11px; }

.gm-welcome-greeting {
    font-size: 14px;
    font-weight: 700;
    color: var(--gm-orange);
    margin: 18px 0 6px;
}

.gm-welcome-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gm-text);
    margin: 0 0 6px;
}

.gm-welcome-sub {
    font-size: 13.5px;
    color: var(--gm-text-muted);
    margin: 0 0 24px;
}

.gm-alert {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 18px;
}

.gm-alert.success {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
}

.gm-alert.error {
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.gm-alert p { margin: 0; }
.gm-alert p + p { margin-top: 4px; }

.gm-field {
    margin-bottom: 18px;
}

.gm-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gm-text);
    margin-bottom: 7px;
}

.gm-field-input-wrap {
    position: relative;
}

.gm-field-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gm-text-muted);
    font-size: 15px;
    pointer-events: none;
    transition: color .2s ease;
}

.gm-field input {
    width: 100%;
    height: 56px;
    padding: 0 46px;
    border-radius: var(--gm-r-sm);
    border: 1px solid var(--gm-border);
    background: #F8FAFC;
    color: var(--gm-text);
    font-size: 14.5px;
    font-family: inherit;
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.gm-field input:focus {
    border-color: var(--gm-orange);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, .14);
}

.gm-field input:focus ~ .gm-field-icon { color: var(--gm-orange); }

.gm-toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--gm-text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    transition: color .2s ease;
}

.gm-toggle-password:hover { color: var(--gm-orange); }

.gm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 22px;
}

.gm-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gm-text-muted);
    font-weight: 600;
    cursor: pointer;
}

.gm-remember input {
    width: 17px;
    height: 17px;
    accent-color: var(--gm-orange);
    cursor: pointer;
}

.gm-row a {
    color: var(--gm-orange);
    font-weight: 700;
    text-decoration: none;
}

.gm-row a:hover { text-decoration: underline; }

/* ---------- Primary button — required, must be visible above OR divider ---------- */

.gm-submit {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: var(--gm-r-sm);
    background: linear-gradient(135deg, var(--gm-orange-a), var(--gm-orange-b));
    color: #fff;
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: .2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 14px 28px -10px rgba(255, 107, 0, .5);
    transition: transform .25s ease, box-shadow .25s ease;
}

.gm-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px -10px rgba(255, 107, 0, .62);
}

.gm-submit:focus-visible {
    outline: 2px solid var(--gm-blue);
    outline-offset: 3px;
}

/* ---------- OR divider ---------- */

.gm-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: var(--gm-text-muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
}

.gm-divider::before,
.gm-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gm-border);
}

/* ---------- Trust badges + footer ---------- */

.gm-trust {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}

.gm-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gm-text-muted);
}

.gm-trust-item i { color: var(--gm-orange); }

.gm-footer {
    text-align: center;
    font-size: 11px;
    color: var(--gm-text-muted);
    padding-top: 18px;
}

/* ---------- Responsive — layout must never collapse or lose the button ---------- */

@media (max-width: 1199.98px) and (min-width: 768px) {
    .gm-login-shell {
        grid-template-columns: 45% 55%;
        max-width: 960px;
        height: min(820px, calc(100vh - 48px));
    }

    .gm-login-left { padding: 36px 32px 32px; }

    .gm-login-headline { font-size: 28px; }

    .gm-feature-grid { gap: 10px; }

    .gm-feature-card { padding: 12px; }

    .gm-login-right { padding: 36px 40px 28px; }
}

@media (max-width: 767.98px) {
    body.gm-login-body { padding: 0; }

    .gm-login-shell {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        border-radius: 0;
        overflow-y: auto;
    }

    .gm-login-left {
        height: auto;
        padding: 32px 24px 28px;
    }

    .gm-login-headline { font-size: 26px; }

    .gm-feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .gm-stats-row { gap: 10px; }

    .gm-login-right {
        height: auto;
        padding: 28px 22px 24px;
    }
}
