/* macOS 风格组合按钮 + 调色盘面板（登录/注册/忘记密码 + 后台顶栏） */

.vs-topbar__theme {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.theme-trigger-circle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.theme-trigger-circle-btn:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.theme-trigger-circle-btn:active {
    transform: translateY(0);
}

.theme-trigger-wrap--admin-fallback {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 1000;
    padding: 0;
    border: none;
    background: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.theme-trigger-wrap {
    position: fixed;
    top: 16px;
    right: 28px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transition: transform 0.2s, filter 0.2s;
}

.theme-trigger-wrap:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.14));
}

.theme-trigger-wrap:active {
    transform: translateY(0);
}

.theme-trigger-oval {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-right: none;
    border-radius: 9999px 0 0 9999px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
}

.theme-trigger-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    margin-left: -1px;
}

.theme-trigger-wrap .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: block;
    transition: transform 0.15s;
}

.theme-trigger-wrap:hover .dot {
    transform: scale(1.1);
}

.theme-trigger-wrap .dot-red {
    background: #ff5f57;
}

.theme-trigger-wrap .dot-yellow {
    background: #febc2e;
}

.theme-trigger-wrap .dot-green {
    background: #28c840;
}

.theme-trigger-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.theme-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.theme-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.theme-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1002;
    width: min(360px, calc(100vw - 32px));
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

.theme-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.theme-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.theme-panel-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.theme-panel-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.theme-panel-close:hover {
    background: #e5e7eb;
    color: #111;
}

.theme-preview {
    height: 64px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
    transition: background-color 0.2s;
}

.theme-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.theme-picker-row label {
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

.theme-picker-row input[type="color"] {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    background: none;
}

.theme-picker-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 4px;
}

.theme-picker-row input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.theme-picker-value {
    flex: 1;
    font-size: 14px;
    color: #6b7280;
    font-family: ui-monospace, monospace;
}

.theme-presets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.theme-preset {
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}

.theme-preset:hover {
    transform: scale(1.08);
}

.theme-preset.is-active {
    border-color: #111;
}

.theme-tip {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 16px;
    line-height: 1.5;
}

.theme-message {
    min-height: 20px;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.4;
}

.theme-message--error {
    color: #b91c1c;
}

.theme-message--success {
    color: #15803d;
}

.theme-actions {
    display: flex;
    gap: 10px;
}

.theme-btn {
    flex: 1;
    height: 42px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}

.theme-btn-save {
    border: none;
    background: #111;
    color: #fff;
}

.theme-btn-save:hover {
    opacity: 0.88;
}

.theme-btn-save:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.theme-btn-reset {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111;
}

.theme-btn-reset:hover {
    background: #f9fafb;
}

@media (max-width: 1024px) {
    .theme-trigger-wrap {
        top: 12px;
        right: 20px;
    }

    .theme-trigger-oval {
        padding: 7px 11px;
        gap: 5px;
    }

    .theme-trigger-circle {
        width: 34px;
        height: 34px;
    }

    .theme-trigger-wrap .dot {
        width: 9px;
        height: 9px;
    }

    .theme-trigger-icon {
        width: 16px;
        height: 16px;
    }
}
