:root {
    --bg-a: #eef2ff;
    --bg-b: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #cbd5e1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --danger-bg: #fee2e2;
    --danger-text: #b91c1c;
    --ok-bg: #dcfce7;
    --ok-text: #166534;
    --warn-bg: #fef3c7;
    --warn-text: #92400e;
    --info-bg: #dbeafe;
    --info-text: #1e40af;
    --ring: rgba(79, 70, 229, 0.28);
    --radius: 12px;
    --shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
    --t: 0.2s;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px 78px;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 10% -10%, #c7d2fe 0%, transparent 60%),
        radial-gradient(800px 500px at 100% 100%, #bfdbfe 0%, transparent 60%),
        linear-gradient(135deg, var(--bg-a), var(--bg-b));
}

.login-container {
    width: min(92vw, 420px);
    background: var(--panel);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 26px 24px 22px;
    animation: enter 0.45s ease-out both;
}

@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-container h2 {
    margin: 0 0 18px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 0.5px;
}

.login-container label {
    display: block;
    margin: 12px 0 8px;
    font-weight: 600;
    color: #1e293b;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    margin-bottom: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    transition: border-color var(--t), box-shadow var(--t);
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 4px var(--ring);
}

.login-container button[type="submit"] {
    width: 100%;
    height: 44px;
    margin-top: 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    background: var(--brand-600);
    cursor: pointer;
    transition: background-color var(--t), transform var(--t), box-shadow var(--t);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.3);
}

.login-container button[type="submit"]:hover {
    background: var(--brand-700);
    transform: translateY(-1px);
}

.login-container button[type="submit"]:active {
    transform: translateY(0);
}

.login-container button[type="submit"]:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

.login-links {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.login-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--t);
}

.login-links a:hover {
    color: var(--brand-600);
    text-decoration: underline;
}

body.modal-open {
    overflow: hidden;
}

.notice-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background: rgba(15, 23, 42, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t);
}

.notice-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

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

.notice-dialog {
    width: min(92vw, 440px);
    padding: 28px 24px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
    text-align: center;
    transform: translateY(8px) scale(0.99);
    transition: transform var(--t);
}

.notice-modal.is-open .notice-dialog {
    transform: translateY(0) scale(1);
}

.notice-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--brand-700);
    background: #eef2ff;
    font-size: 24px;
    font-weight: 700;
}

.notice-dialog h3 {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.3;
}

.notice-dialog p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.notice-actions {
    margin-top: 24px;
}

.notice-close {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    background: var(--brand-600);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    transition: background-color var(--t), transform var(--t), box-shadow var(--t);
}

.notice-close:hover {
    background: var(--brand-700);
    transform: translateY(-1px);
}

.notice-close:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.messages li {
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: center;
}

.messages li.error {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.messages li.success {
    background: var(--ok-bg);
    color: var(--ok-text);
}

.messages li.warning {
    background: var(--warn-bg);
    color: var(--warn-text);
}

.messages li.info {
    background: var(--info-bg);
    color: var(--info-text);
}

.beian-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    background: transparent;
}

.beian-footer a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--t);
}

.beian-footer a:hover {
    color: var(--brand-600);
    text-decoration: underline;
}

.gongan-beian {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gongan-beian img {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.beian-separator {
    color: #94a3b8;
}

@media (max-width: 520px) {
    body {
        padding-bottom: 96px;
    }

    .beian-footer {
        gap: 6px 8px;
        font-size: 12px;
    }

    .beian-separator {
        display: none;
    }
}
