/* ============================================
   iOS 风格完整样式 - 浅色/深色双模式适配
   ============================================ */

/* ============================================
   设计令牌系统 (Design Tokens)
   统一管理颜色、间距、字体等设计变量
   ============================================ */

:root {
    /* === 颜色系统 - 浅色模式 === */
    --color-primary: #1D1D1F;
    --color-secondary: #86868B;
    --color-tertiary: #AEAEB2;
    
    /* 品牌色 */
    --color-blue: #007AFF;
    --color-green: #34C759;
    --color-red: #FF3B30;
    --color-orange: #FF9500;
    --color-yellow: #FFCC00;
    --color-purple: #5856D6;
    --color-pink: #FF2D55;
    --color-teal: #5AC8FA;
    
    /* 背景色 */
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F2F2F7;
    --bg-card: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --bg-glass-dark: rgba(28, 28, 30, 0.85);
    
    /* 边框色 */
    --border-light: rgba(0, 0, 0, 0.06);
    --border-medium: rgba(0, 0, 0, 0.12);
    --border-glass: rgba(255, 255, 255, 0.6);
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.12);
    
    /* 间距系统（8px 网格基准）*/
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* 字体系统 */
    --font-size-xxs: 10px;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    
    /* 圆角系统 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;
    
    /* 过渡动画 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* z-index 层级 */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* 深色模式覆盖 */
body.dark-mode {
    --color-primary: #F5F5F7;
    --color-secondary: #8E8E93;
    --color-tertiary: #636366;
    
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --bg-tertiary: #2C2C2E;
    --bg-card: #1C1C1E;
    --bg-glass: rgba(28, 28, 30, 0.85);
    
    --border-light: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Roboto, sans-serif;
    background-color: var(--bg-primary) !important;
    color: var(--color-primary) !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* ============================================
   iOS 毛玻璃卡片效果
   ============================================ */

.glass-card {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08) !important;
}

/* ============================================
   iOS 白色卡片 (主要内容区域)
   ============================================ */

.ios-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
}

/* ============================================
   圆角体系
   ============================================ */

.ios-radius-sm { border-radius: 8px !important; }
.ios-radius-md { border-radius: 14px !important; }
.ios-radius-lg { border-radius: 20px !important; }
.ios-radius-xl { border-radius: 28px !important; }

/* ============================================
   模态框遮罩层
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 1;
    transition: opacity var(--transition-normal);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

body.modal-open {
    overflow: hidden;
}

/* 移动端侧边栏打开时的遮罩 */
@media (max-width: 768px) {
    .sidebar.open ~ .modal-overlay,
    .modal-overlay:not(.hidden) {
        display: block;
    }
}

/* ============================================
   状态指示灯
   ============================================ */

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background-color: #34C759;
    box-shadow: 0 0 12px rgba(52, 199, 89, 0.45);
}

.status-offline {
    background-color: #FF3B30;
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.45);
}

/* ============================================
   技术 Logo
   ============================================ */

.tech-logo {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

.tech-logo svg {
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   按钮样式 - iOS 风格
   ============================================ */

.btn-ios-primary {
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2) !important;
}

.btn-ios-primary:hover {
    background: linear-gradient(135deg, #0066CC 0%, #004499 100%) !important;
    transform: scale(0.98) !important;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15) !important;
}

.btn-ios-green {
    background: linear-gradient(135deg, #34C759 0%, #28A745 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.2) !important;
}

.btn-ios-green:hover {
    background: linear-gradient(135deg, #28A745 0%, #1E7E34 100%) !important;
    transform: scale(0.98) !important;
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.15) !important;
}

.btn-ios-outline {
    background-color: transparent !important;
    color: #007AFF !important;
    border: 1px solid #007AFF !important;
    border-radius: 12px !important;
    padding: 10px 22px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-ios-outline:hover {
    background-color: rgba(0, 122, 255, 0.08) !important;
    transform: scale(0.98) !important;
}

.btn-ios-text {
    background-color: transparent !important;
    color: #007AFF !important;
    border: none !important;
    padding: 8px 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-ios-text:hover {
    background-color: rgba(0, 122, 255, 0.06) !important;
    border-radius: 8px !important;
}

.btn-ios-danger {
    background: linear-gradient(135deg, #FF3B30 0%, #CC0000 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2) !important;
}

.btn-ios-danger:hover {
    background: linear-gradient(135deg, #CC0000 0%, #990000 100%) !important;
    transform: scale(0.98) !important;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.15) !important;
}

/* ============================================
   输入框样式 - iOS 风格
   ============================================ */

.input-ios {
    background-color: rgba(142, 142, 147, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-size: 16px !important;
    color: #1D1D1F !important;
    transition: all 0.25s ease !important;
    outline: none !important;
    width: 100% !important;
}

.input-ios:focus {
    background-color: #FFFFFF !important;
    border-color: #007AFF !important;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12) !important;
}

/* ============================================
   文字颜色体系
   ============================================ */

.text-ios-primary { color: #1D1D1F !important; }
.text-ios-secondary { color: #86868B !important; }
.text-ios-tertiary { color: #AEAEB2 !important; }
.text-ios-blue { color: #007AFF !important; }
.text-ios-purple { color: #5856D6 !important; }
.text-ios-red { color: #FF3B30 !important; }
.text-ios-green { color: #34C759 !important; }
.text-ios-orange { color: #FF9500 !important; }

/* ============================================
   背景色体系
   ============================================ */

.bg-ios-primary { background-color: #F5F5F7 !important; }
.bg-ios-card { background-color: #FFFFFF !important; }
.bg-ios-blue { background-color: rgba(0, 122, 255, 0.08) !important; }
.bg-ios-green { background-color: rgba(52, 199, 89, 0.08) !important; }
.bg-ios-red { background-color: rgba(255, 59, 48, 0.08) !important; }
.bg-ios-orange { background-color: rgba(255, 149, 0, 0.08) !important; }
.bg-ios-gray { background-color: rgba(142, 142, 147, 0.12) !important; }

/* ============================================
   分割线
   ============================================ */

.ios-divider {
    height: 1px;
    background-color: #C6C6C8 !important;
    width: 100%;
}

/* ============================================
   动画效果
   ============================================ */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.animate-shake {
    animation: shake 0.2s ease-in-out 0s 2;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.animate-pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ============================================
   卡片悬浮效果
   ============================================ */

.card-hover {
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ============================================
   标签样式
   ============================================ */

.tag-ios {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.tag-ios-blue {
    background-color: rgba(0, 122, 255, 0.12) !important;
    color: #007AFF !important;
}

.tag-ios-green {
    background-color: rgba(52, 199, 89, 0.12) !important;
    color: #34C759 !important;
}

.tag-ios-red {
    background-color: rgba(255, 59, 48, 0.12) !important;
    color: #FF3B30 !important;
}

.tag-ios-orange {
    background-color: rgba(255, 149, 0, 0.12) !important;
    color: #FF9500 !important;
}

/* ============================================
   导航栏/侧边栏样式
   ============================================ */

.sidebar-ios {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-item-ios {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 2px 12px;
    border-radius: 12px;
    color: #86868B;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item-ios:hover {
    background: rgba(0, 122, 255, 0.06);
    color: #007AFF;
}

.nav-item-ios.active {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
    font-weight: 600;
}

/* ============================================
   深色模式支持（基于类名 .dark-mode）
   ============================================ */

/* 深色模式基础样式 */
body.dark-mode {
    background-color: #000000 !important;
    color: #F5F5F7 !important;
}

/* 同时也支持系统偏好设置 */
@media (prefers-color-scheme: dark) {
    body:not(.light-mode) {
        background-color: #000000 !important;
        color: #F5F5F7 !important;
    }
}

/* ==================== 深色模式：卡片类 ==================== */
body.dark-mode .glass-card {
    background: rgba(28, 28, 30, 0.85) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .ios-card {
    background: #1C1C1E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .glass-card {
        background: rgba(28, 28, 30, 0.85) !important;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
    }
    body:not(.light-mode) .ios-card {
        background: #1C1C1E !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
}

/* ==================== 深色模式：文字颜色 ==================== */
body.dark-mode .text-ios-primary { color: #F5F5F7 !important; }
body.dark-mode .text-ios-secondary { color: #8E8E93 !important; }
body.dark-mode .metric-value { color: #F5F5F7 !important; }
body.dark-mode .time-display { color: #8E8E93 !important; }
body.dark-mode .metric-label { color: #8E8E93 !important; }

body.dark-mode .text-gray-800,
body.dark-mode .text-gray-900 {
    color: #F5F5F7 !important;
}

body.dark-mode .text-gray-500,
body.dark-mode .text-gray-400 {
    color: #8E8E93 !important;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .text-ios-primary { color: #F5F5F7 !important; }
    body:not(.light-mode) .text-ios-secondary { color: #8E8E93 !important; }
    body:not(.light-mode) .metric-value { color: #F5F5F7 !important; }
    body:not(.light-mode) .time-display { color: #8E8E93 !important; }
    body:not(.light-mode) .metric-label { color: #8E8E93 !important; }
    body:not(.light-mode) .text-gray-800,
    body:not(.light-mode) .text-gray-900 {
        color: #F5F5F7 !important;
    }
    body:not(.light-mode) .text-gray-500,
    body:not(.light-mode) .text-gray-400 {
        color: #8E8E93 !important;
    }
}

/* ==================== 深色模式：分割线 ==================== */
body.dark-mode .ios-divider { background-color: #38383A !important; }

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .ios-divider { background-color: #38383A !important; }
}

/* ==================== 深色模式：输入框 ==================== */
body.dark-mode .input-ios {
    background-color: rgba(38, 38, 40, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #F5F5F7 !important;
}

body.dark-mode .input-ios:focus {
    background-color: #2C2C2E !important;
    border-color: #007AFF !important;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.18) !important;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .input-ios {
        background-color: rgba(38, 38, 40, 0.9) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #F5F5F7 !important;
    }
    body:not(.light-mode) .input-ios:focus {
        background-color: #2C2C2E !important;
        border-color: #007AFF !important;
        box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.18) !important;
    }
}

/* ==================== 深色模式：背景色 ==================== */
body.dark-mode .bg-ios-card { background-color: #1C1C1E !important; }
body.dark-mode .bg-ios-primary { background-color: #000000 !important; }

body.dark-mode .bg-white { background-color: #1C1C1E !important; }
body.dark-mode .bg-gray-50 { background-color: #1C1C1E !important; }
body.dark-mode .bg-gray-100 { background-color: #2C2C2E !important; }

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .bg-ios-card { background-color: #1C1C1E !important; }
    body:not(.light-mode) .bg-ios-primary { background-color: #000000 !important; }
    body:not(.light-mode) .bg-white { background-color: #1C1C1E !important; }
    body:not(.light-mode) .bg-gray-50 { background-color: #1C1C1E !important; }
    body:not(.light-mode) .bg-gray-100 { background-color: #2C2C2E !important; }
}

/* ==================== 深色模式：边框 ==================== */
body.dark-mode .border-gray-100,
body.dark-mode .border-gray-200 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .border-gray-100,
    body:not(.light-mode) .border-gray-200 {
        border-color: rgba(255, 255, 255, 0.08) !important;
    }
}

/* ==================== 深色模式：侧边栏和头部 ==================== */
body.dark-mode .sidebar {
    background: rgba(28, 28, 30, 0.95) !important;
    border-right-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .mobile-header {
    background: rgba(28, 28, 30, 0.95) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .sidebar-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .sidebar {
        background: rgba(28, 28, 30, 0.95) !important;
        border-right-color: rgba(255, 255, 255, 0.08) !important;
    }
    body:not(.light-mode) .mobile-header {
        background: rgba(28, 28, 30, 0.95) !important;
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    }
    body:not(.light-mode) .sidebar-header {
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    }
}

/* ==================== 主题切换按钮样式 ==================== */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(142, 142, 147, 0.12);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #86868B;
}

.theme-toggle-btn:hover {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
}

body.dark-mode .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #8E8E93;
}

body.dark-mode .theme-toggle-btn:hover {
    background: rgba(0, 122, 255, 0.2);
    color: #007AFF;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .theme-toggle-btn {
        background: rgba(255, 255, 255, 0.1);
        color: #8E8E93;
    }
    body:not(.light-mode) .theme-toggle-btn:hover {
        background: rgba(0, 122, 255, 0.2);
        color: #007AFF;
    }
}

/* ==================== 平滑过渡动画 ==================== */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.ios-card,
.glass-card,
.input-ios,
.sidebar,
.mobile-header {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ============================================
   间距系统 (基于 8px 倍数)
   ============================================ */

.ios-spacer-xs { gap: 4px; }
.ios-spacer-sm { gap: 8px; }
.ios-spacer-md { gap: 16px; }
.ios-spacer-lg { gap: 24px; }
.ios-spacer-xl { gap: 32px; }

/* ============================================
   表格/列表样式
   ============================================ */

.ios-list-item {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.ios-list-item:hover {
    background-color: rgba(0, 122, 255, 0.04);
}

.ios-list-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.05);
    margin: 0 16px;
}

/* ============================================
   工具类
   ============================================ */

.ios-shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

.ios-shadow-md {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.ios-shadow-lg {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}

/* ============================================
   Tailwind 类深色模式完整映射
   确保所有常用的 Tailwind 颜色类在深色模式下正常工作
   ============================================ */

/* 背景色映射 */
body.dark-mode .bg-gray-200 { background-color: #2C2C2E !important; }
body.dark-mode .bg-gray-300 { background-color: #3A3A3C !important; }
body.dark-mode .bg-blue-50 { background-color: rgba(0, 122, 255, 0.1) !important; }
body.dark-mode .bg-blue-100 { background-color: rgba(0, 122, 255, 0.15) !important; }
body.dark-mode .bg-green-50 { background-color: rgba(52, 199, 89, 0.1) !important; }
body.dark-mode .bg-green-100 { background-color: rgba(52, 199, 89, 0.15) !important; }
body.dark-mode .bg-red-50 { background-color: rgba(255, 59, 48, 0.1) !important; }
body.dark-mode .bg-red-100 { background-color: rgba(255, 59, 48, 0.15) !important; }
body.dark-mode .bg-orange-50 { background-color: rgba(255, 149, 0, 0.1) !important; }
body.dark-mode .bg-orange-100 { background-color: rgba(255, 149, 0, 0.15) !important; }
body.dark-mode .bg-yellow-50 { background-color: rgba(255, 204, 0, 0.1) !important; }
body.dark-mode .bg-yellow-100 { background-color: rgba(255, 204, 0, 0.15) !important; }
body.dark-mode .bg-purple-50 { background-color: rgba(88, 86, 214, 0.1) !important; }
body.dark-mode .bg-purple-100 { background-color: rgba(88, 86, 214, 0.15) !important; }

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .bg-gray-200 { background-color: #2C2C2E !important; }
    body:not(.light-mode) .bg-gray-300 { background-color: #3A3A3C !important; }
    body:not(.light-mode) .bg-blue-50 { background-color: rgba(0, 122, 255, 0.1) !important; }
    body:not(.light-mode) .bg-blue-100 { background-color: rgba(0, 122, 255, 0.15) !important; }
    body:not(.light-mode) .bg-green-50 { background-color: rgba(52, 199, 89, 0.1) !important; }
    body:not(.light-mode) .bg-green-100 { background-color: rgba(52, 199, 89, 0.15) !important; }
    body:not(.light-mode) .bg-red-50 { background-color: rgba(255, 59, 48, 0.1) !important; }
    body:not(.light-mode) .bg-red-100 { background-color: rgba(255, 59, 48, 0.15) !important; }
    body:not(.light-mode) .bg-orange-50 { background-color: rgba(255, 149, 0, 0.1) !important; }
    body:not(.light-mode) .bg-orange-100 { background-color: rgba(255, 149, 0, 0.15) !important; }
    body:not(.light-mode) .bg-yellow-50 { background-color: rgba(255, 204, 0, 0.1) !important; }
    body:not(.light-mode) .bg-yellow-100 { background-color: rgba(255, 204, 0, 0.15) !important; }
    body:not(.light-mode) .bg-purple-50 { background-color: rgba(88, 86, 214, 0.1) !important; }
    body:not(.light-mode) .bg-purple-100 { background-color: rgba(88, 86, 214, 0.15) !important; }
}

/* 文字颜色映射 */
body.dark-mode .text-gray-600 { color: #AEAEB2 !important; }
body.dark-mode .text-gray-700 { color: #C7C7CC !important; }
body.dark-mode .text-blue-500 { color: #0A84FF !important; }
body.dark-mode .text-blue-600 { color: #007AFF !important; }
body.dark-mode .text-blue-700 { color: #0066CC !important; }
body.dark-mode .text-blue-900 { color: #0051A3 !important; }
body.dark-mode .text-green-500 { color: #30D158 !important; }
body.dark-mode .text-green-600 { color: #34C759 !important; }
body.dark-mode .text-green-700 { color: #28A745 !important; }
body.dark-mode .text-red-500 { color: #FF453A !important; }
body.dark-mode .text-red-600 { color: #FF3B30 !important; }
body.dark-mode .text-red-700 { color: #CC0000 !important; }
body.dark-mode .text-red-900 { color: #990000 !important; }
body.dark-mode .text-orange-500 { color: #FF9F0A !important; }
body.dark-mode .text-orange-600 { color: #FF9500 !important; }
body.dark-mode .text-yellow-500 { color: #FFD60A !important; }
body.dark-mode .text-yellow-600 { color: #FFCC00 !important; }
body.dark-mode .text-purple-500 { color: #BF5AF2 !important; }
body.dark-mode .text-purple-600 { color: #5856D6 !important; }
body.dark-mode .text-purple-700 { color: #5E5CE6 !important; }

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .text-gray-600 { color: #AEAEB2 !important; }
    body:not(.light-mode) .text-gray-700 { color: #C7C7CC !important; }
    body:not(.light-mode) .text-blue-500 { color: #0A84FF !important; }
    body:not(.light-mode) .text-blue-600 { color: #007AFF !important; }
    body:not(.light-mode) .text-blue-700 { color: #0066CC !important; }
    body:not(.light-mode) .text-blue-900 { color: #0051A3 !important; }
    body:not(.light-mode) .text-green-500 { color: #30D158 !important; }
    body:not(.light-mode) .text-green-600 { color: #34C759 !important; }
    body:not(.light-mode) .text-green-700 { color: #28A745 !important; }
    body:not(.light-mode) .text-red-500 { color: #FF453A !important; }
    body:not(.light-mode) .text-red-600 { color: #FF3B30 !important; }
    body:not(.light-mode) .text-red-700 { color: #CC0000 !important; }
    body:not(.light-mode) .text-red-900 { color: #990000 !important; }
    body:not(.light-mode) .text-orange-500 { color: #FF9F0A !important; }
    body:not(.light-mode) .text-orange-600 { color: #FF9500 !important; }
    body:not(.light-mode) .text-yellow-500 { color: #FFD60A !important; }
    body:not(.light-mode) .text-yellow-600 { color: #FFCC00 !important; }
    body:not(.light-mode) .text-purple-500 { color: #BF5AF2 !important; }
    body:not(.light-mode) .text-purple-600 { color: #5856D6 !important; }
    body:not(.light-mode) .text-purple-700 { color: #5E5CE6 !important; }
}

/* 边框颜色映射 */
body.dark-mode .border-gray-300 { border-color: #3A3A3C !important; }

@media (prefers-color-scheme: dark) {
    body:not(.light-mode) .border-gray-300 { border-color: #3A3A3C !important; }
}

/* ============================================
   字体大小工具类（规范化）
   替代硬编码的 text-[10px] 等写法
   ============================================ */

.text-xxs { font-size: var(--font-size-xxs); line-height: 1.4; } /* 10px */
.text-xs-custom { font-size: 11px; line-height: 1.5; } /* 11px */
.text-xs-tight { font-size: var(--font-size-xs); line-height: 1.4; } /* 12px */

/* ============================================
   后台壳层统一样式
   ============================================ */

body.admin-shell {
    background-color: var(--bg-primary) !important;
    color: var(--color-primary) !important;
}

body.admin-shell .sidebar,
body.admin-shell .mobile-header,
body.admin-shell .sidebar-header {
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

body.admin-shell .ios-card,
body.admin-shell .table-responsive,
body.admin-shell .bg-white.border,
body.admin-shell .bg-white.border.border-gray-200,
body.admin-shell .bg-white.border.border-gray-200.rounded-xl,
body.admin-shell .bg-white.border.border-gray-200.rounded-xl.shadow-sm {
    background: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    box-shadow: var(--shadow-md) !important;
}

body.admin-shell .bg-white,
body.admin-shell .bg-gray-50,
body.admin-shell .bg-gray-50\/50,
body.admin-shell .bg-gray-100,
body.admin-shell .bg-gray-100\/50 {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.admin-shell .bg-white {
    background-color: var(--bg-card) !important;
}

body.admin-shell .bg-gray-50,
body.admin-shell .bg-gray-50\/50,
body.admin-shell .bg-gray-100,
body.admin-shell .bg-gray-100\/50 {
    background-color: var(--bg-tertiary) !important;
}

body.admin-shell .border,
body.admin-shell .border-gray-100,
body.admin-shell .border-gray-200,
body.admin-shell .border-gray-300 {
    border-color: var(--border-light) !important;
}

body.admin-shell .text-gray-900,
body.admin-shell .text-gray-800,
body.admin-shell .text-gray-700 {
    color: var(--color-primary) !important;
}

body.admin-shell .text-gray-600,
body.admin-shell .text-gray-500 {
    color: var(--color-secondary) !important;
}

body.admin-shell .text-gray-400,
body.admin-shell .text-gray-300 {
    color: var(--color-tertiary) !important;
}

body.admin-shell .shadow-sm,
body.admin-shell .shadow-lg,
body.admin-shell .shadow-xl,
body.admin-shell .shadow-2xl,
body.admin-shell .shadow-blue-100,
body.admin-shell .shadow-purple-100 {
    box-shadow: var(--shadow-md) !important;
}

body.admin-shell .input-ios,
body.admin-shell input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.admin-shell select,
body.admin-shell textarea {
    background-color: rgba(142, 142, 147, 0.12) !important;
    border-color: var(--border-light) !important;
    color: var(--color-primary) !important;
}

body.admin-shell input::placeholder,
body.admin-shell textarea::placeholder {
    color: var(--color-tertiary) !important;
}

body.admin-shell .theme-toggle-btn,
body.admin-shell .menu-btn {
    background: rgba(142, 142, 147, 0.12);
    color: var(--color-secondary);
}

.admin-page-title {
    color: var(--color-primary) !important;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.admin-page-subtitle {
    color: var(--color-secondary) !important;
    margin-top: 8px;
}

.admin-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.admin-toolbar-btn-primary {
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%) !important;
    color: #FFFFFF !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.18);
}

.admin-toolbar-btn-primary:hover {
    transform: translateY(-1px);
}

.admin-toolbar-btn-secondary {
    background: var(--bg-card) !important;
    color: var(--color-primary) !important;
}

.admin-toolbar-btn-danger {
    background: rgba(255, 59, 48, 0.08) !important;
    color: #FF3B30 !important;
    border-color: rgba(255, 59, 48, 0.12) !important;
}

.admin-toolbar-btn-accent {
    background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%) !important;
    color: #FFFFFF !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.18);
}

.admin-stat-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 24px !important;
    box-shadow: var(--shadow-md) !important;
}

.admin-stat-value {
    color: var(--color-primary) !important;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
}

.admin-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--color-secondary);
    transition: all 0.2s ease;
}

.admin-back-btn:hover {
    color: #007AFF;
    border-color: rgba(0, 122, 255, 0.22);
    background: rgba(0, 122, 255, 0.08);
}

.admin-empty-state {
    background: var(--bg-card) !important;
    border: 1px dashed var(--border-medium) !important;
    border-radius: 24px !important;
    color: var(--color-secondary) !important;
}

.ui-modal-active,
.admin-modal-active {
    display: flex !important;
    padding: 20px;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1080;
}

.ui-modal-active > div > div,
.admin-modal-active > div > div {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 24px !important;
    box-shadow: var(--shadow-xl) !important;
}

.ui-modal-active .bg-gray-50,
.ui-modal-active .bg-gray-50\/50,
.ui-modal-active .bg-blue-50,
.ui-modal-active .bg-blue-50\/50,
.ui-modal-active .bg-purple-50,
.ui-modal-active .bg-purple-50\/50,
.admin-modal-active .bg-gray-50,
.admin-modal-active .bg-gray-50\/50,
.admin-modal-active .bg-blue-50,
.admin-modal-active .bg-blue-50\/50,
.admin-modal-active .bg-purple-50,
.admin-modal-active .bg-purple-50\/50 {
    background-color: var(--bg-tertiary) !important;
}

.ui-modal-active .border-blue-100,
.ui-modal-active .border-purple-100,
.ui-modal-active .border-blue-400,
.ui-modal-active .border-purple-400,
.admin-modal-active .border-blue-100,
.admin-modal-active .border-purple-100,
.admin-modal-active .border-blue-400,
.admin-modal-active .border-purple-400 {
    border-color: var(--border-light) !important;
}

body.admin-shell .custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

body.admin-shell .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(142, 142, 147, 0.3);
    border-radius: 9999px;
}

body.admin-shell.dark-mode .admin-toolbar-btn-secondary,
body.admin-shell.dark-mode .admin-back-btn {
    background: var(--bg-secondary) !important;
}

body.admin-shell.dark-mode .ui-modal-active,
body.admin-shell.dark-mode .admin-modal-active {
    background: rgba(0, 0, 0, 0.52);
}

/* ============================================
   Admin View Unified Layout
   ============================================ */

.admin-view-shell {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-view-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.admin-view-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.admin-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 24px;
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.admin-section-card-soft {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: 24px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.admin-table-card {
    overflow: hidden;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.admin-kpi-card {
    padding: 22px;
}

.admin-kpi-label {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-kpi-hint {
    margin-top: 8px;
    color: var(--color-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.admin-inline-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 700;
}

.admin-feedback-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-medium);
    font-size: 14px;
    font-weight: 600;
}

.admin-feedback-banner.is-success {
    background: rgba(52, 199, 89, 0.10);
    border-color: rgba(52, 199, 89, 0.18);
    color: #1f9d55;
}

.admin-feedback-banner.is-error {
    background: rgba(255, 59, 48, 0.10);
    border-color: rgba(255, 59, 48, 0.18);
    color: #d93025;
}

.admin-feedback-banner.is-info {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.16);
    color: #0b63ce;
}

.admin-meta-card {
    padding: 18px 20px;
}

.admin-meta-title {
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 700;
}

.admin-meta-text {
    margin-top: 6px;
    color: var(--color-secondary);
    font-size: 13px;
    line-height: 1.65;
}

.admin-modal-panel {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: 24px !important;
    box-shadow: var(--shadow-xl), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
    overflow: hidden;
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    background: color-mix(in srgb, var(--bg-tertiary) 70%, transparent);
}

.admin-modal-title {
    color: var(--color-primary);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.admin-modal-body {
    padding: 20px;
}

.admin-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--color-tertiary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.admin-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--color-primary);
}

.admin-form-section {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid var(--border-medium);
}

.admin-form-section.is-blue {
    background: rgba(0, 122, 255, 0.06);
    border-color: rgba(0, 122, 255, 0.12);
}

.admin-form-section.is-purple {
    background: rgba(124, 58, 237, 0.06);
    border-color: rgba(124, 58, 237, 0.12);
}

.admin-form-section.is-neutral {
    background: color-mix(in srgb, var(--bg-tertiary) 80%, transparent);
}

.admin-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
}

.admin-form-section.is-blue .admin-form-section-title {
    color: #0b63ce;
}

.admin-form-section.is-purple .admin-form-section-title {
    color: #6d28d9;
}

.admin-form-section.is-neutral .admin-form-section-title {
    color: var(--color-primary);
}

.admin-form-section-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(0, 122, 255, 0.12);
    background: rgba(255, 255, 255, 0.68);
    color: #0b63ce;
    font-size: 12px;
    line-height: 1.7;
}

.admin-callout-card {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid var(--border-medium);
}

.admin-callout-card.is-blue {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.14);
    color: #0b63ce;
}

.admin-callout-card.is-purple {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.14);
    color: #6d28d9;
}

.admin-callout-card.is-red {
    background: rgba(255, 59, 48, 0.08);
    border-color: rgba(255, 59, 48, 0.14);
    color: #d93025;
}

.admin-callout-card p,
.admin-callout-card div {
    line-height: 1.7;
}

.admin-command-shell {
    position: relative;
    padding: 16px 18px;
    border-radius: 20px;
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.admin-command-code {
    color: #60a5fa;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.7;
    word-break: break-all;
}

.admin-command-copy {
    position: absolute;
    top: 10px;
    right: 10px;
}

.admin-inline-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-tertiary);
    background: transparent;
    transition: all 0.2s ease;
}

.admin-inline-icon-btn:hover {
    background: var(--bg-tertiary);
}

.admin-inline-icon-btn.is-blue:hover {
    color: #0b63ce;
}

.admin-inline-icon-btn.is-red:hover {
    color: #d93025;
}

.admin-inline-icon-btn.is-indigo:hover {
    color: #5856d6;
}

.admin-inline-text-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--color-secondary);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.admin-inline-text-btn:hover {
    background: var(--bg-tertiary);
}

.admin-inline-text-btn.is-blue:hover {
    color: #0b63ce;
}

.admin-inline-text-btn.is-red:hover {
    color: #d93025;
}

.admin-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-status-chip.is-blue {
    background: rgba(0, 122, 255, 0.10);
    color: #0b63ce;
}

.admin-status-chip.is-green {
    background: rgba(52, 199, 89, 0.12);
    color: #1f9d55;
}

.admin-status-chip.is-red {
    background: rgba(255, 59, 48, 0.12);
    color: #d93025;
}

.admin-status-chip.is-yellow {
    background: rgba(255, 149, 0, 0.14);
    color: #b46800;
}

.admin-status-chip.is-orange {
    background: rgba(255, 149, 0, 0.14);
    color: #c56a00;
}

.admin-status-chip.is-gray {
    background: rgba(142, 142, 147, 0.14);
    color: var(--color-secondary);
}

.admin-status-orb {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.admin-status-orb.is-green {
    background: rgba(52, 199, 89, 0.12);
    color: #1f9d55;
}

.admin-status-orb.is-red {
    background: rgba(255, 59, 48, 0.12);
    color: #d93025;
}

.admin-status-orb.is-gray {
    background: rgba(142, 142, 147, 0.14);
    color: var(--color-secondary);
}

.admin-list-card {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
}

.admin-list-card.is-active {
    background: rgba(0, 122, 255, 0.06);
    border-color: rgba(0, 122, 255, 0.12);
}

.admin-list-card.is-neutral {
    background: color-mix(in srgb, var(--bg-tertiary) 74%, transparent);
}

.admin-table-shell table thead {
    background: var(--bg-tertiary);
}

.admin-table-shell table thead th {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-table-shell table tbody tr {
    background: transparent;
    transition: background-color 0.2s ease;
}

.admin-table-shell table tbody tr:hover {
    background: rgba(0, 122, 255, 0.04);
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.monitor-grid-shell {
    padding: 22px;
    border-radius: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.monitor-title-card {
    padding: 22px 24px;
    border-radius: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.monitor-grid-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.monitor-grid-title {
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 800;
}

.monitor-grid-note {
    margin-top: 6px;
    color: var(--color-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.monitor-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.monitor-summary-card {
    padding: 20px 22px;
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.monitor-summary-label {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.monitor-summary-value {
    margin-top: 10px;
    color: var(--color-primary);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.monitor-summary-hint {
    margin-top: 8px;
    color: var(--color-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.monitor-node-card {
    padding: 22px;
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.monitor-node-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.monitor-node-card.is-muted {
    opacity: 0.62;
    filter: grayscale(1);
    border-color: rgba(255, 59, 48, 0.16);
}

.monitor-node-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.monitor-node-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.monitor-node-title {
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
}

.monitor-node-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.monitor-node-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    color: var(--color-secondary);
    font-size: 11px;
    font-weight: 700;
}

.monitor-node-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.monitor-node-link {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #0b63ce;
    font-size: 11px;
    font-weight: 700;
}

.monitor-node-link:hover {
    text-decoration: underline;
}

.monitor-node-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.monitor-mini-stat {
    padding: 12px 14px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg-tertiary) 82%, transparent);
    border: 1px solid var(--border-medium);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.monitor-mini-stat-label {
    color: var(--color-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.monitor-mini-stat-value {
    margin-top: 8px;
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.monitor-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.sparkline-container {
    height: 168px;
}

.sparkline-container canvas,
.telemetry-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.monitor-node-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.monitor-node-pill.is-online {
    background: rgba(52, 199, 89, 0.12);
    color: #1f9d55;
}

.monitor-node-pill.is-offline {
    background: rgba(255, 59, 48, 0.12);
    color: #d93025;
}

.monitor-node-pill.is-unknown {
    background: rgba(142, 142, 147, 0.14);
    color: var(--color-secondary);
}

.monitor-metric-shell {
    padding: 14px 16px;
    border-radius: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.monitor-node-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-medium);
}

.public-monitor-page {
    min-height: 100vh;
    background: var(--bg-primary);
}

.public-monitor-shell {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px;
}

.public-monitor-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 14px;
    padding: 8px 2px 8px;
    border-bottom: 1px solid var(--border-light);
    min-width: 0;
}

.public-monitor-title-text {
    margin: 0;
    line-height: 1.1;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    letter-spacing: -0.025em;
}

.public-monitor-header-logo {
    flex: 0 0 auto;
    transform: translateY(-1px);
}

.time-display {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", monospace;
    font-size: 13px;
    color: var(--color-secondary);
    font-weight: 700;
}

.public-monitor-sync-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
    margin-left: auto;
    flex: 0 0 auto;
    padding-left: 8px;
}

.public-monitor-sync-inline-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-tertiary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.public-monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.public-monitor-node-card {
    display: block;
    padding: 10px;
    border-radius: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    color: inherit;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.public-monitor-node-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    border-color: rgba(0, 122, 255, 0.18);
}

.public-monitor-node-card.is-muted {
    opacity: 0.68;
    border-color: rgba(255, 59, 48, 0.16);
}

.public-monitor-node-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.public-monitor-node-title {
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.public-monitor-node-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.public-monitor-kpi-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.public-monitor-kpi-item,
.public-monitor-chart-panel {
    padding: 8px 10px;
    border-radius: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.public-monitor-kpi-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.public-monitor-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.public-monitor-chart-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.public-monitor-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(142, 142, 147, 0.12);
    border: 1px solid var(--border-medium);
    color: var(--color-secondary);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.public-monitor-legend-item::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    display: inline-block;
}

.public-monitor-legend-item.is-cpu::before {
    background: #007AFF;
}

.public-monitor-legend-item.is-memory::before {
    background: #34C759;
}

.public-monitor-chart-note {
    color: var(--color-secondary);
    font-size: 10px;
    font-weight: 700;
}

.public-monitor-sparkline {
    height: 120px;
}

.public-monitor-sparkline canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.public-monitor-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.public-monitor-footer-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.08);
}

.telemetry-page {
    min-height: 100vh;
    background: var(--bg-primary);
}

.telemetry-shell {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.telemetry-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-sm);
    color: var(--color-secondary);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.telemetry-back-link i,
.telemetry-meta-pill i,
.theme-toggle-btn i {
    width: 16px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
    flex: 0 0 auto;
}

.telemetry-back-link:hover {
    color: #0b63ce;
    border-color: rgba(0, 122, 255, 0.16);
}

.telemetry-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
    gap: 20px;
    margin: 20px 0 24px;
}

.telemetry-hero-card,
.telemetry-status-card,
.telemetry-kpi-card,
.telemetry-chart-card,
.telemetry-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.telemetry-hero-card,
.telemetry-status-card,
.telemetry-chart-card,
.telemetry-panel {
    border-radius: 28px;
}

.telemetry-hero-card {
    padding: 26px 28px;
    background:
        radial-gradient(circle at top left, rgba(0, 122, 255, 0.10), transparent 32%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.08), transparent 26%),
        var(--bg-card);
}

.telemetry-status-card {
    padding: 22px 24px;
}

.telemetry-eyebrow {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.telemetry-title {
    margin-top: 12px;
    color: var(--color-primary);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.1;
}

.telemetry-subtitle {
    margin-top: 10px;
    color: var(--color-secondary);
    font-size: 13px;
    line-height: 1.7;
    font-family: Consolas, Monaco, monospace;
}

.telemetry-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.telemetry-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 700;
}

.telemetry-status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.telemetry-status-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-medium);
}

.telemetry-status-label {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.telemetry-status-value {
    margin-top: 10px;
    color: var(--color-primary);
    font-size: 22px;
    font-weight: 800;
}

.telemetry-status-hint {
    margin-top: 8px;
    color: var(--color-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.telemetry-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.telemetry-kpi-card {
    border-radius: 24px;
    padding: 20px 22px;
}

.telemetry-kpi-label {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.telemetry-kpi-value {
    margin-top: 12px;
    color: var(--color-primary);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    font-family: Consolas, Monaco, monospace;
}

.telemetry-kpi-hint {
    margin-top: 8px;
    color: var(--color-secondary);
    font-size: 12px;
    line-height: 1.6;
}

.telemetry-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.95fr);
    gap: 20px;
}

.telemetry-main-stack,
.telemetry-side-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.telemetry-chart-card {
    padding: 22px 24px;
}

.telemetry-chart-card.is-large {
    min-height: 430px;
}

.telemetry-chart-card.is-medium {
    min-height: 340px;
}

.telemetry-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.telemetry-card-title {
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 800;
}

.telemetry-card-note {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 700;
}

.telemetry-chart-wrap {
    height: 280px;
    min-height: 280px;
}

.telemetry-chart-card.is-large .telemetry-chart-wrap {
    height: 340px;
    min-height: 340px;
}

.telemetry-chart-card.is-medium .telemetry-chart-wrap {
    height: 250px;
    min-height: 250px;
}

.telemetry-panel {
    padding: 22px 24px;
}

.telemetry-disk-list,
.telemetry-process-table-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.telemetry-disk-card {
    padding: 14px 16px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--bg-tertiary) 82%, transparent);
    border: 1px solid var(--border-medium);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.telemetry-disk-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
}

.telemetry-progress {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(142, 142, 147, 0.14);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.telemetry-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    transition: width 0.5s ease;
}

.telemetry-disk-meta {
    margin-top: 10px;
    color: var(--color-secondary);
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
}

.telemetry-process-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.telemetry-process-table thead th {
    padding: 0 0 10px;
    color: var(--color-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-medium);
}

.telemetry-process-table tbody tr {
    transition: background-color 0.2s ease;
}

.telemetry-process-table tbody tr:hover {
    background: rgba(0, 122, 255, 0.04);
}

.telemetry-process-table tbody td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--color-secondary);
    font-family: Consolas, Monaco, monospace;
}

.telemetry-process-name {
    color: var(--color-primary);
    font-weight: 700;
}

.telemetry-process-cpu {
    color: #0b63ce;
    font-weight: 700;
}

.telemetry-empty-note {
    padding: 18px;
    border-radius: 20px;
    border: 1px dashed var(--border-medium);
    background: color-mix(in srgb, var(--bg-tertiary) 76%, transparent);
    color: var(--color-secondary);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 1280px) {
    .admin-kpi-grid,
    .telemetry-kpi-grid,
    .monitor-summary-grid,
    .monitor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .telemetry-hero,
    .telemetry-layout {
        grid-template-columns: 1fr;
    }

    .public-monitor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-view-shell {
        gap: 16px;
    }

    .admin-view-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .admin-page-title {
        font-size: 1.4rem;
    }

    .admin-page-subtitle {
        font-size: 13px;
        line-height: 1.6;
    }

    .admin-view-actions {
        width: 100%;
        align-items: stretch;
        gap: 10px;
    }

    .admin-view-actions > * {
        width: 100%;
        min-width: 0 !important;
    }

    .admin-view-actions .admin-toolbar-btn,
    .admin-view-actions .admin-inline-pill,
    .admin-view-actions select,
    .admin-view-actions input {
        width: 100%;
        justify-content: center;
    }

    .admin-section-card,
    .admin-section-card-soft,
    .admin-modal-panel {
        border-radius: 20px !important;
    }

    .admin-kpi-card,
    .admin-meta-card,
    .admin-form-section,
    .admin-modal-body,
    .admin-modal-header {
        padding: 16px;
    }

    .admin-stat-value {
        font-size: 1.55rem;
    }

    .admin-table-card,
    .admin-table-shell,
    .table-responsive,
    .telemetry-process-table-shell {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table-shell table,
    .telemetry-process-table {
        min-width: 640px;
    }

    .admin-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .admin-modal-actions > * {
        width: 100%;
    }

    .admin-modal-header {
        align-items: flex-start;
    }

    .admin-modal-title {
        font-size: 1rem;
    }

    .admin-view-shell .grid.grid-cols-12,
    .admin-view-shell .grid.grid-cols-3,
    .admin-view-shell .grid.grid-cols-2,
    .admin-view-shell .grid.lg\:grid-cols-12 {
        grid-template-columns: 1fr !important;
    }

    .admin-view-shell [class*="max-w-"] {
        max-width: 100% !important;
    }

    .admin-view-shell .col-span-2,
    .admin-view-shell .col-span-3,
    .admin-view-shell .col-span-4,
    .admin-view-shell .col-span-5,
    .admin-view-shell .col-span-6,
    .admin-view-shell .col-span-7,
    .admin-view-shell .col-span-8,
    .admin-view-shell .col-span-9,
    .admin-view-shell .col-span-10,
    .admin-view-shell .col-span-11,
    .admin-view-shell .col-span-12 {
        grid-column: span 1 / span 1 !important;
    }

    .admin-kpi-grid,
    .telemetry-kpi-grid,
    .monitor-summary-grid,
    .monitor-grid,
    .public-monitor-grid {
        grid-template-columns: 1fr;
    }

    .monitor-chart-grid,
    .monitor-node-mini-grid {
        grid-template-columns: 1fr;
    }

    .public-monitor-shell {
        padding: 16px;
    }

    .public-monitor-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
        padding: 16px 0 16px;
        border-radius: 0;
        flex-wrap: nowrap;
    }

    .public-monitor-header-logo {
        width: 60px !important;
        height: 60px !important;
        transform: none;
    }

    .public-monitor-header-logo svg {
        width: 30px !important;
        height: 30px !important;
    }

    .public-monitor-title-text {
        font-size: 1.28rem;
        line-height: 1.15;
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .public-monitor-footer,
    .public-monitor-node-head {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .public-monitor-sync-inline {
        gap: 4px;
        max-width: 144px;
        overflow: hidden;
        padding-left: 12px;
        flex: 0 0 auto;
    }

    .public-monitor-grid {
        gap: 12px;
    }

    .public-monitor-node-card {
        padding: 8px;
        border-radius: 16px;
    }

    .public-monitor-node-head {
        gap: 8px;
        margin-bottom: 6px;
        align-items: center;
        justify-content: space-between;
    }

    .public-monitor-node-title {
        font-size: 14px;
        letter-spacing: -0.02em;
    }

    .public-monitor-node-head .monitor-node-pill {
        padding: 2px 6px;
        font-size: 8px;
        gap: 4px;
    }

    .public-monitor-kpi-strip {
        gap: 6px;
        margin-bottom: 6px;
    }

    .public-monitor-chart-panel {
        padding: 6px 8px;
        border-radius: 12px;
    }

    .public-monitor-chart-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        margin-bottom: 4px;
    }

    .public-monitor-chart-head > .metric-label {
        font-size: 9px;
        letter-spacing: 0.04em;
    }

    .public-monitor-chart-meta {
        justify-content: flex-end;
        gap: 4px;
        flex: 0 0 auto;
    }

    .public-monitor-legend-item {
        min-height: 18px;
        padding: 0 5px;
        font-size: 9px;
        gap: 4px;
        border: 1px solid var(--border-light);
        background: rgba(148, 163, 184, 0.08);
        color: var(--color-secondary);
        font-weight: 700;
        letter-spacing: 0.02em;
    }

    .public-monitor-legend-item::before {
        width: 5px;
        height: 5px;
    }

    .public-monitor-chart-note {
        display: none;
    }

    .public-monitor-sparkline {
        height: 100px;
    }

    .public-monitor-footer {
        margin-top: 6px;
        padding-top: 6px;
        gap: 6px;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }



    .time-display {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .public-monitor-sync-inline-label {
        display: none;
    }

    .telemetry-title {
        font-size: 1.75rem;
    }

    .telemetry-status-head,
    .telemetry-card-head,
    .monitor-node-header,
    .monitor-node-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .telemetry-chart-card.is-large .telemetry-chart-wrap,
    .telemetry-chart-card.is-medium .telemetry-chart-wrap {
        height: 240px;
    }

    .monitor-node-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .admin-view-shell {
        gap: 14px;
    }

    .admin-page-title {
        font-size: 1.25rem;
    }

    .admin-toolbar-btn,
    .admin-inline-pill {
        min-height: 40px;
        padding-left: 14px;
        padding-right: 14px;
        font-size: 13px;
    }

    .admin-kpi-card,
    .admin-meta-card,
    .admin-form-section,
    .admin-modal-body,
    .admin-modal-header,
    .public-monitor-shell,
    .telemetry-shell {
        padding: 14px;
    }

    .public-monitor-header {
        gap: 6px;
        margin-bottom: 6px;
        padding: 12px 0 12px;
        flex-wrap: nowrap;
    }

    .public-monitor-header-logo {
        width: 52px !important;
        height: 52px !important;
    }

    .public-monitor-header-logo svg {
        width: 28px !important;
        height: 28px !important;
    }

    .public-monitor-title-text {
        font-size: 1.16rem;
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .public-monitor-sync-inline {
        max-width: 112px;
        padding-left: 10px;
        flex: 0 0 auto;
    }

    .public-monitor-sync-inline-label {
        display: none;
    }

    .time-display {
        font-size: 14px;
    }

    .theme-toggle-btn {
        width: 56px;
        height: 56px;
        min-width: 56px;
        border-radius: 18px;
    }

    .theme-toggle-btn i {
        font-size: 22px;
        width: 22px;
        min-width: 22px;
    }

    .public-monitor-node-card {
        padding: 8px;
        border-radius: 16px;
    }

    .public-monitor-node-head {
        gap: 8px;
        margin-bottom: 6px;
        align-items: center;
        justify-content: space-between;
    }

    .public-monitor-node-title {
        font-size: 13px;
    }

    .public-monitor-node-head .monitor-node-pill {
        padding: 2px 5px;
        font-size: 8px;
        gap: 4px;
    }

    .public-monitor-kpi-strip {
        gap: 6px;
        margin-bottom: 6px;
    }

    .public-monitor-chart-panel {
        padding: 6px;
        border-radius: 12px;
    }

    .public-monitor-sparkline {
        height: 90px;
    }

    .public-monitor-chart-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        margin-bottom: 4px;
    }

    .public-monitor-chart-meta {
        gap: 4px;
    }

    .public-monitor-legend-item {
        min-height: 18px;
        padding: 0 5px;
        font-size: 9px;
        gap: 4px;
        border: 1px solid var(--border-light);
        background: rgba(148, 163, 184, 0.08);
    }

    .public-monitor-legend-item::before {
        width: 5px;
        height: 5px;
    }

    .public-monitor-footer {
        margin-top: 6px;
        padding-top: 6px;
        gap: 6px;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .public-monitor-footer-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        min-height: 28px;
        padding: 0 6px;
        border-radius: 10px;
        background: rgba(148, 163, 184, 0.08);
    }

    .telemetry-title {
        font-size: 1.5rem;
    }

    .telemetry-kpi-value,
    .admin-stat-value {
        font-size: 1.4rem;
    }
}

/* ============================================
   Dashboard Unified Cards
   ============================================ */

.dashboard-shell {
    --dashboard-card-radius: 24px;
    --dashboard-card-padding: 20px;
    --dashboard-card-border: 1px solid var(--border-medium);
    --dashboard-card-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    --dashboard-subcard-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-hero {
    padding: var(--dashboard-card-padding);
    border-radius: var(--dashboard-card-radius);
    background:
        radial-gradient(circle at top left, rgba(0, 122, 255, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.12), transparent 30%),
        var(--bg-card);
    border: var(--dashboard-card-border);
    box-shadow: var(--dashboard-card-shadow);
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border-medium);
    color: var(--color-secondary);
    font-size: 13px;
    font-weight: 600;
}

.dashboard-alert-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-notice {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: var(--dashboard-card-radius);
    border: var(--dashboard-card-border);
    background: var(--bg-card);
    box-shadow: var(--dashboard-card-shadow);
}

.dashboard-notice-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.dashboard-notice-title {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 700;
}

.dashboard-notice-text {
    margin-top: 4px;
    color: var(--color-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.dashboard-notice-danger {
    background: rgba(255, 59, 48, 0.05);
    border-color: rgba(255, 59, 48, 0.12);
}

.dashboard-notice-danger .dashboard-notice-icon,
.dashboard-notice-danger .dashboard-notice-title {
    color: #FF3B30;
}

.dashboard-notice-info {
    background: rgba(0, 122, 255, 0.05);
    border-color: rgba(0, 122, 255, 0.12);
}

.dashboard-notice-info .dashboard-notice-icon,
.dashboard-notice-info .dashboard-notice-title {
    color: #007AFF;
}

.dashboard-notice-warn {
    background: rgba(255, 149, 0, 0.06);
    border-color: rgba(255, 149, 0, 0.14);
}

.dashboard-notice-warn .dashboard-notice-icon,
.dashboard-notice-warn .dashboard-notice-title {
    color: #FF9500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.95fr);
    gap: 24px;
}

.dashboard-panel {
    background: var(--bg-card);
    border: var(--dashboard-card-border);
    border-radius: var(--dashboard-card-radius);
    box-shadow: var(--dashboard-card-shadow);
}

.dashboard-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: var(--dashboard-card-padding) var(--dashboard-card-padding) 0;
}

.dashboard-panel-body {
    padding: var(--dashboard-card-padding);
}

.dashboard-status-card {
    padding: var(--dashboard-card-padding);
    border-radius: var(--dashboard-card-radius);
    background: var(--bg-card);
    border: var(--dashboard-card-border);
    color: var(--color-primary);
    box-shadow: var(--dashboard-card-shadow);
}

.dashboard-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border-medium);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-status-badge.is-active {
    color: #34C759;
    background: rgba(52, 199, 89, 0.08);
    border-color: rgba(52, 199, 89, 0.16);
}

.dashboard-status-badge.is-locked {
    color: #FF3B30;
    background: rgba(255, 59, 48, 0.08);
    border-color: rgba(255, 59, 48, 0.16);
}

.dashboard-status-title {
    margin-top: 14px;
    color: var(--color-primary);
    font-size: 1.4rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dashboard-status-text {
    margin-top: 10px;
    color: var(--color-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.dashboard-status-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-width: 280px;
}

.dashboard-status-meta-card {
    border-radius: var(--dashboard-card-radius);
    border: var(--dashboard-card-border);
    background: var(--bg-tertiary);
    padding: 14px;
    box-shadow: var(--dashboard-subcard-shadow);
}

.dashboard-status-meta-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-secondary);
}

.dashboard-status-meta-value {
    margin-top: 8px;
    color: var(--color-primary);
    font-size: 1.35rem;
    line-height: 1.1;
    font-weight: 700;
}

.dashboard-status-footer {
    margin-top: 16px;
    border-radius: var(--dashboard-card-radius);
    border: var(--dashboard-card-border);
    background: var(--bg-tertiary);
    padding: 14px 16px;
    color: var(--color-secondary);
    font-size: 13px;
    line-height: 1.7;
    box-shadow: var(--dashboard-subcard-shadow);
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-kpi-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--dashboard-card-radius) !important;
    background: var(--bg-card) !important;
    border: var(--dashboard-card-border) !important;
    box-shadow: var(--dashboard-card-shadow) !important;
}

.dashboard-kpi-card::after {
    content: '';
    position: absolute;
    inset: auto -15% -40% auto;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(0, 122, 255, 0.08);
}

.dashboard-kpi-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--color-primary);
}

.dashboard-kpi-subtext {
    margin-top: 8px;
    color: var(--color-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.dashboard-log-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-log-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 18px;
    border-radius: var(--dashboard-card-radius);
    border: var(--dashboard-card-border);
    background: var(--bg-tertiary);
    box-shadow: var(--dashboard-subcard-shadow);
}

.dashboard-log-item:last-child {
    padding-bottom: 16px;
    border-bottom: var(--dashboard-card-border);
}

.dashboard-side-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-side-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--dashboard-card-radius);
    background: var(--bg-tertiary);
    border: var(--dashboard-card-border);
    box-shadow: var(--dashboard-subcard-shadow);
}

.dashboard-command-card {
    background: #111827;
    border-radius: var(--dashboard-card-radius);
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--dashboard-subcard-shadow);
}

.dashboard-command-card code {
    display: block;
    color: #93c5fd;
    font-size: 13px;
    line-height: 1.8;
    word-break: break-all;
}

@media (max-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-status-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .public-monitor-title-block {
        min-width: 0;
    }

    .dashboard-hero,
    .dashboard-panel-body,
    .dashboard-status-card {
        padding: var(--dashboard-card-padding);
    }

    .dashboard-panel-header {
        padding: var(--dashboard-card-padding) var(--dashboard-card-padding) 0;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-status-meta {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .dashboard-hero-actions,
    .cron-detect-actions,
    .dashboard-command-head {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .dashboard-hero-actions .admin-toolbar-btn,
    .cron-detect-actions .admin-toolbar-btn,
    .dashboard-command-head .admin-inline-text-btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-notice,
    .dashboard-panel-header,
    .dashboard-side-row {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-notice > form,
    .dashboard-notice > button {
        width: 100%;
    }

    .dashboard-notice .btn-ios-text {
        justify-content: center;
    }
}
