body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    font-family: "Microsoft JhengHei", Arial, sans-serif;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    background: linear-gradient(135deg, transparent 30%, rgba(231, 76, 60, 0.1) 100%);
    z-index: -2;
    border-radius: 0 0 0 100%;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(135deg, transparent 40%, rgba(231, 76, 60, 0.05) 100%);
    z-index: -1;
    border-radius: 0 0 0 70%;
}

.header {
    text-align: center;
    padding: 30px 20px;
    background: transparent;
    color: #333333;
    font-size: 32px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1100;
}

.login-page {
    max-width: 400px;
    margin: 40px auto;
}

.login-page .login-container {
    margin: 0;
}

.login-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    position: relative;
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.session-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 16px;
    padding: 16px 18px;
    color: #623b10;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 235, 0.98)) padding-box,
        linear-gradient(135deg, rgba(231, 76, 60, 0.42), rgba(242, 176, 67, 0.5)) border-box;
    border: 1px solid transparent;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(99, 63, 20, 0.11);
    animation: session-notice-enter 0.38s ease-out both;
}

.session-notice__icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: linear-gradient(135deg, #e76f51, #d94a3a);
    border-radius: 50%;
    box-shadow: 0 5px 14px rgba(217, 74, 58, 0.25);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.session-notice__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.session-notice__title {
    color: #3d2a1f;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.session-notice__message {
    color: #745646;
    font-size: 14px;
    line-height: 1.55;
}

@keyframes session-notice-enter {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .login-page {
        width: calc(100% - 32px);
        margin: 24px auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .session-notice {
        animation: none;
    }
}

.login-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
    color: #333333;
    font-weight: bold;
}

.form-control {
    border-radius: 8px;
    border: 1px solid rgba(231, 76, 60, 0.2);
    background-color: rgba(255, 255, 255, 0.9);
    color: #333333;
    padding: 12px 20px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    background-color: #ffffff;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
    outline: none;
}

.btn-custom {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-radius: 8px;
    border: none;
    padding: 14px 20px;
    width: 100%;
    margin-top: 30px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    padding: 10px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 6px;
}

.error-message:empty {
    display: none;
}

.password-modal[hidden] {
    display: none;
}

.password-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.48);
}

.password-modal__dialog {
    width: min(100%, 420px);
    padding: 28px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
    text-align: center;
}

.password-modal__title {
    margin: 0 0 14px;
    color: #333333;
    font-size: 24px;
    font-weight: 700;
}

.password-modal--success .password-modal__title {
    color: #218838;
}

.password-modal--error .password-modal__title {
    color: #c0392b;
}

.password-modal__message {
    margin: 0 0 24px;
    color: #555555;
    line-height: 1.7;
}

.password-modal__button {
    min-width: 120px;
    margin: 0;
}
