/* ============================================================
   县域教育信息化统计管理平台 · 主题样式
   配色：教育蓝 #1268B3 / 青绿 #12A594 / 浅灰蓝背景 #F2F6FB
   ============================================================ */

:root {
    --primary: #1268b3;
    --primary-dark: #0d4f8b;
    --primary-light: #e8f2fb;
    --primary-soft: #f4f9fe;
    --accent: #12a594;
    --accent-light: #e6f7f4;
    --success: #17a673;
    --success-light: #e8f8f1;
    --warning: #d99a2b;
    --warning-light: #fdf5e4;
    --danger: #d9534f;
    --danger-light: #fdeeee;
    --info: #2f80ed;
    --info-light: #eaf2fe;
    --dark: #5a6b80;
    --bg: #f2f6fb;
    --surface: #ffffff;
    --text: #1f2d3d;
    --muted: #6b7c93;
    --border: #e2e9f2;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 48, 80, .04);
    --shadow: 0 6px 20px rgba(16, 48, 80, .07);
    --shadow-lg: 0 20px 50px rgba(8, 40, 70, .18);
    --sidebar-w: 236px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }

p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; }

.ico { width: 18px; height: 18px; flex: none; }
.ico-sm { width: 15px; height: 15px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }
.only-mobile { display: none; }

/* ============ 布局 ============ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: linear-gradient(180deg, #0b3a66 0%, #0e4d85 58%, #1268b3 100%);
    color: #d7e6f5;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 40;
}

.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 4px; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .16);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.brand-logo .ico { width: 22px; height: 22px; color: #fff; }
.brand-text strong { display: block; font-size: 13.5px; color: #fff; letter-spacing: .2px; line-height: 1.35; }
.brand-text span { font-size: 11px; color: #9dc2e2; }

.sidebar-nav { padding: 6px 0 18px; flex: 1; }
.nav-group-title { padding: 16px 18px 6px; font-size: 11px; letter-spacing: 1.5px; color: #8fb6d8; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: #d7e6f5;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s;
}

.nav-item .ico { width: 18px; height: 18px; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.nav-item.active {
    background: rgba(255, 255, 255, .15);
    border-left-color: #5fd3c4;
    color: #fff;
    font-weight: 600;
}
.nav-item.active .ico { opacity: 1; color: #8ff0e2; }
.nav-badge {
    margin-left: auto;
    font-style: normal;
    font-size: 11px;
    background: #e2574c;
    color: #fff;
    border-radius: 99px;
    padding: 0 6px;
    line-height: 17px;
}

.sidebar-footer {
    padding: 12px 18px;
    font-size: 11px;
    color: #8fb6d8;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-title h1 { font-size: 17px; line-height: 1.3; }
.topbar-title p { margin: 0; font-size: 12px; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: .15s;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }

.dropdown { position: relative; }
.dropdown.open .dropdown-menu { display: block; }
.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 4px 10px 4px 4px;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
}
.user-chip:hover { border-color: #c8dbee; background: var(--primary-soft); }
.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 600;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.user-meta strong { font-size: 13px; font-weight: 600; }
.user-meta small { font-size: 11px; color: var(--muted); }
.user-chip .ico { width: 14px; height: 14px; color: var(--muted); }

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 168px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 6px;
    z-index: 50;
}
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
}
.dropdown-menu a:hover { background: var(--primary-soft); color: var(--primary); }

.content { padding: 22px 24px 44px; flex: 1; }

/* ============ 页面标题 ============ */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.page-head h2 { font-size: 19px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb .ico { width: 13px; height: 13px; }

/* ============ 卡片 ============ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    overflow: hidden;
}
.card-head {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
}
.card-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head h3 .ico { color: var(--primary); }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); background: #fbfdff; }

/* ============ 统计卡片 ============ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary-soft);
    opacity: .85;
}
.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--primary-light);
    color: var(--primary);
    display: grid;
    place-items: center;
    flex: none;
    position: relative;
    z-index: 1;
}
.stat-icon .ico { width: 22px; height: 22px; }
.stat-icon.green { background: var(--accent-light); color: var(--accent); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.blue { background: var(--info-light); color: var(--info); }
.stat-meta { position: relative; z-index: 1; min-width: 0; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.5px; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.45;
    cursor: pointer;
    white-space: nowrap;
    transition: .15s;
    text-decoration: none;
}
.btn .ico { width: 15px; height: 15px; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #1268b3, #0d5596); color: #fff; box-shadow: 0 4px 12px rgba(18, 104, 179, .22); }
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn-accent { background: linear-gradient(135deg, #12a594, #0d8577); color: #fff; }
.btn-accent:hover { color: #fff; filter: brightness(1.05); }
.btn-outline { border-color: #cfdcea; color: var(--primary); background: #fff; }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef4fb; color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.05); }
.btn-danger-outline { border-color: #f0c4c2; color: var(--danger); background: #fff; }
.btn-danger-outline:hover { background: var(--danger-light); color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { color: #fff; filter: brightness(1.05); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-sm .ico { width: 13px; height: 13px; }
.btn-lg { padding: 11px 20px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ============ 表单 ============ */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 500; color: #33475f; }
.field .req { color: var(--danger); margin-left: 2px; }
.field .help { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d5e1ee;
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(18, 104, 179, .12);
}
.input:disabled, .select:disabled, .textarea:disabled { background: #f5f8fc; color: var(--muted); }
.textarea { resize: vertical; min-height: 92px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7c93' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.input-sm { padding: 6px 9px; font-size: 12.5px; border-radius: 7px; }
.input-group { display: flex; gap: 8px; align-items: center; }
.input-group .input { flex: 1; }
.checkbox, .radio { display: inline-flex; align-items: flex-start; gap: 7px; font-size: 13.5px; cursor: pointer; margin-right: 16px; }
.checkbox input, .radio input { margin-top: 3px; accent-color: var(--primary); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; }
.form-actions { display: flex; gap: 10px; align-items: center; padding-top: 6px; flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }
.inline-form { display: inline; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.switch input { width: 38px; height: 21px; appearance: none; background: #cdd9e6; border-radius: 99px; position: relative; cursor: pointer; transition: .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { left: 19px; }

/* ============ 工具条 ============ */
.toolbar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.toolbar .field { gap: 4px; }
.toolbar .field > label { font-size: 12px; color: var(--muted); font-weight: 400; }
.toolbar .input, .toolbar .select { min-width: 150px; }
.toolbar .grow { min-width: 180px; }
.toolbar-actions { margin-left: auto; display: flex; gap: 8px; }

/* ============ 表格 ============ */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.2px; }
.table th, .table td { padding: 11px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table th { background: #f6f9fd; color: #51637a; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.table tbody tr:hover { background: #fbfdff; }
.table tbody tr:last-child td { border-bottom: none; }
.table td.nowrap { white-space: nowrap; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-empty { padding: 42px 16px; text-align: center; color: var(--muted); }
.table-compact th, .table-compact td { padding: 8px 10px; }

/* ============ 徽章 ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.7;
    white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: #0f7a54; }
.badge-warning { background: var(--warning-light); color: #9a6a10; }
.badge-danger { background: var(--danger-light); color: #a8322e; }
.badge-info { background: var(--info-light); color: #1c5fb8; }
.badge-secondary { background: #eef2f7; color: #5a6b80; }
.badge-dark { background: #e8edf4; color: #3b4a5c; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #f0f5fb; color: #4a5c72; font-size: 12px; }
.tag-warn { background: var(--warning-light); color: #9a6a10; }

/* ============ 提示 ============ */
.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 13.5px;
    border: 1px solid transparent;
    animation: fadeIn .2s ease;
}
.alert .ico { width: 17px; height: 17px; margin-top: 2px; flex: none; }
.alert-success { background: var(--success-light); border-color: #c5ecdc; color: #0f6b4b; }
.alert-danger { background: var(--danger-light); border-color: #f6d3d1; color: #9c2b27; }
.alert-warning { background: var(--warning-light); border-color: #f5e3bb; color: #875c0d; }
.alert-info { background: var(--info-light); border-color: #cfe1fb; color: #1a55a5; }
.alert.fade-out { opacity: 0; transition: opacity .5s; }

.hint-box {
    background: var(--primary-soft);
    border: 1px dashed #c5dcef;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #3a5875;
    line-height: 1.75;
}
.hint-box ol, .hint-box ul { margin: 6px 0 0; padding-left: 20px; }
.hint-box strong { color: var(--primary-dark); }

/* ============ 空状态 ============ */
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .empty-icon { width: 62px; height: 62px; border-radius: 50%; background: var(--primary-soft); color: #9bbcd9; display: grid; place-items: center; margin: 0 auto 12px; }
.empty .empty-icon .ico { width: 28px; height: 28px; }
.empty h4 { font-size: 14.5px; color: #42586f; margin-bottom: 4px; }
.empty p { font-size: 13px; }

/* ============ 分页 ============ */
.pagination { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding-top: 14px; }
.page-link {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    color: #4a5c72;
    background: #fff;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { color: #b6c3d3; background: #f7f9fc; }
.page-ellipsis { color: var(--muted); padding: 0 2px; }
.page-total { margin-left: auto; font-size: 12.5px; color: var(--muted); }

/* ============ 标签页 ============ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab {
    padding: 9px 15px;
    font-size: 13.5px;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    cursor: pointer;
    font-family: inherit;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab .count { background: #eef2f7; border-radius: 99px; padding: 0 7px; font-size: 11.5px; color: #5a6b80; }
.tab.active .count { background: var(--primary-light); color: var(--primary-dark); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============ 进度条 ============ */
.progress { height: 6px; background: #eef3fa; border-radius: 99px; overflow: hidden; min-width: 60px; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s; }
.progress-sm { height: 4px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ============ 时间线 ============ */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 7px; bottom: 7px; width: 2px; background: #e4ecf5; }
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px #e8f2fb; }
.timeline-item.success::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-light); }
.timeline-item.danger::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); }
.timeline-item .tl-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.timeline-item .tl-time { color: var(--muted); font-size: 12px; }
.timeline-item .tl-body { font-size: 12.8px; color: #4d6076; margin-top: 2px; }

/* ============ 报表分组 ============ */
.section-block { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: #fff; }
.section-head { background: linear-gradient(90deg, #f4f9fe, #ffffff); padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 9px; }
.section-head .idx { width: 22px; height: 22px; border-radius: 7px; background: var(--primary); color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 600; }
.section-head h4 { font-size: 14px; }
.section-body { padding: 16px; }
.field-row { display: grid; grid-template-columns: 240px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #edf2f8; align-items: start; }
.field-row:last-child { border-bottom: none; }
.field-row .flabel { font-size: 13px; color: #33475f; padding-top: 7px; }
.field-row .flabel .req { color: var(--danger); }
.field-row .fvalue { min-width: 0; }
.field-row .fhint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.field-row .unit { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ============ 字段设计器 ============ */
.builder-table { min-width: 1080px; }
.builder-table td { vertical-align: top; padding: 8px; }
.builder-table .input, .builder-table .select, .builder-table .textarea { padding: 6px 8px; font-size: 12.5px; border-radius: 7px; }
.builder-table .textarea { min-height: 58px; }
.builder-table input[type="checkbox"] { accent-color: var(--primary); margin-top: 8px; }
.builder-table .col-label { min-width: 150px; }
.builder-table .row-delete { color: var(--danger); background: none; border: none; cursor: pointer; padding: 4px; }
.builder-table tr.is-new { background: #fbfdff; }

/* ============ 字段设计器：拖拽 + 实时预览 ============ */
.designer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.designer-layout > form { min-width: 0; }
.designer-preview {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}
.designer-preview-body {
    padding: 14px;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
    max-height: calc(100vh - 220px);
    background: #fbfdff;
}
.designer-preview .section-block { margin-bottom: 12px; }
.designer-preview .section-head { padding: 9px 12px; }
.designer-preview .section-head h4 { font-size: 13px; }
.designer-preview .section-body { padding: 10px 12px; }
.designer-preview .field-row { grid-template-columns: 1fr; gap: 4px; padding: 8px 0; }
.designer-preview .flabel { padding-top: 0; font-size: 12.5px; }
.designer-preview .fhint { display: none; }
.designer-preview .input, .designer-preview .select, .designer-preview .textarea { font-size: 12.5px; padding: 7px 9px; }
.designer-preview .textarea { min-height: 54px; }
.designer-preview .input:disabled, .designer-preview .select:disabled, .designer-preview .textarea:disabled { background: #f7fafd; color: #7a8fa6; }
.preview-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; }

.drag-cell { width: 34px; text-align: center; padding-left: 4px !important; padding-right: 4px !important; }
.drag-handle {
    display: inline-block;
    cursor: grab;
    color: #9bb4cb;
    font-size: 15px;
    line-height: 1;
    letter-spacing: -2px;
    user-select: none;
    padding: 4px 2px;
}
.drag-handle:hover { color: var(--primary); }
.drag-handle:active { cursor: grabbing; }
.builder-table tr.dragging { background: #eef6ff; opacity: .85; }
.builder-table tr.dragging td { border-bottom-color: #cfe4f8; }

@media (max-width: 1400px) {
    .designer-layout { grid-template-columns: 1fr; }
    .designer-preview { position: static; max-height: none; }
    .designer-preview-body { max-height: 460px; }
}

/* ============ 登录页 ============ */
.auth-body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(1200px 600px at 10% 10%, #1a7ac9 0%, #0d4f8b 45%, #0a3459 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
    position: relative;
    overflow-x: hidden;
}
.auth-body::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -160px;
    top: -200px;
    border-radius: 50%;
    background: rgba(18, 165, 148, .18);
    filter: blur(2px);
}
.auth-body::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    left: -140px;
    bottom: -180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.auth-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1080px;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    min-height: 620px;
    box-shadow: var(--shadow-lg);
}

.auth-visual {
    position: relative;
    padding: 34px 36px;
    color: #fff;
    background: linear-gradient(155deg, #0a3a63 0%, #11578f 55%, #0f766e 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.auth-visual::before {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -110px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}
.auth-visual::after {
    content: "";
    position: absolute;
    right: 40px;
    top: -120px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .14);
}

.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.auth-brand .logo { width: 44px; height: 44px; border-radius: 13px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.auth-brand .logo .ico { width: 24px; height: 24px; color: #fff; }
.auth-brand strong { display: block; font-size: 16px; letter-spacing: .3px; }
.auth-brand span { font-size: 12px; color: #b7d6ee; }

.auth-slogan { margin-top: 30px; position: relative; z-index: 2; }
.auth-slogan h1 { font-size: 25px; line-height: 1.45; font-weight: 600; letter-spacing: .5px; }
.auth-slogan p { font-size: 13px; color: #bcd8ee; margin-top: 10px; line-height: 1.8; }

.auth-capabilities { margin-top: 26px; display: grid; gap: 10px; position: relative; z-index: 2; }
.auth-capability {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: 12px 14px;
}
.auth-capability .ico { width: 18px; height: 18px; color: #8ff0e2; margin-top: 2px; }
.auth-capability strong { display: block; font-size: 13.5px; color: #fff; font-weight: 600; }
.auth-capability span { font-size: 12px; color: #bcd8ee; }

.auth-notice { margin-top: auto; padding-top: 18px; position: relative; z-index: 2; }
.auth-notice-title { font-size: 12px; color: #9fc6e4; letter-spacing: 1px; margin-bottom: 6px; }
.auth-notice ul { list-style: none; margin: 0; padding: 0; }
.auth-notice li { font-size: 12.5px; color: #d9ebf9; padding: 3px 0; display: flex; gap: 8px; align-items: baseline; }
.auth-notice li .dot { width: 5px; height: 5px; border-radius: 50%; background: #6ee0d1; flex: none; transform: translateY(-2px); }
.auth-notice a { color: #eaf6ff; }
.auth-notice a:hover { color: #fff; text-decoration: underline; }

.auth-form { padding: 46px 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h2 { font-size: 22px; letter-spacing: .5px; }
.auth-form .sub { color: var(--muted); font-size: 13px; margin: 8px 0 26px; }
.auth-form .field { margin-bottom: 16px; }
.auth-form .input { padding: 11px 13px; font-size: 14px; }
.auth-form .btn { padding: 11px 20px; font-size: 14.5px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin-top: 14px; color: var(--muted); }
.auth-footer { margin-top: 26px; font-size: 11.5px; color: #9aa9bb; text-align: center; line-height: 1.9; }
.auth-tip { margin-top: 18px; background: var(--primary-soft); border: 1px dashed #c8dff2; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #476582; line-height: 1.7; }

/* ============ 登录错误页 ============ */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.error-card { max-width: 520px; width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 38px 36px; text-align: center; box-shadow: var(--shadow); }
.error-code { font-size: 54px; font-weight: 800; color: var(--primary); line-height: 1; letter-spacing: -2px; }
.error-card h1 { font-size: 19px; margin: 14px 0 8px; }
.error-card p { color: var(--muted); font-size: 13.5px; }
.error-card pre { text-align: left; background: #f6f9fd; border-radius: 10px; padding: 12px; font-size: 11.5px; overflow: auto; max-height: 220px; color: #45596f; }

/* ============ 详情列表 ============ */
.detail-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 22px; }
.detail-item { font-size: 13px; }
.detail-item .k { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.detail-item .v { color: var(--text); }
.detail-list.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-list.one { grid-template-columns: 1fr; }

/* ============ 上传 ============ */
.file-drop { border: 1px dashed #c6d8ea; background: #fbfdff; border-radius: 12px; padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.file-drop input[type="file"] { margin-top: 10px; }
.attach-list { list-style: none; padding: 0; margin: 6px 0 0; }
.attach-list li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 2px 0; }

/* ============ 其它 ============ */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.section-title { font-size: 14.5px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--primary); }
.kv-inline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); }
.kv-inline strong { color: var(--text); font-weight: 500; }
.scroll-y { max-height: 360px; overflow-y: auto; }
.school-picker { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; max-height: 260px; overflow-y: auto; background: #fdfeff; }
.school-picker label { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 13px; cursor: pointer; border-radius: 6px; }
.school-picker label:hover { background: var(--primary-soft); }
.school-picker input { accent-color: var(--primary); }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 520px; min-height: auto; }
    .auth-visual { display: none; }
    .auth-form { padding: 34px 28px; }
}

@media (max-width: 960px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 8px 0 30px rgba(6, 30, 55, .3);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(9, 30, 50, .35);
        z-index: 35;
    }
    .only-mobile { display: inline-grid; }
    .content { padding: 16px 14px 40px; }
    .topbar { padding: 0 14px; }
    .form-grid, .form-grid.cols-3, .form-grid[style] { grid-template-columns: 1fr !important; }
    .detail-list.two { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; gap: 4px; }
    .field-row .flabel { padding-top: 0; }
    .toolbar .input, .toolbar .select { min-width: 0; width: 100%; }
    .toolbar .field { flex: 1 1 150px; }
    .stat-value { font-size: 21px; }
    .user-meta { display: none; }
    .user-chip { padding: 4px; border: none; }
}

@media (max-width: 620px) {
    .page-head h2 { font-size: 17px; }
    .table th, .table td { padding: 9px 10px; }
    .card-body { padding: 14px; }
    .auth-body { padding: 12px; }
    .auth-form { padding: 28px 20px; }
    .auth-form h2 { font-size: 19px; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

@media print {
    .sidebar, .topbar, .page-actions, .toolbar, .pagination, .btn { display: none !important; }
    body, .content { background: #fff; }
    .card { border: 1px solid #ddd; box-shadow: none; }
}
