:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #18202a;
    --muted: #6f7a86;
    --border: #dfe5ec;
    --primary: #18202a;
    --primary-hover: #2a3440;
    --danger-bg: #fff1f1;
    --danger-border: #f2c4c4;
    --danger-text: #a52a2a;
    --shadow: 0 24px 70px rgba(23, 35, 52, .12);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.95), rgba(255,255,255,0) 34%),
        var(--bg);
    color: var(--text);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
}

.brand-panel {
    display: flex;
    align-items: flex-end;
    padding: clamp(40px, 6vw, 90px);
    background: linear-gradient(145deg, #151c24 0%, #273241 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
    right: -180px;
    top: -170px;
    box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.018);
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 14px;
    margin-bottom: 28px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.brand-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 5vw, 68px);
    line-height: .98;
    letter-spacing: -.055em;
}

.brand-copy p {
    margin: 0;
    max-width: 480px;
    color: rgba(255,255,255,.68);
    font-size: 17px;
    line-height: 1.65;
}

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: var(--panel);
    border: 1px solid rgba(220,226,234,.9);
    border-radius: 24px;
    padding: clamp(28px, 5vw, 46px);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .11em;
}

.login-card h2 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -.035em;
}

.intro {
    margin: 10px 0 30px;
    color: var(--muted);
    line-height: 1.55;
}

.alert {
    padding: 13px 14px;
    margin-bottom: 20px;
    border: 1px solid var(--danger-border);
    border-radius: 12px;
    background: var(--danger-bg);
    color: var(--danger-text);
    font-size: 14px;
}

.field { margin-bottom: 18px; }

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus {
    border-color: #8a96a5;
    box-shadow: 0 0 0 4px rgba(24,32,42,.06);
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 80px; }

.show-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
    padding: 7px 8px;
}

.login-button {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}

.login-button:hover { background: var(--primary-hover); }
.login-button:active { transform: translateY(1px); }

.login-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .brand-panel { min-height: 240px; align-items: center; padding: 40px 28px; }
    .brand-copy h1 { font-size: 42px; }
    .brand-copy p { font-size: 15px; }
    .form-panel { padding: 28px 18px 40px; }
}

@media (max-width: 520px) {
    .brand-panel { min-height: 190px; }
    .brand-mark { width: 40px; height: 40px; margin-bottom: 18px; }
    .brand-copy h1 { font-size: 34px; }
    .brand-copy p { display: none; }
    .login-card { border-radius: 18px; padding: 26px 20px; }
    .login-card h2 { font-size: 29px; }
}
