/* ===== 系统专家管理后台样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #00bb88;
    --primary-hover: #00a377;
    --bg: #f0f2f5;
    --card: #ffffff;
    --border: #e4e7ed;
    --text: #303133;
    --text-secondary: #909399;
    --danger: #f56c6c;
    --danger-hover: #e64242;
    --warning: #e6a23c;
    --info: #409eff;
    --success: #67c23a;
    --radius: 8px;
    --sidebar-w: 220px;
    --shadow: 0 2px 12px rgba(0,0,0,.06);
}
body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== 登录页 ===== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00bb88 0%, #008c6a 100%);
}
.login-card {
    background: var(--card);
    border-radius: 16px;
    padding: 48px 40px;
    width: 400px;
    max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    text-align: center;
}
.login-icon {
    width: 72px; height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #e6f9f2, #c8f0e2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
}
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { color: var(--text-secondary); font-size: 13px; margin-bottom: 28px; }
.login-error {
    background: #fef0f0;
    color: var(--danger);
    border: 1px solid #fde2e2;
    border-radius: var(--radius);
    padding: 10px;
    font-size: 13px;
    margin-bottom: 18px;
}
.login-field { margin-bottom: 18px; text-align: left; }
.login-field label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.login-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.login-field input:focus { border-color: var(--primary); }
.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: background .2s;
}
.login-btn:hover { background: var(--primary-hover); }
.login-tip { color: var(--text-secondary); font-size: 12px; margin-top: 22px; }

/* ===== 布局 ===== */
.admin-layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.admin-sidebar {
    width: var(--sidebar-w);
    background: #1d2b36;
    color: #c0c8d0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 10;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-brand-icon { font-size: 22px; }
.admin-menu { flex: 1; padding: 14px 10px; }
.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius);
    color: #c0c8d0;
    font-size: 14px;
    margin-bottom: 3px;
    transition: all .2s;
}
.admin-menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-menu-item.active { background: var(--primary); color: #fff; }
.admin-menu-icon { font-size: 16px; width: 20px; text-align: center; }
.admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.admin-user-mini { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admin-avatar-mini {
    width: 32px; height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
    flex-shrink: 0;
}
.admin-username-mini {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-logout {
    color: #8a9aa8;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all .2s;
    flex-shrink: 0;
}
.admin-logout:hover { background: rgba(255,255,255,.1); color: #fff; }

/* 主区域 */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
}
.admin-topbar {
    background: var(--card);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 5;
}
.admin-page-title { font-size: 18px; font-weight: 700; }
.admin-topbar-time { color: var(--text-secondary); font-size: 13px; }
.admin-content { padding: 24px 28px; flex: 1; }

/* ===== 统计卡片 ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-label { color: var(--text-secondary); font-size: 13px; }

/* ===== 面板 ===== */
.panel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.panel-title { font-size: 15px; font-weight: 600; }
.panel-more { color: var(--primary); font-size: 13px; }
.panel-more:hover { text-decoration: underline; }
.panel-body { padding: 20px; }

/* ===== 仪表盘双栏 ===== */
.dashboard-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}
@media (max-width: 1100px) { .dashboard-row { grid-template-columns: 1fr; } }

/* ===== 表格 ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    background: #fafbfc;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}
.data-table tr:hover td { background: #fafcfe; }
.td-title { font-weight: 600; max-width: 200px; }
.td-content { max-width: 220px; color: var(--text-secondary); font-size: 13px; }
.td-time { color: var(--text-secondary); font-size: 12px; white-space: nowrap; }
.loading-tip, .empty-tip { text-align: center; color: var(--text-secondary); padding: 32px 0 !important; }

/* ===== 工具栏 ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 10px; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.toolbar-tip { color: var(--text-secondary); font-size: 13px; }
.search-input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    width: 240px;
    outline: none;
    transition: border-color .2s;
}
.search-input:focus { border-color: var(--primary); }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    background: #f0f2f5;
    color: var(--text-secondary);
}
.badge-warning { background: #fdf6ec; color: var(--warning); }
.badge-info { background: #ecf5ff; color: var(--info); }
.badge-success { background: #f0f9eb; color: var(--success); }
.badge-danger { background: #fef0f0; color: var(--danger); }

/* ===== Tab ===== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 5px;
    box-shadow: var(--shadow);
    width: fit-content;
}
.tab {
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .2s;
}
.tab:hover { color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; }

/* ===== 分页 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
}
.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    transition: all .2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-info { color: var(--text-secondary); font-size: 13px; margin: 0 8px; }

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-overlay.show { display: flex; }
.modal-card {
    background: #fff;
    border-radius: 12px;
    width: 480px;
    max-width: 92vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
    width: 28px; height: 28px;
    border: none;
    background: none;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    line-height: 1;
}
.modal-close:hover { background: #f0f2f5; color: var(--text); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid var(--border);
}

/* ===== 表单 ===== */
.form-field { margin-bottom: 16px; }
.form-field label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-field input, .form-field select, .form-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--primary); }
.form-field textarea { resize: vertical; }
.view-box {
    background: #f5f7fa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 160px;
    overflow-y: auto;
}

/* ===== 反馈附图 ===== */
.fb-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    display: block;
    transition: transform .15s, box-shadow .15s;
}
.fb-thumb:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.fb-img-badge { color: var(--primary); font-size: 12px; white-space: nowrap; }

/* ===== 日志列表 ===== */
.log-list { display: flex; flex-direction: column; }
.log-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 13px;
}
.log-item:last-child { border-bottom: none; }
.log-tag {
    background: #ecf5ff;
    color: var(--info);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    flex-shrink: 0;
}
.log-detail {
    flex: 1;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.log-user { color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }
.log-time { color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-80px);
    background: #1d2b36;
    color: #fff;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 999;
    transition: transform .3s ease;
    pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .admin-sidebar { width: 60px; }
    .admin-brand-text, .admin-menu-item span:not(.admin-menu-icon), .admin-username-mini, .admin-logout { display: none; }
    .admin-brand { justify-content: center; padding: 18px 0; }
    .admin-menu-item { justify-content: center; padding: 11px 0; }
    .admin-sidebar-footer { flex-direction: column; gap: 8px; }
    .admin-main { margin-left: 60px; }
    .admin-content { padding: 16px; }
    .search-input { width: 160px; }
}