/* Shared styling for the mapyCP sign-in, registration and password-reset pages.
   Mirrors the public landing page: deep slate background, cyan-to-blue glow,
   glass cards and the emerald accent for primary actions. */
:root {
    --cp-bg: #070b16;
    --cp-surface: rgba(15, 23, 42, 0.72);
    --cp-border: rgba(148, 163, 184, 0.22);
    --cp-border-strong: rgba(148, 163, 184, 0.38);
    --cp-text: #e2e8f0;
    --cp-text-muted: #94a3b8;
    --cp-primary: #2563eb;
    --cp-cyan: #06b6d4;
    --cp-emerald: #10b981;
    --cp-danger: #f87171;
    --cp-radius: 18px;
}

html.cp-auth,
html.cp-auth body {
    margin: 0;
    min-height: 100%;
    background-color: var(--cp-bg);
    background-image:
        radial-gradient(900px 520px at 12% -8%, rgba(37, 99, 235, 0.35), transparent 65%),
        radial-gradient(760px 460px at 92% 6%, rgba(6, 182, 212, 0.26), transparent 60%),
        radial-gradient(620px 520px at 60% 108%, rgba(16, 185, 129, 0.16), transparent 65%);
    color: var(--cp-text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

html.cp-auth a { color: var(--cp-cyan); text-decoration: none; }
html.cp-auth a:hover { color: #67e8f9; }
html.cp-auth :is(a, button, input, select):focus-visible {
    outline: 2px solid rgba(103, 232, 249, 0.7);
    outline-offset: 2px;
}
html.cp-auth ::selection { background: rgba(6, 182, 212, 0.35); color: #fff; }

.cp-auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 32px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 28px;
    box-sizing: border-box;
}

.cp-auth-visual { display: flex; flex-direction: column; gap: 22px; }
.cp-auth-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; font-size: 22px; letter-spacing: 0.2px; }
.cp-auth-brand img { width: 44px; height: 44px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--cp-border); }
.cp-auth-brand span.highlight { color: var(--cp-cyan); }

.cp-auth-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; width: fit-content;
    padding: 6px 14px; border-radius: 9999px; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px; color: #a5f3fc;
    background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.32);
}

.cp-auth-headline { margin: 0; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.15; font-weight: 800; color: #fff; }
.cp-auth-headline .cp-gradient {
    background: linear-gradient(135deg, #67e8f9, #34d399);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cp-auth-lede { margin: 0; max-width: 34rem; color: var(--cp-text-muted); font-size: 15px; }

.cp-auth-points { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.cp-auth-points li { display: flex; gap: 10px; align-items: flex-start; color: #cbd5e1; font-size: 14px; }
.cp-auth-points i { color: var(--cp-emerald); margin-top: 3px; font-size: 14px; }

.cp-auth-art {
    border-radius: var(--cp-radius); overflow: hidden; border: 1px solid var(--cp-border);
    background: var(--cp-surface); box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}
.cp-auth-art img { display: block; width: 100%; height: auto; }
.cp-auth-changelog {
    display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--cp-radius);
    background: var(--cp-surface); border: 1px solid var(--cp-border); color: var(--cp-text);
}
.cp-auth-changelog:hover { border-color: var(--cp-border-strong); color: #fff; }
.cp-auth-changelog img { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; }
.cp-auth-changelog strong { display: block; font-size: 14px; color: #fff; }
.cp-auth-changelog small { color: var(--cp-text-muted); font-size: 12px; }

.cp-auth-panel {
    width: 100%; max-width: 460px; justify-self: end;
    padding: 34px 32px 28px; border-radius: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--cp-border);
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(18px);
}

.cp-auth-panel h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; color: #fff; }
.cp-auth-panel .cp-auth-sub { margin: 0 0 22px; color: var(--cp-text-muted); font-size: 14px; }

.cp-auth-field { margin-bottom: 16px; min-width: 0; }
.cp-auth-field > div { min-width: 0; }
.cp-auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 420px) { .cp-auth-split { grid-template-columns: 1fr; } }
.cp-auth-field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: #cbd5e1; }
.cp-auth-input {
    display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 48px;
    border-radius: 12px; background: rgba(2, 6, 23, 0.55); border: 1px solid var(--cp-border);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
/* The bundled form stylesheet sets width/padding/height on bare inputs, which
   makes the field wider than its shell. Keep the field sized by its wrapper. */
html.cp-auth .cp-auth-input input,
html.cp-auth .cp-auth-input select,
html.cp-auth .cp-auth-input input.form-control {
    flex: 1 1 auto; min-width: 0; width: auto; max-width: none;
    height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0;
    box-shadow: none; background: transparent; color: #f8fafc; font: inherit; outline: none;
}
.cp-auth-input:focus-within { border-color: rgba(6, 182, 212, 0.65); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16); }
.cp-auth-visual i.fas, .cp-auth-visual i.far, .cp-auth-visual i.fa,
.cp-auth-panel i.fas, .cp-auth-panel i.far, .cp-auth-panel i.fa,
.cp-auth-btn i.fas, .cp-auth-alert i.fas {
    font-family: 'FontAwesome' !important;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
}

.cp-auth-input > i { color: var(--cp-cyan); font-size: 14px; width: 16px; min-width: 16px; text-align: center; }
.cp-auth-input input::placeholder { color: #64748b; }
.cp-auth-input select option { background: #0f172a; color: #e2e8f0; }

.cp-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; font-size: 13px; }
.cp-auth-row label { color: var(--cp-text-muted); display: inline-flex; gap: 8px; align-items: center; }
.cp-auth-row input[type="checkbox"] { accent-color: var(--cp-cyan); width: 15px; height: 15px; }

.cp-auth-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    width: 100%; height: 48px; border: 0; border-radius: 12px; cursor: pointer;
    font: inherit; font-weight: 800; font-size: 15px; color: #04211a;
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 12px 26px rgba(16, 185, 129, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.cp-auth-btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.cp-auth-btn:disabled { cursor: progress; filter: grayscale(0.35); transform: none; box-shadow: none; }
.cp-auth-btn.cp-auth-btn-secondary {
    color: #dbeafe; background: rgba(37, 99, 235, 0.16); border: 1px solid rgba(59, 130, 246, 0.45); box-shadow: none;
}

.cp-auth-links { margin-top: 18px; text-align: center; color: var(--cp-text-muted); font-size: 13px; }
.cp-auth-links a { font-weight: 700; }
.cp-auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
.cp-auth-divider::before, .cp-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--cp-border); }

.cp-auth-alert { display: none; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; font-size: 13px; }
.cp-auth-alert.is-visible { display: block; }
.cp-auth-alert.cp-auth-error { color: #fecaca; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.4); }
.cp-auth-alert.cp-auth-success { color: #bbf7d0; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.4); }

.cp-auth-hint { margin: 10px 0 0; font-size: 12px; color: #64748b; }
.cp-auth-foot { margin-top: 22px; text-align: center; font-size: 12px; color: #64748b; }

#verifyingLogin { display: none; width: 18px; margin: 10px auto 0; }

/* Legacy Angular-driven visibility on the sign-in form. */
[ng-cloak] { display: none !important; }

@media (max-width: 980px) {
    .cp-auth-shell { grid-template-columns: 1fr; padding: 28px 18px 40px; gap: 24px; }
    .cp-auth-panel { justify-self: stretch; max-width: 520px; margin: 0 auto; }
    .cp-auth-visual { order: 2; }
    .cp-auth-art { display: none; }
}
