/* ═══ 智峰科技内部管理系统 - 深色护眼主题 ═══ */
:root {
    --bg-page: #0f172a;
    --bg-surface: #1e293b;
    --bg-elevated: #334155;
    --bg-input: #1e293b;
    --border: #334155;
    --border-light: #475569;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #22d3ee;
    --accent-hover: #67e8f9;
    --accent-muted: rgba(34, 211, 238, 0.12);
    --purple: #818cf8;
    --green: #4ade80;
    --red: #f87171;
    --orange: #fb923c;
    --radius: 10px;
    --radius-lg: 14px;
    --bg-hover: #334155;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-page);
    display: flex;
    min-height: 100vh;
}

/* ═══ 侧边栏 ═══ */
.sidebar {
    width: 220px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(34,211,238,0.08), transparent);
}
.sidebar-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}
.sidebar-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 13px;
    color: var(--text-secondary);
}
.nav-item:hover {
    background: var(--accent-muted);
    color: var(--text);
}
.nav-item.active {
    background: var(--accent-muted);
    border-left-color: var(--accent);
    color: #fff;
}
.nav-item .icon { font-size: 16px; width: 22px; text-align: center; }
.nav-group-label {
    padding: 18px 20px 8px;
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}
.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

/* ═══ 主内容区 ═══ */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
    background: var(--bg-surface);
    padding: 14px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.content {
    flex: 1;
    padding: 20px 28px;
    overflow-y: auto;
    background: var(--bg-page);
}

/* ═══ 统计卡片 ═══ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 18px 20px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-card .label { font-size: 12px; color: var(--text-secondary); }
.stat-card .value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 6px;
    color: var(--accent);
}

/* ═══ 面板 ═══ */
.panel {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-header h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.panel-body { padding: 20px; }
.panel-body.no-padding { padding: 0; }

/* ═══ 筛选器 ═══ */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
}
.filters select, .filters input {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: var(--bg-input);
    color: var(--text);
}
.filters select:focus, .filters input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(34,211,238,0.15);
}
.filters input[type="text"] { min-width: 200px; }

/* ═══ 按钮 ═══ */
.btn {
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--border-light);
    background: var(--bg-elevated);
    color: var(--text);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn:hover { background: #475569; border-color: #64748b; }
.btn-primary {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
    font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { color: var(--red); border-color: rgba(248,113,113,0.4); }
.btn-danger:hover { background: rgba(248,113,113,0.1); }
.btn-success { background: var(--green); color: #0f172a; border-color: var(--green); font-weight: 600; }
.btn-success:hover { background: #6ee7b7; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }

/* ═══ 表格 ═══ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    text-align: left;
    padding: 11px 14px;
    background: var(--bg-elevated);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
}
.data-table tr:hover td { background: rgba(34,211,238,0.05); }
.data-table .actions { white-space: nowrap; display: flex; gap: 6px; }

/* ═══ Badge ═══ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}
.badge-green { background: rgba(74,222,128,0.15); color: var(--green); }
.badge-yellow { background: rgba(251,191,36,0.15); color: #fbbf24; }
.badge-red { background: rgba(248,113,113,0.15); color: var(--red); }
.badge-blue { background: rgba(34,211,238,0.15); color: var(--accent); }
.badge-gray { background: rgba(148,163,184,0.12); color: var(--text-secondary); }

/* ═══ 弹窗 ═══ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 560px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
}
.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 1;
}
.modal-header h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.modal-close {
    width: 32px; height: 32px;
    border: none; background: none;
    font-size: 20px; cursor: pointer;
    color: var(--text-secondary); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--bg-elevated); color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ═══ 表单 ═══ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(34,211,238,0.15);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-group input::placeholder { color: var(--text-muted); }

/* ═══ 文件拖拽上传区 ═══ */
.file-drop-zone {
    border: 2px dashed rgba(34,211,238,0.3);
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(34,211,238,0.03);
}
.file-drop-zone:hover, .file-drop-zone.dragover {
    border-color: rgba(34,211,238,0.6);
    background: rgba(34,211,238,0.08);
}
.file-drop-hint {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.file-upload-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.file-upload-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 12px;
}
.file-upload-item .file-icon { font-size: 20px; flex-shrink: 0; }
.file-upload-item .file-info { flex: 1; min-width: 0; }
.file-upload-item .file-name {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-upload-item .file-meta { color: var(--text-muted); font-size: 11px; }
.file-upload-item .file-extracted {
    color: #4ade80;
    font-size: 11px;
    margin-top: 2px;
}
.file-upload-item .file-remove {
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    padding: 0 4px;
}
.file-upload-item .file-remove:hover { color: #f87171; }
.file-upload-item.uploading { opacity: 0.6; }
.file-upload-item .file-progress {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}
.file-upload-item .file-progress-bar {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s;
}

/* ═══ 知识库卡片 ═══ */
.knowledge-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.knowledge-card:hover {
    border-color: var(--accent);
    background: rgba(34,211,238,0.03);
}
.knowledge-card .title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}
.knowledge-card .meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}
.knowledge-card .preview {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══ 链接 ═══ */
.url-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.url-link:hover { text-decoration: underline; }

/* ═══ 空状态 ═══ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ═══ Toast ═══ */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    animation: slideIn 0.3s ease;
}
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ═══ Tab ═══ */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ═══ 厂家资料复选框 ═══ */
.mat-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid var(--border-light) !important;
    border-radius: 4px;
    background: var(--bg-input) !important;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s;
}
.mat-checkbox:hover {
    border-color: var(--accent) !important;
}
.mat-checkbox:checked {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}
.mat-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0f172a;
    font-size: 14px;
    font-weight: bold;
}

/* ═══ 密码字段 ═══ */
.password-field {
    font-family: monospace;
    cursor: pointer;
    user-select: none;
    color: var(--text);
}
.password-field.masked { color: var(--text-muted); }

/* ═══ 详情 ═══ */
.detail-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* ═══ 图片缩略图 ═══ */
.asset-thumb {
    width: 48px; height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s;
}
.asset-thumb:hover { transform: scale(2.5); z-index: 10; position: relative; }
.asset-thumb-placeholder {
    width: 48px; height: 48px;
    border-radius: 6px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 20px;
}

/* ═══ Admin ═══ */
.admin-only { display: none; }
.admin-only.show { display: flex; }

/* ═══ 工具卡片 ═══ */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.tool-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tool-card:hover {
    border-color: var(--accent);
    background: rgba(34,211,238,0.03);
    transform: translateY(-2px);
}
.tool-card .tool-icon { font-size: 32px; }
.tool-card .tool-name { font-size: 15px; font-weight: 600; color: var(--text); }
.tool-card .tool-desc { font-size: 12px; color: var(--text-secondary); }
.tool-card .tool-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ═══ 待办 ═══ */
.todo-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s;
}
.todo-item:hover { border-color: var(--accent); }
.todo-item.done { opacity: 0.5; }
.todo-item.done .todo-title { text-decoration: line-through; }
.todo-check {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    color: var(--bg-surface);
    transition: all 0.2s;
    background: transparent;
}
.todo-item.done .todo-check {
    background: var(--green); border-color: var(--green);
}
.todo-content { flex: 1; }
.todo-title { font-size: 14px; font-weight: 500; color: var(--text); }
.todo-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: flex; gap: 12px; }
.todo-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ═══ 行程 ═══ */
.schedule-item {
    background: var(--bg-surface);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    margin-bottom: 10px;
    display: flex;
    gap: 16px;
    transition: all 0.2s;
}
.schedule-item:hover { border-color: var(--accent); }
.schedule-date {
    flex-shrink: 0;
    text-align: center;
    min-width: 56px;
    padding: 8px;
    background: var(--accent-muted);
    border-radius: 8px;
}
.schedule-date .day { font-size: 22px; font-weight: 700; color: var(--accent); }
.schedule-date .month { font-size: 11px; color: var(--text-secondary); }
.schedule-info { flex: 1; }
.schedule-info .title { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.schedule-info .meta { font-size: 12px; color: var(--text-secondary); }
.schedule-actions { display: flex; gap: 6px; align-items: flex-start; }

/* ═══ AI 悬浮按钮 ═══ */
.ai-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: #fff;
    border: 2px solid rgba(34, 211, 238, 0.3);
    cursor: pointer;
    padding: 0;
    box-shadow:
        0 4px 24px rgba(0,0,0,0.4),
        0 0 0 6px rgba(34, 211, 238, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.08);
    z-index: 900;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-fab:hover {
    transform: scale(1.12) translateY(-2px);
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.5),
        0 0 0 8px rgba(34, 211, 238, 0.1),
        0 0 24px rgba(34, 211, 238, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.12);
}
.ai-fab:active { transform: scale(0.95); }
.ai-robot-svg {
    width: 58px;
    height: 58px;
    display: block;
    animation: robotFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.ai-robot-svg .bot-eye {
    animation: botBlink 4s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}
.ai-robot-svg .bot-eye-shine {
    animation: botBlink 4s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}
.ai-fab:hover .ai-robot-svg .bot-eye {
    fill: #67e8f9;
}
.ai-robot-svg .bot-shadow {
    animation: botShadowPulse 2.5s ease-in-out infinite;
    transform-origin: center;
}
@keyframes robotFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes botBlink {
    0%, 48%, 52%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.12); }
}
@keyframes botShadowPulse {
    0%, 100% { opacity: 0.1; transform: scaleX(1); }
    50% { opacity: 0.2; transform: scaleX(1.15); }
}

/* ═══ 音乐面板（双平台） ═══ */
.music-drawer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 440px;
    height: 620px;
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    z-index: 950;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.music-drawer.show { display: flex; }
.music-drawer-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    cursor: move;
    user-select: none;
}
.music-drawer-header .close {
    background: none; border: none;
    color: var(--text-secondary); font-size: 22px; cursor: pointer;
    line-height: 1; padding: 0 4px; opacity: 0.8;
}
.music-drawer-header .close:hover { opacity: 1; color: var(--text); }

/* 平台切换标签 */
.music-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
}
.music-tab {
    flex: 1;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}
.music-tab:hover { color: var(--text-secondary); }
.music-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(34,211,238,0.05);
}

/* 搜索条 */
.music-search-bar {
    display: flex;
    padding: 8px 14px;
    gap: 8px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}
.music-search-bar input {
    flex: 1;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    background: var(--bg-input);
    color: var(--text);
    font-size: 13px;
    outline: none;
}
.music-search-bar input:focus { border-color: var(--accent); }
.music-search-bar button {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #0f172a;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s;
}
.music-search-bar button:hover { background: var(--accent-hover); }

/* 内容区 */
.music-content { flex: 1; display: flex; flex-direction: column; }
.music-content iframe {
    flex: 1;
    width: 100%;
    border: none;
}
.music-fallback {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    top: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    color: var(--text-secondary);
    text-align: center;
    background: var(--bg-surface);
}
.music-fallback .btn { padding: 10px 24px; }

/* 汽水音乐按钮颜色 */
.ai-quick-btn.ai-qishui-btn {
    background: rgba(236,72,153,0.12);
    color: #f472b6;
    border-color: rgba(236,72,153,0.25);
    animation: musicPulse 2s infinite;
}
.ai-quick-btn.ai-qishui-btn:hover {
    background: rgba(236,72,153,0.25);
    border-color: #f472b6;
}

/* ═══ AI 面板 ═══ */
.ai-panel {
    position: fixed;
    top: auto;
    left: auto;
    bottom: 100px;
    right: 28px;
    width: 360px;
    height: 540px;
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    z-index: 901;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.ai-panel.show { display: flex; }
.ai-panel-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
}
.ai-panel-header .close {
    background: none; border: none;
    color: var(--text-secondary); font-size: 20px; cursor: pointer;
}
.ai-panel-header .close:hover { color: var(--text); }
.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-page);
}
.ai-msg {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    max-width: 85%;
    word-break: break-word;
}
.ai-msg.bot {
    background: var(--bg-elevated);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
}
.ai-msg.user {
    background: var(--accent);
    color: #0f172a;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}
/* 思考中动画 */
.ai-msg.thinking {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 10px 18px;
    display: flex;
    gap: 4px;
    align-items: center;
}
.ai-msg.thinking span {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: thinkDot 1.4s ease-in-out infinite;
}
.ai-msg.thinking .dot1 { animation-delay: 0s; }
.ai-msg.thinking .dot2 { animation-delay: 0.2s; }
.ai-msg.thinking .dot3 { animation-delay: 0.4s; }
@keyframes thinkDot {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}
.ai-input-area {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: var(--bg-surface);
}
.ai-input-area input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    background: var(--bg-input);
    color: var(--text);
}
.ai-input-area input:focus { border-color: var(--accent); }
.ai-input-area input::placeholder { color: var(--text-muted); }
.ai-input-area button {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--accent);
    color: #0f172a;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}
.ai-input-area button:hover { background: var(--accent-hover); }
.ai-quick-actions {
    padding: 8px 14px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: var(--bg-surface);
}
.ai-quick-btn {
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 11px;
    background: var(--accent-muted);
    color: var(--accent);
    border: 1px solid rgba(34,211,238,0.2);
    cursor: pointer;
    transition: all 0.2s;
}
.ai-quick-btn:hover {
    background: rgba(34,211,238,0.2);
    border-color: var(--accent);
}
.ai-quick-btn.ai-fun-btn {
    background: rgba(168,85,247,0.12);
    color: #c084fc;
    border-color: rgba(168,85,247,0.25);
}
.ai-quick-btn.ai-fun-btn:hover {
    background: rgba(168,85,247,0.25);
    border-color: #c084fc;
}
.ai-quick-btn.ai-delegate-btn {
    background: rgba(251,146,60,0.12);
    color: #fb923c;
    border-color: rgba(251,146,60,0.25);
}
.ai-quick-btn.ai-delegate-btn:hover {
    background: rgba(251,146,60,0.25);
    border-color: #fb923c;
}
.ai-quick-btn.ai-music-btn {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
    border-color: rgba(59,130,246,0.25);
}
.ai-quick-btn.ai-music-btn:hover {
    background: rgba(59,130,246,0.25);
    border-color: #60a5fa;
}
/* 汽水音乐按钮颜色 */
.ai-quick-btn.ai-qishui-btn {
    background: rgba(236,72,153,0.12);
    color: #f472b6;
    border-color: rgba(236,72,153,0.25);
    animation: musicPulse 2s infinite;
}
.ai-quick-btn.ai-qishui-btn:hover {
    background: rgba(236,72,153,0.25);
    border-color: #f472b6;
}
@keyframes musicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(236,72,153,0.3); }
    50% { box-shadow: 0 0 0 6px rgba(236,72,153,0); }
}
.ai-platform-links {
    padding: 0 14px 8px;
    display: flex;
    gap: 8px;
    background: var(--bg-surface);
}
.ai-link-btn {
    flex: 1;
    padding: 7px 0;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid var(--border-light);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 500;
}
.ai-link-btn span { font-size: 15px; }
.ai-link-btn.doubao:hover {
    background: rgba(251,146,60,0.1);
    border-color: var(--orange);
    color: var(--orange);
}
.ai-link-btn.workbuddy:hover {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
}

/* ═══ 通知 ═══ */
.notify-bell {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    margin-right: 12px;
    padding: 4px;
}
.notify-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.notify-dropdown {
    position: absolute;
    top: 48px; right: 120px;
    width: 320px;
    max-height: 400px;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    z-index: 800;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.notify-dropdown.show { display: flex; }
.notify-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text);
}
.notify-list { overflow-y: auto; flex: 1; }
.notify-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}
.notify-item:hover { background: var(--accent-muted); }
.notify-item.unread { background: var(--accent-muted); }
.notify-item strong { display: block; font-size: 13px; margin-bottom: 4px; color: var(--text); }
.notify-item div { font-size: 12px; color: var(--text-secondary); }
.notify-item small { color: var(--text-muted); }

/* ═══ 银行卡 ═══ */
.bank-card {
    background: linear-gradient(135deg, #1e3a5f, #1a237e);
    color: #fff;
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.bank-card::after {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.bank-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.bank-card-header strong { font-size: 16px; display: block; }
.bank-card-header small { font-size: 11px; color: rgba(255,255,255,0.6); display: block; }
.bank-card-balance {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}
.bank-card-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}
.bank-card-actions .btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}
.bank-card-actions .btn:hover { background: rgba(255,255,255,0.25); }

/* ═══ 权限复选框 ═══ */
.perm-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.perm-checkboxes label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-elevated);
    transition: all 0.2s;
}
.perm-checkboxes label:has(input:checked) {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
}

/* ═══ 天气卡片（紧凑版） ═══ */
.weather-card {
    background: linear-gradient(160deg, #1a1a3e 0%, #152044 30%, #0d1f4a 60%, #0a1628 100%);
    border-radius: 14px;
    margin: 0 0 16px 0;
    border: 1px solid rgba(34,211,238,0.12);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    transition: all 0.35s ease;
}
.weather-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -30px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.weather-card.collapsed {
    height: 6px;
    border-radius: 4px;
    margin: 0 0 12px 0;
    border: 1px solid rgba(34,211,238,0.06);
    box-shadow: none;
}
.weather-card.collapsed .weather-inner,
.weather-card.collapsed .weather-loading { display: none !important; }
.weather-card.collapsed .weather-ctrl {
    position: absolute;
    right: 8px; top: -16px;
}
.weather-card.collapsed .weather-ctrl input { display: none; }
.weather-card.collapsed::before { display: none; }

.weather-loading { padding: 16px; text-align: center; color: #8899bb; font-size: 13px; }
.weather-inner { padding: 12px 16px 10px; position: relative; }

/* ── 控制区 ── */
.weather-ctrl {
    position: absolute;
    top: 10px; right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}
.weather-ctrl input {
    width: 44px;
    padding: 3px 6px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: #9ab4d0;
    font-size: 11px;
    outline: none;
    text-align: center;
}
.weather-ctrl input:focus { border-color: rgba(34,211,238,0.4); }
.weather-ctrl .btn {
    background: rgba(255,255,255,0.06);
    color: #6b8aaa;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 3px 6px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
}
.weather-ctrl .btn:hover { background: rgba(255,255,255,0.14); color: #c8d6ff; }

/* ── 顶行：当前天气 + 元数据 ── */
.weather-compact-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 8px;
    padding-right: 90px; /* 给控制区留空 */
    flex-wrap: wrap;
}
.weather-current {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.weather-icon-lg {
    font-size: 42px;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.12));
    animation: weatherFloat 3s ease-in-out infinite;
}
@keyframes weatherFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
.weather-current-text { min-width: 0; }
.weather-temp-lg {
    font-size: 32px;
    font-weight: 700;
    color: #e8ecff;
    line-height: 1;
    letter-spacing: -1px;
}
.weather-desc-lg {
    font-size: 13px;
    color: #9ab4d0;
    margin-top: 1px;
}
.weather-city {
    font-size: 11px;
    color: #6b8aaa;
    margin-top: 1px;
}
.weather-meta-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
    font-size: 11px;
    color: #6b8aaa;
    flex: 1;
    min-width: 180px;
}
.weather-meta-compact span { white-space: nowrap; }
.weather-meta-compact b {
    color: #9ab4d0;
    font-weight: 600;
    margin-left: 3px;
}

/* ── 逐小时行 ── */
.weather-hourly-row {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    padding: 6px 0;
    scrollbar-width: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 8px;
}
.weather-hourly-row::-webkit-scrollbar { display: none; }
.weather-hr-item {
    flex-shrink: 0;
    width: 48px;
    text-align: center;
    padding: 5px 2px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    transition: all 0.2s;
}
.weather-hr-item:hover {
    background: rgba(34,211,238,0.06);
    border-color: rgba(34,211,238,0.15);
}
.weather-hr-item .hr-day {
    font-size: 9px;
    color: #64748b;
    margin-bottom: 1px;
}
.weather-hr-item .hr-time {
    font-size: 10px;
    color: #6b8aaa;
    margin-bottom: 2px;
}
.weather-hr-item .hr-icon {
    font-size: 18px;
    margin-bottom: 1px;
    line-height: 1.2;
}
.weather-hr-item .hr-temp {
    font-size: 12px;
    font-weight: 600;
    color: #c8d6ff;
}
.weather-hr-item .hr-pop {
    font-size: 9px;
    color: #5b8af0;
    margin-top: 1px;
}

/* ── 底行：逐日 + 预警滚动 ── */
.weather-bottom-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.weather-daily-row {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.weather-day-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    font-size: 12px;
}
.weather-day-item .day-label { color: #6b8aaa; }
.weather-day-item .day-icon { font-size: 16px; }
.weather-day-item .day-range { color: #c8d6ff; font-weight: 500; }
.weather-day-item .day-range .low { color: #6b8aaa; margin-left: 4px; }

/* ── 预警滚动条 ── */
.weather-alert-ticker {
    flex: 1;
    min-width: 140px;
    height: 22px;
    overflow: hidden;
    position: relative;
    background: rgba(0,0,0,0.15);
    border-radius: 11px;
    display: flex;
    align-items: center;
}
.weather-alert-track {
    display: inline-flex;
    gap: 24px;
    white-space: nowrap;
    padding-left: 100%;
    animation: tickerScroll 18s linear infinite;
}
.weather-alert-ticker:hover .weather-alert-track { animation-play-state: paused; }
.weather-alert-static {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
.weather-alert-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}
.weather-alert-tag.red { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.weather-alert-tag.orange { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; }
.weather-alert-tag.yellow { background: linear-gradient(135deg, #eab308, #ca8a04); color: #1a1a2e; }
.weather-alert-tag.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
.weather-alert-empty {
    font-size: 11px;
    color: #64748b;
    padding: 0 10px;
}

/* ═══ 响应式 ═══ */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-header h1, .sidebar-header p, .nav-item span { display: none; }
    .content { padding: 14px; }
    .topbar { padding: 12px 16px; }
    .form-row { flex-direction: column; }
}

/* ═══ 滚动条 ═══ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══ 选中文字 ═══ */
::selection { background: var(--accent); color: #0f172a; }
