* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #eef2f7;
    color: #222;
}
.layout { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 20px;
    box-shadow: 4px 0 20px rgba(17,24,39,0.15);
    z-index: 1000;
}
.logo {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 24px;
}
.logo-text {
    display: inline-block;
}
.logo-version {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.08em;
    color: #93c5fd;
    padding-top: 0.2em;
}
.sidebar nav a {
    display: block;
    color: #e5e7eb;
    text-decoration: none;
    padding: 12px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background .2s ease;
}
.sidebar nav a:hover { background: #374151; }
.content { flex: 1; margin-left: 220px; padding: 24px; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.card, .panel {
    background: white;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.06);
    margin-bottom: 18px;
}
.card .label { color: #666; margin-bottom: 10px; }
.card .value { font-size: 32px; font-weight: bold; }
.inline-form, .inline-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.compact-form input { min-width: 180px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stack-form { display: flex; flex-direction: column; gap: 10px; }
input, textarea, select, button {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #fff;
}
textarea { resize: vertical; }
button { background: #2563eb; color: white; border: none; cursor: pointer; min-width: 96px; }
button:hover { opacity: 0.92; }
.danger-btn { background: #dc2626; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.danger { background: #fee2e2; color: #991b1b; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 10px; text-align: left; vertical-align: top; }
pre { white-space: pre-wrap; margin: 0; }
.project-box { border: 1px solid #e5e7eb; border-radius: 14px; padding: 14px; margin-bottom: 14px; background: #fafafa; }
.btn-link { display: inline-block; padding: 10px 12px; background: #6b7280; color: white; text-decoration: none; border-radius: 10px; }
.note-cell, .meta-form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.channel-filter-form { max-width: 360px; }
.channel-multi-select { width: 220px; min-height: 150px; border-radius: 14px; background: #f8fafc; }
.number-library-top-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 16px; }
.section-header-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nowrap-title { white-space: nowrap; }
.sms-content-cell { min-width: 280px; white-space: pre-wrap; }
.rules-top-form { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) 180px; gap: 16px; align-items: end; }
.active-rule-box { margin-top: 16px; padding: 14px; border-radius: 12px; background: #f8fafc; border: 1px solid #e5e7eb; }
.project-summary-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-bottom: 12px; }
.link-text { word-break: break-all; }
.project-action-row button { min-width: 110px; }
.sms-add-form textarea { min-height: 44px; }
.wrap-mobile { flex-wrap: wrap; }
@media (max-width: 980px) {
    .layout { flex-direction: column; }
    .sidebar { position: static; width: 100%; height: auto; overflow: visible; }
    .content { margin-left: 0; }
    .rules-top-form, .number-library-top-grid, .project-summary-grid { grid-template-columns: 1fr; }
    .channel-multi-select { width: 100%; }
}


.number-library-search-panel { padding: 16px 18px; }
.number-library-upload-panel { padding-top: 20px; }
.number-library-upload-wrap { display: flex; flex-direction: column; gap: 18px; }
.single-upload-form, .batch-upload-form { background: #f8fbff; border: 1px solid #dbe7ff; border-radius: 16px; padding: 16px; }
.single-upload-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; align-items: center; }
.single-upload-grid button { width: 100%; }
.batch-upload-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-weight: 600; }
.batch-upload-header span { font-size: 13px; color: #64748b; font-weight: 400; }
.batch-upload-body { display: grid; grid-template-columns: 1fr 180px; gap: 12px; align-items: stretch; }
.batch-upload-body button { height: 100%; min-height: 120px; }
.conflict-subsection { margin-top: 22px; padding-top: 18px; border-top: 1px dashed #dbe3ef; }
.conflict-inline-tip { font-size: 13px; color: #64748b; }
.empty-cell, .empty-box { text-align: center; color: #64748b; padding: 18px 12px; }
.panel-tip { margin-bottom: 14px; padding: 12px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; color: #1d4ed8; }
.project-summary-grid-wide { grid-template-columns: 220px 1fr; align-items: start; }
.full-link-text { display: inline-block; padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.project-action-row-six { display: grid; grid-template-columns: repeat(6, minmax(110px, auto)); gap: 10px; align-items: center; }
.project-action-row-six form { margin: 0; }
.sms-log-panel-top table td, .sms-log-panel-top table th { vertical-align: top; }
.sms-log-table th:nth-child(1),
.sms-log-table td:nth-child(1) {
    white-space: nowrap;
    width: 1%;
}
.sms-log-table th:nth-child(2),
.sms-log-table td:nth-child(2),
.sms-log-table th:nth-child(3),
.sms-log-table td:nth-child(3),
.sms-log-table th:nth-child(4),
.sms-log-table td:nth-child(4) {
    white-space: nowrap;
    width: 1%;
}
.sms-log-scroll {
    max-height: 640px;
}
.sms-log-list-panel {
    height: 680px;
    display: flex;
    flex-direction: column;
}
.sms-log-list-panel .section-header-actions {
    flex-shrink: 0;
}
.sms-log-list-panel .sms-log-scroll {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: none;
}
@media (max-width: 1180px) {
  .single-upload-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .project-action-row-six { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
}
@media (max-width: 980px) {
  .batch-upload-body { grid-template-columns: 1fr; }
  .batch-upload-body button { min-height: 48px; }
}
@media (max-width: 640px) {
  .single-upload-grid { grid-template-columns: 1fr; }
  .project-action-row-six { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
}


.compact-number-library-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.compact-single-upload-form {
    margin-bottom: 0;
}
.single-upload-grid-one-line {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr 1fr 1fr 1.2fr 0.9fr 180px;
    gap: 10px;
    align-items: center;
}
.compact-single-upload-form input,
.compact-single-upload-form button {
    min-height: 42px;
}
.compact-batch-upload-form {
    margin-top: 0;
}
.vertical-batch-upload-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.vertical-batch-upload-body textarea {
    width: 100%;
    min-height: 110px;
}
.vertical-batch-upload-body button {
    align-self: flex-end;
    min-width: 160px;
}
@media (max-width: 1450px) {
    .single-upload-grid-one-line {
        grid-template-columns: repeat(4, minmax(180px, 1fr));
    }
}
@media (max-width: 900px) {
    .single-upload-grid-one-line {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
    .vertical-batch-upload-body button {
        align-self: stretch;
    }
}


.global-rule-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.global-rule-head h2 {
    margin: 0;
    flex-shrink: 0;
}
.global-rule-head-time {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #475569;
    white-space: nowrap;
}
.global-rule-head-time strong {
    color: #0f172a;
    font-weight: 700;
}
.global-rule-head button {
    min-width: 136px;
    min-height: 42px;
    margin-left: auto;
    flex-shrink: 0;
}
.global-rule-layout {
    display: grid;
    grid-template-columns: 25% 25% 50%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
}
.global-rule-form {
    display: block;
    width: 100%;
    margin-bottom: 0;
}
.rule-card,
.active-rule-summary {
    height: 122px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #dbe7ff;
    border-radius: 16px;
    background: #f8fbff;
}
.rule-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rule-card label {
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}
.rule-card textarea {
    width: 100%;
    min-height: 0;
    height: 72px;
    resize: none;
}
.active-rule-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: stretch;
    background: #ffffff;
}
.active-rule-line {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fbff;
    border: 1px solid #dbe7ff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}
.active-rule-label {
    font-size: 12px;
    color: #64748b;
    line-height: 1.2;
}
.active-rule-line strong {
    color: #0f172a;
    line-height: 1.3;
    word-break: break-word;
}
.inline-batch-upload-body {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    align-items: stretch;
}
.inline-batch-upload-body textarea {
    width: 100%;
    min-height: 110px;
}
.inline-batch-upload-body button {
    height: 100%;
    min-height: 110px;
}
.project-button-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.project-button-grid form, .project-button-grid button {
    width: 100%;
}
.project-button-grid button {
    min-width: 0;
    min-height: 44px;
}
@media (max-width: 1180px) {
    .global-rule-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .rule-card,
    .active-rule-summary {
        height: auto;
    }
    .rule-card textarea {
        height: 88px;
        resize: vertical;
    }
    .inline-batch-upload-body {
        grid-template-columns: 1fr;
    }
    .inline-batch-upload-body button {
        min-height: 48px;
    }
    .project-button-grid {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}
@media (max-width: 700px) {
    .global-rule-head {
        flex-direction: column;
        align-items: stretch;
    }
    .global-rule-head-time {
        white-space: normal;
    }
    .global-rule-head button {
        margin-left: 0;
    }
}
@media (max-width: 700px) {
    .project-button-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}


.compact-sms-test-form {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.9fr 1fr 1fr 1.2fr 160px;
    gap: 10px;
    align-items: center;
}
.compact-sms-test-form input,
.compact-sms-test-form textarea,
.compact-sms-test-form button {
    min-height: 38px;
    padding: 10px 12px;
    font-size: 14px;
}
.compact-sms-test-form textarea {
    min-height: 58px;
}
@media (max-width: 1250px) {
    .compact-sms-test-form {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}
@media (max-width: 700px) {
    .compact-sms-test-form {
        grid-template-columns: 1fr;
    }
}


.cloud-forward-form input,
.cloud-forward-form textarea,
.cloud-forward-form button {
    min-height: 31px;
    padding: 5px 10px;
    font-size: 13px;
}
.cloud-forward-form textarea {
    min-height: 68px;
}

.mapping-count-badge {
    display: inline-block;
    min-width: 42px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    text-align: center;
    font-weight: 700;
}
.compact-project-record-form input,
.compact-project-record-form textarea {
    min-height: 22px;
    padding: 4px 9px;
    font-size: 13px;
}
.compact-project-record-form textarea {
    min-height: 48px;
}


.project-summary-stack {
    gap: 6px;
}
.project-head-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.project-link-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.full-link-inline {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.project-count-line {
    display: flex;
    align-items: center;
    gap: 8px;
}


.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.page-header h1 {
    margin: 0 0 6px;
    font-size: 28px;
}
.subtle-text,
.summary-meta {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}
.sticky-summary-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 18px 20px;
    border: 1px solid #dfe7f2;
    border-radius: 22px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.08);
}
.task-status {
    min-width: 170px;
    padding: 12px 16px;
    border-radius: 999px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}
.task-status.idle {
    background: #dcfce7;
    color: #166534;
}
.task-status.running {
    background: #fee2e2;
    color: #991b1b;
}
.devices-top-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}
.top-half-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.top-half-panel .section-header-actions .mini-stat {
    width: auto;
    flex: 0 0 auto;
}
.channel-manage-panel {
    padding: 14px 16px;
}
.channel-manager-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) 250px;
    gap: 18px;
    align-items: start;
}
.channel-list-shell {
    border: 1px solid #dbe5f1;
    border-radius: 16px;
    background: #f8fbff;
    overflow: hidden;
}
.channel-list-header {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border-bottom: 1px solid #dbe5f1;
    background: #f1f6fd;
    font-weight: 700;
}
.header-checkbox {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
.channel-list-title {
    font-size: 15px;
}
.channel-list-box {
    height: 140px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 10px 10px;
}
.channel-check-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.check-row.channel-check-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 28px;
    padding: 8px 12px;
    border: 1px solid #dbe5f1;
    border-radius: 10px;
    background: #fff;
}
.check-row.channel-check-row > input[type='checkbox'] {
    margin-top: 3px;
}
.channel-item-main {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}
.channel-item-code {
    display: inline-block;
    flex: 0 0 auto;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
}
.channel-note-box {
    flex: 1 1 auto;
    min-width: 0;
}
.channel-note-display {
    min-height: 20px;
    padding: 1px 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
    word-break: break-all;
    cursor: text;
}
.channel-note-display.empty {
    color: #94a3b8;
}
.channel-note-inline-form {
    display: none;
}
.channel-note-inline-form.editing {
    display: block;
}
.channel-note-inline-form input {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
}
.channel-side-actions,
.channel-side-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.channel-bottom-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1.45fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
}
.channel-bottom-actions form {
    margin: 0;
    min-width: 0;
}
.add-channel-form {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
    align-items: center;
}
.add-channel-form input {
    width: 100%;
    min-width: 0;
}
.add-channel-form button {
    grid-column: auto;
    width: auto;
    white-space: nowrap;
}
.delete-channel-row,
.add-channel-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 10px;
    width: 100%;
}
.delete-channel-row input,
.add-channel-row input,
.delete-channel-row button,
.add-channel-row button,
.wide-action-btn {
    min-height: 36px;
}
.delete-channel-form input[type='password'] {
    min-width: 220px;
}
.delete-channel-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    flex-wrap: nowrap;
    margin: 0;
    width: 100%;
}
.delete-channel-form input[type='password'] {
    width: 100%;
    min-width: 0;
}
.delete-channel-form button {
    min-width: 92px;
    white-space: nowrap;
}
.channel-apply-btn {
    min-height: 34px;
    width: 100%;
    min-width: 88px;
    white-space: nowrap;
}
.channel-bottom-actions input,
.channel-bottom-actions button {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
}
.mini-stat,
.stat-card {
    width: 100%;
    padding: 10px 12px;
    text-align: center;
    background: #edf4ff;
    border: 1px solid #dbe7ff;
    border-radius: 12px;
    color: #1d4ed8;
    font-weight: 700;
}
.wide-action-btn {
    width: 100%;
}
.top-gap {
    margin-top: 14px;
}
.table-scroll {
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}
.table-scroll table {
    margin: 0;
}
.table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 #e5e7eb;
}
.fixed-four-rows {
    max-height: 232px;
}
.fixed-five-rows {
    max-height: 230px;
}
.max-h-12 {
    max-height: 280px;
}
.max-h-14 {
    max-height: 340px;
}
.max-h-18 {
    max-height: 420px;
}
.device-operation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 18px;
    align-items: start;
}
.device-operation-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.device-operation-actions .action-form,
.device-operation-actions .action-form button {
    width: 100%;
}
.device-action-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
}
.device-action-row > button,
.device-action-row .action-form {
    width: 100%;
    margin: 0;
}
.device-action-row .action-form button,
.device-action-row > button {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 4px;
    min-height: 34px;
}
.device-table-scroll {
    max-height: none;
}
.devices-top-grid .channel-list-shell,
.devices-top-grid #operation-log-panel {
    height: 320px;
    max-height: 320px;
}
.devices-top-grid .channel-list-box {
    height: calc(320px - 44px);
    max-height: calc(320px - 44px);
}
.operation-log-table {
    table-layout: fixed;
}
.operation-log-table th,
.operation-log-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}
.operation-log-table th:nth-child(1),
.operation-log-table td:nth-child(1) {
    width: 175px;
}
.operation-log-table th:nth-child(2),
.operation-log-table td:nth-child(2) {
    width: 150px;
}
.operation-log-table th:nth-child(3),
.operation-log-table td:nth-child(3) {
    width: 88px;
}
.settings-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.settings-row-card {
    padding: 14px 18px;
}
.settings-row-fields {
    display: grid;
    gap: 12px;
    align-items: start;
}
.settings-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.settings-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-row-1 {
    grid-template-columns: minmax(0, 1fr);
}
.field-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #f8fbff;
}
.settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.settings-field label {
    font-weight: 700;
    color: #334155;
}
.settings-field input {
    width: 180px;
    max-width: 100%;
}
.settings-submit {
    display: flex;
    justify-content: flex-start;
    align-items: end;
}
@media (max-width: 980px) {
    .settings-row-3,
    .settings-row-2 {
        grid-template-columns: 1fr;
    }
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.quick-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.quick-link-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid #dbe5f1;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    background: #f8fbff;
}
.quick-link-card strong {
    color: #0f172a;
    font-size: 17px;
}
.quick-link-card span {
    color: #64748b;
    font-size: 14px;
}
.quick-link-card:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.dashboard-cards .card-sub {
    color: #64748b;
    margin-top: 8px;
}
.bridge-dashboard-panel {
    height: 340px;
    display: flex;
    flex-direction: column;
}
.bridge-dashboard-summary {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}
.bridge-dashboard-summary-label {
    color: #64748b;
    font-size: 14px;
}
.bridge-dashboard-summary-value {
    color: #0f172a;
    font-size: 28px;
    line-height: 1;
}
.bridge-dashboard-scroll {
    flex: 1 1 auto;
    min-height: 0;
}
.bridge-dashboard-scroll table {
    min-width: 980px;
}
.bridge-dashboard-scroll td:nth-child(1),
.bridge-dashboard-scroll td:nth-child(3),
.bridge-dashboard-scroll td:nth-child(4),
.bridge-dashboard-scroll td:nth-child(5),
.bridge-dashboard-scroll td:nth-child(7),
.bridge-dashboard-scroll th:nth-child(1),
.bridge-dashboard-scroll th:nth-child(3),
.bridge-dashboard-scroll th:nth-child(4),
.bridge-dashboard-scroll th:nth-child(5),
.bridge-dashboard-scroll th:nth-child(7) {
    white-space: nowrap;
}
.bridge-dashboard-scroll td:nth-child(2),
.bridge-dashboard-scroll th:nth-child(2) {
    min-width: 180px;
}
.bridge-dashboard-scroll td:nth-child(6),
.bridge-dashboard-scroll th:nth-child(6) {
    min-width: 170px;
}
.single-line-log-form {
    display: grid;
    grid-template-columns: 170px 130px 150px 150px minmax(0, 1fr) 96px;
    gap: 10px;
    align-items: center;
}
.single-line-log-form input,
.single-line-log-form select,
.single-line-log-form button {
    min-height: 38px;
}
.single-line-log-form input {
    width: 100%;
    min-width: 0;
}
.single-line-log-form .log-content-input {
    min-width: 0;
}
button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}
.scroll-panel::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.scroll-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
.scroll-panel::-webkit-scrollbar-track {
    background: transparent;
}
@media (max-width: 1280px) {
    .single-line-log-form {
        grid-template-columns: repeat(4, minmax(180px, 1fr));
    }
}
@media (max-width: 1100px) {
    .channel-manager-grid,
    .device-operation-layout,
    .grid-2,
    .quick-link-grid,
    .single-line-log-form {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 820px) {
    .single-line-log-form {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}
@media (max-width: 560px) {
    .single-line-log-form {
        grid-template-columns: 1fr;
    }
}

/* 项目一 服务器右侧页面压缩 */
.content { padding: 18px; }
.card, .panel { padding: 12px; border-radius: 14px; margin-bottom: 12px; }
input, textarea, select, button { padding: 7px 9px; border-radius: 8px; font-size: 13px; }
button { min-width: 80px; }
th, td { padding: 7px 8px; }
.inline-form, .inline-actions { gap: 8px; }
.compact-panel h2, .compact-page-header h1 { margin: 0 0 6px 0; }
.compact-table-scroll { max-height: 260px; }
.compact-scroll-box { min-height: 180px; max-height: 240px; }
.compact-side-actions, .compact-action-grid { gap: 8px; }
.compact-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compact-input-row input { min-width: 120px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.45); display: none; align-items: center; justify-content: center; z-index: 1200; }
.modal-overlay.show { display: flex; }
.modal-card { width: min(560px, calc(100vw - 24px)); background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 12px 36px rgba(15,23,42,0.2); display: flex; flex-direction: column; gap: 10px; }
.modal-title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal-card textarea { min-height: 96px; }
.single-action-form { margin: 0; }
.sms-log-toolbar-btn {
    width: 80px;
    min-width: 80px;
}
.back-to-top-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1100;
    min-width: 82px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}
.back-to-top-btn:hover {
    background: #1e293b;
}
.back-to-top-btn[hidden] {
    display: none !important;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
}
.status-online {
    background: #dcfce7;
    color: #166534;
}
.status-offline {
    background: #fee2e2;
    color: #991b1b;
}
.runtime-monitor-card-value {
    font-size: 24px;
}
.runtime-monitor-page-header {
    margin-bottom: 10px;
}
.runtime-monitor-top-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.runtime-monitor-summary-card {
    margin-bottom: 0;
}
.runtime-monitor-frequency-value {
    font-size: 26px;
}
.runtime-monitor-host-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.runtime-monitor-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}
.runtime-monitor-panel-head h2 {
    margin: 0;
}
.runtime-monitor-issues {
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.runtime-monitor-issues strong {
    display: block;
    margin-bottom: 6px;
}
.runtime-monitor-issues ul {
    margin: 0;
    padding-left: 18px;
}
.runtime-monitor-issues li {
    margin-bottom: 4px;
    line-height: 1.35;
}
.runtime-monitor-kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.runtime-monitor-kv-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.runtime-monitor-kv-label {
    color: #64748b;
    font-size: 12px;
    line-height: 1.2;
}
.runtime-monitor-kv-value {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}
@media (max-width: 980px) {
  .compact-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .back-to-top-btn {
      right: 16px;
      bottom: 16px;
  }
  .runtime-monitor-top-grid,
  .runtime-monitor-host-grid,
  .runtime-monitor-kv-grid {
      grid-template-columns: 1fr;
  }
}
