/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1f2937; background: #f3f4f6; line-height: 1.6; }
a { color: #2563eb; text-decoration: none; }
a:hover { color: #1d4ed8; }

/* === Admin Layout === */
.admin-layout { display: flex; flex-direction: column; min-height: 100vh; }
.sidebar { width: 240px; background: #1e293b; color: #e2e8f0; display: flex; flex-direction: column; position: static; overflow-y: auto; flex-shrink: 0; }
.sidebar-header { padding: 20px; border-bottom: 1px solid #334155; }
.sidebar-header h2 { font-size: 20px; color: #60a5fa; }
.sidebar-header small { font-size: 12px; color: #94a3b8; }
.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-group { padding: 8px 16px; }
.nav-group-title { display: block; font-size: 11px; text-transform: uppercase; color: #64748b; margin-bottom: 4px; letter-spacing: 0.05em; }
.nav-item { display: block; padding: 8px 16px; color: #cbd5e1; border-radius: 6px; margin: 2px 0; font-size: 14px; transition: all 0.15s; }
.nav-item:hover { background: #334155; color: #f1f5f9; text-decoration: none; }
.nav-item.active { background: #3b82f6; color: white; }
.main-content { flex: 1; margin-left: 0; display: flex; flex-direction: column; }
.top-bar { height: 56px; background: white; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.top-bar-title { font-size: 16px; font-weight: 600; }
.btn-logout { padding: 6px 16px; border-radius: 6px; background: #fee2e2; color: #dc2626; font-size: 13px; }
.btn-logout:hover { background: #fecaca; text-decoration: none; }
.page-content { padding: 24px; flex: 1; }

/* === Cards & Forms === */
.card { background: white; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 24px; margin-bottom: 20px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-title { font-size: 18px; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-value { font-size: 28px; font-weight: 700; color: #1e293b; }
.stat-label { font-size: 13px; color: #64748b; margin-top: 4px; }

/* === Buttons === */
.btn { padding: 8px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s; }
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover { background: #d97706; }
.btn-secondary { background: #6b7280; color: white; }
.btn-secondary:hover { background: #4b5563; }
.btn-sm { padding: 4px 12px; font-size: 12px; }

/* === Tables === */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 16px; text-align: left; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
th { font-weight: 600; color: #475569; background: #f8fafc; position: sticky; top: 0; }
tr:hover { background: #f8fafc; }
.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.data-table th { padding: 12px 16px; background: #f1f5f9; color: #475569; font-size: 13px; font-weight: 600; text-align: left; border-bottom: 2px solid #e2e8f0; }
.data-table td { padding: 10px 16px; font-size: 13px; color: #374151; border-bottom: 1px solid #f1f5f9; }
.data-table tr:hover td { background: #f8fafc; }

/* === Status badges === */
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-success { background: #86efac; color: #14532d; }
.badge-warning { background: #fde68a; color: #78350f; }
.badge-danger { background: #fca5a5; color: #7f1d1d; }
.badge-info { background: #93c5fd; color: #1e3a5f; }
.badge-secondary { background: #cbd5e1; color: #334155; }

/* === Alert === */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* === Auth Pages === */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); }
.auth-card { background: white; border-radius: 16px; padding: 40px; width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.auth-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-subtitle { text-align: center; color: #64748b; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: #374151; }
.form-control { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; transition: border-color 0.15s; }
.form-control:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 16px; }

/* === Admin Toolbar === */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* Toolbar 文本输入框 */
.toolbar input[type="text"],
.toolbar input[type="search"],
.toolbar input[type="date"],
.toolbar input:not([type]) {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 220px;
}
.toolbar input::placeholder { color: #9ca3af; }
.toolbar input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Toolbar 下拉选择框 */
.toolbar select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 140px;
}
.toolbar select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Toolbar 默认按钮（搜索/筛选/重置） */
.toolbar button {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.toolbar button:hover {
    background: #f5f7fa;
    border-color: #9ca3af;
}

/* Toolbar 语义按钮（高优先级覆盖默认样式） */
.toolbar .btn-primary { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.toolbar .btn-primary:hover { background: #2563eb; border-color: #2563eb; }
.toolbar .btn-secondary { background: #6b7280; color: #fff; border-color: #6b7280; }
.toolbar .btn-secondary:hover { background: #4b5563; border-color: #4b5563; }
.toolbar .btn-danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.toolbar .btn-danger:hover { background: #dc2626; border-color: #dc2626; }
.toolbar .btn-success { background: #10b981; color: #fff; border-color: #10b981; }
.toolbar .btn-success:hover { background: #059669; border-color: #059669; }
.toolbar .btn-warning { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.toolbar .btn-warning:hover { background: #d97706; border-color: #d97706; }
.toolbar .btn-sm { padding: 4px 12px; font-size: 12px; }

/* Toolbar 辅助文本 */
.toolbar .toolbar-hint {
    font-size: 13px;
    color: #909399;
    white-space: nowrap;
}

/* === Admin Modal === */
.geo-modal-overlay { position: fixed; top: 0; left: 240px; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 5vh 0; }
.geo-modal { background: white; border-radius: 12px; width: 90%; max-width: calc(100vw - 240px); height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.2); padding: 24px; }
.geo-modal h4 { font-size: 18px; font-weight: 600; color: #1e293b; margin-bottom: 20px; }
.geo-modal-lg { width: 90%; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #f1f5f9; }
.form-actions button { padding: 8px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; border: none; cursor: pointer; background: #f1f5f9; color: #374151; }
.form-actions button:hover { background: #e2e8f0; }
.form-actions .btn-primary, .form-actions .btn-warning, .form-actions .btn-danger { color: white; }

/* === Pager === */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; }
.pager-btn { padding: 6px 12px; border: 1px solid #d1d5db; border-radius: 6px; background: white; cursor: pointer; font-size: 13px; }
.pager-btn.active { background: #3b82f6; color: white; border-color: #3b82f6; }
.pager-info { font-size: 13px; color: #64748b; }

/* === Website Layout === */
.website-layout { min-height: 100vh; }
.website-header { background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 50; }
.website-nav { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 64px; }
.website-brand { font-size: 22px; font-weight: 700; color: #3b82f6; }
.website-links { display: flex; gap: 32px; }
.website-links a { color: #475569; font-size: 15px; font-weight: 500; }
.website-links a:hover { color: #3b82f6; text-decoration: none; }
.website-hero { max-width: 1200px; margin: 0 auto; padding: 80px 24px; text-align: center; }
.website-hero h1 { font-size: 48px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.website-hero p { font-size: 18px; color: #64748b; max-width: 600px; margin: 0 auto 32px; }
.website-section { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }
.website-footer { background: #1e293b; color: #94a3b8; padding: 40px 24px; text-align: center; margin-top: 60px; }

/* ============================================================ */
/* === Tenant Layout (Element UI Style) === */
/* ============================================================ */
.tenant-layout { display: flex; flex-direction: column; min-height: 100vh; background: #f0f2f5; }
.tenant-sidebar { width: 220px; background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%); color: #e2e8f0; display: flex; flex-direction: column; position: static; overflow-y: auto; flex-shrink: 0; }
.tenant-sidebar-header { padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: center; }
.tenant-sidebar-header h2 { font-size: 18px; color: #409eff; letter-spacing: 1px; }
.tenant-sidebar-header small { font-size: 11px; color: #94a3b8; display: block; margin-top: 4px; }
.tenant-sidebar-nav { padding: 8px 0; flex: 1; }
.tenant-nav-group { margin-bottom: 4px; }
.tenant-nav-group-title { display: block; padding: 10px 20px 4px; font-size: 11px; text-transform: uppercase; color: #64748b; letter-spacing: 0.08em; font-weight: 600; }
.tenant-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 20px; color: #b0bec5; font-size: 13px; transition: all 0.2s; border-left: 3px solid transparent; cursor: pointer; }
.tenant-nav-item:hover { background: rgba(64,158,255,0.1); color: #e2e8f0; text-decoration: none; }
.tenant-nav-item.active { background: rgba(64,158,255,0.15); color: #409eff; border-left-color: #409eff; font-weight: 500; }
.tenant-nav-item .nav-icon { width: 18px; text-align: center; font-size: 15px; }
.tenant-main { flex: 1; margin-left: 0; display: flex; flex-direction: column; min-height: 100vh; }
.tenant-topbar { height: 56px; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); display: flex; align-items: center; padding: 0 24px; flex-shrink: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.tenant-topbar-left { display: flex; align-items: center; gap: 12px; }
.tenant-topbar-title { font-size: 15px; font-weight: 600; color: #303133; }
.tenant-topbar-right { display: flex; align-items: center; gap: 16px; }
.tenant-user-info { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #606266; }
.tenant-user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #409eff, #53a8ff); color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.tenant-page-content { padding: 20px 24px; flex: 1; }

/* === Element UI Style Components === */
.el-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid #ebeef5; overflow: hidden; }
.el-card__header { padding: 16px 20px; border-bottom: 1px solid #ebeef5; display: flex; justify-content: space-between; align-items: center; }
.el-card__header h4 { font-size: 15px; font-weight: 600; color: #303133; margin: 0; }
.el-card__body { padding: 20px; }
.el-stat-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid #ebeef5; position: relative; overflow: hidden; }
.el-stat-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.el-stat-card.blue::after { background: #409eff; }
.el-stat-card.green::after { background: #67c23a; }
.el-stat-card.orange::after { background: #e6a23c; }
.el-stat-card.red::after { background: #f56c6c; }
.el-stat-card.purple::after { background: #9c27b0; }
.el-stat-card.cyan::after { background: #00bcd4; }
.el-stat-value { font-size: 26px; font-weight: 700; color: #303133; }
.el-stat-label { font-size: 13px; color: #909399; margin-top: 6px; }
.el-stat-footer { margin-top: 12px; font-size: 12px; color: #909399; border-top: 1px solid #f2f6fc; padding-top: 10px; }

/* === Element Table === */
.el-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.el-table th { padding: 12px 0; background: #fafafa; color: #909399; font-weight: 600; text-align: left; padding-left: 16px; border-bottom: 1px solid #ebeef5; font-size: 13px; }
.el-table td { padding: 12px 16px; border-bottom: 1px solid #ebeef5; color: #606266; }
.el-table tr:hover td { background: #f5f7fa; }
.el-table .el-table__empty-block { text-align: center; padding: 40px 0; color: #c0c4cc; }

/* === Element Buttons === */
.el-button { padding: 8px 16px; border-radius: 4px; font-size: 13px; font-weight: 500; border: 1px solid #dcdfe6; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: all 0.2s; background: #fff; color: #606266; }
.el-button:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.el-button--primary { background: #409eff; color: #fff; border-color: #409eff; }
.el-button--primary:hover { background: #66b1ff; border-color: #66b1ff; }
.el-button--success { background: #67c23a; color: #fff; border-color: #67c23a; }
.el-button--success:hover { background: #85ce61; border-color: #85ce61; }
.el-button--warning { background: #e6a23c; color: #fff; border-color: #e6a23c; }
.el-button--warning:hover { background: #ebb563; border-color: #ebb563; }
.el-button--danger { background: #f56c6c; color: #fff; border-color: #f56c6c; }
.el-button--danger:hover { background: #f78989; border-color: #f78989; }
.el-button--text { border: none; color: #409eff; background: transparent; padding: 4px 8px; }
.el-button--text:hover { color: #66b1ff; }
.el-button--text.danger { color: #f56c6c; }
.el-button--text.danger:hover { color: #f78989; }
.el-button--small { padding: 5px 11px; font-size: 12px; border-radius: 3px; }
.el-button--mini { padding: 4px 8px; font-size: 11px; }

/* === Element Form === */
.el-form-item { margin-bottom: 18px; }
.el-form-item label { display: block; font-size: 13px; font-weight: 500; color: #606266; margin-bottom: 6px; }
.el-input { width: 100%; padding: 8px 12px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; color: #606266; transition: border-color 0.2s; outline: none; }
.el-input:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64,158,255,0.15); }
.el-select { width: 100%; padding: 8px 12px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; color: #606266; background: #fff; outline: none; }
.el-select:focus { border-color: #409eff; }
.el-textarea { width: 100%; padding: 8px 12px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; color: #606266; resize: vertical; min-height: 100px; outline: none; font-family: inherit; }
.el-textarea:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64,158,255,0.15); }

/* === Element Toolbar === */
.el-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.el-toolbar .el-input { width: 240px; }
.el-toolbar .el-select { width: 140px; }

/* === Element Tags === */
.el-tag { display: inline-block; padding: 2px 10px; border-radius: 3px; font-size: 11px; font-weight: 500; line-height: 1.6; }
.el-tag--success { background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8; }
.el-tag--warning { background: #fdf6ec; color: #e6a23c; border: 1px solid #faecd8; }
.el-tag--danger { background: #fef0f0; color: #f56c6c; border: 1px solid #fde2e2; }
.el-tag--info { background: #f4f4f5; color: #909399; border: 1px solid #e9e9eb; }
.el-tag--primary { background: #ecf5ff; color: #409eff; border: 1px solid #d9ecff; }
.el-tag--plain { background: transparent; }

/* === Element Dialog/Modal === */
.el-dialog-overlay { position: fixed; top: 0; left: 220px; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 5vh 0; }
.el-dialog { background: #fff; border-radius: 6px; width: 90%; max-width: calc(100vw - 220px); height: 90vh; display: flex; flex-direction: column; box-shadow: 0 12px 32px rgba(0,0,0,0.2); }
.el-dialog--large { width: 90%; }
.el-dialog__header { padding: 16px 20px; border-bottom: 1px solid #ebeef5; display: flex; justify-content: space-between; align-items: center; }
.el-dialog__header h4 { font-size: 16px; font-weight: 600; color: #303133; }
.el-dialog__close { font-size: 20px; cursor: pointer; color: #909399; background: none; border: none; }
.el-dialog__close:hover { color: #409eff; }
.el-dialog__body { padding: 20px; overflow-y: auto; flex: 1; }
.el-dialog__footer { padding: 12px 20px; border-top: 1px solid #ebeef5; display: flex; justify-content: flex-end; gap: 10px; }

/* === Element Pagination === */
.el-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; }
.el-pagination button { min-width: 32px; height: 32px; border: 1px solid #dcdfe6; border-radius: 4px; background: #fff; color: #606266; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.el-pagination button:hover { color: #409eff; }
.el-pagination button.active { background: #409eff; color: #fff; border-color: #409eff; }
.el-pagination button:disabled { color: #c0c4cc; cursor: not-allowed; }
.el-pagination .el-pagination__info { font-size: 12px; color: #909399; margin: 0 8px; }
.el-pagination .el-pagination__ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; color: #c0c4cc; font-size: 13px; user-select: none; }

/* === Element Progress === */
.el-progress { height: 8px; background: #ebeef5; border-radius: 4px; overflow: hidden; }
.el-progress-bar { height: 100%; border-radius: 4px; transition: width 0.3s; }
.el-progress-bar--blue { background: #409eff; }
.el-progress-bar--green { background: #67c23a; }
.el-progress-bar--orange { background: #e6a23c; }

/* === Content Grid === */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.content-card { background: #fff; border-radius: 8px; border: 1px solid #ebeef5; padding: 16px; transition: box-shadow 0.2s; }
.content-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.content-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.content-card h4 { font-size: 14px; font-weight: 600; color: #303133; margin-bottom: 8px; }
.content-card__desc { font-size: 12px; color: #909399; line-height: 1.6; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.content-card__meta { font-size: 11px; color: #c0c4cc; display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f2f6fc; }
.content-card__actions { display: flex; gap: 6px; margin-top: 12px; }

/* === Knowledge Graph === */
.kg-panel { display: grid; grid-template-columns: 260px 260px 1fr; gap: 16px; }
@media (max-width: 1100px) {
    .kg-panel { grid-template-columns: 1fr 1fr; }
    .kg-canvas { grid-column: 1 / -1; min-height: 400px; }
}
@media (max-width: 640px) {
    .kg-panel { grid-template-columns: 1fr; }
    .kg-canvas { grid-column: auto; }
}
.kg-entity-panel,
.kg-relation-panel { background: #fff; border-radius: 8px; border: 1px solid #ebeef5; padding: 16px; display: flex; flex-direction: column; max-height: 600px; }
.kg-entity-panel .kg-list-body,
.kg-relation-panel .kg-list-body { flex: 1; overflow-y: auto; min-height: 0; }
.kg-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0 0; border-top: 1px solid #f2f6fc; margin-top: auto; font-size: 12px; color: #606266; }
.kg-pagination button { background: #fff; border: 1px solid #dcdfe6; border-radius: 4px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: #606266; }
.kg-pagination button:hover:not(:disabled) { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.kg-pagination button:disabled { color: #c0c4cc; cursor: not-allowed; }
.kg-pagination .kg-page-info { color: #909399; }
.kg-canvas { background: #fff; border-radius: 8px; border: 1px solid #ebeef5; min-height: 500px; position: relative; display: flex; align-items: center; justify-content: center; color: #c0c4cc; }

/* === Empty State === */
.el-empty { text-align: center; padding: 60px 20px; color: #c0c4cc; }
.el-empty__icon { font-size: 48px; margin-bottom: 16px; }
.el-empty__desc { font-size: 14px; color: #909399; }

/* === Admin Card Sub-components === */
.card-desc { font-size: 13px; color: #6b7280; line-height: 1.6; margin-bottom: 10px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; background: #eff6ff; color: #3b82f6; }
.card-meta { font-size: 12px; color: #9ca3af; display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.card-actions { display: flex; gap: 6px; margin-top: 12px; }

/* === Admin Score === */
.score { display: inline-block; font-size: 20px; font-weight: 700; color: #3b82f6; }

/* === Admin Tabs === */
.tabs { display: flex; gap: 0; border-bottom: 2px solid #e5e7eb; margin-bottom: 16px; }
.tabs span { padding: 8px 20px; font-size: 14px; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.tabs span:hover { color: #3b82f6; }
.tabs span.active { color: #3b82f6; border-bottom-color: #3b82f6; font-weight: 600; }

/* === Admin Stats Row === */
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }

/* === Admin Packages === */
.package-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.content-card.recommended { border: 2px solid #3b82f6; position: relative; }
.recommended-badge { position: absolute; top: -1px; right: 20px; background: #3b82f6; color: white; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 0 0 6px 6px; }
.price { font-size: 28px; font-weight: 700; color: #1e293b; margin: 12px 0 4px; }
.price-yearly { font-size: 13px; color: #6b7280; margin-bottom: 16px; }
.features { list-style: none; padding: 0; margin: 0; }
.features li { padding: 6px 0; font-size: 13px; color: #374151; border-bottom: 1px solid #f3f4f6; }
.features li::before { content: "✓ "; color: #10b981; font-weight: 700; }
.meta { font-size: 12px; color: #9ca3af; margin-top: 8px; }

/* === Admin Platform Accounts === */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.platform-card { background: white; border-radius: 10px; padding: 20px; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: box-shadow 0.2s; }
.platform-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.platform-card.inactive { opacity: 0.6; }
.platform-icon { width: 40px; height: 40px; border-radius: 10px; background: #eff6ff; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px; }
.status { font-size: 12px; font-weight: 600; }
.status.connected { color: #10b981; }
.status.disconnected { color: #ef4444; }

/* === Responsive Tenant === */
@media (max-width: 768px) {
    .tenant-sidebar { display: none; }
    .tenant-sidebar-open { display: block !important; position: fixed; top: 56px; left: 0; bottom: 0; z-index: 1001; width: 240px; box-shadow: 4px 0 20px rgba(0,0,0,0.3); }
    .tenant-sidebar-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 1000; }
    .tenant-main { margin-left: 0; }
    .el-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .kg-panel { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
    .tenant-topbar-menu { display: none; }
    .tenant-user-name { display: none; }
    .tenant-hamburger { display: flex; }
}

/* === Responsive === */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .sidebar-open { display: block !important; position: fixed; top: 56px; left: 0; bottom: 0; z-index: 1001; width: 240px; box-shadow: 4px 0 20px rgba(0,0,0,0.3); }
    .admin-sidebar-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 1000; }
    .main-content { margin-left: 0; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .website-hero h1 { font-size: 32px; }
    .top-navbar-menu { display: none; }
    .admin-hamburger { display: flex; }
}

/* === Form Tabs === */
.form-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #909399;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.form-tab:hover {
    color: #409eff;
}
.form-tab--active {
    color: #409eff;
    border-bottom-color: #409eff;
}

/* === Package Cards === */
.package-card {
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transition: box-shadow 0.2s, transform 0.2s;
}
.package-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.package-card.current-package {
    border-color: #409eff;
    background: #f0f7ff;
}
.package-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}
.package-ribbon {
    position: absolute;
    top: 12px;
    right: -8px;
    background: #409eff;
    color: #fff;
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 2px;
    font-weight: 500;
}
.current-ribbon {
    background: #67c23a;
}
.package-current {
    border-color: #67c23a;
}
.package-recommended {
    border-color: #409eff;
    box-shadow: 0 2px 12px rgba(64,158,255,0.15);
}
.package-type-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}
.pkg-trial { background: #e6f7ff; color: #1890ff; }
.pkg-basic { background: #f6ffed; color: #52c41a; }
.pkg-pro { background: #fff7e6; color: #fa8c16; }
.pkg-enterprise { background: #f9f0ff; color: #722ed1; }
.package-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #606266;
}
.package-features li {
    padding: 4px 0;
    border-bottom: 1px dashed #f0f0f0;
}
.package-features li:last-child { border-bottom: none; }
.feature-tag {
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f9eb;
    color: #67c23a;
    font-size: 12px;
}
.feature-tag.feature-off {
    background: #fef0f0;
    color: #f56c6c;
}

/* === Billing Toggle === */
.billing-toggle {
    display: flex;
    background: #f5f7fa;
    border-radius: 6px;
    padding: 2px;
}
.toggle-option {
    flex: 1;
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #909399;
    transition: all 0.2s;
}
.toggle-option.toggle-active {
    background: #fff;
    color: #409eff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* === Tab Buttons === */
.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    color: #909399;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab-btn:hover { color: #409eff; }
.tab-btn.tab-active {
    color: #409eff;
    border-bottom-color: #409eff;
}

/* === Quota Bar Component === */
.quota-bar { }
.quota-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
}
.quota-bar-track {
    height: 6px;
    background: #e4e7ed;
    border-radius: 3px;
    overflow: hidden;
}
.quota-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.quota-bar-fill.normal { background: #409eff; }
.quota-bar-fill.warning { background: #e6a23c; }
.quota-bar-fill.danger { background: #f56c6c; }
.quota-bar-fill.full { background: #409eff; }

/* === Payment Method Cards === */
.payment-method-card {
    padding: 16px 20px;
    border: 2px solid #e4e7ed;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    min-width: 100px;
    transition: all 0.2s;
}
.payment-method-card:hover {
    border-color: #b3d8ff;
    background: #f0f7ff;
}
.payment-method-card.pm-selected {
    border-color: #409eff;
    background: #ecf5ff;
}

/* === Purchase Confirm === */
.purchase-confirm {
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 12px;
    padding: 24px;
}
.confirm-table {
    width: 100%;
    border-collapse: collapse;
}
.confirm-table td {
    padding: 8px 0;
    font-size: 14px;
}
.confirm-table td:first-child {
    width: 80px;
    font-size: 13px;
}

/* === Modal Overlay & Dialog === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}
.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    animation: slideUp 0.25s;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: #909399;
    padding: 4px 8px;
    border-radius: 4px;
}
.modal-close:hover { background: #f5f7fa; color: #303133; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* === 关键词多选下拉 === */
.kw-dropdown-item:hover { background: #f5f7fa; }

/* === 顶部横向导航（Admin） === */
.top-navbar {
    height: 56px;
    background: #0f172a;
    display: flex;
    align-items: center;
    padding: 0 24px;
    flex-shrink: 0;
    border-bottom: 1px solid #1e293b;
    z-index: 100;
}
.top-navbar-brand {
    font-size: 18px;
    font-weight: 700;
    color: #60a5fa;
    margin-right: 40px;
    white-space: nowrap;
}
/* 汉堡菜单按钮 */
.admin-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
}
.admin-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #94a3b8;
    border-radius: 2px;
    transition: all 0.2s;
}
.top-navbar-menu {
    display: flex;
    gap: 4px;
    flex: 1;
}
.top-navbar-item {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    color: #94a3b8;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.top-navbar-item:hover { background: #1e293b; color: #e2e8f0; }
.top-navbar-item.active { background: #1e293b; color: #60a5fa; font-weight: 500; }
.top-navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}
.top-navbar-user a { color: #94a3b8; font-size: 13px; }
.top-navbar-user a:hover { color: #e2e8f0; }

/* 主体：左侧边栏 + 主内容 */
.admin-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.sidebar-hidden { width: 0; overflow: hidden; flex-shrink: 0; }

/* === 顶部横向导航（Tenant） === */
.tenant-topbar-brand {
    font-size: 17px;
    font-weight: 700;
    color: #409eff;
    margin-right: 40px;
    letter-spacing: 1px;
}
/* 汉堡菜单按钮 */
.tenant-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
}
.tenant-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #94a3b8;
    border-radius: 2px;
    transition: all 0.2s;
}
.tenant-topbar-menu {
    display: flex;
    gap: 4px;
    flex: 1;
}
.tenant-topbar-item {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    color: #94a3b8;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}
.tenant-topbar-item:hover { background: rgba(64,158,255,0.1); color: #e2e8f0; }
.tenant-topbar-item.active { background: rgba(64,158,255,0.15); color: #409eff; font-weight: 500; }
.tenant-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 租户主体 */
.tenant-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.tenant-sidebar-hidden { width: 0; overflow: hidden; flex-shrink: 0; }

/* ========== 官网管理页面 - Bootstrap 风格 ========== */
.tenant-page { }
.tenant-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.tenant-header h3 { font-size: 18px; font-weight: 600; margin: 0; color: #303133; }

.tenant-table-wrap { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow-x: auto; }
.tenant-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tenant-table thead th { background: #fafafa; padding: 10px 14px; text-align: left; font-weight: 600; color: #606266; border-bottom: 1px solid #ebeef5; white-space: nowrap; }
.tenant-table tbody td { padding: 10px 14px; border-bottom: 1px solid #ebeef5; color: #333; }
.tenant-table tbody tr:hover td { background: #f5f7fa; }

.form-row { display: flex; gap: 14px; margin-bottom: 0; }
.form-row .form-group { flex: 1; }

.form-group-horizontal { display: flex; align-items: flex-start; margin-bottom: 14px; gap: 12px; }
.form-group-horizontal > label { width: 110px; flex-shrink: 0; padding-top: 10px; text-align: right; font-size: 14px; color: #606266; font-weight: 500; }
.form-group-horizontal > .form-control { flex: 1; }

.tenant-modal-overlay {
  position: fixed; top: 60px; left: 220px; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
}
.tenant-modal-content {
  background: #fff; border-radius: 12px; width: 80%; max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18); overflow: hidden;
}
.tenant-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid #ebeef5;
}
.tenant-modal-header h4, .tenant-modal-header h5 { margin: 0; font-size: 16px; font-weight: 600; color: #303133; }
.tenant-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.tenant-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 24px; border-top: 1px solid #ebeef5;
}
.tenant-modal-body hr { border: none; border-top: 1px solid #ebeef5; margin: 16px 0; }
.tenant-modal-body h5 { font-size: 14px; font-weight: 600; color: #303133; margin: 8px 0 12px; }

/* 搜索筛选工具栏 */
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar .form-control { max-width: 260px; }

/* === Quil Rich Text Editor === */
.quil-editor-wrapper {
    width: 100%;
    margin-bottom: 14px;
}

.quil-editor-container {
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    overflow: hidden;
    min-height: 300px;
}

.quil-editor-container .ql-toolbar {
    border-bottom: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    border-radius: 8px 8px 0 0 !important;
}

.quil-editor-container .ql-container {
    border: none !important;
    font-family: inherit;
}

.quil-editor-container .ql-editor {
    min-height: 250px;
    font-size: 14px;
    line-height: 1.6;
    padding: 16px;
}

/* === Admin Modal Overlay === */
.admin-modal {
    position: fixed;
    top: 56px;
    left: 240px;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 80%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
}
.admin-modal-content > h4 {
    padding: 16px 24px;
    margin: 0;
    border-bottom: 1px solid #ebeef5;
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}
.admin-modal-content .form-group {
    padding: 0 24px;
    margin-bottom: 14px;
}
.admin-modal-content .form-group:first-of-type {
    padding-top: 20px;
}
.admin-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}
.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid #ebeef5;
}

/* Responsive */
@media (max-width: 768px) {
    .quil-editor-container .ql-toolbar {
        overflow-x: auto;
    }
}