:root {
    --brand: #07c160;
    --brand-deep: #05a94f;
    --text: #1f1f1f;
    --muted: #7b7b7b;
    --panel: rgba(255, 255, 255, 0.9);
}

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

body {
    min-height: 100vh;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 20%, rgba(7, 193, 96, 0.35), transparent 38%),
        radial-gradient(circle at 85% 10%, rgba(76, 173, 255, 0.2), transparent 32%),
        linear-gradient(145deg, #ecfdf4 0%, #f7fbff 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

body.container-mode {
    background: #f3f7f5;
}

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

body.container-mode .login-page {
    min-height: auto;
    height: 100vh;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}

body.electron-shell {
    overflow: hidden;
}

.login-panel {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(10, 46, 28, 0.14);
    padding: 34px 28px 22px;
    position: relative;
}

body.container-mode .login-panel {
    max-width: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #f3f7f5;
    padding: 28px 22px 18px;
}

body.electron-shell.container-mode .login-panel {
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.panel-window-actions {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
}

.electron-btn {
    width: 30px;
    height: 22px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    -webkit-app-region: no-drag;
}

.electron-min {
    background: #dce8e2;
    color: #34443d;
}

.electron-close {
    background: #ff5a5a;
    color: #fff;
}

.panel-header {
    text-align: left;
}

body.electron-shell .panel-header {
    -webkit-app-region: drag;
    padding-right: 82px;
}

body.electron-shell .panel-window-actions .electron-btn {
    -webkit-app-region: no-drag;
}

.panel-header h1 {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.panel-header p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
}

.error-box {
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff1f1;
    border: 1px solid #ffd4d4;
    color: #d63c3c;
    font-size: 14px;
}

.login-form {
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.field span {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #4f4f4f;
}

.field input {
    width: 100%;
    height: 46px;
    border: 1px solid #d8e1dd;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.field input::placeholder {
    color: #a0a0a0;
}

.field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(7, 193, 96, 0.15);
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.remember-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

.remember-row span {
    font-size: 13px;
    color: #5e5e5e;
}

.submit-btn {
    margin-top: 4px;
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #15cb6a 0%, #07c160 100%);
    box-shadow: 0 10px 20px rgba(7, 193, 96, 0.3);
    color: #fff;
    font-size: 16px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.2s ease;
}

.submit-btn:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.panel-footer {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px dashed #e8eeea;
}

.panel-footer p {
    font-size: 12px;
    color: #8a8a8a;
    line-height: 1.6;
}

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

.success-panel {
    width: 100%;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    box-shadow: 0 20px 46px rgba(10, 46, 28, 0.14);
    padding: 28px 24px;
    text-align: center;
}

body.container-mode .success-panel {
    max-width: none;
    height: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #f3f7f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.success-panel h1 {
    font-size: 28px;
    font-weight: 700;
}

.success-panel p {
    margin-top: 10px;
    color: #6f7b77;
    font-size: 14px;
}

.success-orbit {
    width: 66px;
    height: 66px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 2px solid rgba(7, 193, 96, 0.26);
    position: relative;
    animation: orbit-rotate 1.2s linear infinite;
}

.success-orbit .dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #07c160;
}

.success-orbit .dot-a {
    top: -5px;
    left: 28px;
}

.success-orbit .dot-b {
    right: -5px;
    top: 28px;
    background: #19d06d;
}

.success-orbit .dot-c {
    left: -5px;
    top: 28px;
    background: #5ce59a;
}

@keyframes orbit-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

body.container-mode .panel-header h1 {
    font-size: 42px;
}

@media (max-height: 920px) {
    .login-page {
        align-items: flex-start;
        padding-top: 24px;
    }

    .login-panel {
        padding-top: 26px;
    }

    .panel-header h1 {
        font-size: 30px;
    }
}
