/* 管理后台统一公共样式：布局、卡片、表格、表单、按钮、状态标签 */

:root {
    --dtp-primary: #2563eb;
    --dtp-primary-dark: #1d4ed8;
    --dtp-text: #1b2431;
    --dtp-text-secondary: #4b5b6f;
    --dtp-text-tertiary: #8698ab;
    --dtp-border: #e3e8f0;
    --dtp-border-light: #eef2f7;
    --dtp-bg: #f4f6fa;
    --dtp-sidebar: #101c33;
    --dtp-radius: 10px;
    --dtp-shadow: 0 1px 2px rgba(16, 32, 56, 0.06), 0 4px 14px rgba(16, 32, 56, 0.05);
}

body.admin-body {
    margin: 0;
    background: var(--dtp-bg);
    color: var(--dtp-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
}

.admin-shell {
    display: flex;
    /* 整体锁定视口高度：左侧菜单固定，右侧内容区独立滚动 */
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏 */
.admin-sidebar {
    width: 238px;
    flex-shrink: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(79, 140, 255, 0.04) 0%, transparent 120px),
        var(--dtp-sidebar);
    color: #cbd5e1;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #2f6cf0, #4f8cff);
    color: #fff;
    font-weight: 600;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.brand-text strong {
    font-size: 13px;
    color: #f1f5f9;
    font-weight: 600;
}

.brand-text small {
    font-size: 11px;
    color: #64748b;
}

.admin-nav {
    flex: 1;
    /* min-height: 0 允许菜单区在 flex 布局中收缩，从而内部出现滚动条而不是撑高整页 */
    min-height: 0;
    padding: 14px 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.admin-nav::-webkit-scrollbar {
    width: 6px;
}

.admin-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 3px;
}

.admin-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.admin-nav::-webkit-scrollbar-track {
    background: transparent;
}

.nav-group {
    margin-top: 4px;
}

.nav-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    margin-top: 4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e2e8f0;
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-group-title:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-group-title .nav-arrow {
    width: 6px;
    height: 6px;
    border-top: 1.5px solid #94a3b8;
    border-right: 1.5px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.2s ease, border-color 0.18s ease;
}

.nav-group-title:hover .nav-arrow {
    border-color: #fff;
}

.nav-group-body {
    display: none;
    padding-left: 4px;
    margin-top: 2px;
}

.nav-group.is-open .nav-group-body {
    display: block;
}

.nav-group.is-open .nav-group-title .nav-arrow {
    transform: rotate(135deg);
    border-color: #4f8cff;
}

.nav-group.is-open .nav-group-title {
    color: #fff;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 2px;
    border-radius: 7px;
    color: #b6c5da;
    text-decoration: none;
    font-size: 12.8px;
    transition: background 0.18s ease, color 0.18s ease;
}

/* 菜单项前的圆点标识，与平台端原型保持一致 */
.nav-item::before {
    content: '';
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #5b6f8c;
    transition: background 0.18s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-item.is-active {
    background: var(--dtp-primary);
    color: #fff;
    font-weight: 500;
    box-shadow: none;
}

.nav-item.is-active::before {
    background: #fff;
}

/* 侧边栏用户区：默认只显示用户名，点击后向上弹出用户菜单 */
.admin-user {
    position: relative;
    flex-shrink: 0;
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease;
}

.user-trigger:hover,
.user-trigger.is-open {
    background: rgba(255, 255, 255, 0.1);
}

.user-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 向上箭头：菜单弹出方向提示，展开后翻转 */
.user-caret {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-top: 1.5px solid #94a3b8;
    border-left: 1.5px solid #94a3b8;
    transform: rotate(45deg) translate(1px, 1px);
    transition: transform 0.2s ease;
}

.user-trigger.is-open .user-caret {
    transform: rotate(225deg) translate(2px, 2px);
}

.user-menu {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(100% - 4px);
    padding: 6px;
    background: #fff;
    border: 1px solid var(--dtp-border);
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(16, 32, 56, 0.18);
    z-index: 40;
}

.user-menu[hidden] {
    display: none;
}

.user-menu-item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #344054;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.user-menu-item:hover {
    background: #f2f5fa;
}

.user-menu-item.is-danger {
    color: #d92d20;
}

.user-menu-item.is-danger:hover {
    background: #fef3f2;
}

/* 主区域 */
.admin-main {
    flex: 1;
    min-width: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    /* 右侧内容独立滚动，不影响左侧菜单 */
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 22px;
    background: #fff;
    border-bottom: 1px solid var(--dtp-border);
    /* 顶栏在内容滚动时保持可见 */
    position: sticky;
    top: 0;
    z-index: 20;
    flex-shrink: 0;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.topbar-sub {
    font-size: 12px;
    color: var(--dtp-text-tertiary);
}

.admin-content {
    padding: 18px 22px 40px;
}

/* 卡片 */
.panel {
    background: #fff;
    border: 1px solid var(--dtp-border);
    border-radius: var(--dtp-radius);
    box-shadow: var(--dtp-shadow);
    padding: 18px 20px;
    margin-bottom: 16px;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-title h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.panel-title .hint {
    font-size: 12px;
    color: var(--dtp-text-tertiary);
}

/* 表单 */
.form-label {
    margin-bottom: 6px;
    font-size: 13px;
    color: #344054;
    font-weight: 500;
}

.form-control,
.form-select {
    height: 38px;
    border-color: #d0d5dd;
    border-radius: 8px;
    font-size: 13px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--dtp-primary);
    box-shadow: 0 0 0 3px rgba(43, 107, 228, 0.12);
}

.form-text {
    font-size: 12px;
    color: var(--dtp-text-tertiary);
}

/* 按钮 */
.btn {
    border-radius: 8px;
    font-size: 13px;
    padding: 7px 16px;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--dtp-primary-dark);
    border-color: var(--dtp-primary-dark);
}

.btn-outline-secondary {
    color: #344054;
    border-color: #d0d5dd;
}

/* 表格 */
.table {
    margin-bottom: 0;
    font-size: 13px;
}

.table > thead th {
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid var(--dtp-border);
    color: var(--dtp-text-secondary);
    font-weight: 500;
    font-size: 12px;
    white-space: nowrap;
}

.table > tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid #f1f3f7;
    vertical-align: middle;
}

.table > tbody tr:hover {
    background: #fafbfd;
}

.table-responsive {
    border: 1px solid var(--dtp-border);
    border-radius: 10px;
    overflow: hidden;
}

/* 状态标签 */
.badge-status {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.6;
}

.badge-success {
    background: #ecfdf3;
    color: #067647;
}

.badge-danger {
    background: #fef3f2;
    color: #b42318;
}

.badge-warning {
    background: #fffaeb;
    color: #b54708;
}

.badge-info {
    background: #eff8ff;
    color: #175cd3;
    margin-left: 6px;
}

/* 通信编号：生成器与示例两栏、代码块 */
.code-split {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 14px;
}

.code-box {
    background: #0f172a;
    color: #d7e3f4;
    border-radius: 8px;
    padding: 12px 14px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-box .c { color: #7d8ca3; }
.code-box .k { color: #7dd3fc; }
.code-box .s { color: #86efac; }
.code-box .n { color: #fbbf24; }

/* 报文详情卡片：内容过长时滚动，避免撑高两栏布局 */
.code-box.code-box-scroll {
    max-height: 320px;
    overflow: auto;
}

.commno-result {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #d5e3ff;
    background: #f7faff;
    border-radius: 8px;
}

.commno-code {
    font-size: 18px;
    letter-spacing: 1px;
    color: #175cd3;
    background: transparent;
}

.info-note {
    border-left: 3px solid #2563eb;
    background: #f7faff;
    padding: 10px 12px;
    border-radius: 6px;
    color: #475467;
    font-size: 12px;
    line-height: 1.7;
}

@media (max-width: 992px) {
    .code-split {
        grid-template-columns: 1fr;
    }
}

/* 终端接口日志：原始报文展示 */
.payload-pre {
    max-height: 320px;
    overflow: auto;
    background: #0f172a;
    color: #d7e3f4;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.6;
    word-break: break-all;
    white-space: pre-wrap;
    margin: 0;
}

.badge-muted {
    background: #f2f4f7;
    color: #475467;
}

.text-muted-sm {
    font-size: 12px;
    color: var(--dtp-text-tertiary);
}

/* 强调文本：详情弹窗字段值 */
.text-strong {
    font-weight: 600;
    color: #0f172a;
}

.empty-state {
    padding: 42px 0;
    text-align: center;
    color: var(--dtp-text-tertiary);
    font-size: 13px;
}

/* 表格内空数据行：保留表头，跨列显示占位文字 */
.table-empty-row td {
    padding: 42px 0;
    text-align: center;
    color: var(--dtp-text-tertiary);
    font-size: 13px;
}

/* ===== 统一分页组件 ===== */
.pager-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--dtp-border-light);
}

.pager-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--dtp-text-secondary);
}

.pager-info strong {
    color: var(--dtp-primary);
    font-weight: 600;
}

.pager-size {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--dtp-text-secondary);
}

.pager-size .form-select {
    width: auto;
    min-width: 70px;
    padding: 4px 28px 4px 10px;
    font-size: 13px;
}

/* Bootstrap 分页样式微调 */
.pager-wrap .pagination {
    --bs-pagination-border-color: var(--dtp-border);
    --bs-pagination-color: #344054;
    --bs-pagination-hover-color: var(--dtp-primary);
    --bs-pagination-hover-bg: #f0f5ff;
    --bs-pagination-hover-border-color: var(--dtp-primary);
    --bs-pagination-active-bg: var(--dtp-primary);
    --bs-pagination-active-border-color: var(--dtp-primary);
    --bs-pagination-disabled-color: #cbd5e1;
    --bs-pagination-border-radius: 6px;
}

.pager-wrap .page-link {
    padding: 5px 11px;
    font-size: 13px;
}

.pager-wrap .page-item.active .page-link {
    font-weight: 600;
}

/* 旧版分页样式（保留兼容，逐步淘汰） */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 12px;
    color: var(--dtp-text-secondary);
}

.pager-links {
    display: flex;
    gap: 6px;
}

.pager-links a,
.pager-links span {
    min-width: 32px;
    padding: 5px 10px;
    border: 1px solid var(--dtp-border);
    border-radius: 6px;
    background: #fff;
    color: #344054;
    text-align: center;
    text-decoration: none;
}

.pager-links .is-current {
    border-color: var(--dtp-primary);
    background: var(--dtp-primary);
    color: #fff;
}

.pager-links .is-disabled {
    color: #cbd5e1;
}

/* 提示条 */
.alert {
    border-radius: 10px;
    font-size: 13px;
    padding: 10px 14px;
}

/* 登录页 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background:
        radial-gradient(circle at 12% 8%, #e8eefb 0%, rgba(232, 238, 251, 0) 46%),
        radial-gradient(circle at 88% 92%, #e6ecfa 0%, rgba(230, 236, 250, 0) 42%),
        #f1f5f9;
}

.login-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    width: 100%;
    max-width: 920px;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.16);
}

.login-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 44px 40px 32px;
    color: #e2e8f0;
    background: linear-gradient(150deg, #0b1226 0%, #132043 58%, #0a1020 100%);
    overflow: hidden;
}

.aside-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    right: -110px;
    top: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.32) 0%, rgba(79, 140, 255, 0) 68%);
    pointer-events: none;
}

.aside-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.aside-brand .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 16px;
}

.aside-brand strong {
    display: block;
    font-size: 14px;
    color: #f8fafc;
    letter-spacing: 0.3px;
}

.aside-brand small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
}

.login-aside h2 {
    position: relative;
    margin: 44px 0 0;
    font-size: 27px;
    line-height: 1.45;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.aside-desc {
    position: relative;
    margin: 14px 0 0;
    max-width: 320px;
    font-size: 12.5px;
    line-height: 1.8;
    color: #94a3b8;
}

.aside-points {
    position: relative;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.aside-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
    font-size: 12.5px;
    color: #cbd5e1;
}

.aside-points .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4f8cff;
    box-shadow: 0 0 8px rgba(79, 140, 255, 0.9);
}

.aside-foot {
    position: relative;
    margin-top: auto;
    padding-top: 40px;
    font-size: 11px;
    color: #475569;
}

.login-panel {
    display: flex;
    align-items: center;
    padding: 52px 46px;
}

.login-panel-inner {
    width: 100%;
}

.login-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.login-panel h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
}

.login-sub {
    margin: 8px 0 26px;
    font-size: 12.5px;
    color: #94a3b8;
}

.login-error {
    margin-bottom: 16px;
    padding: 10px 13px;
    border-radius: 8px;
    background: #fef3f2;
    color: #b42318;
    font-size: 12.5px;
}

.login-field {
    position: relative;
    margin-bottom: 16px;
}

.login-field .form-label {
    font-size: 12.5px;
}

.login-field .form-control {
    height: 44px;
    padding-right: 62px;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.login-field .form-control:focus {
    background: #fff;
}

.login-field-action {
    position: absolute;
    right: 12px;
    bottom: 11px;
    padding: 0;
    border: none;
    background: none;
    font-size: 12px;
    color: var(--dtp-primary);
    cursor: pointer;
}

.login-field-action:hover {
    color: var(--dtp-primary-dark);
}

.login-submit {
    width: 100%;
    height: 44px;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.login-foot {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: 11.5px;
    color: #94a3b8;
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .login-aside {
        display: none;
    }

    .login-panel {
        padding: 40px 28px;
    }

    .login-mobile-brand {
        display: flex;
    }
}

@media (max-width: 900px) {
    .admin-sidebar {
        width: 68px;
    }

    .brand-text,
    .nav-group-title {
        display: none;
    }

    /* 窄屏用户菜单：触发器只显示截断的用户名，菜单在侧栏右侧弹出 */
    .admin-user {
        padding: 8px 6px;
    }

    .user-trigger {
        justify-content: center;
        padding: 8px 4px;
    }

    .user-caret {
        display: none;
    }

    .user-menu {
        left: calc(100% + 8px);
        right: auto;
        bottom: 8px;
        width: 150px;
    }

    .nav-item {
        text-align: center;
        padding: 10px 6px;
        font-size: 12px;
    }

    .admin-content {
        padding: 16px;
    }
}

/* =============================================================================
   无感切换（pjax）：内容区替换时的淡入与加载态
   ============================================================================= */
#adminView {
    animation: adminViewFadeIn 0.18s ease;
}

@keyframes adminViewFadeIn {
    from {
        opacity: 0.4;
    }
    to {
        opacity: 1;
    }
}

.admin-body.is-view-loading .admin-main {
    opacity: 0.6;
    transition: opacity 0.12s ease;
}

/* =============================================================================
   弹窗：与后台整体风格保持一致
   ============================================================================= */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.modal-header,
.modal-footer {
    padding: 16px 20px;
    border-color: #eef2f7;
}

.modal-body {
    padding: 18px 20px;
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

/* =============================================================================
   可搜索下拉（原生 select 增强，见 admin.js initSearchSelect）
   ============================================================================= */
.search-select {
    position: relative;
}

.search-select-menu {
    display: none;
    position: absolute;
    z-index: 1080;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--dtp-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.search-select-menu.is-open {
    display: block;
}

.search-select-item {
    padding: 8px 10px;
    font-size: 13px;
    color: #0f172a;
    border-radius: 6px;
    cursor: pointer;
}

.search-select-item:hover,
.search-select-item.is-active {
    background: #f1f5f9;
}

.search-select-empty {
    padding: 10px;
    font-size: 13px;
    color: #94a3b8;
}

/* =============================================================================
   表格操作列
   ============================================================================= */
/* 额度使用率进度条 */
.usage-rate {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.usage-track {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    border-radius: 999px;
    background: #15a34a;
}

.usage-fill.danger {
    background: #dc2626;
}

.usage-text {
    min-width: 46px;
    font-size: 12px;
    color: #64748b;
    text-align: right;
}

/* =============================================================================
   教学区域 / 电子围栏
   ============================================================================= */
/* 左右分栏：左侧地图 2 份、右侧列表 1 份 */
.split4 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    align-items: start;
}

@media (max-width: 1200px) {
    .split4 {
        grid-template-columns: 1fr;
    }
}

/* 分栏内子卡片 */
.sub-card {
    background: #fff;
    border: 1px solid var(--dtp-border);
    border-radius: 10px;
    overflow: hidden;
}

.sub-card-hd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef1f6;
}

.sub-card-hd h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
}

.sub-card-hd .r {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.sub-card-bd {
    padding: 14px 16px;
}

/* 电子围栏示意图底图 */
.fence-map {
    position: relative;
    height: 400px;
    border: 1px solid var(--dtp-border);
    border-radius: 9px;
    overflow: hidden;
    background:
        linear-gradient(0deg, rgba(37, 99, 235, .04), rgba(37, 99, 235, .04)),
        repeating-linear-gradient(0deg, #eef3f9 0 1px, transparent 1px 34px),
        repeating-linear-gradient(90deg, #eef3f9 0 1px, transparent 1px 34px),
        #f7fafd;
}

/* 高德地图容器：铺满底图区域 */
#amapContainer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* 单个围栏多边形（按坐标包围盒等比定位） */
.fence-poly {
    position: absolute;
    border: 2px solid #2563eb;
    background: rgba(37, 99, 235, .13);
    border-radius: 6px;
    cursor: pointer;
}

.fence-poly.pending {
    border-color: #e08a00;
    background: rgba(224, 138, 0, .1);
}

.fence-poly.rejected {
    border-color: #dc2626;
    background: rgba(220, 38, 38, .08);
}

.fence-label {
    position: absolute;
    left: 8px;
    top: 8px;
    background: #fff;
    border: 1px solid var(--dtp-border);
    border-radius: 5px;
    font-size: 10.5px;
    padding: 1px 6px;
    color: #475467;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
    white-space: nowrap;
}

.fence-note {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--dtp-border);
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 11px;
    color: #475467;
}

.fence-map-tip {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 11px;
    color: #94a3b8;
}

/* 电子围栏真实多边形 SVG 叠加层 */
.fence-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.fence-svg polygon {
    pointer-events: auto;
}

/* 围栏多边形轮廓（默认：通过/已备案） */
.fence-poly-shape {
    fill: rgba(37, 99, 235, .18);
    stroke: #2563eb;
    stroke-width: 1.6;
}

/* 待审核 */
.fence-poly-shape.pending {
    fill: rgba(224, 138, 0, .12);
    stroke: #e08a00;
}

/* 驳回 */
.fence-poly-shape.rejected {
    fill: rgba(220, 38, 26, .10);
    stroke: #dc2626;
}

.fence-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 12.5px;
}

/* 地图设置区域（独立绘制工具） */
.fence-tool-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* 绘制结果统计：顶点数与面积 */
.fence-tool-stat {
    margin-left: auto;
    font-size: 12px;
    color: #475467;
}

/* 绘制地图容器：固定高度，铺满宽度 */
.fence-tool-map {
    position: relative;
    height: 460px;
    border: 1px solid var(--dtp-border);
    border-radius: 9px;
    overflow: hidden;
    background: #f7fafd;
}

#areaMapToolMap {
    width: 100%;
    height: 100%;
}

/* 可点击行 */
.table-row-click {
    cursor: pointer;
}

/* 交叉验证结论条 */
.verdict {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    border-radius: 8px;
}

.verdict .ic {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.verdict .txt {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #166534;
}

.verdict .txt span {
    font-size: 11.5px;
    color: #4d7c5f;
}

.verdict.warn {
    border-color: #fde68a;
    background: #fffbeb;
}

.verdict.warn .ic {
    background: #d97706;
}

.verdict.warn .txt {
    color: #92400e;
}

.verdict.warn .txt span {
    color: #a16207;
}

.verdict.bad {
    border-color: #fecaca;
    background: #fef2f2;
}

.verdict.bad .ic {
    background: #dc2626;
}

.verdict.bad .txt {
    color: #991b1b;
}

.verdict.bad .txt span {
    color: #b91c1c;
}

/* 抓拍标签 */
.tag {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--dtp-border);
    border-radius: 5px;
    background: #f8fafc;
    font-size: 11px;
    color: #475467;
    white-space: nowrap;
}

/* =============================================================================
   分栏卡片（学时初审、交叉验证等页面共用）
   ============================================================================= */
.card {
    background: #fff;
    border: 1px solid var(--dtp-border);
    border-radius: 10px;
    box-shadow: var(--dtp-shadow);
}

.card-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef1f6;
}

.card-hd h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--dtp-text);
}

.card-hd .r {
    display: flex;
    gap: 6px;
}

.card-bd {
    padding: 12px 16px;
}

.table-compact > thead th,
.table-compact > tbody td {
    padding: 7px 8px;
    font-size: 12px;
}

/* 初审规则列表 */
.rule-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* =============================================================================
   三源交叉验证卡片
   ============================================================================= */
.xv-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 992px) {
    .xv-grid {
        grid-template-columns: 1fr;
    }
}

.xv-src {
    border: 1px solid var(--dtp-border);
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
}

.xv-src .h {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dtp-text);
}

.xv-src .ico {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.xv-src .ico-car {
    background: #eef4ff;
    color: #2563eb;
}

.xv-src .ico-stu {
    background: #e8f8ee;
    color: #15a34a;
}

.xv-src .ico-coach {
    background: #fff6e3;
    color: #e08a00;
}

.xv-src .kv {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px dashed #f1f5f9;
}

.xv-src .kv:last-child {
    border-bottom: 0;
}

.xv-src .kv span {
    color: var(--dtp-text-tertiary);
    white-space: nowrap;
}

.xv-src .kv b {
    font-weight: 500;
    color: var(--dtp-text);
    text-align: right;
    word-break: break-all;
}

/* 三源数据链路：拓扑三栏与箭头 */
.chain-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr) 48px minmax(0, 1fr);
    gap: 0;
    align-items: center;
}

.chain-grid .xv-src {
    height: 100%;
}

.chain-arrow {
    text-align: center;
    color: #8698ab;
    font-size: 22px;
}

.xv-src .ico-blue {
    background: #eef4ff;
    color: #2563eb;
}

.xv-src .ico-green {
    background: #e8f8ee;
    color: #15a34a;
}

.chain-center {
    border-color: #c9dcff;
    background: #f7faff;
}

.chain-regulator {
    border-color: #c6ecd4;
    background: #f7fdf9;
}

@media (max-width: 992px) {
    .chain-grid {
        grid-template-columns: 1fr;
    }

    .chain-arrow {
        transform: rotate(90deg);
        padding: 4px 0;
    }
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.rule {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #eef1f6;
    border-radius: 8px;
    background: #fbfcfe;
}

.rule .k {
    padding: 2px 6px;
    border-radius: 4px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
}

.rule b {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dtp-text);
}

.rule-desc {
    margin-top: 2px;
    font-size: 11px;
    color: #8698ab;
}

/* 交叉验证规则配置：规则名区域、取值输入框、超时规则行 */
.rule-main {
    flex: 1;
    min-width: 0;
}

.xv-rule-input {
    flex: none;
    width: 200px;
    font-size: 12px;
}

.xv-reason {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px dashed #e6ecf3;
    font-size: 12px;
    color: #4a5c72;
}

.xv-reason:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.xv-reason code {
    flex: none;
    color: #2563eb;
    font-size: 11px;
}

/* 紫色徽标（计时收费） */
.badge-purple {
    background: rgba(124, 58, 237, .12);
    color: #6d28d9;
}

/* 列表页查询条件栏：与原型一致的紧凑布局 */
/* 监管审核日志：报文明细展示 */
.review-json {
    max-height: 240px;
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
}

.filter-bar .filter-label {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.filter-bar .form-control,
.filter-bar .form-select {
    width: 170px;
    min-width: 120px;
    height: 32px;
    padding: 0 9px;
    font-size: 12.5px;
}

.filter-bar .form-control {
    width: 200px;
}

/* 表格内文字链接按钮 */
.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 12px;
    font-family: inherit;
}

.link-button:hover {
    text-decoration: underline;
}

/* 面板内次级标题 */
.panel-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.table-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* 操作按钮禁止收缩与换行，避免中文按钮竖排 */
.table-action .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.btn-xs {
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 6px;
    line-height: 1.5;
    white-space: nowrap;
}

/* =============================================================================
   角色权限配置树（角色权限管理页）
   ============================================================================= */
.auth-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.auth-tree {
    max-height: 58vh;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.auth-group + .auth-group {
    border-top: 1px solid #e2e8f0;
}

.auth-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.auth-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.auth-items {
    padding: 4px 12px 8px;
}

.auth-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed #eef2f7;
}

.auth-item:last-child {
    border-bottom: 0;
}

.auth-module {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 200px;
    flex: 0 0 200px;
    font-size: 12.5px;
    color: #475569;
    margin: 0;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.auth-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
    margin: 0;
    cursor: pointer;
}

/* 收起状态：仅保留一级菜单标题行 */
.auth-tree.is-collapsed .auth-items {
    display: none;
}

/* 在线咨询：弹窗内展示咨询原文 */
.consult-question {
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 在线咨询：弹窗内展示已有回复（只读） */
.consult-answer {
    padding: 10px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 13px;
    color: #166534;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}


/* =============================================================================
   AJAX 列表状态
   ============================================================================= */
.table-loading td,
.table-empty td {
    padding: 28px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 12.5px;
}

/* =============================================================================
   统计卡片（接口清单、接口监控等页面共用）
   ============================================================================= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--dtp-border);
    border-radius: var(--dtp-radius);
    box-shadow: var(--dtp-shadow);
    padding: 14px 16px;
}

.stat-label {
    font-size: 12px;
    color: var(--dtp-text-tertiary);
}

.stat-value {
    margin-top: 4px;
    font-size: 22px;
    font-weight: 600;
    color: var(--dtp-text);
    line-height: 1.2;
}

.stat-value small {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 400;
    color: var(--dtp-text-tertiary);
}

.stat-diff {
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--dtp-text-tertiary);
}

.stat-diff b {
    color: var(--dtp-primary);
}

/* KPI 色调：仅改变数值颜色，卡片结构保持全站统一 */
.stat-card.is-ok .stat-value { color: #15a34a; }
.stat-card.is-warn .stat-value { color: #e08a00; }
.stat-card.is-danger .stat-value { color: #dc2626; }

/* =============================================================================
   返回码分布条
   ============================================================================= */
.bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 72px;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--dtp-text-secondary);
}

.bar-track {
    height: 8px;
    border-radius: 4px;
    background: #eef2f7;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--dtp-primary);
}

.bar-fill.is-ok { background: #15a34a; }
.bar-fill.is-warn { background: #e08a00; }
.bar-fill.is-danger { background: #dc2626; }

/* =============================================================================
   报文查看
   ============================================================================= */
.modal-pre {
    margin: 0;
    padding: 14px;
    border-radius: 8px;
    background: #101c33;
    color: #d7e3f4;
    font-size: 12px;
    line-height: 1.6;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .stat-grid { grid-template-columns: 1fr; }
}

/* =============================================================================
   培训全过程查询
   ============================================================================= */
.empty-hint {
    padding: 42px 0;
    text-align: center;
    font-size: 13px;
    color: var(--dtp-text-tertiary);
}

.trace-steps {
    display: flex;
    margin: 2px 0 14px;
}

.trace-step {
    flex: 1;
    position: relative;
    padding-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--dtp-text-tertiary);
}

.trace-step::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border-radius: 50%;
    background: #dfe6ef;
    box-shadow: 0 0 0 1px #dfe6ef;
}

.trace-step::after {
    content: '';
    position: absolute;
    top: 11px;
    left: 0;
    right: 50%;
    height: 2px;
    background: #dfe6ef;
}

.trace-step:first-child::after {
    display: none;
}

.trace-step.is-done {
    color: var(--dtp-text-secondary);
}

.trace-step.is-done::before {
    background: var(--dtp-primary);
    box-shadow: 0 0 0 1px var(--dtp-primary);
}

.trace-step.is-done::after {
    background: var(--dtp-primary);
}

.trace-step.is-active {
    color: var(--dtp-primary);
    font-weight: 600;
}

.trace-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.trace-tline .it {
    position: relative;
    padding: 8px 0 8px 18px;
    border-left: 2px solid var(--dtp-border);
}

.trace-tline .it:last-child {
    border-left-color: transparent;
}

.trace-tline .it::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dfe6ef;
}

.trace-tline .it.is-ok::before {
    background: #15a34a;
}

.trace-tline .it .t {
    font-size: 13px;
    font-weight: 500;
    color: var(--dtp-text);
}

.trace-tline .it .m {
    margin-top: 2px;
    font-size: 12px;
    color: var(--dtp-text-tertiary);
}

@media (max-width: 1100px) {
    .trace-split { grid-template-columns: 1fr; }
}

/* 投诉图片缩略图 */
.cp-img {
    width: 96px;
    height: 72px;
    margin: 6px 8px 0 0;
    object-fit: cover;
    border: 1px solid var(--dtp-border);
    border-radius: 6px;
    background: #f5f7fa;
}

/* =============================================================================
   评价管理
   ============================================================================= */
.eval-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    align-items: start;
}

.stars-on {
    color: #ffc42e;
    letter-spacing: 1px;
}

.stars-off {
    color: #dfe6ef;
    letter-spacing: 1px;
}

@media (max-width: 1100px) {
    .eval-split { grid-template-columns: 1fr; }
}

/* =============================================================================
   培训教学大纲
   ============================================================================= */
.syl-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.syl-split {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 14px;
    align-items: start;
}

.syl-input {
    width: 96px;
}

.syl-tline .syl-item {
    position: relative;
    padding: 0 0 16px 16px;
    border-left: 2px solid #e3ebf5;
}

.syl-tline .syl-item:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.syl-tline .syl-item::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563eb;
}

@media (max-width: 1100px) {
    .syl-split { grid-template-columns: 1fr; }
}

/* 可点击行（点击打开详情/编辑弹窗） */
.table-clickable tbody tr {
    cursor: pointer;
}

/* =============================================================================
   统计分析
   ============================================================================= */
.stat-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.syl-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 16px 14px;
}

.syl-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8a99ad;
}

.syl-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

@media (max-width: 1400px) {
    .stat-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .stat-split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .stat-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =============================================================================
   必读弹窗通知：驾校账号登录后展示，读秒结束方可关闭
   ============================================================================= */
.notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
}

.notice-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 560px;
    max-width: 100%;
    max-height: 84vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.notice-card[hidden] {
    display: none;
}

.notice-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
}

.notice-close:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.notice-head {
    padding: 16px 24px 12px;
    border-bottom: 1px solid #eef2f7;
    font-size: 12px;
    color: #64748b;
    letter-spacing: 0.5px;
}

.notice-body {
    padding: 18px 24px 8px;
    overflow-y: auto;
}

.notice-title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.5;
}

.notice-content {
    font-size: 13.5px;
    line-height: 1.9;
    color: #334155;
    word-break: break-word;
}

.notice-content p {
    margin-bottom: 12px;
}

.notice-content img {
    max-width: 100%;
    height: auto;
}

.notice-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 4px;
    padding: 9px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    font-size: 12.5px;
    color: #1d4ed8;
}

.notice-tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid #60a5fa;
    border-radius: 50%;
    font-size: 11px;
    font-style: normal;
    color: #1d4ed8;
}

.notice-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 24px 20px;
}

/* =============================================================================
   驾校首页：页头、KPI、待办、公告与排班两栏布局
   ============================================================================= */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.page-head h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.page-head p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
}

.home-tip {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 999px;
    padding: 2px 10px;
}

.page-head-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.school-home-grid {
    display: grid;
    /* 左宽右窄，对齐原型 split3（1.15 : 0.85） */
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 16px;
    margin-top: 16px;
}

.school-home-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.todo-list {
    display: flex;
    flex-direction: column;
}

.todo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 2px;
    border-bottom: 1px dashed #eef2f7;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
}

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

/* 只读统计行：不表现可点击 */
.todo-row.is-static {
    cursor: default;
}

.todo-row:hover {
    color: #2563eb;
}

.notice-brief-list {
    display: flex;
    flex-direction: column;
}

.notice-brief {
    padding: 10px 0;
    border-bottom: 1px dashed #eef2f7;
}

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

.notice-brief-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.notice-brief-tags .badge-status {
    font-size: 10px;
}

.notice-brief-title {
    font-size: 13px;
    color: #1f2d3d;
    line-height: 1.6;
}

.notice-brief-meta {
    margin-top: 2px;
    font-size: 11.5px;
    color: #8698ab;
}

/* 公告标题可点击：点击后弹窗查看公告正文 */
.notice-brief-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.18s ease;
}

.notice-brief-link:hover {
    color: var(--dtp-primary);
    text-decoration: underline;
}

/* 公告详情弹窗（SweetAlert2 自定义内容） */
.notice-detail {
    text-align: left;
}

.notice-detail-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dtp-border-light);
    font-size: 12px;
    color: var(--dtp-text-tertiary);
}

.notice-detail-body {
    margin-top: 12px;
    max-height: 52vh;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.9;
    color: #334155;
    word-break: break-word;
}

.notice-detail-body img {
    max-width: 100%;
    height: auto;
}

.notice-detail-attach {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--dtp-border-color, #e5e7eb);
    font-size: 12px;
    color: #64748b;
}

.notice-detail-attach-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.notice-attach-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-attach-item {
    padding: 4px 0;
}

.notice-attach-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--dtp-primary, #2563eb);
    font-size: 12px;
    gap: 12px;
}

.notice-attach-link:hover {
    text-decoration: underline;
}

.notice-attach-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.notice-attach-size {
    color: #94a3b8;
    font-size: 11px;
    flex-shrink: 0;
}

.notice-detail-loading {
    padding: 24px 0;
    font-size: 13px;
    color: var(--dtp-text-tertiary);
}

@media (max-width: 1200px) {
    .school-home-grid {
        grid-template-columns: 1fr;
    }
}

/* 图片批量上传缩略图（证照、附件等通用） */
.upload-thumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.upload-thumb {
    position: relative;
    width: 108px;
    height: 108px;
    border: 1px solid var(--dtp-border);
    border-radius: var(--dtp-radius);
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    display: block;
}

.upload-thumb a {
    padding: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--dtp-primary);
    text-align: center;
    word-break: break-all;
    text-decoration: none;
}

.upload-thumb a:hover {
    text-decoration: underline;
}

.upload-thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-thumb-remove:hover {
    background: #dc2626;
}

/* =============================================================================
   弹窗页签（nav-tabs）：去掉 li 项目符号，统一为下划线高亮样式
   ============================================================================= */
.nav-tabs {
    list-style: none;
    padding-left: 0;
    border-bottom: 1px solid #e5e7eb;
}

.nav-tabs .nav-item {
    /* 重置侧边栏 .nav-item 的布局与圆点伪元素（类名共用，需在页签范围内覆盖） */
    display: block;
    list-style: none;
    gap: 0;
    padding: 0;
    margin: 0 0 -1px;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
    text-decoration: none;
    transition: none;
}

.nav-tabs .nav-item::before {
    content: none;
    display: none;
}

.nav-tabs .nav-link {
    padding: 8px 16px;
    font-size: 13px;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    color: #2563eb;
    border-bottom-color: #cbd5e1;
}

.nav-tabs .nav-link.active {
    color: #2563eb;
    font-weight: 600;
    background: transparent;
    border-bottom-color: #2563eb;
}

.nav-tabs .nav-link:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}
