:root {
    color-scheme:light;
    font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing:border-box; }
html, body { min-height:100%; margin:0; }
body { background:#0f172a; color:#f8fafc; }
button, input { font:inherit; }

.ka-login {
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
    min-height:100vh;
    width:100%;
}

.ka-brand {
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    padding:60px 40px;
    background:#fff;
    border-right:1px solid #e2e8f0;
}

.ka-brand-inner {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;
}

.ka-logo {
    display:block;
    width:76px;
    height:76px;
    object-fit:cover;
}

.ka-brand-copy { min-width:0; color:#0f172a; }
.ka-brand-copy h1 {
    margin:0;
    font-size:clamp(22px, 2.1vw, 30px);
    line-height:1.2;
    letter-spacing:-.04em;
    white-space:nowrap;
}
.ka-brand-copy p {
    margin:6px 0 0;
    color:#475569;
    font-size:14px;
    font-weight:600;
}

.ka-auth {
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    padding:60px 50px;
    background:linear-gradient(145deg, #0b1329 0%, #0f172a 60%, #1e293b 100%);
}

.ka-auth-inner { width:min(100%, 440px); }
.ka-auth-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    margin-bottom:38px;
}
.ka-auth-head h2 {
    margin:0;
    color:#fff;
    font-size:clamp(27px, 2.3vw, 34px);
    line-height:1.25;
    letter-spacing:-.04em;
}
.requested-service {
    max-width:42%;
    padding-top:8px;
    color:#94a3b8;
    font-size:13px;
    font-weight:600;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.ka-field { display:block; margin-bottom:24px; }
.ka-field > span {
    display:block;
    margin-bottom:10px;
    color:#cbd5e1;
    font-size:13px;
    font-weight:700;
    letter-spacing:.05em;
}
.ka-field input {
    display:block;
    width:100%;
    height:54px;
    padding:0 18px;
    border:1.5px solid #334155;
    border-radius:12px;
    outline:0;
    background:rgba(15, 23, 42, .72);
    color:#fff;
    font-size:15px;
    transition:border-color .2s, box-shadow .2s, background .2s;
}
.ka-field input::placeholder { color:#64748b; }
.ka-field input:focus {
    border-color:#38bdf8;
    background:rgba(15, 23, 42, .96);
    box-shadow:0 0 0 4px rgba(56, 189, 248, .18);
}

.ka-actions { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:36px; }
.ka-button {
    min-height:54px;
    border:0;
    border-radius:12px;
    color:#fff;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    transition:transform .2s, box-shadow .2s, filter .2s;
}
.ka-button:hover { transform:translateY(-1px); filter:brightness(1.08); }
.ka-button:active { transform:none; }
.ka-button.primary {
    background:linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow:0 4px 14px rgba(37, 99, 235, .35);
}
.ka-button.success {
    background:linear-gradient(135deg, #10b981, #059669);
    box-shadow:0 4px 14px rgba(16, 185, 129, .3);
}
.forgot-password {
    display:block;
    margin:24px 0 0 auto;
    padding:0;
    border:0;
    background:transparent;
    color:#94a3b8;
    font-size:13px;
    cursor:pointer;
}
.forgot-password:hover { color:#e2e8f0; }

.password-reset-dialog {
    width:min(520px, calc(100vw - 32px));
    max-height:calc(100vh - 32px);
    padding:0;
    overflow:hidden;
    border:1px solid #cbd5e1;
    border-radius:20px;
    background:#fff;
    color:#0f172a;
    box-shadow:0 24px 80px rgba(0,0,0,.48);
}
.password-reset-dialog::backdrop { background:rgba(2, 6, 23, .78); backdrop-filter:blur(3px); }
.reset-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    padding:24px 26px;
    border-bottom:1px solid #e2e8f0;
}
.reset-head > div { display:flex; flex-direction:column; gap:5px; }
.reset-head strong { font-size:21px; }
.reset-head span { color:#64748b; font-size:13px; }
.reset-close {
    padding:8px 12px;
    border:1px solid #cbd5e1;
    border-radius:9px;
    background:#fff;
    color:#334155;
    cursor:pointer;
}
.reset-body { display:grid; gap:18px; max-height:calc(100vh - 145px); padding:24px 26px 28px; overflow:auto; }
.reset-body form { display:grid; gap:16px; }
.reset-body label { display:grid; gap:7px; color:#334155; font-size:13px; font-weight:700; }
.reset-body input {
    width:100%;
    min-height:48px;
    padding:0 14px;
    border:1px solid #cbd5e1;
    border-radius:10px;
    outline:0;
    background:#fff;
    color:#0f172a;
}
.reset-body input:focus { border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.13); }
.reset-body button.primary {
    min-height:48px;
    border:0;
    border-radius:10px;
    background:#2563eb;
    color:#fff;
    font-weight:700;
    cursor:pointer;
}
.reset-message { margin:0; padding:12px 14px; border-radius:10px; background:#eff6ff; color:#1d4ed8; font-size:13px; }
[hidden] { display:none !important; }

@media (max-width:800px) {
    body { overflow:auto; }
    .ka-login { grid-template-columns:1fr; }
    .ka-brand { min-height:210px; padding:34px 24px; border-right:0; border-bottom:1px solid #e2e8f0; }
    .ka-brand-inner { gap:16px; }
    .ka-logo { width:64px; height:64px; }
    .ka-auth { min-height:calc(100vh - 210px); padding:42px 24px 54px; }
}

@media (max-width:480px) {
    .ka-brand { min-height:174px; padding:28px 20px; }
    .ka-logo { width:52px; height:52px; }
    .ka-brand-copy h1 { font-size:20px; }
    .ka-brand-copy p { font-size:12px; }
    .ka-auth { min-height:calc(100vh - 174px); padding:36px 20px 44px; }
    .ka-auth-head { display:block; margin-bottom:30px; }
    .requested-service { display:block; max-width:100%; padding-top:8px; }
    .ka-auth-head h2 { font-size:26px; }
    .ka-actions { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion:reduce) {
    *, *::before, *::after { scroll-behavior:auto !important; transition:none !important; }
}
