/* ===========================
   AXA运维中心 - 简约商务科技风格
   =========================== */

/* CSS变量 - 简约配色系统 */
:root {
    /* 主色调 - 深邃科技蓝 */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --primary-hover: #334155;

    /* 强调色 - 科技青 */
    --accent: #0ea5e9;
    --accent-light: #38bdf8;
    --accent-dark: #0284c7;

    /* 功能色 */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* 中性色 - 高级灰 */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* 阴影 - 精致细腻 */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);

    /* 间距 */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;

    /* 过渡 */
    --transition: 0.15s ease;
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --border: #334155;
    --border-light: #1e293b;

    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.3);
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.4), 0 1px 2px -1px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -4px rgba(0,0,0,0.4);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 屏幕阅读器专用类 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===========================
   登录页面
   =========================== */

/* 登录过渡动画层 */
.login-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-transition.fade-out {
    animation: fadeOut 0.8s ease-out forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* 扩散圆圈效果 */
.expanding-circles {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.expanding-circles .circle {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: expand 2s ease-out infinite;
}

.expanding-circles .circle:nth-child(2) {
    animation-delay: 0.5s;
}

.expanding-circles .circle:nth-child(3) {
    animation-delay: 1s;
}

@keyframes expand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* 过渡内容 */
.transition-content {
    text-align: center;
    z-index: 10;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: rgba(255, 255, 255, 0.6);
    animation-duration: 1.2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: rgba(255, 255, 255, 0.3);
    animation-duration: 0.9s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 加载文字 */
.loading-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 1px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* 进度条 */
.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 1));
    border-radius: 2px;
    animation: progress 2s ease-in-out infinite;
    transform-origin: left;
}

@keyframes progress {
    0% {
        transform: scaleX(0);
    }
    50% {
        transform: scaleX(0.7);
    }
    100% {
        transform: scaleX(1);
    }
}

.login-page {
    height: 100%;
    width: 100%;
    background: var(--bg-primary);
}

.login-split {
    display: flex;
    width: 100%;
    height: 100%;
}

/* 左侧品牌区域 */
.login-left {
    flex: 1;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(14, 165, 233, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* 粒子背景 */
.login-left-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float-up linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-duration: 8s;
    animation-delay: 0s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(2) {
    left: 20%;
    animation-duration: 10s;
    animation-delay: 1s;
    width: 5px;
    height: 5px;
}

.particle:nth-child(3) {
    left: 30%;
    animation-duration: 12s;
    animation-delay: 2s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(4) {
    left: 40%;
    animation-duration: 9s;
    animation-delay: 0.5s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(5) {
    left: 50%;
    animation-duration: 11s;
    animation-delay: 1.5s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(6) {
    left: 60%;
    animation-duration: 13s;
    animation-delay: 2.5s;
    width: 5px;
    height: 5px;
}

.particle:nth-child(7) {
    left: 70%;
    animation-duration: 10s;
    animation-delay: 0.8s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(8) {
    left: 80%;
    animation-duration: 14s;
    animation-delay: 1.2s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(9) {
    left: 90%;
    animation-duration: 9s;
    animation-delay: 2s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(10) {
    left: 15%;
    animation-duration: 11s;
    animation-delay: 0.3s;
    width: 5px;
    height: 5px;
}

.particle:nth-child(11) {
    left: 25%;
    animation-duration: 12s;
    animation-delay: 1.8s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(12) {
    left: 35%;
    animation-duration: 10s;
    animation-delay: 2.3s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(13) {
    left: 45%;
    animation-duration: 13s;
    animation-delay: 0.6s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(14) {
    left: 55%;
    animation-duration: 9s;
    animation-delay: 1.4s;
    width: 5px;
    height: 5px;
}

.particle:nth-child(15) {
    left: 65%;
    animation-duration: 11s;
    animation-delay: 2.1s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(16) {
    left: 75%;
    animation-duration: 14s;
    animation-delay: 0.9s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(17) {
    left: 85%;
    animation-duration: 10s;
    animation-delay: 1.7s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(18) {
    left: 95%;
    animation-duration: 12s;
    animation-delay: 2.4s;
    width: 5px;
    height: 5px;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

.login-left-content {
    text-align: center;
    color: #fff;
    padding: 60px;
    position: relative;
    z-index: 1;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.login-brand i {
    font-size: 2.5rem;
    color: var(--accent);
}

.login-brand h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

.login-slogan {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 48px;
}

.login-features {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.feature-item i {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.6);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.feature-item:hover i {
    border-color: var(--accent);
    color: var(--accent);
}

.feature-item span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1px;
}

/* 右侧登录表单 */
.login-right {
    flex: 1;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.login-box {
    width: 100%;
    max-width: 420px;
}

.login-header {
    margin-bottom: 40px;
    text-align: center;
}

.login-logo {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.login-logo i {
    font-size: 1.5rem;
    color: var(--accent);
}

.login-logo svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    position: relative;
}

.form-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-group input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group input:focus + i,
.form-group:focus-within i {
    color: var(--accent);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* 表单组中的SVG图标样式 */
.form-group svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition);
    pointer-events: none;
}

/* 验证码样式 */
.captcha-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-input-wrapper {
    position: relative;
    flex: 1;
}

.captcha-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition);
}

.captcha-input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.captcha-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.captcha-image-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#captcha-image {
    height: 40px;
    width: 120px;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid var(--border);
    transition: var(--transition);
}

#captcha-image:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.captcha-refresh {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    position: relative;
}

.captcha-refresh:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-secondary);
    transform: scale(1.05);
}

.captcha-refresh svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.captcha-refresh:hover svg {
    transform: rotate(180deg);
}

.login-btn {
    width: 100%;
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    background: var(--primary-light);
}

.login-btn:active {
    transform: scale(0.98);
}

/* 登录页底部版权信息 */
.login-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.login-footer p {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 2px 0;
    line-height: 1.5;
}

.login-footer p:first-child {
    margin-bottom: 2px;
}

.verify-btn {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.verify-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.verify-btn.verified {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

/* 移动端适配 */
@media (max-width: 900px) {
    .login-split {
        flex-direction: column;
    }

    .login-left {
        padding: 40px 20px;
        min-height: auto;
    }

    .login-left-content {
        padding: 20px;
    }

    .login-brand {
        gap: 12px;
        margin-bottom: 20px;
    }

    .login-brand i {
        font-size: 2rem;
    }

    .login-brand h2 {
        font-size: 1.25rem;
    }

    .login-slogan {
        font-size: 0.75rem;
        margin-bottom: 32px;
        letter-spacing: 2px;
    }

    .login-features {
        gap: 24px;
    }

    .feature-item i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .feature-item span {
        font-size: 0.7rem;
    }

    .login-right {
        width: 100%;
        padding: 40px 24px;
    }
}

/* ===========================
   主应用容器
   =========================== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.header {
    height: 64px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-left h1 i {
    color: var(--accent);
    font-size: 1.125rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#username-display {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.user-menu {
    display: flex;
    gap: 4px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* 主内容布局 */
.main-container {
    flex: 1;
    display: flex;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.logo {
    padding: 0 8px;
}

.logo h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.logo p {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'SF Mono', Monaco, monospace;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 快捷操作 */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: left;
    transition: var(--transition);
    position: relative;
}

.action-btn i,
.action-btn svg {
    font-size: 0.875rem;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.action-btn:hover i,
.action-btn:hover svg {
    color: var(--accent);
}

.action-btn.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent);
}

.action-btn.active i,
.action-btn.active svg {
    color: var(--accent);
}

.refresh-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 右侧内容区 */
.right-panel {
    flex: 1;
    padding: 24px;
    min-width: 0;
}

/* 汇总面板 */
.summary-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.summary-header i {
    color: var(--accent);
    font-size: 1rem;
}

.summary-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-time {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 20px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
}

.summary-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.summary-item.total .summary-icon {
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent);
}

.summary-item.online .summary-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.summary-item.offline .summary-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.summary-item.rate .summary-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.summary-info {
    display: flex;
    flex-direction: column;
}

.summary-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.summary-detail {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.detail-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.detail-badge i {
    font-size: 0.625rem;
}

.detail-nums {
    display: flex;
    gap: 12px;
}

.detail-num {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.detail-num i {
    font-size: 0.5rem;
}

.detail-num.online {
    color: var(--success);
}

.detail-num.offline {
    color: var(--danger);
}

.time-value {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'SF Mono', Monaco, monospace;
}

/* 站点网格 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* 站点卡片 */
.site-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.site-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.site-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

.site-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.site-name i {
    color: var(--accent);
    font-size: 0.8125rem;
}

.site-actions {
    display: flex;
    gap: 4px;
}

.site-card-body {
    padding: 16px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.status-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.online .status-indicator {
    background: var(--success);
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-badge.offline .status-indicator {
    background: var(--danger);
}

.url-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.url-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}

.url-label {
    color: var(--text-muted);
    min-width: 32px;
}

.url-link {
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.url-link:hover {
    text-decoration: underline;
}

.url-link i {
    font-size: 0.625rem;
    flex-shrink: 0;
}

.site-card-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-primary);
    font-size: 0.6875rem;
    color: var(--text-muted);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 移动端工具栏 */
.mobile-toolbar {
    display: none;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent);
}

.btn-info:hover {
    background: rgba(14, 165, 233, 0.2);
}

/* ===========================
   模态框
   =========================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    /* 防止模态框背景干扰内部元素交互 */
    pointer-events: none;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 420px;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-lg);
    /* 允许模态框内容接收事件 */
    pointer-events: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-form .form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.modal-form .form-group input,
.modal-form .form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.modal-form .form-group input:focus,
.modal-form .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* 确保模态框中的输入框可以正常选择文本 */
.modal-content input,
.modal-content textarea {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.modal-form .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.modal-body {
    padding: 20px;
}

.security-warning {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: rgba(14, 165, 233, 0.05);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.warning-icon {
    width: 36px;
    height: 36px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.warning-message p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.warning-message .site-name-display,
.warning-message .credential-type-display {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.credentials-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.credential-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.credential-item label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.credential-value {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.btn-copy {
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: var(--transition);
}

.btn-copy:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.confirm-delete-content {
    text-align: center;
    padding: 10px 0;
}

.confirm-delete-content .warning-icon {
    margin: 0 auto 16px;
}

.confirm-delete-content .warning-message p {
    margin-bottom: 8px;
}

.site-name-highlight {
    font-weight: 600;
    color: var(--danger);
}

.warning-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.import-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.import-method h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.import-method h4 i {
    color: var(--accent);
}

.method-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.file-upload-area:hover {
    border-color: var(--accent);
}

.upload-placeholder i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.upload-placeholder p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.file-details i {
    color: var(--accent);
}

.file-details span {
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.file-size {
    color: var(--text-muted) !important;
    font-size: 0.75rem !important;
}

.btn-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.import-divider {
    text-align: center;
    position: relative;
}

.import-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.import-divider span {
    position: relative;
    background: var(--bg-secondary);
    padding: 0 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.import-preview {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
}

.import-preview h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.preview-summary {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

/* Toast通知 */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    max-width: 360px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
}

.toast.info {
    background: var(--accent);
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 250, 252, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.loading-spinner p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    box-shadow: var(--shadow);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* 页脚 */
/* 凭证预览按钮 */
.credential-preview {
    display: flex;
    gap: 6px;
}

.btn-view-credentials {
    padding: 4px 10px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.6875rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.btn-view-credentials:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.site-actions-bottom {
    display: flex;
    gap: 8px;
}

.site-actions-bottom .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 6px 12px;
}

/* 拖拽排序 */
.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    padding: 4px;
    /* 防止拖拽手柄被选中 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.drag-handle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.drag-handle svg {
    width: 16px;
    height: 16px;
}

.drag-handle:active {
    cursor: grabbing;
}

/* 确保卡片其他部分不显示拖拽光标 */
.site-card-body,
.site-card-footer {
    cursor: default;
}

.site-card.dragging {
    opacity: 0.5;
}

/* 拖拽排序占位符 */
.sort-placeholder {
    background: var(--bg-tertiary);
    border: 2px dashed var(--accent);
    border-radius: var(--radius);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.875rem;
    margin: 8px;
}

.sort-placeholder i {
    margin-right: 8px;
}

/* 拖拽悬停状态 */
.site-card.drag-over {
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .mobile-toolbar {
        display: block;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 16px;
    }

    .toolbar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        cursor: pointer;
    }

    .toolbar-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-primary);
    }

    .toolbar-toggle {
        color: var(--text-muted);
        transition: var(--transition);
    }

    .mobile-toolbar.open .toolbar-toggle {
        transform: rotate(180deg);
    }

    .toolbar-content {
        display: none;
        padding: 0 16px 16px;
    }

    .mobile-toolbar.open .toolbar-content {
        display: block;
    }

    .toolbar-actions {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .toolbar-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border: none;
        background: transparent;
        border-radius: var(--radius);
        cursor: pointer;
        color: var(--text-secondary);
        font-size: 0.8125rem;
        text-align: left;
        transition: var(--transition);
    }

    .toolbar-btn i,
    .toolbar-btn svg {
        width: 18px;
        height: 18px;
        color: var(--text-muted);
        flex-shrink: 0;
    }

    .toolbar-btn:hover {
        background: var(--bg-tertiary);
    }

    .right-panel {
        padding: 16px;
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-detail {
        flex-direction: column;
        gap: 12px;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sites-grid {
        grid-template-columns: 1fr;
    }
}

/* 暗色主题调整 */
[data-theme="dark"] .login-logo {
    background: var(--accent);
}

[data-theme="dark"] .summary-item {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .site-card-footer {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .modal-form .form-group input,
[data-theme="dark"] .modal-form .form-group textarea {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .import-preview {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .credential-value {
    background: var(--bg-tertiary);
}