/* 智慧医院后台管理系统样式 */

:root {
    --primary: #0284c7;
    --primary-light: #0ea5e9;
    --primary-dark: #0369a1;
    --success: #16a34a;
    --error: #dc2626;
    --warning: #ea580c;
    --bg: #f0f9ff;
    --sidebar-bg: #0c4a6e;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 4px 24px rgba(2, 132, 199, 0.12);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    line-height: 1.6;
}

/* ========== 登录页 ========== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #38bdf8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-container {
    display: flex;
    gap: 48px;
    align-items: center;
    max-width: 900px;
    width: 100%;
}

.login-brand {
    flex: 1;
    color: var(--white);
    text-align: center;
}

.brand-icon svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
}

.login-brand h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-brand p {
    opacity: 0.85;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.login-card {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 420px;
}

.login-card h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--primary-dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========== 后台布局 ========== */
.admin-page {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-brand strong {
    display: block;
    font-size: 1rem;
}

.sidebar-brand small {
    opacity: 0.7;
    font-size: 0.75rem;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background 0.2s, color 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: var(--white);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-left h1 {
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    font-size: 0.9rem;
}

.user-info small {
    color: var(--text-muted);
}

.content {
    padding: 24px 32px;
    flex: 1;
}

.footer {
    padding: 16px 32px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--white);
}

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--primary);
}

.stat-blue { border-left-color: #0284c7; }
.stat-green { border-left-color: #16a34a; }
.stat-orange { border-left-color: #ea580c; }
.stat-purple { border-left-color: #7c3aed; }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== 面板 ========== */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.panel-header h3 {
    font-size: 1rem;
    color: var(--primary-dark);
}

.panel-body {
    padding: 20px;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-link {
    display: block;
    padding: 16px;
    text-align: center;
    background: var(--bg);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.quick-link:hover {
    background: #dbeafe;
}

.notice-list {
    list-style: none;
}

.notice-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.notice-list li:last-child {
    border-bottom: none;
}

.notice-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #dbeafe;
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 8px;
}

.welcome-text p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.welcome-text strong {
    color: var(--primary-dark);
}

.panel-dashboard-welcome {
    margin-top: 0;
}

.dashboard-welcome {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.6;
}

/* ========== 管理员账号 ========== */
.modal-dialog-sm {
    max-width: 420px;
}

.dept-qr-body {
    text-align: center;
}

.dept-qr-name {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.dept-qr-canvas-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.dept-qr-canvas-wrap img,
.dept-qr-canvas-wrap canvas,
.dept-qr-canvas-wrap table {
    margin: 0 auto;
}

.dept-qr-url-box {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.dept-qr-url-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: #f8fafc;
}

.btn-action-qr {
    color: #0369a1;
    border-color: #7dd3fc;
    background: #f0f9ff;
}

.btn-action-qr:hover:not(:disabled) {
    background: #e0f2fe;
}

.btn-action-qr:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.admin-account-page {
    display: grid;
    gap: 24px;
}

.panel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-account-form {
    max-width: 420px;
}

.admin-account-form .form-actions {
    padding-top: 8px;
}

.admin-role,
.admin-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

.admin-role-admin {
    background: #e0f2fe;
    color: #0369a1;
}

.admin-role-super_admin {
    background: #ede9fe;
    color: #6d28d9;
}

.admin-status-1 {
    background: #dcfce7;
    color: #15803d;
}

.admin-status-0 {
    background: #fee2e2;
    color: #b91c1c;
}

.tag-current {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 0.72rem;
    border-radius: 4px;
    background: #fef3c7;
    color: #b45309;
}

.row-current-user {
    background: #f8fafc;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin-right: 4px;
}

/* ========== 科室部门面板 ========== */
.panel-dept {
    overflow: hidden;
}

.panel-dept .panel-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
}

.panel-dept .panel-body-table {
    padding: 0;
}

.dept-table-wrap {
    overflow-x: auto;
}

.empty-state {
    padding: 60px 24px;
    text-align: center;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 6px;
}

/* ========== 面板头部 ========== */
.panel-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-body-table {
    padding: 0;
}

/* ========== 数据表格 ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.dept-table thead th {
    padding: 14px 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    border-bottom: 2px solid var(--border);
}

.dept-table tbody.dept-group {
    border-bottom: 8px solid #f0f9ff;
}

.dept-table tbody.dept-group:last-child {
    border-bottom: none;
}

.dept-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.dept-table .row-level-1 td {
    background: #fafcff;
}

.dept-table .row-level-1 td:first-child {
    border-left: 3px solid var(--primary);
}

.dept-table .row-level-2 td {
    background: var(--white);
}

.dept-group-collapsed .row-level-2 {
    display: none;
}

.dept-table .row-level-2:hover td,
.dept-table .row-level-1:hover td {
    background: #f0f9ff;
}

.dept-table .col-sort {
    width: 100px;
    text-align: center;
}

.dept-table .col-actions {
    width: 280px;
    text-align: right;
}

.dept-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dept-name-parent .dept-name-text {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.dept-name-toggle {
    cursor: pointer;
}

.dept-name-toggle:hover .dept-name-text {
    color: var(--primary);
}

.dept-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: none;
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 4px;
    transition: background 0.15s;
}

.dept-toggle:hover {
    background: #dbeafe;
}

.dept-folder-placeholder {
    display: inline-block;
    width: 20px;
    flex-shrink: 0;
}

.dept-name-child {
    padding-left: 28px;
}

.dept-name-child .dept-name-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dept-tree-branch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-left: 2px solid #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    border-radius: 0 0 0 4px;
    margin-right: 4px;
    flex-shrink: 0;
}

.sort-badge {
    display: inline-block;
    min-width: 36px;
    padding: 4px 10px;
    background: #dbeafe;
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.sort-badge-sub {
    background: #f1f5f9;
    color: var(--text-muted);
}

.role-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.role-tag-1 {
    background: #dbeafe;
    color: var(--primary-dark);
}

.role-tag-2 {
    background: #dcfce7;
    color: #15803d;
}

.modal-body select,
.config-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
}

.modal-body select:focus,
.config-form select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.level-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}

.level-tag.level-1 {
    background: var(--primary);
    color: var(--white);
}

.level-tag.level-2 {
    background: #e2e8f0;
    color: #64748b;
}

.action-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-action:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: #f0f9ff;
}

.btn-action-add {
    border-color: #bae6fd;
    color: var(--primary);
    background: #f0f9ff;
}

.btn-action-add:hover {
    background: #e0f2fe;
    border-color: var(--primary-light);
}

.btn-action-edit:hover {
    border-color: #93c5fd;
}

.btn-action-danger {
    color: var(--error);
    border-color: #fecaca;
    background: #fff5f5;
}

.btn-action-danger:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
}

/* ========== 弹窗 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    display: none;
}

.modal-overlay.is-open {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.modal-dialog {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--primary-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
}

.form-hint {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.required {
    color: var(--error);
}

/* ========== 系统配置 ========== */
.panel-config .panel-body {
    padding: 28px 32px;
}

.config-form {
    max-width: 560px;
}

.config-form .form-group {
    margin-bottom: 24px;
}

.config-form .form-actions {
    padding-top: 8px;
}

.banner-preview {
    margin-bottom: 12px;
}

.banner-preview img {
    display: block;
    max-width: 360px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: #f8fafc;
}

.config-form input[type="file"] {
    width: 100%;
    padding: 10px 0;
    font-size: 0.9rem;
}

/* ========== 意见投诉 ========== */
.panel-complaint .panel-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
}

.modal-dialog-lg {
    max-width: 820px;
}

/* 详情弹窗：固定高度，内容区纵向滚动 */
.modal-dialog-fixed {
    display: flex;
    flex-direction: column;
    height: 80vh;
    max-height: 720px;
    min-height: 420px;
}

.modal-dialog-fixed .modal-header,
.modal-dialog-fixed .modal-footer {
    flex-shrink: 0;
}

.modal-dialog-fixed .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-body-table {
    padding: 0 24px 24px;
}

.modal-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 16px 0;
}

.eval-table-wrap {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.eval-table {
    margin: 0;
}

.eval-table th,
.eval-table td {
    padding: 12px 16px;
    border: 1px solid var(--border);
}

.eval-table thead th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
}

.eval-table .col-id {
    width: 70px;
    text-align: center;
}

.eval-table .col-sort {
    width: 90px;
    text-align: center;
}

.eval-table .col-actions {
    width: 160px;
    text-align: right;
}

.eval-table .col-content {
    word-break: break-word;
}

.config-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.config-form textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.modal-body textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.tab-links {
    display: flex;
    gap: 12px;
}

.tab-links a {
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tab-links a.active,
.tab-links a:hover {
    background: #dbeafe;
    color: var(--primary-dark);
}

.auth-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.auth-status-pending {
    background: #fef3c7;
    color: #b45309;
}

.auth-status-approved {
    background: #dcfce7;
    color: #15803d;
}

.auth-status-rejected {
    background: #fef2f2;
    color: #b91c1c;
}

.auth-status-none {
    background: #f1f5f9;
    color: #64748b;
}

.panel-toolbar-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
}

.tab-links-secondary a {
    font-size: 0.85rem;
}

.member-dept-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.member-dept-filter-label {
    font-size: 0.85rem;
    color: #64748b;
    white-space: nowrap;
}

.member-dept-filter-select {
    min-width: 180px;
    max-width: 240px;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.85rem;
    color: #334155;
}

.member-dept-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.admin-list-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    width: 100%;
}

.admin-list-filter-label {
    font-size: 0.85rem;
    color: #64748b;
    white-space: nowrap;
}

.admin-list-filter-select,
.admin-list-filter-input,
.admin-list-filter-date {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.85rem;
    color: #334155;
}

.admin-list-filter-select {
    min-width: 120px;
}

.admin-list-filter-input {
    min-width: 160px;
}

.admin-list-filter-date {
    min-width: 140px;
}

.admin-list-filter-select:focus,
.admin-list-filter-input:focus,
.admin-list-filter-date:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.admin-list-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.eval-period-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.eval-period-status-1 {
    background: #dcfce7;
    color: #15803d;
}

.eval-period-status-2 {
    background: #f1f5f9;
    color: #64748b;
}

.eval-table .col-actions {
    min-width: 220px;
}

.btn-action-view {
    color: #0369a1;
    border-color: #bae6fd;
    background: #f0f9ff;
}

.btn-action-view:hover {
    background: #e0f2fe;
}

.eval-records-tabs {
    margin-bottom: 16px;
}

.eval-records-tab {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.eval-records-tab:hover {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #7dd3fc;
}

.eval-records-tab.active,
.eval-records-tab.active:hover {
    background: var(--primary, #0284c7);
    color: #fff;
    border-color: var(--primary, #0284c7);
}

.eval-records-summary {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.eval-summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
}

.eval-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.eval-summary-item .label,
.eval-summary-extra > .label {
    font-size: 0.78rem;
    color: #64748b;
}

.eval-summary-extra {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

.eval-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.eval-summary-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 0.82rem;
    color: #334155;
}

.eval-summary-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.eval-summary-question {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: #334155;
}

.eval-summary-question span {
    color: #64748b;
    font-size: 0.8rem;
}

.eval-records-table .empty-cell {
    text-align: center;
    color: #94a3b8;
    padding: 24px 16px;
}

.eval-records-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.eval-period-pagination {
    padding: 0 4px 8px;
}

.eval-records-pagination-info {
    font-size: 0.85rem;
    color: #64748b;
}

.eval-records-pagination-actions {
    display: flex;
    gap: 8px;
}

.eval-record-detail-json {
    margin: 12px 0 0;
    padding: 16px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    overflow: auto;
    max-height: 240px;
    white-space: pre-wrap;
    word-break: break-word;
}

.eval-record-detail-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eval-record-detail-raw {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

.eval-record-detail-raw summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: #64748b;
    user-select: none;
}

.eval-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.eval-detail-meta p {
    margin: 0;
    font-size: 0.88rem;
    color: #334155;
}

.eval-detail-meta__label {
    color: #64748b;
    margin-right: 6px;
}

.eval-detail-block__title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.eval-detail-table th,
.eval-detail-table td {
    font-size: 0.85rem;
}

.eval-detail-table th {
    white-space: nowrap;
}

.eval-detail-score,
.eval-detail-total {
    text-align: center;
    font-weight: 600;
    color: #0284c7;
}

.eval-detail-section-hints {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

.eval-detail-section-hints p {
    margin: 0 0 8px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #64748b;
}

.eval-detail-section-hints p:last-child {
    margin-bottom: 0;
}

.eval-detail-leader-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.eval-detail-leader-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
    color: #334155;
}

.eval-detail-leader-list li:last-child {
    border-bottom: none;
}

.eval-detail-leader-text {
    flex: 1 1 280px;
    line-height: 1.5;
}

.eval-detail-leader-score {
    white-space: nowrap;
    color: #0284c7;
}

.eval-detail-leader-total {
    margin: 12px 0 0;
    font-size: 0.9rem;
    color: #334155;
}

.eval-detail-leader-total strong {
    color: #0284c7;
    font-size: 1rem;
}

.col-summary {
    max-width: 280px;
    word-break: break-all;
}

.wo-status,
.wo-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.wo-status-1 {
    background: #fef3c7;
    color: #b45309;
}

.wo-status-2 {
    background: #dbeafe;
    color: #1d4ed8;
}

.wo-status-3 {
    background: #dcfce7;
    color: #15803d;
}

.wo-type-1 {
    background: #e0f2fe;
    color: #0369a1;
}

.wo-type-2 {
    background: #d1fae5;
    color: #047857;
}

.wo-type-3 {
    background: #ffedd5;
    color: #c2410c;
}

.detail-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.5;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    flex: 0 0 120px;
    color: #64748b;
    font-size: 0.9rem;
}

.detail-value {
    flex: 1;
    color: #1e293b;
    word-break: break-all;
}

.detail-value a {
    color: var(--primary);
    margin-right: 8px;
}

.detail-list {
    margin: 0;
    padding-left: 18px;
}

.detail-list li {
    margin-bottom: 4px;
}

.detail-row--media {
    align-items: flex-start;
}

.wo-media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wo-media-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 160px;
}

.wo-media-thumb-btn {
    display: block;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    cursor: zoom-in;
    line-height: 0;
}

.wo-media-thumb-btn:hover {
    border-color: var(--primary);
}

.wo-media-img {
    display: block;
    width: 140px;
    height: 140px;
    object-fit: cover;
}

.wo-media-video {
    display: block;
    width: 200px;
    max-width: 100%;
    max-height: 160px;
    border-radius: 8px;
    background: #000;
}

.wo-media-label {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
}

.wo-media-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    align-items: center;
    justify-content: center;
}

.wo-media-lightbox.is-open {
    display: flex;
}

.wo-media-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
}

.wo-media-lightbox__img {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 960px);
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.wo-media-lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.wo-media-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.ev-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.ev-status-0 {
    background: #fef3c7;
    color: #b45309;
}

.ev-status-1 {
    background: #dcfce7;
    color: #15803d;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-brand {
        margin-bottom: 16px;
    }

    .sidebar {
        display: none;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
}
