/* ============================================================
   客户运维记录系统 · Metro / Modern 扁平风格样式
   ============================================================ */

:root {
    --accent: #0078d4;
    --accent-dark: #005a9e;
    --accent-light: #deecf9;
    --ink: #1f1f1f;
    --ink-2: #4d4d4d;
    --line: #d6d6d6;
    --bg: #f3f3f3;
    --panel: #ffffff;
    --sidebar: #1b1b1f;
    --sidebar-hover: #2b2b31;
    --danger: #c42b1c;
    --ok: #107c10;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------- 框架 ---------- */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 214px;
    flex: 0 0 214px;
    background: var(--sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    color: #fff;
    border-bottom: 1px solid #303036;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    width: 12px;
    height: 12px;
    background: var(--accent);
    display: inline-block;
}

.brand-text {
    font-size: 15px;
    letter-spacing: 0.5px;
}

.nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: #d9d9d9;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
    text-decoration: none;
}

.nav-item.active {
    background: var(--accent);
    color: #fff;
    border-left-color: #ffffff;
}

.nav-glyph {
    font-size: 14px;
    opacity: 0.85;
    width: 16px;
    text-align: center;
}

.main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.topbar {
    height: 52px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}

.page-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.user-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.user-name {
    color: var(--ink-2);
}

.logout-form {
    margin: 0;
}

.content {
    flex: 1 1 auto;
    padding: 18px;
    overflow: auto;
}

.statusbar {
    height: 30px;
    background: var(--panel);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    font-size: 12px;
    color: #8a8a8a;
}

/* ---------- 首页磁贴 ---------- */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.tile {
    display: block;
    position: relative;
    padding: 22px 20px 20px;
    min-height: 132px;
    color: #fff;
    background: var(--accent);
    border-radius: 0;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tile:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.tile.t-1 { background: #0078d4; }
.tile.t-2 { background: #107c10; }
.tile.t-3 { background: #8764b8; }
.tile.t-4 { background: #c19c00; }

.tile-icon {
    font-size: 22px;
    opacity: 0.9;
    display: block;
    margin-bottom: 16px;
}

.tile-title {
    font-size: 18px;
    font-weight: 600;
    display: block;
}

.tile-desc {
    font-size: 12px;
    opacity: 0.85;
    display: block;
    margin-top: 6px;
}

.hello {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--ink-2);
}

/* ---------- 卡片 / 面板 ---------- */

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.panel-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ececec;
}

.add-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* ---------- 表单控件 ---------- */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 12px 14px;
    margin-bottom: 0;
}

.toolbar .spacer {
    flex: 1 1 auto;
}

label.field-label,
.lbl {
    color: var(--ink-2);
    font-size: 13px;
    white-space: nowrap;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
select,
textarea {
    font-family: inherit;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #c8c8c8;
    border-radius: 0;
    padding: 6px 8px;
    min-width: 0;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
    border-color: var(--accent);
}

textarea {
    width: 100%;
    resize: vertical;
    line-height: 1.6;
}

select {
    min-width: 120px;
}

.w160 { width: 160px; }
.w200 { width: 200px; }
.w240 { width: 240px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 0;
    cursor: pointer;
    line-height: 1.2;
}

.btn:hover {
    background: var(--accent-dark);
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: #6b6b6b;
}

.btn-secondary:hover {
    background: #4f4f4f;
}

.btn-ghost {
    background: #fff;
    color: var(--ink-2);
    border-color: var(--line);
}

.btn-ghost:hover {
    background: #f0f0f0;
    color: var(--ink);
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: #9d2118;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-mini {
    padding: 3px 8px;
    font-size: 12px;
    background: #fff;
    color: var(--accent-dark);
    border: 1px solid var(--accent);
}

.btn-mini:hover {
    background: var(--accent);
    color: #fff;
}

.icon-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.icon-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 0;
}

.icon-btn:hover {
    background: var(--accent-dark);
}

.icon-btn.danger {
    background: #d13438;
}

.icon-btn.danger:hover {
    background: #a4262c;
}

/* ---------- 表格 ---------- */

.table-wrap {
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: none;
    overflow-x: auto;
}

table.grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.grid th {
    background: #2f7cf6;
    color: #fff;
    font-weight: 600;
    text-align: center;
    padding: 9px 8px;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
}

table.grid td {
    border-bottom: 1px solid #eaeaea;
    border-right: 1px solid #f0f0f0;
    padding: 8px;
    vertical-align: middle;
}

table.grid tbody tr:nth-child(even) {
    background: #fafafa;
}

table.grid tbody tr:hover {
    background: var(--accent-light);
}

table.grid td.center { text-align: center; }
table.grid td.nowrap { white-space: nowrap; }
table.grid td.ellipsis {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table.grid input[type="text"] {
    width: 100%;
    padding: 4px 6px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fafafa;
    border: 1px solid var(--line);
    border-top: 1px solid #eaeaea;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--ink-2);
}

.pager {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pager a,
.pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    font-size: 12px;
}

.pager a:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.pager .current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pager .disabled {
    color: #bdbdbd;
    background: #fafafa;
}

.empty {
    padding: 40px;
    text-align: center;
    color: #9a9a9a;
    background: #fff;
    border: 1px solid var(--line);
    border-top: none;
}

/* ---------- 状态标签 ---------- */

.tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    color: #fff;
    background: #8a8a8a;
}

.tag-ok { background: var(--ok); }
.tag-skip { background: #8a6d3b; }
.tag-fail { background: var(--danger); }

/* ---------- 编辑表单 ---------- */

.form-grid {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) 132px minmax(0, 1fr);
    gap: 12px 10px;
    align-items: center;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.form-grid .lbl {
    text-align: right;
    padding-right: 4px;
}

.field-with-add {
    display: flex;
    gap: 6px;
    align-items: center;
}

.field-with-add select {
    flex: 1 1 auto;
    min-width: 0;
}

.field-with-add .btn-mini {
    flex: 0 0 auto;
    height: 30px;
}

.hint {
    font-size: 12px;
    color: var(--danger);
    margin-top: -4px;
    grid-column: 2 / -1;
}

.form-stack {
    display: grid;
    gap: 8px;
}

.inline-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lbl-block {
    color: var(--ink-2);
    font-size: 13px;
    text-align: left;
    display: block;
}

.val-summary {
    margin-top: 4px;
}

.val-summary ul {
    margin: 4px 0 0 18px;
    padding: 0;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eaeaea;
}

/* ---------- 弹窗（原生 dialog） ---------- */

dialog.modal {
    border: none;
    border-top: 4px solid var(--accent);
    padding: 0;
    width: 460px;
    max-width: 92vw;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

dialog.modal::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

.modal-head {
    background: var(--accent);
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
}

.modal-body {
    padding: 16px;
    display: grid;
    gap: 10px;
}

.modal-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 8px;
    align-items: center;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #eaeaea;
}

/* ---------- 提示条 ---------- */

.toast {
    background: #e8f4ea;
    border-left: 3px solid var(--ok);
    color: #0f5a10;
    padding: 9px 12px;
    margin-bottom: 14px;
    font-size: 13px;
}

.errors {
    background: #fdecea;
    border-left: 3px solid var(--danger);
    color: #8a1c12;
    padding: 9px 12px;
    margin-bottom: 14px;
    font-size: 13px;
}

.errors ul {
    margin: 4px 0 0 18px;
    padding: 0;
}

/* ---------- 登录页 ---------- */

.login-page {
    min-height: 100vh;
    display: flex;
    background: #0b7ec2;
}

.login-hero {
    flex: 1 1 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-hero .ring {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.login-hero .ring.r2 { width: 300px; height: 300px; }
.login-hero .ring.r3 { width: 200px; height: 200px; }

.login-hero .core {
    position: relative;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    z-index: 2;
}

.login-hero .dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.75;
}

.login-hero .node {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #0b7ec2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-card {
    width: 380px;
    flex: 0 0 380px;
    background: #fff;
    align-self: center;
    margin: 0 60px 0 0;
    padding: 30px 30px 26px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.login-avatar {
    width: 74px;
    height: 74px;
    margin: 0 auto 20px;
    line-height: 0;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
    margin-bottom: 22px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #b9d3ea;
}

.login-divider span {
    white-space: nowrap;
}

.login-field {
    display: flex;
    align-items: center;
    border: 1px solid #9dc3e6;
    background: #fff;
    margin-bottom: 14px;
    height: 44px;
}

.login-field .ico {
    width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
}

.login-field input {
    flex: 1 1 auto;
    border: none;
    outline: none;
    height: 100%;
    font-size: 14px;
    padding: 0 8px;
}

.login-field input:focus {
    outline: none;
}

.login-actions {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}

.login-actions .btn {
    flex: 1 1 0;
    padding: 11px 0;
    font-size: 14px;
}

.login-error {
    background: #fdecea;
    color: #8a1c12;
    font-size: 12px;
    padding: 8px 10px;
    margin-bottom: 14px;
    border-left: 3px solid var(--danger);
}

.login-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

@media (max-width: 860px) {
    .login-hero { display: none; }
    .login-card { margin: 40px auto; width: 92%; flex: 0 0 auto; }
}

@media (max-width: 780px) {
    .sidebar { width: 170px; flex-basis: 170px; }
    .form-grid { grid-template-columns: 110px minmax(0, 1fr); }
    .form-grid .lbl { text-align: left; }
}

/* ============================================================
   V1.1 视觉升级：渐变侧栏、圆角卡片、彩色图标、批量操作区
   ============================================================ */

:root {
    --accent: #2f7cf6;
    --accent-2: #7b61ff;
    --accent-dark: #1f5fd0;
    --radius: 12px;
    --shadow-sm: 0 2px 10px rgba(20, 40, 80, 0.06);
    --shadow-md: 0 8px 24px rgba(20, 40, 80, 0.10);
}

body {
    background: #f4f7fb;
}

.app-shell {
    background: linear-gradient(160deg, #f7faff 0%, #eef3fb 100%);
}

.sidebar {
    width: 230px;
    flex: 0 0 230px;
    background: linear-gradient(178deg, #1e2b46 0%, #274160 46%, #2a4b74 100%);
    box-shadow: 6px 0 20px rgba(12, 24, 48, 0.16);
}

.brand {
    padding: 20px 18px 16px;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-text {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.6px;
    background: linear-gradient(90deg, #8ab6ff, #cfb0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav {
    padding: 12px 0 20px;
    gap: 2px;
}

.nav-item {
    margin: 2px 10px;
    padding: 11px 12px;
    border-left: none;
    border-radius: 10px;
    color: #b8c6db;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    text-decoration: none;
    transform: translateX(2px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(47, 124, 246, 0.95), rgba(123, 97, 255, 0.9));
    box-shadow: 0 6px 18px rgba(47, 124, 246, 0.35);
    color: #fff;
    border-left-color: transparent;
}

.nav-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 4px 10px rgba(4, 18, 44, 0.22);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    opacity: 1;
}

.nav-glyph svg {
    width: 17px;
    height: 17px;
}

.glyph-svg {
    display: block;
}

.nav-sub {
    margin: 0 10px 6px 36px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.12);
    display: none;
    flex-direction: column;
    gap: 2px;
}

.nav-group.open .nav-sub {
    display: flex;
}

.nav-group {
    display: block;
}

.nav-row {
    display: flex;
    align-items: center;
}

.nav-row .nav-item {
    flex: 1 1 auto;
    margin-right: 0;
}



.nav-sub-item {
    font-size: 12px;
    color: #8ea2bd;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.nav-sub-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    text-decoration: none;
}

.nav-sub-item.on {
    color: #fff;
    background: rgba(47, 124, 246, 0.38);
}

.topbar {
    height: 58px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(20, 40, 80, 0.08);
    box-shadow: 0 2px 10px rgba(20, 40, 80, 0.05);
}

.page-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.avatar {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 3px 10px rgba(47, 124, 246, 0.3);
}

.statusbar {
    background: #fff;
    border-top: 1px solid rgba(20, 40, 80, 0.08);
}

.content {
    padding: 20px;
}

/* 磁贴 */

.tiles {
    gap: 16px;
}

.tile {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.tile:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.tile.t-1 { background: linear-gradient(140deg, #2f7cf6, #4facfe); }
.tile.t-2 { background: linear-gradient(140deg, #12b886, #43e97b); }
.tile.t-3 { background: linear-gradient(140deg, #a06cf7, #c471ed); }
.tile.t-4 { background: linear-gradient(140deg, #f5a623, #ffcd83); }
.tile.t-5 { background: linear-gradient(140deg, #7b61ff, #9d8bff); }

.tile-icon {
    margin-bottom: 14px;
}

.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.10));
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 18px rgba(6, 24, 62, 0.20);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
}

.tile-icon svg {
    width: 26px;
    height: 26px;
}

/* 面板 / 工具条 */

.panel,
.toolbar {
    border: 1px solid rgba(20, 40, 80, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.panel {
    padding: 16px 18px;
}

.toolbar {
    padding: 14px 16px;
}

.panel-title {
    border-bottom: 1px solid rgba(20, 40, 80, 0.07);
}

/* 按钮：统一圆角渐变，工具条内等宽 */

.btn {
    border-radius: 9px;
    padding: 8px 18px;
    font-weight: 500;
    background: linear-gradient(135deg, #2f7cf6, #5b8def);
    box-shadow: 0 3px 10px rgba(47, 124, 246, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #2f7cf6, #5b8def);
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(47, 124, 246, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b, #8494a8);
    box-shadow: 0 3px 10px rgba(100, 116, 139, 0.22);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #64748b, #8494a8);
}

.btn-ghost {
    background: #fff;
    color: var(--ink-2);
    border-color: rgba(20, 40, 80, 0.14);
    box-shadow: none;
}

.btn-ghost:hover {
    background: #f5f8fd;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background: linear-gradient(135deg, #e04242, #d13438);
}

.btn-mini {
    border-radius: 7px;
    box-shadow: none;
}

/* 工具条按钮等宽等色 */

.btn-tool {
    min-width: 120px;
    width: 120px;
    padding-left: 0;
    padding-right: 0;
    background: linear-gradient(135deg, #2f7cf6, #5b8def);
    color: #fff;
    border: none;
}

/* 日期区间等内联组合不被换行拆开 */

.inline-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-tool:hover {
    color: #fff;
}

.icon-btn {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(47, 124, 246, 0.2);
}

/* 表格 */

.table-wrap {
    border: 1px solid rgba(20, 40, 80, 0.08);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-sm);
}

table.grid th {
    background: #2f7cf6;
}

table.grid tbody tr:hover {
    background: #eef5ff;
}

input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
}

.summary-row {
    background: #fbfdff;
    border: 1px solid rgba(20, 40, 80, 0.08);
    border-top: 1px solid rgba(20, 40, 80, 0.08);
    border-radius: 0 0 var(--radius) var(--radius);
}

pager a {
    border-radius: 6px;
}

.page-size {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ink-2);
}

.page-size select {
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 12px;
    min-width: 76px;
}

/* 查询统计 */

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border: 1px solid rgba(20, 40, 80, 0.08);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-label {
    font-size: 12px;
    color: #8a97a8;
    letter-spacing: 0.4px;
}

.stat-card .stat-value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 6px;
    background: linear-gradient(90deg, #2f7cf6, #7b61ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-card .stat-unit {
    font-size: 12px;
    color: #8a97a8;
    margin-left: 4px;
}

.stat-card.c-2 { border-left-color: #12b886; }
.stat-card.c-3 { border-left-color: #ffb020; }
.stat-card.c-4 { border-left-color: #7b61ff; }

.seg {
    display: inline-flex;
    border: 1px solid rgba(20, 40, 80, 0.12);
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
}

.seg a {
    padding: 7px 16px;
    font-size: 13px;
    color: var(--ink-2);
}

.seg a.on {
    background: linear-gradient(135deg, #2f7cf6, #5b8def);
    color: #fff;
}

.seg a:hover {
    text-decoration: none;
}

/* 弹窗 */

dialog.modal {
    border-radius: var(--radius);
    border-top: 4px solid var(--accent);
    box-shadow: 0 18px 50px rgba(12, 24, 48, 0.35);
}

/* 登录页微调 */

.login-page {
    background: linear-gradient(135deg, #0b5fb0 0%, #0b7ec2 45%, #12a1d9 100%);
}

.login-card {
    border-radius: 16px;
}

/* ---------- 打印 ---------- */

@media print {
    .sidebar, .topbar, .statusbar, .no-print { display: none !important; }
    .content { padding: 0; }
    body { background: #fff; }
}

/* ---------- 登录页 V1.2：点阵网格渐变背景 + 透明 logo ---------- */

.login-page {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 4% -10%, rgba(34, 211, 238, 0.85) 0%, rgba(34, 211, 238, 0) 58%),
        radial-gradient(820px 480px at 100% 2%, rgba(168, 85, 247, 0.9) 0%, rgba(168, 85, 247, 0) 62%),
        radial-gradient(1100px 640px at 50% 126%, rgba(37, 99, 235, 0.95) 0%, rgba(37, 99, 235, 0) 72%),
        linear-gradient(118deg, #0b3fa6 0%, #1f74ff 46%, #6a4bff 100%);
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1.4px);
    background-size: 17px 17px;
    opacity: 0.42;
    -webkit-mask-image: radial-gradient(135% 100% at 30% -10%, #000 30%, transparent 82%);
    mask-image: radial-gradient(135% 100% at 30% -10%, #000 30%, transparent 82%);
    pointer-events: none;
}

.login-page::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: repeating-linear-gradient(56deg, rgba(255, 255, 255, 0.10) 0 1px, transparent 1px 9px);
    opacity: 0.3;
    pointer-events: none;
}

.login-hero,
.login-card {
    position: relative;
    z-index: 1;
}

.login-hero .ring {
    border-color: rgba(255, 255, 255, 0.35);
}

.login-hero .core {
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.18));
    box-shadow: 0 0 60px rgba(180, 220, 255, 0.45);
}

.login-card {
    border-radius: 20px;
    box-shadow: 0 26px 60px rgba(6, 24, 70, 0.34);
}

.login-logo {
    display: block;
    width: 118px;
    height: auto;
    margin: 0 auto 14px;
}

/* ---------- 登录页 V3：蓝白商务风（与内页一致、控件居中、适配手机浏览器） ---------- */

body.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: #ffffff;
    font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
    background: #2a5fd0 url("../img/login-bg.jpg") center / cover no-repeat fixed;
    overflow-x: hidden;
}

/* 背景图已由 body 承载，旧的网格/光斑层隐藏 */
.login-bg {
    display: none;
}

.login-shell {
    width: 100%;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 40px 18px calc(26px + env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.login-brand {
    text-align: center;
    width: 100%;
    max-width: 470px;
    box-sizing: border-box;
}

.login-brand .login-logo {
    display: block;
    width: 92px;
    max-width: 40%;
    height: auto;
    margin: 0 auto 14px;
}

.login-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(8, 26, 70, 0.45);
}

.login-subtitle {
    margin: 10px 0 0;
    font-size: 12px;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.86);
    text-shadow: 0 1px 10px rgba(8, 26, 70, 0.35);
    overflow-wrap: anywhere;
}

.login-card {
    flex: 0 0 auto;
    margin: 0 auto;
    width: 100%;
    max-width: 372px;
    box-sizing: border-box;
    padding: 26px 26px 24px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(14, 52, 106, 0.46), rgba(8, 32, 74, 0.34));
    border: 1px solid rgba(168, 216, 255, 0.35);
    box-shadow: 0 24px 60px rgba(4, 18, 48, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.20), inset 0 0 40px rgba(120, 190, 255, 0.10);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.login-divider {
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.login-divider::before,
.login-divider::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent) !important;
}

.login-field {
    height: 46px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.10);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-field:focus-within {
    background: rgba(255, 255, 255, 0.20);
    border-color: rgba(160, 226, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(130, 210, 255, 0.28), 0 0 18px rgba(120, 205, 255, 0.35);
}

.login-field .ico {
    width: 40px;
    flex: 0 0 40px;
}

.login-field input {
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 0.4px;
}

.login-field input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.login-field input:-webkit-autofill {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0 999px rgba(12, 44, 92, 0.9) inset;
}

.login-actions {
    gap: 10px;
    margin-top: 22px;
}

.login-btn,
.login-btn-ghost {
    flex: 1 1 0;
    height: 44px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-btn {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #2f7cf6, #1f66dd);
    box-shadow: 0 8px 18px rgba(47, 124, 246, 0.32);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(47, 124, 246, 0.4);
}

.login-btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #eaf3ff;
}

.login-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.login-foot {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.login-error {
    border-radius: 10px;
    background: rgba(255, 120, 110, 0.16);
    border: 1px solid rgba(255, 150, 140, 0.5);
    color: #ffe3e0;
    padding: 9px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}

.login-info {
    border-radius: 10px;
    background: rgba(140, 220, 255, 0.16);
    border: 1px solid rgba(170, 230, 255, 0.45);
    color: #eaf8ff;
    padding: 9px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}

.login-copyright {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    letter-spacing: 0.6px;
    text-align: center;
}

@media (max-width: 560px) {
    .login-shell { gap: 18px; padding: 30px 16px calc(20px + env(safe-area-inset-bottom)); }
    .login-title { font-size: 21px; letter-spacing: 3px; }
    .login-subtitle { font-size: 11px; letter-spacing: 0.5px; }
    .login-brand .login-logo { width: 76px; }
    .login-card { max-width: 100%; padding: 22px 18px 18px; }
    .login-btn, .login-btn-ghost { width: 100%; }
}

/* 数据备份与还原 */

.backup-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.backup-col {
    flex: 1 1 360px;
    min-width: 300px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #f6f9ff;
    border: 1px solid #e2ecfa;
}

.backup-head {
    font-size: 14px;
    font-weight: 600;
    color: #16324f;
}

/* ---------- 信息维护：流程条 ---------- */
.flow-panel {
    background: linear-gradient(120deg, #f7fbff, #eef5ff);
}

.flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 4px 2px;
}

.flow-step {
    flex: 1 1 150px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #dfeaf9;
    box-shadow: 0 6px 16px rgba(28, 92, 176, 0.08);
}

.flow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
}

.flow-no {
    font-size: 12px;
    color: #7d93ae;
    letter-spacing: 0.5px;
}

.flow-name {
    font-size: 14px;
    font-weight: 600;
    color: #16324f;
}

.flow-arrow {
    flex: 0 0 24px;
    text-align: center;
    font-size: 20px;
    color: #9db6d6;
}

@media (max-width: 900px) {
    .flow {
        flex-direction: column;
        align-items: stretch;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }
}

/* ---------- 勾选面板 ---------- */
.pick {
    position: relative;
    display: inline-block;
}

.pick > summary {
    list-style: none;
    cursor: pointer;
    font-size: 12px;
    color: #2f7cf6;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px dashed rgba(47, 124, 246, 0.45);
    background: rgba(47, 124, 246, 0.06);
    white-space: nowrap;
}

.pick > summary::-webkit-details-marker {
    display: none;
}

.pick[open] > summary {
    background: rgba(47, 124, 246, 0.14);
}

.pick-body {
    position: absolute;
    z-index: 30;
    margin-top: 6px;
    padding: 10px 12px;
    min-width: 180px;
    max-width: 320px;
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid #dbe6f5;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(18, 52, 96, 0.18);
}

.pick-head {
    font-size: 12px;
    font-weight: 600;
    color: #16324f;
    margin: 4px 0 6px;
}

.chk {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #33506e;
    padding: 3px 0;
    white-space: nowrap;
}

.chk input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

.eng-pick {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
/* 勾选浮层：打开时用居中弹层一次展示全部选项（不再被表格滚动区裁切） */
.pick-modal {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 28, 52, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.pick-modal.show {
    display: flex;
}

.pick-modal-card {
    width: 340px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(10, 30, 60, 0.32);
    overflow: hidden;
}

.pick-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e4edf9;
    background: linear-gradient(180deg, #f7fbff, #ffffff);
}

.pick-modal-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #16324f;
}

.pick-modal-close {
    border: none;
    background: #2f7cf6;
    color: #fff;
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.pick-modal-close:hover {
    background: #1f68e0;
}

.pick-modal-body {
    padding: 10px 16px 14px;
    overflow: auto;
}

.pick-modal-body .pick-body {
    position: static;
    min-width: 0;
    max-width: none;
    max-height: none;
    padding: 0;
    border: none;
    box-shadow: none;
    overflow: visible;
    background: transparent;
}

/* 操作列按钮保持一行，不因列宽换行 */
.icon-actions {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.icon-actions .btn {
    white-space: nowrap;
    flex: 0 0 auto;
}

/* 查询统计：明细下方的打印/导出按钮组，居中排列 */
.stat-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* 勾选面板入口做成与「停用」一致的实心按钮（重置密码等） */
.pick > summary.btn {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 5px 12px;
    font-size: 12px;
    color: #fff;
    background: linear-gradient(135deg, #2f7cf6, #5b8def);
    box-shadow: 0 3px 10px rgba(47, 124, 246, 0.22);
}

.pick > summary.btn:hover {
    filter: brightness(1.05);
}

.pick[open] > summary.btn {
    background: linear-gradient(135deg, #2f7cf6, #5b8def);
}

/* 本人改密等窄表单：两列（标签 + 输入框）整齐对齐 */
.form-rows {
    display: grid;
    margin: 0 auto;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px 12px;
    align-items: center;
    max-width: 460px;
}

.form-rows .lbl {
    text-align: right;
}

.form-rows .w320 {
    width: 100%;
    max-width: 320px;
}

.form-rows-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .form-rows {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .form-rows .lbl {
        text-align: left;
    }
}

/* 列表页工具条：操作按钮统一居中一行 */
.toolbar-actions {
    flex: 1 0 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.toolbar-actions form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

/* 操作列内「重置密码」与「停用」等按钮高度一致 */
.icon-actions .btn,
.icon-actions .pick > summary.btn {
    height: 30px;
    min-height: 30px;
    padding: 0 14px;
    line-height: 1;
    box-sizing: border-box;
}

/* 修改本人密码页：面板在页面水平居中，按钮与提示在输入框列下居中 */
.pwd-panel {
    max-width: 720px;
    margin: 48px auto;
}

.form-rows .form-rows-actions {
    grid-column: 2;
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.form-rows .form-rows-note {
    grid-column: 2;
    margin: 0;
    text-align: center;
}

/* ===== 信息维护：数据机房 ===== */
.room-block{margin:12px 0 4px;padding:12px;border:1px dashed #d6e2f6;border-radius:10px;background:#f8fbff;}
.room-block-head{display:flex;align-items:center;gap:12px;margin-bottom:10px;flex-wrap:wrap;}
.room-block-head strong{font-size:14px;color:#22354f;}
.room-rows{display:flex;flex-direction:column;gap:8px;}
.room-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.room-row input[type=text]{height:34px;}
.danger-chk{color:#d9534f;}
.modal-wide{width:min(920px,94vw);}
/* 维护流程步骤可点击 */
a.flow-step{text-decoration:none;color:inherit;transition:transform .15s,box-shadow .15s;}
a.flow-step:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(37,99,235,.18);}
/* 侧栏二级菜单变长后可滚动 */
.sidebar .nav{overflow-y:auto;}
.sidebar .nav-sub-item{display:flex;}

/* 表单里的勾选入口：与「新增客户」同款实心按钮 */
.pick > summary.pick-btn{
    color:#fff !important;
    border:1px solid transparent !important;
    background:linear-gradient(135deg,#2f7cf6,#5b8def) !important;
    box-shadow:0 3px 10px rgba(47,124,246,.22);
    display:inline-flex;align-items:center;gap:6px;
}
.pick > summary.pick-btn svg{width:13px;height:13px;display:block;}
.pick > summary.pick-btn:hover{filter:brightness(1.05);}
.pick[open] > summary.pick-btn{background:linear-gradient(135deg,#2f7cf6,#5b8def) !important;}

/* ---------- 二级菜单：小尺寸玻璃图标（延续一级菜单质感） ---------- */
.nav-sub {
    margin: 2px 8px 10px 34px;
    padding-left: 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.10);
    gap: 4px;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    line-height: 26px;
    letter-spacing: 0.2px;
    color: #a9bcd6;
    padding: 6px 9px;
    border-radius: 9px;
}

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

.nav-sub-item.on {
    color: #fff;
    background: linear-gradient(90deg, rgba(47, 124, 246, 0.42), rgba(123, 97, 255, 0.28));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.nav-sub-glyph {
    display: inline-flex;
    vertical-align: middle;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 3px 8px rgba(4, 18, 44, 0.20);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
}

.nav-sub-glyph svg {
    width: 16px !important;
    height: 16px !important;
}

.nav-sub-item.on .nav-sub-glyph {
    border-color: rgba(255, 255, 255, 0.42);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.10));
}

/* 机房行右侧「移除」按钮 */
.room-del {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(47, 124, 246, 0.28);
    background: rgba(47, 124, 246, 0.06);
    color: #2f7cf6;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.room-del:hover {
    background: rgba(226, 74, 74, 0.12);
    border-color: rgba(226, 74, 74, 0.4);
    color: #d13c3c;
}

/* ---------- 新增客户：基本信息 + 数据机房合并为一张卡 ---------- */
.add-card {
    display: block;
    padding: 14px 16px 12px;
    border: 1px solid #dfeafb;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff, #f6faff);
    box-shadow: inset 0 1px 0 #fff;
}

.add-card .add-sec-title {
    font-size: 13px;
    font-weight: 600;
    color: #22354f;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    padding-left: 9px;
    border-left: 3px solid #2f7cf6;
    line-height: 1.1;
}

.add-card .add-row {
    margin-bottom: 0;
}

/* 机房区块与基本信息同卡，仅用分隔线区分 */
.add-card .room-block {
    margin: 14px 0 0;
    padding: 12px 0 0;
    border: none;
    border-top: 1px dashed #dbe6f7;
    border-radius: 0;
    background: transparent;
}

.add-card .add-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef3fb;
}

.add-card .add-actions .btn-sm,
.add-card .add-actions .pick > summary {
    height: 30px;
}

/* 侧栏禁止横向滚动、长文本按容器收缩 */
.sidebar{overflow-x:hidden;}
.sidebar .nav-sub{box-sizing:border-box;max-width:calc(100% - 44px);}
.sidebar .nav-sub-item{box-sizing:border-box;min-width:0;width:100%;}
.sidebar .nav-sub-item > span:not(.nav-sub-glyph){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* ---------- 彻底消除横向滚动条（侧栏 + 页面级） ---------- */
@media screen {
    html, body { overflow-x: hidden; max-width: 100%; }
    .shell { max-width: 100%; overflow-x: hidden; }
}
.sidebar { overflow: hidden; }
.sidebar .nav { overflow-y: auto; overflow-x: hidden; }
.sidebar .nav-item, .sidebar .nav-sub, .sidebar .nav-sub-item { max-width: 100%; }
.topbar { flex-wrap: nowrap; min-width: 0; gap: 10px; }
.page-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-box { min-width: 0; flex: 0 0 auto; }
.content { overflow-x: auto; }

/* ---------- 单据二级菜单：维护系统 + 其下年份 ---------- */
.nav-sub-group { margin: 2px 0 4px; }
.nav-sub-group .nav-sub-item { font-size: 13.5px; }
.nav-yr {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 2px 0 2px 14px;
    padding-left: 10px;
    border-left: 1px dashed rgba(255, 255, 255, 0.16);
}
.nav-yr-item {
    display: block;
    font-size: 12.5px;
    line-height: 22px;
    padding: 2px 8px;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.nav-yr-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-yr-item.on { background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 600; }

/* 单据二级菜单：收紧缩进，保证系统名完整显示；父项高亮更柔和 */
.sidebar .nav-sub { margin-left: 22px; }
.nav-sub-group .nav-sub-item { font-size: 13px; gap: 8px; padding-left: 6px; padding-right: 6px; }
.nav-sub-group > .nav-sub-item.on {
    background: rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
}
.nav-yr { margin-left: 10px; }
.nav-yr-item.on { background: linear-gradient(135deg, #2f7cf6, #5b8def); color: #fff; }

/* 三级（年份）默认收起，仅展开当前选中的维护系统 */
.nav-sub-group .nav-yr { display: none; }
.nav-sub-group.sel .nav-yr { display: flex; }
/* 巡检单模板表格（录入页） */
.tpl-box { margin: 2px 0 10px; }
.tpl-title { font-weight: 700; font-size: 15px; color: #1f2d3d; margin-bottom: 8px; }
.tpl-edit { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.tpl-edit th { background: #eef2f7; border: 1px solid #d6dde7; padding: 5px 6px; font-weight: 600; color: #3b4a5a; }
.tpl-edit td { border: 1px solid #d6dde7; padding: 3px 4px; }
.tpl-edit td input, .tpl-edit td select { width: 100%; border: 1px solid #dfe4ea; border-radius: 3px; padding: 3px 5px; font-size: 13px; background: #fff; }
.tpl-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.tpl-actions .hint { color: #8492a6; font-size: 12px; }