* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 50%, #ffffff 100%);
    color: #1d2a36;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.login-layout {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 28px;
}

.login-container {
    width: min(1150px, 100%);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 28px;
}

.brand-panel {
    padding: 12px 0 12px 8px;
}

.form-panel {
    display: flex;
    justify-content: center;
}

.login-card {
    width: 430px;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d8e0ea;
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(15, 61, 122, 0.1);
    padding: 26px 24px 22px;
    backdrop-filter: blur(4px);
}

.form-panel > .login-card {
    flex: 0 1 430px;
}

.login-card h3 {
    margin: 0 0 8px;
    font-size: 2.1rem;
    color: #0b2d5c;
    font-weight: 800;
}

.login-card .subtitle {
    margin: 0 0 18px;
    color: #5f6f7f;
    font-size: 0.98rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #1d2a36;
    font-weight: 700;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"] {
    width: 100%;
    padding: 14px 14px;
    border: 1px solid #c9d5e3;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    color: #1d2a36;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="date"]:focus {
    border-color: #0f3d7a;
    box-shadow: 0 0 0 3px rgba(15, 61, 122, 0.12);
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 8px 0 18px;
    font-size: 0.9rem;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1d2a36;
    font-weight: 600;
}

.remember input {
    width: 15px;
    height: 15px;
    accent-color: #0f3d7a;
}

.forgot-link {
    color: #0f3d7a;
    text-decoration: none;
    font-weight: 700;
}

.forgot-link:hover {
    text-decoration: underline;
}

.error-box,
.success-box {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.error-box {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.success-box {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.success-box h4 {
    margin: 0 0 0.5rem;
}

.success-box p {
    margin: 0.45rem 0;
}

.success-box code {
    overflow-wrap: anywhere;
}

.btn-login {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f3d7a 0%, #0b2d5c 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 22px rgba(15, 61, 122, 0.2);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(15, 61, 122, 0.24);
}

.signup-text {
    margin-top: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: #5f6f7f;
}

.signup-text a {
    color: #0f3d7a;
    text-decoration: none;
    font-weight: 700;
}

.signup-text a:hover {
    text-decoration: underline;
}

footer {
    background: #edf3fa;
    color: #5f6f7f;
    text-align: center;
    padding: 18px 20px;
    border-top: 1px solid #d8e0ea;
    font-size: 0.9rem;
}

.login-page .login-guide-toggle {
    display: block;
    width: auto;
    min-height: 0;
    margin: 0 0 10px;
    padding: 2px 0;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: none;
    color: #075bd0;
    font: inherit;
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
}

.login-page .login-guide-toggle:hover,
.login-page .login-guide-toggle:focus-visible {
    color: #183d6d;
    text-decoration: underline;
}

.login-guide {
    margin: 0 0 18px;
    color: #536987;
    font-size: .88rem;
    line-height: 1.5;
}

.login-guide[hidden] {
    display: none;
}

.login-guide ol {
    margin: 8px 0 10px;
    padding-left: 22px;
}

.login-guide li + li {
    margin-top: 3px;
}

.login-guide-example {
    margin: 0 0 6px;
}

.login-guide small {
    display: block;
    font-size: 0.8rem;
}

@media (max-width: 860px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .brand-panel {
        text-align: center;
        padding: 12px 0 0;
    }

    .form-panel {
        width: 100%;
    }

    .login-card {
        width: 100%;
    }
}
