
:root {
    --primary: #3157d5;
    --primary-dark: #2445b2;
    --text: #172033;
    --muted: #667085;
    --border: #e4e7ec;
    --bg: #f6f8fc;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f6f8fc 0%, #eef3ff 100%);
}
.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
}
.auth-card {
    width: min(720px, 100%);
    background: #fff;
    border: 1px solid rgba(228,231,236,.9);
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(16,24,40,.10);
}
.auth-shell.compact .auth-card { width: min(500px, 100%); }
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
}
.brand img { width: 42px; height: 42px; object-fit: contain; }
.auth-heading { margin: 30px 0 25px; }
.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.auth-heading h1 { margin: 0 0 8px; font-size: clamp(27px, 5vw, 36px); }
.auth-heading p { margin: 0; color: var(--muted); line-height: 1.6; }
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label {
    display: block;
    margin: 0 0 7px;
    font-size: 13px;
    font-weight: 700;
}
.input-wrap { position: relative; }
.input-wrap input,
.input-wrap select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 0 14px 0 43px;
    outline: none;
    font: inherit;
    transition: .18s ease;
}
.input-wrap input:focus,
.input-wrap select:focus {
    border-color: #91a8ff;
    box-shadow: 0 0 0 4px rgba(49,87,213,.09);
}
.field-icon {
    position: absolute;
    z-index: 2;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #98a2b3;
    pointer-events: none;
}
.field-icon svg,
.auth-message svg,
.primary-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.select-wrap::after {
    content: "⌄";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-55%);
    color: #667085;
    pointer-events: none;
}
.select-wrap select { appearance: none; padding-right: 38px; }
.password-wrap input { padding-right: 68px; }
.toggle-password {
    position: absolute;
    right: 8px;
    top: 7px;
    height: 34px;
    min-width: 52px;
    border: 0;
    border-radius: 9px;
    background: #eef4ff;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
}
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 4px;
    font-size: 13px;
}
.remember { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.remember input { accent-color: var(--primary); }
.text-button {
    border: 0;
    background: none;
    color: var(--primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.auth-message {
    margin: 15px 0;
    padding: 11px 13px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    border: 1px solid transparent;
}
.auth-message[hidden] { display: none; }
.auth-message.success { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.auth-message.error { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.primary-btn {
    width: 100%;
    min-height: 50px;
    margin-top: 8px;
    border: 0;
    border-radius: 13px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
}
.primary-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.primary-btn:disabled { opacity: .7; cursor: wait; transform: none; }
.btn-icon { font-size: 21px; line-height: 1; }
.auth-switch {
    margin: 20px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.auth-switch a { color: var(--primary); font-weight: 800; text-decoration: none; }
.security-note {
    margin: 16px auto 0;
    max-width: 520px;
    color: #98a2b3;
    text-align: center;
    font-size: 11px;
    line-height: 1.5;
}
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
    .auth-card { padding: 25px 20px; border-radius: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
}
