*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #fff;
    color: #333;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 48px 40px 40px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.login-logo img {
    height: 100px;
    width: auto;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Field group */
.field-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.field-group label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 6px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap .input-icon {
    position: absolute;
    left: 14px;
    color: #aaa;
    font-size: 14px;
    pointer-events: none;
}

.input-wrap .input-icon-right {
    position: absolute;
    right: 14px;
    color: #aaa;
    font-size: 14px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
}

.input-wrap .input-icon-right:hover {
    color: #555;
}

.input-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 40px;
    background: #f7f8fa;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap input:focus {
    border-color: #183962;
    box-shadow: 0 0 0 3px rgba(24, 57, 98, 0.08);
    background: #fff;
}

.input-wrap input::placeholder {
    color: #bbb;
}

/* ── Floating label ── */
.float-wrap {
    position: relative;
    margin-top: 8px;
}

.float-label {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #bbb;
    pointer-events: none;
    transition: top 0.18s ease, transform 0.18s ease, font-size 0.18s ease,
                color 0.18s ease, background 0.18s ease, padding 0.18s ease,
                left 0.18s ease;
    line-height: 1;
    background: transparent;
}

/* Focused or has value */
.float-wrap input:focus ~ .float-label,
.float-wrap input:not(:placeholder-shown) ~ .float-label,
.float-wrap input:-webkit-autofill ~ .float-label {
    top: 0;
    transform: translateY(-50%);
    left: 36px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #183962;
    background: #fff;
    padding: 0 4px;
}

/* Error messages */
.field-error {
    font-size: 12px;
    color: #d32f2f;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.field-error.hidden {
    display: none;
}

/* Forgot password */
.forgot-link {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-link a {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link a:hover {
    text-decoration: underline;
}

/* Login button */
.btn-login {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 48px;
    background: #183962;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 24px;
}

.btn-login:hover {
    background: #1e4a7a;
}

.btn-login:active {
    background: #122d4e;
}

.btn-login .shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: skewX(-18deg);
    animation: shine 3.5s infinite;
    pointer-events: none;
}

@keyframes shine {
    0%   { left: -100%; }
    28%  { left: 140%; }
    100% { left: 140%; }
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #bbb;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Sign up row */
.signup-row {
    text-align: center;
    font-size: 13px;
    color: #777;
}

.signup-row a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.signup-row a:hover {
    text-decoration: underline;
}

/* Validation summary */
.validation-summary {
    background: #fff0f0;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #d32f2f;
    margin-bottom: 16px;
}

.validation-summary:empty {
    display: none;
}

/* ── Title / subtitle ── */
.login-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #183962;
    margin-bottom: 4px;
}

.login-subtitle {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 24px;
}

/* ── Wide card variant (sign-up) ── */
.login-card--wide {
    max-width: 500px;
}

/* ── Two-column name row ── */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Select wrap ── */
.select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrap .input-icon {
    position: absolute;
    left: 14px;
    color: #aaa;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.select-wrap select {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 40px;
    background: #f7f8fa;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select-wrap select:focus {
    border-color: #183962;
    box-shadow: 0 0 0 3px rgba(24, 57, 98, 0.08);
    background: #fff;
}

/* ── Radio group ── */
.radio-group {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.radio-option:has(input:checked) {
    border-color: #183962;
    background: #f0f4fa;
}

.radio-option input[type="radio"] {
    margin-top: 2px;
    accent-color: #183962;
    flex-shrink: 0;
}

.radio-label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.radio-hint {
    font-size: 11px;
    font-weight: 400;
    color: #888;
    margin-top: 2px;
}

/* ── Checkbox option ── */
.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.checkbox-option input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #183962;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.checkbox-option a {
    color: #2563eb;
    text-decoration: none;
}

.checkbox-option a:hover {
    text-decoration: underline;
}

/* Thin separator line inside card */
.card-separator {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0 0;
}

/* Forgot password centered at bottom */
.forgot-link-bottom {
    text-align: center;
    margin-top: 16px;
}

.forgot-link-bottom a {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link-bottom a:hover {
    text-decoration: underline;
}

/* New-account inline row */
.new-account-row {
    text-align: right;
    font-size: 13px;
    color: #777;
    margin-top: 16px;
}

.new-account-row a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.new-account-row a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px 32px;
        border-radius: 10px;
    }

    .login-logo img {
        height: 56px;
    }

    .login-card--wide {
        max-width: 100%;
    }

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

    .radio-group {
        flex-direction: column;
    }
}
