/* ===================================================================
   style.css —— 教室设备管理系统 全局样式

   【设计说明】
   采用浅色主题 + 蓝色主色调，符合教育管理系统的稳重风格。
   布局用 CSS Flex 和 Grid，不依赖任何 CSS 框架，
   保证系统零前端依赖，下载下来就能用。

   【响应式处理】
   导航栏在窄屏下会换行，表格在窄屏下可横向滚动，
   在手机浏览器上也能正常查看。
   =================================================================== */

/* ---------- 设计变量 ----------
   顶栏高度写成变量，是因为抽屉收起时要用 calc(-100% - 顶栏高度)
   才能完全移出屏幕；两处各写一个数字，改一个忘一个就会让
   「用户信息/退出」压在顶栏上露出来。 */
:root {
    --topbar-h: 58px;     /* 宽屏顶栏高度 */
    --topbar-h-narrow: 54px;  /* 窄屏顶栏高度，抽屉用它做偏移 */
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

a { color: #1890ff; text-decoration: none; }
a:hover { color: #096dd9; }

/* ---------- 顶部导航 ---------- */
.topbar {
    height: var(--topbar-h);
    background: #001529;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left { display: flex; align-items: center; }
/* 顶栏标识：不用图标字体，用一个纯色方块里的首字，避免依赖 emoji 渲染 */
.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    line-height: 1;
    user-select: none;
}
.logo-text {
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    white-space: nowrap;
}

.topbar-nav { display: flex; flex-wrap: wrap; }
.topbar-nav a {
    color: rgba(255, 255, 255, .75);
    padding: 0 15px;
    height: var(--topbar-h);
    line-height: var(--topbar-h);
    font-size: 14px;
    transition: all .2s;
}
.topbar-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.topbar-nav a.active { color: #1890ff; background: rgba(24, 144, 255, .12); }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-info { color: rgba(255, 255, 255, .85); font-size: 13px; }

.role-badge {
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 5px;
}
.role-badge.admin { background: #faad14; color: #fff; }
.role-badge.user { background: #52c41a; color: #fff; }

/* ---------- 消息提示 ---------- */
/* 提示条放在右下角。
   原来固定在右上角，会正好盖住仪表盘的「待处理工单」统计卡片，
   而那个卡片恰恰是操作完弹提示后最想立刻确认的数字。 */
.flash-area {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 340px;
}
.flash {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    animation: slideIn .25s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
.flash button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: rgba(0, 0, 0, .45);
    line-height: 1;
}
.flash-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.flash-error   { background: #fff1f0; border: 1px solid #ffa39e; color: #cf1322; }
.flash-warning { background: #fffbe6; border: 1px solid #ffe58f; color: #d48806; }
.flash-info    { background: #e6f7ff; border: 1px solid #91d5ff; color: #0958d9; }

/* ---------- 主体容器 ---------- */
.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* ---------- 卡片 ---------- */
.card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
    margin-bottom: 18px;
}
.card-head {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #262626;
}
.card-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 15px;
    background: #1890ff;
    margin-right: 8px;
    vertical-align: -2px;
    border-radius: 2px;
}
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 0; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    color: #595959;
    cursor: pointer;
    font-size: 13px;
    line-height: 22px;
    transition: all .2s;
    white-space: nowrap;
}
.btn:hover { border-color: #1890ff; color: #1890ff; }
.btn-primary { background: #1890ff; border-color: #1890ff; color: #fff; }
.btn-primary:hover { background: #096dd9; border-color: #096dd9; color: #fff; }
.btn-danger { background: #ff4d4f; border-color: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #cf1322; border-color: #cf1322; color: #fff; }
.btn-success { background: #52c41a; border-color: #52c41a; color: #fff; }
.btn-success:hover { background: #389e0d; border-color: #389e0d; color: #fff; }
.btn-warning { background: #faad14; border-color: #faad14; color: #fff; }
.btn-warning:hover { background: #d48806; border-color: #d48806; color: #fff; }
.btn-sm { padding: 2px 10px; font-size: 12px; line-height: 20px; }
.btn-outline { background: transparent; color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .35); }
.btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

/* ---------- 表单 ---------- */
.form-row { display: flex; flex-wrap: wrap; gap: 14px; }
.form-item { display: flex; flex-direction: column; gap: 4px; }
.form-item label { font-size: 13px; color: #595959; }
.form-item input,
.form-item select,
.form-item textarea {
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    min-width: 160px;
    outline: none;
    transition: border-color .2s;
}
.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus { border-color: #1890ff; }
.form-item textarea { min-height: 60px; resize: vertical; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
th {
    background: #fafafa;
    color: #595959;
    font-weight: 600;
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
td {
    padding: 11px 12px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}
tbody tr:hover { background: #fafcff; }
tr.row-overdue { background: #fff7e6; }
tr.row-overdue:hover { background: #fff1e0; }

/* ---------- 标签 ---------- */
.tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
}
.tag-idle     { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.tag-borrowed { background: #e6f7ff; color: #0958d9; border: 1px solid #91d5ff; }
.tag-fault    { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.tag-returned { background: #f9f0ff; color: #531dab; border: 1px solid #d3adf7; }
.tag-overdue  { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.tag-ok       { background: #f6ffed; color: #389e0d; }
.tag-warn     { background: #fffbe6; color: #d48806; }
.tag-bad      { background: #fff1f0; color: #cf1322; }

/* ---------- 统计卡片 ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat-box {
    background: #fff;
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
    border-left: 3px solid #1890ff;
}
.stat-box.s2 { border-left-color: #52c41a; }
.stat-box.s3 { border-left-color: #faad14; }
.stat-box.s4 { border-left-color: #ff4d4f; }
.stat-box.s5 { border-left-color: #722ed1; }
.stat-box.s6 { border-left-color: #13c2c2; }
.stat-num {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;
    color: #262626;
}
.stat-label { font-size: 13px; color: #8c8c8c; margin-top: 2px; }

/* ---------- 空状态 ---------- */
.empty {
    text-align: center;
    padding: 50px 20px;
    color: #bfbfbf;
}

/* ---------- 弹窗 ---------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal.show { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 6px;
    width: 560px;
    max-width: 92vw;
    max-height: 86vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}
.modal-head {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.modal-body { padding: 20px; }

/* ---------- 图表 ---------- */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 18px;
}
.chart-box { width: 100%; height: 300px; }

/* ---------- 登录页 ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a3a6b 0%, #2b5c9e 55%, #3a7bd5 100%);
}
.login-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
    width: 400px;
    max-width: 92vw;
    overflow: hidden;
}
.login-head {
    background: #001529;
    color: #fff;
    padding: 28px 0 22px;
    text-align: center;
}
.login-head h1 { font-size: 20px; font-weight: bold; }
.login-head p { font-size: 12px; color: rgba(255, 255, 255, .6); margin-top: 6px; }
.login-body { padding: 28px; }
.login-body .form-item { margin-bottom: 16px; }
.login-body .form-item input { width: 100%; min-width: 0; padding: 9px 12px; }
.login-btn { width: 100%; padding: 9px; font-size: 15px; }
.login-tips {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #e8e8e8;
    font-size: 12px;
    color: #8c8c8c;
    line-height: 1.9;
}

/* ---------- 错误页 ---------- */
.error-page {
    text-align: center;
    padding: 90px 20px;
}
.error-code { font-size: 76px; font-weight: bold; color: #1890ff; }
.error-msg { color: #8c8c8c; margin: 12px 0 22px; }

/* ---------- 工具类 ---------- */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.muted { color: #8c8c8c; }
.nowrap { white-space: nowrap; }
.mt-10 { margin-top: 10px; }
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ---------- 汉堡按钮与导航遮罩 ---------- */
/* 宽屏一律隐藏，只有窄屏才参与布局（见下方 768 断点） */
.hamburger {
    display: none;
    width: 34px; height: 34px;
    margin-right: 10px;
    flex-direction: column;
    justify-content: center; align-items: center;
    gap: 4px;
    border-radius: 6px;
    position: relative;
    z-index: 101;      /* 高于顶栏 100 与抽屉 99，保证抽屉打开时仍能点它关闭 */
}
.hamburger span {
    display: block;
    width: 18px; height: 2px;
    background: #fff; border-radius: 2px;
    transition: transform .24s, opacity .24s;
}
.hamburger:active { background: rgba(255, 255, 255, .12); }

.nav-mask {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .45);
    /* 遮罩必须在抽屉之下、顶栏之上：
       顶栏 z-index 是 100，抽屉是 99，遮罩取 97 */
    z-index: 97;
    opacity: 0; visibility: hidden;
    transition: opacity .22s, visibility .22s;
}
.nav-mask.on { opacity: 1; visibility: visible; }

/* 抽屉展开时汉堡变成叉号 */
body.nav-open .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 导航抽屉容器 ---------- */
/* 宽屏下它只是把「导航 + 用户区」横向排开，等同原来的顶栏布局；
   窄屏下整个容器变成一个抽屉。容器高度由内容决定，
   不需要在 CSS 里按导航项个数去算。 */
.topbar-drawer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* ---------- 窄屏适配 ---------- */
@media (max-width: 768px) {
    /* 顶栏恢复单行：左边标题，右边汉堡，不再竖排堆成三行 */
    .topbar {
        height: var(--topbar-h-narrow);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 12px;
        gap: 10px;
    }
    .hamburger { display: flex; }

    /* 标题在窄屏略缩小，给右边汉堡留位置 */
    .logo { width: 24px; height: 24px; font-size: 13px; margin-right: 7px; }
    .logo-text { font-size: 15px; }

    /* 整个抽屉容器变成从顶栏下方滑出的面板。
       层级：顶栏 100 > 抽屉 99 > 遮罩 97 */
    .topbar-drawer {
        position: fixed;
        left: 0; right: 0;
        top: var(--topbar-h-narrow);
        z-index: 99;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        background: #001529;
        /* 收起位移必须是 -100% 再减去一个顶栏高度（54px）。
           只写 -100% 的话，抽屉底边正好停在 54px 处，
           而抽屉末端的「用户信息/退出」会因此落在 0~54px 区间里，
           也就是压在顶栏上显示出来。 */
        transform: translateY(calc(-100% - var(--topbar-h-narrow)));
        transition: transform .24s ease;
        max-height: calc(100vh - var(--topbar-h-narrow));
        overflow-y: auto;
    }
    body.nav-open .topbar-drawer { transform: translateY(0); }
    /* 抽屉打开时锁住背景滚动 */
    body.nav-open { overflow: hidden; }

    .topbar-nav { flex-direction: column; padding: 6px 0; }
    .topbar-nav a {
        height: 38px; line-height: 38px;
        padding: 0 16px;
        font-size: 14px;
    }
    .topbar-right {
        padding: 10px 14px;
        border-top: 1px solid rgba(255, 255, 255, .1);
    }
    .user-info { font-size: 13px; }

    .container { padding: 0 12px; }
    .chart-grid { grid-template-columns: 1fr; }

    /* 表格在窄屏横向滑动，保证字段不被压成两行 */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-wrap table { min-width: 680px; }

    /* 弹窗贴边显示，完整可见 */
    .modal-box { width: calc(100% - 24px); max-width: 100%; }

    .flash-area { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

/* ===================================================================
   在线检测系统改造新增样式（2026-10-28）

   这一段是为了配合「教室设备在线检测与维修管理系统」的新版页面：
   机房监控看板、终端网格、维修工单、统计图表。

   【为什么要新增 btn-ghost】
   原来的 .btn-outline 是给深色顶栏设计的 —— 白字、白框，
   用在顶栏的「退出」按钮上没问题。
   但新版页面里很多按钮放在白色卡片上，如果继续用 .btn-outline，
   白字配白底，按钮看上去就是「隐形」的。
   所以浅色背景上统一改用 .btn-ghost（深字浅框）。
   =================================================================== */

/* ---------- 浅色背景上的描边按钮 ---------- */
.btn-ghost {
    background: #fff;
    color: #595959;
    border-color: #d9d9d9;
}
.btn-ghost:hover {
    color: #1890ff;
    border-color: #1890ff;
    background: #f0f8ff;
}

/* ---------- 页头 ---------- */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.page-head h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2d3d;
    margin-bottom: 4px;
}
.page-head p { font-size: 13px; }
.head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- 两列栅格 ---------- */
.grid { display: grid; gap: 16px; }
.grid.g2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- 新版卡片头 / 卡片体 ----------
   旧版用 .card-head / .card-body，新版统一用 .card-hd / .card-bd，
   两套名字都留着，老页面不受影响。 */
.card-hd {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f0;
}
.card-hd h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2d3d;
}
.card-bd { padding: 16px 18px; }
.sp { margin-left: auto; }

/* ---------- 新版表格容器 ----------
   .table-wrap 是旧名，.tbl-wrap 是新名，样式一样。 */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
    background: #fafafa;
    color: #595959;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.tbl td {
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}
.tbl tbody tr:hover { background: #fafcff; }

/* ---------- 状态小圆片标签 ---------- */
.tag-pill {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.tag-pill.t-ok   { background: #f6ffed; color: #389e0d; border-color: #b7eb8f; }
.tag-pill.t-idle { background: #fafafa; color: #8c8c8c; border-color: #d9d9d9; }
.tag-pill.t-warn { background: #fffbe6; color: #d48806; border-color: #ffe58f; }
.tag-pill.t-err  { background: #fff1f0; color: #cf1322; border-color: #ffa39e; }

/* ---------- 标签页 ---------- */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.tabs .tab {
    padding: 8px 16px;
    font-size: 13px;
    color: #595959;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tabs .tab:hover { color: #1890ff; }
.tabs .tab.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    font-weight: 600;
}

/* ---------- 机房概览条 ---------- */
.room-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.strip-item {
    background: #fff;
    border-radius: 6px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
    border-left: 3px solid #1890ff;
}
.strip-num {
    font-size: 26px;
    font-weight: 600;
    color: #1f2d3d;
    line-height: 1.2;
}
.strip-num span { font-size: 14px; color: #8c8c8c; margin-left: 2px; }
.strip-lbl { font-size: 13px; color: #595959; margin-top: 2px; }
.strip-sub { font-size: 12px; color: #8c8c8c; }

/* ---------- 图例 ---------- */
.legend {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #595959;
    margin-bottom: 12px;
}
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.d-online    { background: #52c41a; }
.dot.d-offline   { background: #bfbfbf; }
.dot.d-fault     { background: #ff4d4f; }
.dot.d-repairing { background: #faad14; }

/* ---------- 机房区块 ---------- */
.room-block {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
    padding: 16px 18px;
    margin-bottom: 14px;
}
.room-hd {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}
.room-hd h3 { font-size: 15px; font-weight: 600; color: #1f2d3d; }
.room-hd .muted { font-size: 12px; }
.room-rate {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: #595959;
}
.room-rate.good { color: #389e0d; }
.room-rate.mid  { color: #d48806; }
.room-rate.bad  { color: #cf1322; }

/* ---------- 终端网格 ---------- */
.grid-cells {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 8px;
}
.cell {
    border-radius: 5px;
    padding: 8px 9px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .12s ease, box-shadow .12s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 62px;
}
.cell:hover { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(0, 21, 41, .12); }
.cell b { font-size: 12px; font-weight: 600; }
.cell span { font-size: 11px; opacity: .85; font-family: Menlo, Consolas, monospace; }
.cell i { font-size: 11px; font-style: normal; opacity: .9; }

.cell.c-online    { background: #f6ffed; border-color: #b7eb8f; color: #237804; }
.cell.c-offline   { background: #fafafa; border-color: #d9d9d9; color: #8c8c8c; }
.cell.c-fault     { background: #fff1f0; border-color: #ffa39e; color: #cf1322; }
.cell.c-repairing { background: #fffbe6; border-color: #ffe58f; color: #d48806; }

/* ---------- 在线率进度条 ---------- */
.rate-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}
.rate-name {
    width: 130px;
    font-size: 13px;
    color: #595959;
    flex-shrink: 0;
}
.rate-bar {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
}
.rate-fill {
    height: 100%;
    background: #1890ff;
    transition: width .4s ease;
}
.rate-fill.good { background: #52c41a; }
.rate-fill.mid  { background: #faad14; }
.rate-fill.bad  { background: #ff4d4f; }
.rate-val {
    font-size: 12px;
    color: #8c8c8c;
    white-space: nowrap;
    min-width: 120px;
    text-align: right;
}

/* ---------- 行内表单 ---------- */
.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.inline-form input,
.inline-form select {
    padding: 5px 9px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: #333;
}
.inline-form input:focus,
.inline-form select:focus { border-color: #1890ff; outline: none; }
.inline-select {
    padding: 2px 6px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
    max-width: 120px;
}

/* ---------- 弹窗底部按钮区 ---------- */
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

/* ---------- 小工具类 ---------- */
.mono {
    font-family: Menlo, Consolas, "Courier New", monospace;
    font-size: 12px;
}
.small { font-size: 12px; }
.last-check { font-size: 12px; color: #8c8c8c; }

/* ---------- 维修人员角色徽章 ---------- */
.role-badge.maint { background: #722ed1; color: #fff; }

/* ---------- 窄屏适配 ---------- */
@media (max-width: 768px) {
    .grid.g2 { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; align-items: stretch; }
    .head-actions { justify-content: flex-start; }
    .rate-row { flex-wrap: wrap; }
    .rate-name { width: auto; }
    .rate-val { text-align: left; }
    .grid-cells { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
    .tbl-wrap table { min-width: 640px; }
}
