/*
 * Přihlašovací obrazovka CREBOOK PMS – brand Realstavby Property Management.
 * Načítá se jen na přihlašovací stránce, zbytek administrace má app.css.
 * Fonty hostujeme lokálně (bez Google Fonts kvůli GDPR).
 */

@font-face {
    font-family: 'Sora';
    src: url('../fonts/sora-var.woff2') format('woff2-variations');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-var.woff2') format('woff2-variations');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #14171C;
    --teal: #0E7C72;
    --teal-hover: #0A5C55;
    --teal-light: #1FB5A3;
    --bg-form: #F6F6F4;
    --text: #14171C;
    --text-muted: #6A707A;
    --text-label: #383D45;
    --border: #D5D8DD;
    --divider: #E6E7E9;
    --error: #B42318;
    --error-bg: #FEF3F2;
    --cremg: #5865F2;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-form);
}

.lg {
    display: flex;
    flex-wrap: wrap;
    min-height: 100vh;
}

/* ---------- levý tmavý panel ---------- */

.lg-side {
    position: relative;
    overflow: hidden;
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 64px;
    background: var(--ink);
    color: #fff;
}

.lg-logo { width: 340px; max-width: 100%; height: auto; display: block; }

.lg-side-main { position: relative; z-index: 1; }

.lg-eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--teal-light);
}

.lg-claim {
    margin: 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.15;
    color: #fff;
}

.lg-copy { margin: 0; font-size: 14px; color: #A3A9B3; position: relative; z-index: 1; }

/* Obrys značky – dekorace, oříznutá rohem panelu. */
.lg-deco {
    position: absolute;
    right: -120px;
    bottom: -140px;
    width: 620px;
    height: auto;
    color: var(--teal-light);
    opacity: .09;
    pointer-events: none;
}

.lg-side > .lg-logo, .lg-side > .lg-copy { position: relative; z-index: 1; }

/* ---------- pravý sloupec s formulářem ---------- */

.lg-main {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-form);
}

.lg-form-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.lg-form { width: 100%; max-width: 400px; }

.lg-title {
    margin: 0 0 24px;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
}

.lg-alert {
    margin-bottom: 24px;
    padding: 12px 14px;
    border: 1px solid var(--error);
    border-left-width: 4px;
    border-radius: 8px;
    background: var(--error-bg);
    color: var(--error);
    font-size: 14px;
}

.lg-alert p { margin: 0; }
.lg-alert p + p { margin-top: 6px; }

.lg-field { margin-bottom: 24px; }

.lg-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.lg-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-label);
}

.lg-label-row .lg-label { margin-bottom: 0; }

.lg-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--teal);
    text-decoration: none;
}

.lg-link:hover { color: var(--teal-hover); text-decoration: underline; }

.lg-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 16px;
    color: var(--text);
}

.lg-input::placeholder { color: #9BA1AB; }

.lg-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(14, 124, 114, .18);
}

.lg-input-wrap { position: relative; }
.lg-input-wrap .lg-input { padding-right: 52px; }

.lg-reveal {
    position: absolute;
    top: 50%;
    right: 3px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
}

.lg-reveal:hover { color: var(--text-label); }
.lg-reveal svg { width: 20px; height: 20px; display: block; }
/* Bez tohoto by display:block přebil atribut hidden a svítily obě ikony. */
.lg-reveal svg[hidden], [hidden] { display: none !important; }

.lg-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-label);
    cursor: pointer;
}

.lg-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
}

.lg-submit {
    display: block;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 10px;
    background: var(--teal);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.lg-submit:hover { background: var(--teal-hover); }

.lg-note {
    margin: 24px 0 0;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

/* ---------- zápatí ---------- */

.lg-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 24px 28px;
    border-top: 1px solid var(--divider);
    font-size: 14px;
    color: var(--text-muted);
}

.lg-foot-mark {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    background: var(--cremg);
}

.lg-foot-logo { height: 14px; width: auto; display: block; }

.lg-foot-name {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--text-label);
}

/* ---------- přístupnost ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(14, 124, 114, .45);
    outline-offset: 2px;
}

.lg-input:focus-visible { outline-offset: 0; }

/* ---------- mobil ---------- */

@media (max-width: 900px) {
    .lg { display: block; min-height: 100vh; }

    .lg-side {
        min-height: 256px;
        padding: 64px 24px 0;
        display: block;
    }

    .lg-logo { width: 268px; }

    .lg-side-main { margin-top: 20px; }
    .lg-eyebrow { font-size: 12px; margin-bottom: 6px; }
    .lg-claim { font-size: 18px; }

    /* Rok se na mobilu nevejde a není podstatný. */
    .lg-copy { display: none; }

    .lg-deco { width: 300px; right: -60px; bottom: auto; top: -40px; }

    .lg-main {
        min-height: calc(100vh - 256px);
        margin-top: -24px;
        border-radius: 24px 24px 0 0;
        background: var(--bg-form);
        position: relative;
        z-index: 1;
    }

    .lg-form-wrap {
        display: block;
        padding: 32px 24px 0;
    }

    .lg-form { max-width: 520px; margin: 0 auto; }
    .lg-title { font-size: 28px; }
    .lg-input { height: 52px; border-radius: 12px; }
    .lg-submit { height: 54px; }

    /* „Zapomněli jste heslo?“ patří na mobilu pod pole, ne k labelu. */
    .lg-label-row { display: block; }
    .lg-label-row .lg-label { margin-bottom: 8px; }
    .lg-label-row .lg-link { display: none; }

    .lg-aux {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 24px;
        min-height: 44px;
    }

    .lg-aux .lg-link { display: inline-flex; align-items: center; min-height: 44px; }

    .lg-foot {
        margin-top: auto;
        border-top: 0;
        padding: 24px;
    }

    .lg-main { display: flex; flex-direction: column; }
    .lg-form-wrap { flex: 0 0 auto; }
}

@media (min-width: 901px) {
    /* Na desktopu je odkaz u labelu, samostatný řádek není potřeba. */
    .lg-aux { display: none; }
}
