/*
 * ========================================
 * admin.css - hzyuan 管理后台样式
 * ========================================
 * 使用说明：
 *   1. 本文件由 admin_hzyuan.php 内联样式拆分而来
 *   2. 需要配合对应页面的 body class 使用：
 *      - 403错误页   → <body class="error-page">
 *      - 登录页      → <body class="login-page">
 *      - 管理后台主页 → <body class="admin-page">
 *   3. 所有样式仅作用于管理后台相关页面，不影响前台
 * ========================================
 */

/* ==================== 全局重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== 403 禁止访问页面 ==================== */
body.error-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 32px;
    padding: 2.5rem;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-card h1 {
    color: #ef4444;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.error-card p {
    color: #334155;
    margin: 1rem 0;
    line-height: 1.6;
}

.ip-info {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 16px;
    margin: 1rem 0;
    font-family: monospace;
}

.btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    margin-top: 1rem;
}

.btn:hover {
    background: #5b67cd;
}

/* ==================== 登录页面 ==================== */
body.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border-radius: 32px;
    padding: 2.5rem;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.login-card h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-sub {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.login-card input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 60px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    margin-bottom: 1rem;
}

.login-card input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 60px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.login-card button:hover {
    background: rgba(255, 255, 255, 0.4);
}

.error {
    color: #ffb4a2;
    text-align: center;
    margin-bottom: 1rem;
}

/* ==================== 管理后台主界面 ==================== */
body.admin-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 2rem;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 顶部工具栏 */
.admin-header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h1 {
    font-size: 1.8rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info span {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(239, 68, 68, 0.6);
    padding: 6px 14px;
    border-radius: 40px;
}

.settings-btn {
    background: rgba(34, 197, 94, 0.8);
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
}

.settings-btn:hover {
    background: #16a34a;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.8);
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
}

.logout-btn:hover {
    background: #dc2626;
}

/* 消息提示条 */
.message-bar {
    background: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #0284c7;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.message-bar.error {
    border-left-color: #dc2626;
}

.message-bar.success {
    border-left-color: #22c55e;
}

/* ==================== 新增：骨架屏样式 ==================== */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-container {
    padding: 16px;
}

.skeleton-card {
    width: 100%;
    height: 100px;
    border-radius: 12px;
}

.skeleton-table-row {
    display: flex;
    gap: 16px;
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
}

.skeleton-table-cell {
    height: 20px;
    flex: 1;
    border-radius: 4px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex: none;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 0;
}

.skeleton-text-sm {
    height: 12px;
    width: 60%;
}

/* ==================== 新增：表单实时验证样式 ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.is-valid {
    border-color: #22c55e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-group input.is-invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.validation-message {
    font-size: 0.75rem;
    margin-top: 4px;
}

.validation-message.error {
    color: #ef4444;
}

.validation-message.success {
    color: #22c55e;
}

/* ==================== 新增：美观确认弹窗样式 ==================== */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.confirm-modal-content {
    background: white;
    border-radius: 24px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
}

.confirm-modal.show .confirm-modal-content {
    transform: scale(1);
}

.confirm-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.confirm-modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #1e293b;
}

.confirm-modal-content p {
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-btn {
    padding: 10px 24px;
    border-radius: 40px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-btn.cancel {
    background: #f1f5f9;
    color: #475569;
}

.confirm-btn.cancel:hover {
    background: #e2e8f0;
}

.confirm-btn.confirm {
    background: #ef4444;
    color: white;
}

.confirm-btn.confirm:hover {
    background: #dc2626;
}

.confirm-btn.confirm-success {
    background: #22c55e;
}

.confirm-btn.confirm-success:hover {
    background: #16a34a;
}

/* ==================== 新增：表格工具栏 ==================== */
.table-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

/* ==================== 新增：拖拽排序样式 ==================== */
.table-wrapper {
    overflow-x: auto;
    position: relative;
}

.drag-handle {
    cursor: grab;
    user-select: none;
    color: #94a3b8;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    transition: background 0.2s;
}

.drag-handle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
}

.drag-handle:active {
    cursor: grabbing;
}

.dragging {
    opacity: 0.5;
    background: #e2e8f0;
}

.drag-over {
    border-top: 2px solid #667eea;
}

.sortable-row {
    cursor: default;
    transition: background 0.2s;
}

.sortable-row:hover {
    background: rgba(102, 126, 234, 0.05);
}

.drag-col {
    width: 40px;
    text-align: center;
    cursor: grab;
    font-size: 1.2rem;
    color: #94a3b8;
}

.drag-col:active {
    cursor: grabbing;
}

/* 排序模式激活时的样式 */
.sort-mode-active .drag-col {
    cursor: grab;
    color: #667eea;
}

.sort-mode-active .sortable-row {
    cursor: move;
}

/* 排序按钮组 */
.sort-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.sort-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 6px;
    border-radius: 6px;
    color: #94a3b8;
    transition: all 0.2s;
}

.sort-btn:hover {
    background: #e2e8f0;
    color: #667eea;
}

/* ==================== 新增：批量操作栏 ==================== */
.batch-actions-bar {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid #e2e8f0;
}

.batch-actions-bar .selected-count {
    font-size: 0.85rem;
    color: #475569;
}

.batch-actions-bar .batch-buttons {
    display: flex;
    gap: 8px;
}

.batch-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.batch-btn.delete {
    background: #fee2e2;
    color: #ef4444;
}

.batch-btn.delete:hover {
    background: #ef4444;
    color: white;
}

.batch-btn.export {
    background: #e0e7ff;
    color: #4f46e5;
}

.batch-btn.export:hover {
    background: #4f46e5;
    color: white;
}

.batch-btn.import {
    background: #d1fae5;
    color: #059669;
}

.batch-btn.import:hover {
    background: #059669;
    color: white;
}

.batch-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #475569;
}

.batch-select-all input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 复选框列 */
.checkbox-col {
    width: 40px;
    text-align: center;
}

.checkbox-col input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ==================== 导入/导出模态框 ==================== */
.import-export-modal .modal-content {
    max-width: 500px;
}

.import-area {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.import-area:hover {
    border-color: #667eea;
    background: #f8fafc;
}

.import-area.drag-over {
    border-color: #22c55e;
    background: #f0fdf4;
}

.import-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.import-area p {
    color: #64748b;
    font-size: 0.85rem;
}

.import-preview {
    max-height: 300px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    font-size: 0.75rem;
    font-family: monospace;
    margin-top: 16px;
    display: none;
}

.import-preview.show {
    display: block;
}

.export-format-select {
    margin: 16px 0;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.export-format-select label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* ==================== 折叠面板 ==================== */
.collapse-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    margin-bottom: 1.5rem;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    position: sticky;
    top: 80px;
    z-index: 90;
}

.panel-header h2 {
    font-size: 1.25rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #64748b;
    transition: transform 0.3s;
}

.panel-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.panel-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 24px 24px;
}

.panel-content.collapsed {
    display: none;
}

/* 添加按钮 */
.add-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    cursor: pointer;
    margin: 1rem 0;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th,
td {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

th {
    background: rgba(248, 250, 252, 0.8);
    font-weight: 600;
    color: #334155;
}

.actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin: 0 4px;
    padding: 4px 8px;
    border-radius: 8px;
}

.edit-btn {
    color: #3b82f6;
}

.delete-btn {
    color: #ef4444;
}

/* 通用模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 32px;
    padding: 2rem;
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.close-btn {
    background: #f1f5f9;
    border: none;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    color: #475569;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: scale(1.05);
}

.modal-content label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    font-size: 0.95rem;
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.upload-area {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.file-label {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
    border: none;
}

.file-label:hover {
    background: #5b67cd;
}

.icon-preview {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 16px;
    background: #f1f5f9;
    padding: 6px;
    border: 1px solid #e2e8f0;
}

.submit-btn {
    background: #667eea;
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}

.submit-btn:hover {
    background: #5b67cd;
}

.cancel-btn {
    background: #e2e8f0;
    color: #334155;
    padding: 12px 28px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.cancel-btn:hover {
    background: #cbd5e1;
}

/* IP白名单相关组件 */
.ip-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.ip-list-table th,
.ip-list-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.ip-list-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #334155;
}

.ip-badge {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: monospace;
    font-size: 0.8rem;
}

.delete-ip-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}

.add-ip-form {
    background: #f8fafc;
    padding: 16px;
    border-radius: 16px;
    margin-top: 16px;
}

.add-ip-form .form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.add-ip-form .form-group {
    flex: 1;
    min-width: 150px;
}

.add-ip-form label {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.add-ip-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
}

.info-note {
    background: #f0f9ff;
    padding: 12px;
    border-radius: 12px;
    margin-top: 16px;
    font-size: 0.75rem;
    color: #0369a1;
}

.info-note code {
    background: #e0f2fe;
    padding: 2px 6px;
    border-radius: 6px;
}

/* 设置模块 */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.settings-modal.show {
    display: flex;
}

.settings-modal .modal-content {
    max-width: 1100px;
    width: 90%;
    height: 85vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 32px;
}

.settings-modal .modal-header {
    padding: 1.25rem 1.5rem;
    margin-bottom: 0;
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.settings-modal .modal-header h3 {
    font-size: 1.4rem;
}

.settings-modal .close-btn {
    background: #f1f5f9;
    width: 44px;
    height: 44px;
    font-size: 2rem;
}

.settings-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* 左侧导航 */
.settings-sidebar {
    width: 220px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 1rem 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.settings-sidebar-item {
    padding: 12px 20px;
    cursor: pointer;
    color: #475569;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.settings-sidebar-item:hover {
    background: #e2e8f0;
}

.settings-sidebar-item.active {
    background: #eef2ff;
    color: #667eea;
    border-left-color: #667eea;
}

/* 右侧内容区 */
.settings-main {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.settings-section h4 {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

/* 可折叠的模块子项 */
.module-item {
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    overflow: hidden;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #f8fafc;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
}

.module-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-header-left h4 {
    font-size: 1rem;
    color: #1e293b;
    margin: 0;
}

.module-header-left .desc {
    font-size: 0.7rem;
    color: #94a3b8;
}

.module-toggle-icon {
    font-size: 0.9rem;
    color: #64748b;
    transition: transform 0.3s;
}

.module-header.collapsed .module-toggle-icon {
    transform: rotate(-90deg);
}

.module-content {
    padding: 16px 20px;
    border-top: none;
    background: white;
}

.module-content.collapsed {
    display: none;
}

.datetime-sub-item {
    margin-left: 24px;
    padding: 8px 0 8px 16px;
    border-left: 2px dashed #e2e8f0;
}

/* 单项设置行 */
.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 12px;
}

.settings-option .desc {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: 8px;
}

/* 开关按钮 */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: #cbd5e1;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: #04BE02;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 3px;
    transition: transform 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

/* 设置项内的输入组 */
.settings-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.settings-input-group input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
}

.settings-input-group select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 60px;
    background: white;
}

/* 背景预览 */
.bg-preview {
    margin-top: 10px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
}

.bg-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
}

/* 已有图标/图片网格 */
.existing-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.existing-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    background: #f8fafc;
}

.existing-icon-item:hover {
    background: #e2e8f0;
    border-color: #667eea;
}

.existing-icon-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 6px;
}

.existing-icon-item .icon-name {
    font-size: 0.7rem;
    color: #64748b;
    text-align: center;
    word-break: break-all;
}

/* 设置弹窗底部操作栏 */
.settings-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: white;
    flex-shrink: 0;
}

/* 回到顶部按钮 */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 200;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}

/* API 设置区域 */
.api-settings-group {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.api-settings-group h5 {
    color: #1e293b;
    margin-bottom: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-input {
    margin-top: 12px;
}

.api-key-input label {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.api-key-input input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.85rem;
}

.api-help {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 8px;
}

.api-help a {
    color: #667eea;
    text-decoration: none;
}

/* 天气/月历悬浮放大效果 */
.weather-calendar-wrapper {
    transition: transform 0.25s ease-in-out;
    display: inline-block;
}

.weather-calendar-wrapper:hover {
    transform: scale(calc(var(--hover-scale) / 100));
}

/* ==================== 图标选择器样式 ==================== */
.icon-selector {
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    background: #f8fafc;
}

.icon-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin: 4px 0;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s;
}

.icon-option:hover {
    background: #e2e8f0;
}

.icon-option img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 4px;
}

.use-online-btn {
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.use-online-btn:hover {
    background: #5b67cd;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
    body.admin-page {
        padding: 1rem;
    }

    .settings-sidebar {
        width: 120px;
    }

    .settings-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .add-ip-form .form-row {
        flex-direction: column;
    }

    .modal-content {
        max-width: 95%;
        padding: 1.5rem;
    }

    .close-btn {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }

    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .batch-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .batch-buttons {
        justify-content: center;
    }
    
    .table-toolbar {
        flex-wrap: wrap;
    }
}

/* ==================== 确保背景图片选择器在最上层 ==================== */
#bgImagesModal.modal {
    z-index: 20000 !important;
}

#bgImagesModal .modal-content {
    position: relative;
    z-index: 20001;
}



/* ==================== 亮色主题适配 ==================== */
body.admin-page[data-theme="light"] .skeleton-table-cell {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
}

body.admin-page[data-theme="light"] .batch-actions-bar {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.admin-page[data-theme="light"] .confirm-modal-content {
    background: #ffffff;
}

/* ==================== 图标选择器样式 ==================== */
#existingIconsModal {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

#existingIconsModal .existing-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    padding: 12px;
    background: #f8fafc;
    border-radius: 16px;
    margin-bottom: 16px;
}

#existingIconsModal .existing-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

#existingIconsModal .existing-icon-item:hover {
    background: #eef2ff;
    border-color: #667eea;
    transform: translateY(-2px);
}

#existingIconsModal .existing-icon-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 6px;
    border-radius: 8px;
}

#existingIconsModal .existing-icon-item .icon-name {
    font-size: 0.7rem;
    color: #64748b;
    text-align: center;
    word-break: break-all;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ==================== 在线图标选择器样式 ==================== */
#iconSelectorModal .icons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#iconSelectorModal .icon-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

#iconSelectorModal .icon-option:hover {
    background: #eef2ff;
    border-color: #667eea;
    transform: translateX(4px);
}

#iconSelectorModal .icon-option img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #e2e8f0;
}

#iconSelectorModal .icon-option-info {
    flex: 1;
}

#iconSelectorModal .icon-option-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
}

#iconSelectorModal .icon-option-desc {
    font-size: 0.7rem;
    color: #64748b;
}

#iconSelectorModal .use-online-btn {
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.2s;
}

#iconSelectorModal .use-online-btn:hover {
    background: #5b67cd;
}



/* ==================== 按钮颜色统一调整 ==================== */

/* 表格工具栏按钮 - 导出全部、导入、排序模式、批量模式 */
.table-toolbar .batch-btn.export,
.table-toolbar .batch-btn.import,
.table-toolbar .batch-btn[onclick*="toggleSortMode"],
.table-toolbar .batch-btn[onclick*="toggleBatchMode"] {
    background: #667EEA !important;
    color: white !important;
}

.table-toolbar .batch-btn.export:hover,
.table-toolbar .batch-btn.import:hover,
.table-toolbar .batch-btn[onclick*="toggleSortMode"]:hover,
.table-toolbar .batch-btn[onclick*="toggleBatchMode"]:hover {
    background: #2563eb !important;
    color: white !important;
}

/* 模态框中的文件上传按钮 - 上传、已有图标、获取在线图标 */
.modal-content .file-label {
    background: #667EEA !important;
    color: white !important;
}

.modal-content .file-label:hover {
    background: #2563eb !important;
    color: white !important;
}

/* 特殊处理：已有图标按钮原本是绿色，现在统一改为蓝色 */
.modal-content .file-label[style*="background:#22c55e"],
.modal-content .file-label[style*="background: #22c55e"] {
    background: #667EEA !important;
}

.modal-content .file-label[style*="background:#22c55e"]:hover,
.modal-content .file-label[style*="background: #22c55e"]:hover {
    background: #2563eb !important;
}

/* 特殊处理：获取在线图标按钮原本是橙色，现在统一改为蓝色 */
.modal-content .file-label[style*="background:#f59e0b"],
.modal-content .file-label[style*="background: #f59e0b"] {
    background: #667EEA !important;
}

.modal-content .file-label[style*="background:#f59e0b"]:hover,
.modal-content .file-label[style*="background: #f59e0b"]:hover {
    background: #2563eb !important;
}



/* ==================== 布局管理样式（完整版） ==================== */

/* 图层列表容器 */
.layout-layers-list {
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
}

/* 图层项 */
.layout-layer-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s;
}

.layout-layer-item:last-child {
    margin-bottom: 0;
}

.layout-layer-item.dragging {
    opacity: 0.5;
    background: #eef2ff;
}

.layout-layer-item.drag-over {
    border: 2px solid #667eea;
    margin-bottom: 14px;
}

/* 头部区域 */
.layout-layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #f8fafc;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
}

.layout-layer-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.layout-layer-drag {
    cursor: grab;
    font-size: 1.2rem;
    color: #94a3b8;
    padding: 4px;
    width: 28px;
    text-align: center;
    user-select: none;
}

.layout-layer-drag:active {
    cursor: grabbing;
}

.layout-layer-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.layout-layer-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.layout-layer-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

/* 内容区域 */
.layout-layer-content {
    padding: 16px 20px;
    background: #ffffff;
}

.layout-layer-content.collapsed {
    display: none;
}

/* 主图层设置行 */
.layout-layer-settings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
}

/* 单个设置项 - 胶囊样式 */
.setting-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #64748b;
    background: #f8fafc;
    padding: 6px 14px;
    border-radius: 24px;
    white-space: nowrap;
}

.setting-group label {
    font-weight: 500;
    color: #475569;
    font-size: 0.75rem;
}

.setting-group input {
    width: 55px;
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
    background: white;
}

.setting-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.setting-group select {
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.8rem;
    background: white;
    cursor: pointer;
    width: auto;
    min-width: 80px;
}

.setting-group span {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* ==================== 子组件分隔线 ==================== */
.subcomponents-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 16px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, #cbd5e1, transparent);
}

.divider-text {
    font-size: 0.7rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

/* ==================== 子组件行样式（修改后 - 开关与名称同行） ==================== */

/* 子组件行整体 */
.subcomponent-row {
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.subcomponent-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* 子组件行头部 - 名称和开关在同一行 */
.subcomponent-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

/* 标题区域（图标 + 名称） */
.subcomponent-title-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 开关区域（标签 + 开关按钮） */
.subcomponent-toggle-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 开关标签样式 */
.subcomponent-toggle-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* 子组件图标 */
.subcomponent-icon {
    font-size: 1rem;
}

/* 子组件名称 */
.subcomponent-row-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
}

/* 子组件设置行 - 仅在开关打开时显示 */
.subcomponent-row-settings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-left: 28px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

/* 隐藏设置行的样式（用于动态控制） */
.subcomponent-row-settings.hidden,
.subcomponent-row-settings[style*="display: none"] {
    display: none;
}

/* 子组件内的设置项 - 更紧凑 */
.sub-setting {
    padding: 4px 12px;
    background: #f8fafc;
}

.sub-setting input {
    width: 50px;
    padding: 4px 6px;
    font-size: 0.75rem;
}

.sub-setting label {
    font-size: 0.7rem;
}

/* 子组件开关稍小 */
.sub-setting .toggle-switch {
    width: 40px;
    height: 22px;
}

.sub-setting .toggle-switch::after {
    width: 18px;
    height: 18px;
    top: 2px;
    left: 3px;
}

.sub-setting .toggle-switch.active::after {
    transform: translateX(18px);
}

/* 子组件二级菜单样式 */
.subcomponent-children {
    margin-top: 12px;
    padding-left: 36px;
    border-left: 2px dashed #e2e8f0;
}

.subcomponent-child-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 24px;
    margin-top: 8px;
}

.subcomponent-child-item:first-child {
    margin-top: 0;
}

.child-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.child-icon {
    font-size: 0.9rem;
}

.child-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.8rem;
}

.child-desc {
    font-size: 0.65rem;
    color: #64748b;
    background: white;
    padding: 2px 8px;
    border-radius: 12px;
}

.child-control {
    flex-shrink: 0;
}

.child-control .toggle-switch {
    width: 40px;
    height: 22px;
}

.child-control .toggle-switch::after {
    width: 18px;
    height: 18px;
    top: 2px;
    left: 3px;
}

.child-control .toggle-switch.active::after {
    transform: translateX(18px);
}

/* 分隔线 */
.layout-layer-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0;
}

/* ==================== 内容显示设置样式（优化版） ==================== */

.content-display-settings {
    margin-top: 16px;
    padding: 8px 0;
}

/* 设置行 - 两列网格布局 */
.setting-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
    align-items: center;
}

/* 单行占满整行 */
.setting-row.single {
    grid-template-columns: 1fr;
    max-width: 320px;
}

/* 滑块专用组 */
.setting-group-slider {
    flex: 1;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.slider-wrapper input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: #cbd5e1;
    border-radius: 4px;
    outline: none;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.opacity-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #667eea;
    font-size: 0.85rem;
    background: white;
    padding: 2px 8px;
    border-radius: 20px;
}

/* 输入框包装器 */
.input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-wrapper input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.85rem;
    text-align: center;
    background: white;
    transition: all 0.2s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.input-wrapper span {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* 提示信息 */
.setting-note {
    margin-top: 16px;
    padding-top: 12px;
    font-size: 0.7rem;
    color: #94a3b8;
    border-top: 1px dashed #e2e8f0;
    text-align: center;
}

/* ==================== 系统监控设置样式 ==================== */

.sysmonitor-settings {
    margin-top: 16px;
    padding: 8px 0;
}

.sysmonitor-settings .setting-row {
    margin-bottom: 12px;
}

.sysmonitor-settings .setting-row:last-child {
    margin-bottom: 0;
}

.sysmonitor-settings .setting-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 8px 18px;
    border-radius: 32px;
    width: 100%;
    transition: all 0.2s;
}

.sysmonitor-settings .setting-group:hover {
    background: #f1f5f9;
}

.sysmonitor-settings .setting-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sysmonitor-settings .setting-icon {
    font-size: 1rem;
}

.sysmonitor-settings .setting-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
    white-space: nowrap;
}

.sysmonitor-settings .setting-desc {
    font-size: 0.7rem;
    color: #64748b;
    font-family: monospace;
    background: white;
    padding: 3px 10px;
    border-radius: 16px;
    margin-left: 4px;
    white-space: nowrap;
}

.sysmonitor-settings .setting-control {
    flex-shrink: 0;
}

.sysmonitor-settings .toggle-switch {
    width: 44px;
    height: 24px;
}

.sysmonitor-settings .toggle-switch::after {
    width: 20px;
    height: 20px;
    top: 2px;
    left: 3px;
}

.sysmonitor-settings .toggle-switch.active::after {
    transform: translateX(20px);
}

.sysmonitor-settings .setting-note {
    margin-top: 16px;
    padding-top: 12px;
    font-size: 0.7rem;
    color: #94a3b8;
    border-top: 1px dashed #e2e8f0;
    text-align: center;
}

/* 即时保存提示 */
.layout-save-hint {
    position: fixed;
    bottom: 80px;
    right: 30px;
    background: #22c55e;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: opacity 0.3s ease;
}

/* 折叠图标旋转样式 */
.module-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

/* 拖拽时的样式 */
.layout-layer-drag {
    cursor: grab;
}

.layout-layer-drag:active {
    cursor: grabbing;
}



/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
    .layout-layer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .layout-layer-header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .layout-layer-settings {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .setting-group {
        justify-content: space-between;
        width: 100%;
        white-space: normal;
    }
    
    .subcomponent-row-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .subcomponent-row-settings {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }
    
    .sub-setting {
        justify-content: space-between;
        width: 100%;
    }
    
    .subcomponent-children {
        padding-left: 16px;
    }
    
    .subcomponent-child-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .child-control {
        align-self: flex-end;
    }
    
    .sysmonitor-settings .setting-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 16px;
    }
    
    .sysmonitor-settings .setting-label {
        flex-wrap: wrap;
    }
    
    .sysmonitor-settings .setting-desc {
        font-size: 0.6rem;
        white-space: normal;
        word-break: break-all;
    }
    
    .sysmonitor-settings .setting-control {
        align-self: flex-end;
    }
}

/* ==================== 子组件设置折叠按钮样式 ==================== */

.subcomponent-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.subcomponent-settings-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f1f5f9;
    font-size: 0.7rem;
    color: #64748b;
    transition: all 0.2s;
}

.subcomponent-settings-toggle:hover {
    background: #e2e8f0;
    color: #475569;
}

.settings-toggle-icon {
    font-size: 0.7rem;
}

.settings-toggle-text {
    font-size: 0.7rem;
}

.settings-toggle-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

/* 设置区域折叠样式 */
.subcomponent-row-settings {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    max-height: 100px;
    opacity: 1;
    padding: 8px 0 8px 28px;
}

.subcomponent-row-settings.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 0 0 28px;
    overflow: hidden;
}

/* ==================== 子组件描述文字样式 ==================== */

.subcomponent-title-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.subcomponent-name-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.subcomponent-row-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
}

.subcomponent-desc {
    font-size: 0.7rem;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 12px;
    display: inline-block;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* 移动端适配 - 描述文字换行 */
@media (max-width: 768px) {
    .subcomponent-desc {
        white-space: normal;
        word-break: break-all;
        max-width: 200px;
        font-size: 0.55rem;
    }
    
    .subcomponent-name-wrapper {
        flex: 1;
    }
}

/* ===================重置按钮样式 - 美化版========================= */

.layout-save-area {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.reset-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.reset-btn:active {
    transform: translateY(1px);
}
