:root {
    --bg1: #f6fbff;
    --bg2: #eef7ff;
    --card: #ffffff;
    --text: #163047;
    --muted: #6f8597;
    --accent: #8ecbff;
    --accent-strong: #5fb6ff;
    --border: #d9ecfb;
    --shadow: 0 20px 45px rgba(39, 87, 128, 0.10);
    --input-shadow: 0 6px 18px rgba(90, 165, 230, 0.08);
    --error-bg: #fff5f5;
    --error-border: #ffd6d6;
    --error-text: #8f3d3d;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, #ffffff 0%, transparent 35%),
        linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-shell {
    width: 60%;
    max-width: 720px;
    min-width: 320px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 42px 38px 34px;
    position: relative;
    overflow: hidden;
}

.auth-shell--compact {
    max-width: 640px;
}

.auth-shell::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #5b7d97;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-strong);
    box-shadow: 0 0 0 6px rgba(95, 182, 255, 0.15);
}

h1 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: #35556d;
}

input {
    width: 100%;
    border: 1px solid var(--border);
    background: #fbfeff;
    border-radius: 12px;
    padding: 14px 15px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    box-shadow: var(--input-shadow);
}

input::placeholder {
    color: #a0b2c1;
}

input:focus {
    border-color: var(--accent-strong);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(95, 182, 255, 0.16);
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.submit-row,
.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 4px;
}

.helper {
    font-size: 13px;
    color: var(--muted);
}

button,
.button {
    appearance: none;
    border: 0;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    color: #10324f;
    background: linear-gradient(180deg, #bde4ff 0%, #8ecbff 100%);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
    box-shadow: 0 10px 24px rgba(95, 182, 255, 0.24);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover,
.button:hover {
    transform: translateY(-1px);
    filter: brightness(1.01);
}

button:active,
.button:active {
    transform: translateY(0);
}

.button-secondary {
    background: linear-gradient(180deg, #f7fbff 0%, #e7f4ff 100%);
    color: #21445f;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(95, 182, 255, 0.12);
}

.notice {
    border-radius: 14px;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.notice-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}

.footer-note {
    margin-top: 22px;
    font-size: 12px;
    color: #8ca0b0;
    text-align: center;
}

@media (max-width: 900px) {
    .auth-shell {
        width: 80%;
    }
}

@media (max-width: 640px) {
    .auth-shell {
        width: 100%;
        padding: 30px 22px 24px;
        border-radius: 16px;
    }

    .row {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 27px;
    }

    .submit-row,
    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    button,
    .button {
        width: 100%;
    }
}