@charset "UTF-8";

/*
 * Login page — same visual language as the automation planner
 * (static/css/automation.css, "light operations dashboard"):
 * white cards on a pale teal page, teal-green accent, Estedad font.
 * Self-contained: only Bootstrap RTL (grid/utilities) is loaded before this file.
 */

@font-face {
    font-family: 'Estedad';
    src: url('../fonts/estedad-variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --bg: #f3f7fb;
    --surface: #fff;
    --border: #d6e1e9;
    --text: #172c3b;
    --heading: #173c4a;
    --muted: #607581;
    --accent: #0d9d78;
    --accent-strong: #137e75;
    --focus: #25a583;
    --input-bg: #fbfdff;
    --input-border: #cad9e4;
    --danger-bg: #fdecef;
    --danger-border: #e5aab4;
    --danger-text: #9f2c42;
    font-family: 'Estedad', Tahoma, Arial, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 34px 22px;
    font-family: inherit;
    color: var(--text);
    background: linear-gradient(135deg, #f7fafc, #eaf3f7 48%, #f5f8fb);
    background-attachment: fixed;
    line-height: 1.8;
}

.login-layout {
    width: min(1080px, 100%);
    min-height: 610px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 20px;
    align-items: stretch;
}

/* ---- Intro panel (same gradient as the planner hero) ---- */
.login-intro {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 34px 42px;
    border: 1px solid #c2ded7;
    border-radius: 26px;
    background: linear-gradient(112deg, #e2f3ed, #ecf6fa 55%, #f7faff);
    box-shadow: 0 8px 24px #2e557514;
    color: var(--heading);
}
.login-intro::before,
.login-intro::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid #0d9d781c;
    border-radius: 50%;
    pointer-events: none;
}
.login-intro::before {
    width: 480px; height: 480px; left: -220px; top: -210px;
    box-shadow: 0 0 0 55px #0d9d7809, 0 0 0 110px #0d9d7804;
}
.login-intro::after { width: 300px; height: 300px; right: -190px; bottom: -140px; }

.intro-brand { display: flex; align-items: center; gap: 12px; font-size: 1.12rem; font-weight: 800; color: #174150; }
.intro-brand small { display: block; font-size: .68rem; font-weight: 400; color: #5e7780; }
.brand-symbol {
    display: grid; place-items: center; width: 39px; height: 39px;
    border-radius: 12px; background: #dcf2e9; color: #14845f; font-size: 1.25rem;
}
.intro-eyebrow { color: var(--accent-strong); font-size: .76rem; font-weight: 700; }
.intro-content h1 {
    margin: 13px 0 14px; line-height: 1.55; font-weight: 800; color: #174150;
    font-size: clamp(1.7rem, 3vw, 2.55rem);
}
.intro-content h1 em { color: var(--accent); font-style: normal; }
.intro-content p { color: #496b76; line-height: 2; font-size: .89rem; max-width: 470px; }
.intro-features { display: grid; gap: 10px; margin-top: 28px; }
.intro-features > div {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px;
    border: 1px solid #c9e0de; border-radius: 11px; background: #ffffffa8;
    font-size: .85rem; color: #264558;
}
.intro-features span { color: #126d61; font-size: .78rem; font-weight: 700; }
.intro-footer { color: #5e7780; font-size: .76rem; }
.intro-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: #169b76; box-shadow: 0 0 0 4px #169b7624; margin-left: 8px;
}

/* ---- Login card ---- */
.login-card {
    width: 100%;
    padding: 40px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 5px 20px #2b55750d;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-card h4 { color: var(--heading); }
.login-card .text-secondary { color: var(--muted) !important; }
.login-icon {
    display: inline-grid; place-items: center; width: 64px; height: 64px;
    margin-bottom: 14px; border-radius: 50%; background: #e2f3ea; color: #187855; font-size: 1.7rem;
}

.form-label { color: #294655; font-weight: 600; }
.form-control {
    height: 46px;
    padding: 8px 14px;
    background: var(--input-bg);
    color: #213c4c;
    border: 1px solid var(--input-border);
    border-radius: 11px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #8296a2; opacity: 1; }
.form-control:focus {
    background: var(--input-bg);
    color: #213c4c;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px #25a58322;
}
.input-group > .form-control { border-start-start-radius: 0; border-end-start-radius: 0; }
.input-group-text {
    background: #f1f5f8;
    border: 1px solid var(--input-border);
    color: #526a78;
    border-radius: 11px;
}

.input-ltr {
    direction: ltr !important;
    text-align: left !important;
    letter-spacing: .5px;
}

.btn-login {
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(110deg, #25b994, #1e9f8d);
    color: #fff;
    font-weight: 700;
    transition: filter .15s, transform .15s, box-shadow .15s;
}
.btn-login:hover,
.btn-login:focus {
    color: #fff;
    background: linear-gradient(110deg, #25b994, #1e9f8d);
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px #1e9f8d33;
}
.btn-login:focus-visible { box-shadow: 0 0 0 3px #25a58333; }

.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-img {
    border: 1px solid var(--input-border);
    border-radius: 11px;
    background: #fff;
    user-select: none;
}
.captcha-refresh {
    color: #28495a;
    background: #e9f0f4;
    border: 1px solid #cadbe4;
    border-radius: 11px;
}
.captcha-refresh:hover { background: #dceaf1; color: var(--accent-strong); border-color: #8dcfc0; }

.alert-danger {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border) !important;
    color: var(--danger-text);
}

.version-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px;
    background: #e5f4ed; color: #176d50; border: 1px solid #b9dfcd;
    border-radius: 999px; font-size: .75rem; direction: ltr;
}
.login-footer { font-size: .75rem; border-color: #e2eaf0 !important; }
.login-footer .fa-shield-halved { color: var(--accent); }

@media (max-width: 850px) {
    .login-layout { grid-template-columns: 1fr; max-width: 530px; }
    .login-intro { min-height: 310px; padding: 28px; }
    .intro-content h1 { font-size: 1.7rem; }
    .intro-features { display: none; }
    .login-card { min-height: 530px; }
}
@media (max-width: 520px) {
    body { padding: 18px 12px 32px; }
    .login-layout { gap: 12px; }
    .login-intro { min-height: 260px; padding: 22px; border-radius: 19px; }
    .intro-content p { margin-bottom: 0; }
    .intro-footer { display: none; }
    .login-card { min-height: 0; padding: 30px 22px; }
}
