/* ============================================================
   住宿申请审批系统 · 组件库
   ------------------------------------------------------------
   设计令牌来自 assets/theme.css（与智慧公寓共用同一套设计源）。
   准则是「类名保持不变，只换值与规格」——页面与 JS 逻辑无需改动。

   结构：
   1. 页头与分区标题    2. 卡片与栅格      3. 业务模块卡
   4. 按钮              5. 表单            6. 徽章与标签
   7. 列表项与表格      8. 流程（步骤条 / 时间轴）
   9. 弹窗与提示        10. 页签与统计块
   11. 登录页与扫码入口 12. 其它（kv / 床位选择 / 代码块）
   ============================================================ */

/* ============================================================
   1. 页头与分区标题
   ============================================================ */

.page-title {
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -.2px;
    margin-bottom: 3px;
}

.page-sub {
    color: var(--ink-3);
    font-size: 12.5px;
    margin-bottom: 18px;
}

.section-title {
    font-size: 14.5px;
    font-weight: 600;
    margin: 22px 0 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -.1px;
}

.section-title .count {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-3);
    background: var(--surface-3);
    padding: 1px 8px;
    border-radius: 999px;
}

/* ============================================================
   2. 卡片与栅格
   ============================================================ */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    overflow: hidden;
}

.card-pad {
    padding: 18px;
}

.grid {
    display: grid;
    gap: 16px;
}

/* 网格子项默认 min-width:auto，内容（长 URL / 代码块 / 表格）会把列撑破，
   窄屏表现就是整页横向溢出。统一放开收缩。 */
.grid > * {
    min-width: 0;
}

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

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

@media (max-width: 640px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    /* KPI 卡（.grid-4）在手机上保持两列，竖排四张会占掉一整屏 */
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

/* ============================================================
   3. 业务模块卡（学生端「我要办理」）
   ============================================================ */

.module {
    position: relative;
    padding: 18px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    transition: box-shadow .16s, transform .16s, border-color .16s;
    box-shadow: var(--sh-1);
    overflow: hidden;
}

.module:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-2);
    border-color: var(--brand-300);
}

.module::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--brand-600);
}

.module.m-transfer::after {
    background: var(--brand-600);
}

.module.m-checkout::after {
    background: var(--warn);
}

.module.m-checkin::after {
    background: var(--ok);
}

.module.disabled {
    cursor: not-allowed;
    opacity: .58;
    background: var(--surface-2);
}

.module.disabled:hover {
    transform: none;
    box-shadow: var(--sh-1);
    border-color: var(--line);
}

.module .m-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    background: var(--brand-100);
    color: var(--brand-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.module.m-checkout .m-icon {
    background: var(--warn-soft);
    color: var(--warn);
}

.module.m-checkin .m-icon {
    background: var(--ok-soft);
    color: var(--ok);
}

.module.disabled .m-icon {
    background: var(--surface-3);
    color: var(--ink-4);
}

.module h3 {
    font-size: 15.5px;
    font-weight: 600;
    margin-bottom: 5px;
}

.module p {
    color: var(--ink-3);
    font-size: 12.5px;
    min-height: 38px;
}

.module .m-go {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-600);
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.module.disabled .m-go {
    color: var(--ink-4);
}

/* ============================================================
   4. 按钮
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 15px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;
    transition: background .14s, border-color .14s, color .14s, transform .1s;
}

.btn:hover {
    background: var(--brand-50);
    border-color: var(--brand-300);
    color: var(--brand-700);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.btn .icon {
    font-size: 15px;
}

.btn-primary {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-700);
    border-color: var(--brand-700);
    color: #fff;
}

.btn-ok {
    background: var(--ok);
    border-color: var(--ok);
    color: #fff;
}

.btn-ok:hover {
    background: #0C8257;
    border-color: #0C8257;
    color: #fff;
}

.btn-danger {
    background: var(--surface);
    border-color: #F0C8C8;
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-soft);
    border-color: #E5B0B0;
    color: var(--danger);
}

.btn-warn {
    background: var(--surface);
    border-color: #FADFB4;
    color: #B3680A;
}

.btn-warn:hover {
    background: var(--warn-soft);
    border-color: #F3CE94;
    color: #B3680A;
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ink-3);
}

.btn-ghost:hover {
    background: var(--surface-3);
    border-color: transparent;
    color: var(--ink-2);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12.5px;
    border-radius: var(--r-xs);
}

.btn-lg {
    padding: 11px 20px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

/* 顶栏里的浅色按钮（覆盖上面的默认底色） */
.topbar .btn-primary {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
}

.topbar .btn-primary:hover {
    background: rgba(255, 255, 255, .26);
    color: #fff;
}

/* ============================================================
   5. 表单
   ============================================================ */

.field {
    margin-bottom: 15px;
}

.field>label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.field .hint {
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 5px;
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--ink-4);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(42, 127, 212, .14);
}

.input:disabled,
.select:disabled,
.input[readonly] {
    background: var(--surface-3);
    color: var(--ink-3);
    cursor: not-allowed;
}

input[type=checkbox],
input[type=radio] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-600);
    cursor: pointer;
    vertical-align: -2px;
}

/* 下拉框：去掉原生箭头，用同色系自绘箭头（与智慧公寓一致） */
.select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2378889A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.textarea {
    min-height: 84px;
    resize: vertical;
    line-height: 1.6;
}

.row {
    display: flex;
    gap: 12px;
}

.row>* {
    flex: 1;
    min-width: 0;
}

/* ============================================================
   6. 徽章与标签
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.pending {
    background: var(--warn-soft);
    color: #A3600A;
}

.badge.completed {
    background: var(--ok-soft);
    color: #0B7A53;
}

.badge.rejected {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge.cancelled {
    background: var(--surface-3);
    color: var(--ink-3);
}

.badge.gray {
    background: var(--surface-3);
    color: var(--ink-2);
}

.badge.blue {
    background: var(--brand-100);
    color: var(--brand-800);
}

.badge.purple {
    background: var(--purple-soft);
    color: var(--purple);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: var(--r-xs);
    background: var(--surface-3);
    color: var(--ink-2);
    font-size: 11.5px;
    font-weight: 600;
}

.mono {
    font-family: var(--mono);
    font-size: 12px;
}

/* ============================================================
   7. 列表项与表格
   ============================================================ */

.item {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: background .12s;
    cursor: pointer;
}

.item:last-child {
    border-bottom: none;
}

.item:hover {
    background: var(--brand-50);
}

.item-main {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.item-meta {
    color: var(--ink-3);
    font-size: 12.5px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.empty {
    padding: 44px 20px;
    text-align: center;
    color: var(--ink-4);
}

.empty .e-icon {
    font-size: 28px;
    opacity: .5;
    margin-bottom: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    text-align: left;
    padding: 10px 12px;
    color: var(--ink-3);
    font-weight: 600;
    font-size: 12px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--brand-50);
}

/* ============================================================
   8. 流程（步骤条 / 时间轴）
   ============================================================ */

.steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 4px 0 2px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-4);
    font-size: 12.5px;
    font-weight: 600;
}

.step .n {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    background: var(--surface);
    flex: none;
}

.step.done {
    color: var(--ok);
}

.step.done .n {
    background: var(--ok);
    border-color: var(--ok);
    color: #fff;
}

.step.active {
    color: var(--brand-600);
}

.step.active .n {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
    box-shadow: 0 0 0 4px var(--brand-100);
}

.step.reject {
    color: var(--danger);
}

.step.reject .n {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.step-line {
    width: 26px;
    height: 1.5px;
    background: var(--line-strong);
    margin: 0 8px;
}

.timeline {
    position: relative;
    padding-left: 22px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--line);
}

.tl-item {
    position: relative;
    padding-bottom: 16px;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--line-strong);
    z-index: 1;
}

.tl-item.done::before {
    background: var(--ok);
    border-color: var(--ok);
}

.tl-item.active::before {
    background: var(--brand-600);
    border-color: var(--brand-600);
    box-shadow: 0 0 0 4px var(--brand-100);
}

.tl-item.reject::before {
    background: var(--danger);
    border-color: var(--danger);
}

.tl-title {
    font-weight: 600;
    font-size: 13.5px;
}

.tl-meta {
    color: var(--ink-3);
    font-size: 12px;
    margin-top: 1px;
}

.tl-comment {
    margin-top: 5px;
    background: var(--surface-2);
    border-left: 3px solid var(--line-strong);
    padding: 6px 10px;
    border-radius: 0 6px 6px 0;
    font-size: 12.5px;
    color: var(--ink-2);
}

/* ============================================================
   9. 弹窗与提示
   ============================================================ */

.mask {
    position: fixed;
    inset: 0;
    background: rgba(12, 30, 50, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.mask.hidden {
    display: none;
}

.modal {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-3);
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    overflow: auto;
    animation: pop .18s ease;
}

.modal.lg {
    max-width: 760px;
}

@keyframes pop {
    from {
        transform: scale(.97);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 2;
}

.modal-head h3 {
    font-size: 15.5px;
    font-weight: 650;
}

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

.modal-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: var(--surface);
}

.x {
    cursor: pointer;
    color: var(--ink-4);
    font-size: 20px;
    line-height: 1;
    border: none;
    background: none;
    padding: 2px 6px;
    border-radius: 6px;
}

.x:hover {
    background: var(--surface-3);
    color: var(--ink-2);
}

.notice {
    display: flex;
    gap: 11px;
    padding: 12px 15px;
    border-radius: var(--r-sm);
    align-items: flex-start;
    background: var(--warn-soft);
    border: 1px solid #F5DCAE;
    color: #8A5209;
    font-size: 13px;
    margin-bottom: 12px;
}

.notice.info {
    background: var(--brand-50);
    border-color: #CFE2F5;
    color: var(--brand-800);
}

.notice.ok {
    background: var(--ok-soft);
    border-color: #B7E5D3;
    color: #0B6B49;
}

.notice.danger {
    background: var(--danger-soft);
    border-color: #F0C8C8;
    color: #A93232;
}

.notice .n-icon {
    font-size: 15px;
    line-height: 1.4;
    flex: none;
}

.notice .icon {
    font-size: 16px;
    margin-top: 2px;
    flex: none;
}

/* 未读通知：加左侧色条强调，读过的回落为普通样式 */
.notice.unread {
    background: var(--brand-50);
    border-color: #CFE2F5;
    color: var(--brand-800);
    border-left: 3px solid var(--brand-600);
}

.notice .n-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11.5px;
    opacity: .78;
    margin-top: 5px;
}

/* ============================================================
   10. 页签与统计块
   ============================================================ */

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
    overflow-x: auto;
}

.tab {
    padding: 9px 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-3);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab:hover {
    color: var(--ink);
}

.tab.active {
    color: var(--brand-600);
    border-bottom-color: var(--brand-600);
}

.tab .count {
    font-size: 11px;
    background: var(--surface-3);
    color: var(--ink-3);
    border-radius: 999px;
    padding: 1px 7px;
    margin-left: 5px;
}

.tab.active .count {
    background: var(--brand-100);
    color: var(--brand-800);
}

.stat {
    position: relative;
    padding: 16px 18px;
    border-radius: var(--r-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--sh-1);
    overflow: hidden;
}

.stat::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--brand-600);
}

.stat .k {
    font-size: 12.5px;
    color: var(--ink-3);
    font-weight: 600;
    margin-bottom: 6px;
}

.stat .v {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.5px;
}

.stat .v small {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-4);
    margin-left: 4px;
}

/* ============================================================
   11. 登录页与扫码入口
   ============================================================ */

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: linear-gradient(150deg, #0B3359 0%, #124A7E 46%, #1B6DBA 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: none;
    border-radius: var(--r-xl);
    box-shadow: 0 26px 60px rgba(6, 26, 48, .38);
    padding: 34px 28px 26px;
}

.login-card h1 {
    font-size: 19px;
    font-weight: 650;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -.2px;
}

.login-card .sub {
    text-align: center;
    color: var(--ink-3);
    font-size: 12.5px;
    margin-bottom: 22px;
}

/* 登录卡内的控件规格（与智慧公寓登录页逐项一致） */
.login-card .btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
    border-radius: var(--r);
}

.login-card .field input {
    padding: 11px 13px;
    font-size: 14.5px;
}

.login-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, #15528F, #2A7FD4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 8px 20px rgba(21, 82, 143, .28);
}

.seg {
    display: flex;
    background: var(--surface-3);
    border-radius: var(--r-sm);
    padding: 3px;
    margin-bottom: 20px;
}

.seg button {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    border-radius: 7px;
    font-weight: 600;
    font-size: 13px;
    color: var(--ink-3);
    cursor: pointer;
    transition: background .14s, color .14s;
}

.seg button.active {
    background: var(--surface);
    color: var(--brand-700);
    box-shadow: var(--sh-1);
}

.login-tip {
    margin-top: 18px;
    padding: 13px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 12px;
    color: var(--ink-3);
    line-height: 1.9;
}

.login-tip b {
    color: var(--ink-2);
}

.login-tip code {
    background: var(--surface-3);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 11.5px;
    cursor: pointer;
    font-family: var(--mono);
}

.login-tip code:hover {
    background: var(--brand-100);
    color: var(--brand-800);
}

/* ---- 扫码办理入口（此前缺样式，页面处于裸奔状态，此处补齐）---- */

.scan-card {
    display: flex;
    align-items: center;
    gap: 22px;
    max-width: 560px;
    margin: 20px auto 0;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
}

.scan-qr {
    flex: none;
    width: 132px;
    height: 132px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-qr img {
    width: 100%;
    height: 100%;
    display: block;
}

.qr-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11.5px;
    color: var(--ink-4);
    background: var(--surface-2);
    border-radius: var(--r-sm);
    padding: 6px;
}

.scan-info {
    flex: 1;
    min-width: 0;
}

.scan-info h4 {
    font-size: 14px;
    font-weight: 650;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.scan-info p {
    font-size: 12.5px;
    color: var(--ink-3);
    line-height: 1.75;
}

.scan-url {
    margin-top: 9px;
    padding: 6px 9px;
    background: var(--surface-2);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-xs);
    font-size: 11.5px;
    color: var(--ink-2);
    word-break: break-all;
}

.scan-note {
    margin-top: 7px;
    font-size: 11.5px;
    color: var(--ink-4);
}

/* 深色背景上的浮层卡片需要更实的投影才立得住 */
.login-wrap .scan-card,
.login-wrap .flow-card {
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 12px 34px rgba(6, 26, 48, .26);
}

/* ---- 流程说明卡（登录页底部三条流程）---- */

.flow-strip {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
}

.flow-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 15px 17px;
    box-shadow: var(--sh-1);
}

.flow-card h4 {
    font-size: 13.5px;
    font-weight: 650;
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--brand-700);
}

.flow-card h4 .icon {
    font-size: 15px;
}

.flow-chain {
    font-size: 12.5px;
    color: var(--ink-2);
    line-height: 2;
}

.flow-chain .arrow {
    color: var(--ink-4);
    margin: 0 4px;
}

@media (max-width: 900px) {
    .flow-strip {
        grid-template-columns: 1fr;
    }

    .scan-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================================
   12. 其它
   ============================================================ */

.kv {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 9px 14px;
    font-size: 13px;
}

.kv .k {
    color: var(--ink-3);
}

.kv .v {
    color: var(--ink);
    font-weight: 500;
    word-break: break-all;
}

.bedpick {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bed {
    padding: 7px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    background: var(--surface);
    transition: .12s;
}

.bed:hover {
    border-color: var(--brand-500);
    color: var(--brand-600);
}

.bed.sel {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
}

.bed.used {
    opacity: .45;
    cursor: not-allowed;
    text-decoration: line-through;
}

.ext-box {
    background: #0E2338;
    color: #C6D4E2;
    border-radius: var(--r-sm);
    padding: 14px 16px;
    font-family: var(--mono);
    font-size: 12px;
    overflow: auto;
    line-height: 1.75;
    /* 接口清单靠空格对齐：保留空白与换行，但容器窄时允许自动折行，
       否则右半截会被裁掉（桌面两栏布局右栏只有 400 多像素）。 */
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.85;
    max-width: 100%;
}

.ext-box .g {
    color: #6EE7B7;
}

.ext-box .b {
    color: #93C5FD;
}

.ext-box .y {
    color: #FCD34D;
}

/* ---- Toast ---- */

#toasts {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 240px;
    max-width: 380px;
    padding: 12px 16px;
    border-radius: var(--r-sm);
    background: var(--surface);
    box-shadow: var(--sh-3);
    border-left: 4px solid var(--brand-600);
    font-size: 13px;
    animation: slide .2s ease;
}

.toast.ok {
    border-left-color: var(--ok);
}

.toast.err {
    border-left-color: var(--danger);
}

.toast.warn {
    border-left-color: var(--warn);
}

@keyframes slide {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ---- 顶栏里的身份胶囊（深蓝底上的浅色款）---- */

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .topbar .brand-text span {
        display: none;
    }

    .role-chip {
        display: none;
    }
}

/* ============================================================
   13. 登录页改版（左右分栏 · 2026-10-19）
   ------------------------------------------------------------
   旧版是「居中窄卡 + 中宽扫码卡 + 更宽流程条」三段堆叠，左右边缘不齐。
   改为左品牌区 + 右登录区整屏分栏：视觉重心明确，两栏各自成组。
   ============================================================ */

.login-body {
    background: #F4F7FB;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
}

/* ---- 左：品牌 + 流程 ---- */

.login-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 60px 68px;
    background: linear-gradient(155deg, #08294A 0%, #0F4577 44%, #1A6AB8 100%);
    color: #fff;
}

.hero-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-deco-a {
    width: 760px;
    height: 760px;
    right: -300px;
    top: -320px;
    background: radial-gradient(circle at 38% 38%, rgba(104, 178, 255, .32), rgba(104, 178, 255, 0) 62%);
}

.hero-deco-b {
    width: 560px;
    height: 560px;
    left: -250px;
    bottom: -290px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .13), rgba(255, 255, 255, 0) 66%);
}

.hero-inner {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 56px;
}

.hero-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex: none;
}

.hero-brand-text strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .8px;
}

.hero-brand-text span {
    display: block;
    font-size: 12px;
    opacity: .66;
    margin-top: 4px;
    letter-spacing: .4px;
}

.hero-main h1 {
    font-size: 44px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.hero-lead {
    margin-top: 18px;
    font-size: 15.5px;
    letter-spacing: .8px;
    color: rgba(255, 255, 255, .92);
}

.hero-sub {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.95;
    color: rgba(255, 255, 255, .58);
    max-width: 440px;
}

.hero-flows {
    margin-top: 44px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-radius: var(--r);
    overflow: hidden;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .1);
}

.hero-flow {
    display: flex;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, .03);
    transition: background .15s;
}

.hero-flow:hover {
    background: rgba(255, 255, 255, .075);
}

.hf-no {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #7FC0FF;
    padding-top: 2px;
    flex: none;
}

.hf-body h4 {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .6px;
}

.hf-body p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .58);
}

.hero-foot {
    margin-top: 38px;
    font-size: 11.5px;
    letter-spacing: .4px;
    color: rgba(255, 255, 255, .36);
}

/* ---- 右：登录区 ---- */

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 52px 52px;
    background: #F4F7FB;
}

.login-card,
.login-panel .scan-card {
    width: 100%;
    max-width: 428px;
}

.login-panel .login-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: 0 18px 44px rgba(10, 40, 75, .1), 0 2px 6px rgba(10, 40, 75, .04);
    padding: 34px 30px 28px;
}

.login-panel .login-card h1 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .8px;
    text-align: left;
    margin-bottom: 6px;
}

.login-panel .login-card .sub {
    text-align: left;
    color: var(--ink-3);
    font-size: 13px;
    margin-bottom: 24px;
}

.login-panel .login-card .btn.btn-lg {
    padding: 13px;
    font-size: 15px;
    letter-spacing: 2px;
    margin-top: 10px;
    border-radius: var(--r);
}

.login-panel .login-card .field input {
    padding: 11px 13px;
    font-size: 14.5px;
}

.login-panel .seg {
    margin-bottom: 22px;
    padding: 4px;
}

.login-panel .seg button {
    padding: 9px;
    font-size: 13.5px;
}

.login-panel .login-tip {
    margin-top: 20px;
    font-size: 12px;
    line-height: 1.95;
}

/* 扫码卡：与登录卡同宽，横向紧凑 */
.login-panel .scan-card {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: 0 6px 18px rgba(10, 40, 75, .05);
}

.login-panel .scan-qr {
    width: 92px;
    height: 92px;
    padding: 7px;
    flex: none;
}

.login-panel .scan-info h4 {
    font-size: 13px;
    margin-bottom: 5px;
}

.login-panel .scan-info p {
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--ink-3);
}

.login-panel .scan-url {
    margin-top: 8px;
    font-size: 10.5px;
    padding: 5px 8px;
}

/* 窄屏：单列，品牌区收成页头，流程条隐藏 */
@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding: 32px 24px 28px;
        align-items: flex-start;
    }

    .hero-inner {
        max-width: none;
    }

    .hero-brand {
        margin-bottom: 20px;
    }

    .hero-mark {
        width: 40px;
        height: 40px;
        font-size: 19px;
        border-radius: 12px;
    }

    .hero-main h1 {
        font-size: 25px;
        letter-spacing: .6px;
    }

    .hero-lead {
        font-size: 13.5px;
        margin-top: 9px;
    }

    .hero-sub,
    .hero-flows,
    .hero-foot {
        display: none;
    }

    .login-panel {
        padding: 26px 18px 44px;
        gap: 14px;
    }

    .login-panel .login-card {
        padding: 24px 20px 22px;
        border-radius: var(--r-lg);
    }

    .login-panel .login-card h1 {
        font-size: 19px;
    }

    .login-panel .scan-card {
        flex-direction: row;
        text-align: left;
    }
}

/* ============================================================
   14. 空态收敛（原 44px 上下留白导致列表区一大片空白）
   ============================================================ */

.empty {
    padding: 30px 20px;
}

.empty .e-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

/* 卡片内的空态不要再被撑出很高的高度 */
.card .empty {
    padding: 24px 18px;
}

/* ============================================================
   15. 细节收紧（2026-10-19）
   ============================================================ */

/* 提示条 .notice 是 flex：裸文本 + <b> 会被拆成多个匿名 flex item，
   窄屏下每段各占一列，中文挤成一字一行。统一由 .n-text 包裹成单一 item。 */
.notice > .n-text,
.notice > div {
    flex: 1;
    min-width: 0;
    line-height: 1.75;
}

.notice > .n-text > b {
    font-weight: 650;
}

/* 顶栏身份胶囊：副标题原 10.5px 太小，两层文字挤在一起 */
.topbar .who {
    padding: 5px 13px 5px 6px;
}

.topbar .who .who-text b {
    font-size: 12.5px;
    line-height: 1.35;
}

.topbar .who .who-text i {
    font-size: 11px;
    line-height: 1.35;
    opacity: .78;
}

/* 空态再收一档：列表区空的时候不该占掉半屏 */
.card .empty {
    padding: 20px 16px;
}

.card .empty .e-icon {
    font-size: 22px;
    margin-bottom: 5px;
}

/* ---- 手机端：业务模块卡由纵向改为横向行式 ---- */
@media (max-width: 560px) {
    .module {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr) 16px;
        grid-template-areas:
            "icon title go"
            "icon desc go";
        column-gap: 12px;
        row-gap: 3px;
        align-items: center;
        padding: 13px 13px 13px 16px;
    }

    .module .m-icon {
        grid-area: icon;
        width: 38px;
        height: 38px;
        font-size: 18px;
        margin-bottom: 0;
        align-self: start;
    }

    .module h3 {
        grid-area: title;
        font-size: 14.5px;
        margin-bottom: 0;
    }

    .module p {
        grid-area: desc;
        font-size: 12px;
        line-height: 1.6;
        min-height: 0;
    }

    .module .m-go {
        grid-area: go;
        margin-top: 0;
        font-size: 0;
        justify-self: end;
    }

    .module .m-go .icon {
        font-size: 15px;
    }
}
