/* CRM dashboard layout and shared home-page summary presentation. */
:root {
    --login-bg: #18191a;
    --login-surface: #252627;
    --login-surface-raised: #2e3032;
    --login-input: #343638;
    --login-border: rgba(255, 255, 255, 0.16);
    --login-text: #f5f5f5;
    --login-copy: #d6d6d6;
    --login-muted: #a6a6a6;
    --login-accent: #d0d0d0;
    --login-accent-strong: #4a4c4f;
    --login-accent-solid-hover: #5b5e62;
    --login-danger: #fca5a5;
    --login-danger-soft: rgba(239, 68, 68, .12);
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; margin: 0; }

body.login-page,
body.login-page button,
body.login-page input {
    font-family: "DM Sans", system-ui, sans-serif;
}

body.login-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    padding: clamp(18px, 4vw, 52px);
    overflow-x: hidden;
    place-items: center;
    color: var(--login-copy);
    background: var(--login-bg);
}

body.login-page::before {
    position: fixed;
    inset: 0;
    pointer-events: none;
    content: "";
    display: none;
}

.login-ambient {
    display: none;
}

.login-ambient-one { top: -8rem; left: -6rem; background: var(--login-accent); }
.login-ambient-two { right: -8rem; bottom: -9rem; background: #777; }

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(1060px, 100%);
    min-height: 650px;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
    overflow: hidden;
    border: 1px solid var(--login-border);
    border-radius: 16px;
    background: var(--login-surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .32);
}

.login-brand-panel,
.login-auth-panel { padding: clamp(34px, 5vw, 64px); }

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: #202122;
}

.login-brand-panel::after {
    display: none;
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--login-text);
    font-family: "Manrope", sans-serif;
    font-size: .95rem;
    font-weight: 800;
}

.login-brand img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 14px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,.28));
}

.login-brand-copy { position: relative; z-index: 1; max-width: 470px; }

.login-eyebrow {
    color: var(--login-accent);
    font-family: "Manrope", sans-serif;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.login-brand-copy h1,
.login-auth-copy h2 {
    margin: 12px 0 16px;
    color: var(--login-text);
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.08;
}

.login-brand-copy h1 { max-width: 480px; font-size: clamp(2.15rem, 4vw, 3.2rem); }

.login-brand-copy p {
    max-width: 450px;
    margin: 0;
    color: var(--login-copy);
    font-size: 1rem;
    line-height: 1.75;
}

.login-trust-row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--login-copy);
    font-size: .75rem;
    font-weight: 700;
}

.login-trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.login-trust-row i { color: var(--login-accent); }

.login-auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--login-surface);
}

.login-auth-copy h2 { font-size: clamp(1.65rem, 2.5vw, 2rem); }
.login-auth-copy p { margin: 0 0 30px; color: var(--login-muted); font-size: .95rem; }
.login-form { display: grid; gap: 20px; }
.form-group { display: grid; gap: 8px; }

.form-group label {
    color: var(--login-copy);
    font-size: .85rem;
    font-weight: 700;
}

.login-input-wrap { position: relative; display: flex; align-items: center; }

.login-input-wrap > i {
    position: absolute;
    left: 15px;
    z-index: 1;
    color: var(--login-muted);
    font-size: 1rem;
}

.login-input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 46px;
    color: var(--login-text);
    border: 1px solid var(--login-border);
    border-radius: 12px;
    outline: 0;
    background: var(--login-input);
    font-size: 1rem;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-input-wrap input::placeholder { color: var(--login-muted); }

.login-input-wrap input:focus {
    border-color: var(--login-accent);
    background: var(--login-surface-raised);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .14);
}

.password-toggle {
    position: absolute;
    right: 7px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    color: var(--login-muted);
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible { color: var(--login-text); background: rgba(255,255,255,.055); }

.login-error {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    color: var(--login-danger);
    border: 1px solid rgba(239, 68, 68, .34);
    border-radius: 11px;
    background: var(--login-danger-soft);
    font-size: .8rem;
    font-weight: 600;
}

.login-submit {
    display: flex;
    width: 100%;
    height: 50px;
    align-items: center;
    justify-content: space-between;
    margin-top: 3px;
    padding: 0 18px;
    color: #fff;
    border: 1px solid var(--login-accent-strong);
    border-radius: 8px;
    background: var(--login-accent-strong);
    box-shadow: none;
    font-size: .88rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.login-submit:hover { background: var(--login-accent-solid-hover); box-shadow: 0 6px 16px rgba(0,0,0,.18); transform: translateY(-1px); }
.login-submit:active { transform: scale(.99); }

.login-support {
    margin: 24px 0 0;
    color: var(--login-muted);
    font-size: .78rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 820px) {
    body.login-page { align-items: start; }
    .login-shell { max-width: 560px; min-height: auto; grid-template-columns: 1fr; }
    .login-brand-panel { min-height: 270px; padding-bottom: 36px; }
    .login-brand-copy { margin-top: 40px; }
    .login-brand-copy h1 { max-width: 430px; font-size: clamp(2rem, 8vw, 2.8rem); }
    .login-brand-copy p,
    .login-trust-row { display: none; }
}

@media (max-width: 480px) {
    body.login-page { padding: 0; background: var(--login-bg); }
    .login-shell { min-height: 100vh; border: 0; border-radius: 0; }
    .login-brand-panel,
    .login-auth-panel { padding: 28px 22px; }
    .login-brand-panel { min-height: 235px; }
    .login-brand-copy { margin-top: 30px; }
    .login-brand-copy h1 { margin-bottom: 0; font-size: 2.15rem; }
    .login-auth-panel { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* CRM dashboard layout and shared home-page summary presentation. */
/* Connectivity notice injected by the installable web-app helper. */
.aec-connectivity-status {
    position: fixed;
    z-index: 100;
    right: 18px;
    top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid #f59e0b;
    border-radius: 999px;
    color: #fff;
    background: #6f4700;
    box-shadow: 0 10px 24px rgba(0,0,0,.24);
    font-size: .8rem;
    font-weight: 800;
}
.aec-connectivity-status[hidden] { display: none !important; }
