/* ============================================================
   Design Tokens
   ============================================================ */
:root {
    --color-primary: #111827;
    --color-primary-hover: #374151;
    --color-primary-light: #e5e7eb;

    --color-secondary: #64748b;
    --color-success: #10b981;
    --color-success-hover: #059669;
    --color-warning: #f59e0b;
    --color-warning-hover: #d97706;
    --color-error: #ef4444;
    --color-error-hover: #dc2626;

    --color-bg: #f3f4f6;
    --color-surface: #ffffff;
    --color-surface-alt: #f8f9fa;

    --color-border: #e5e7eb;
    --color-border-strong: #d1d5db;

    --color-text-primary: #111827;
    --color-text-secondary: #6b7280;
    --color-text-tertiary: #9ca3af;
    --color-text-on-primary: #ffffff;

    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 20px;
    --text-xl: 24px;
    --text-2xl: 32px;

    --fw-regular: 400;
    --fw-semibold: 600;

    --lh-body: 1.5;
    --lh-heading: 1.25;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-9: 36px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    --radius-sm: 6px;
    --radius-md: 8px;

    --shadow-1: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-2: 0 4px 12px rgba(0,0,0,0.1);

    --sidebar-width: 240px;
}

/* ============================================================
   Reset & Global
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: var(--text-sm);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    color: var(--color-text-primary);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
}
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 3px; }
body::-webkit-scrollbar-thumb:hover { background: var(--color-text-tertiary); }
body.modal-open { overflow: hidden; }

h1, h2, h3, h4 { font-weight: var(--fw-semibold); line-height: var(--lh-heading); color: var(--color-text-primary); }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Typography Utilities
   ============================================================ */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-center { text-align: center; }
.font-semibold { font-weight: var(--fw-semibold); }
.nowrap { white-space: nowrap; }
.word-break { word-break: break-all; }

/* ============================================================
   Layout Utilities
   ============================================================ */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.hidden { display: none; }
.align-center { align-items: center; }
.generated-cards-textarea { width: 100%; min-height: 220px; height: 220px; resize: vertical; line-height: 1.6; }
.ai-prompt-text { font-size: 13px; line-height: 1.6; }

.kami-full-width { width: 100%; }
.preview-toolbar { position: absolute; top: 20px; right: 20px; z-index: 10002; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; max-width: calc(100% - 40px); }
.preview-mode-label { background: rgba(0,0,0,0.6); padding: 4px 12px; border-radius: 20px; color: #fff; font-size: 12px; display: flex; align-items: center; margin-right: 4px; }
.preview-frame { width: 100%; height: 100%; border: none; background: transparent; }
.material-picker-list { min-height: 100px; }
.empty-state-pad { text-align: center; padding: 40px; }

/* Icon */
.icon { width: 16px; height: 16px; stroke-width: 2; flex-shrink: 0; }
.icon-lg { width: 20px; height: 20px; }

/* ============================================================
   Card
   ============================================================ */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    overflow-x: auto;
}
.card-header {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 { font-size: var(--text-base); font-weight: var(--fw-semibold); }
.card-body { padding: var(--space-6); }

/* ============================================================
   Button
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }

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

.btn-secondary { background: #ffffff; color: var(--color-text-primary); border-color: var(--color-border-strong); }
.btn-secondary:hover { background: var(--color-surface-alt); border-color: var(--color-border-strong); color: var(--color-text-primary); }

.btn-success { background: var(--color-success); color: #ffffff; border-color: var(--color-success); }
.btn-success:hover { background: var(--color-success-hover); border-color: var(--color-success-hover); color: #ffffff; }

.btn-warning { background: var(--color-warning); color: #ffffff; border-color: var(--color-warning); }
.btn-warning:hover { background: var(--color-warning-hover); border-color: var(--color-warning-hover); color: #ffffff; }

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

.btn-ghost { background: transparent; color: var(--color-text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--color-surface-alt); color: var(--color-text-primary); }

.btn-sm { padding: var(--space-1) var(--space-3); font-size: var(--text-xs); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { background: var(--color-border); color: var(--color-text-tertiary); cursor: not-allowed; border-color: var(--color-border); }
.btn svg { width: 16px; height: 16px; }

/* ============================================================
   Form
   ============================================================ */
.form-group { margin-bottom: var(--space-4); }
.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary);
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--color-text-primary);
    transition: border-color 0.15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    outline: 2px solid var(--color-primary);
    outline-offset: -1px;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--color-text-tertiary); }
.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 42px;
}
.form-textarea { resize: vertical; min-height: 80px; padding-top: var(--space-3); padding-bottom: var(--space-3); }
.form-input[type="color"] { height: 42px; padding: 4px 6px; cursor: pointer; background: #fff; border-radius: var(--radius-sm); }
.form-input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.form-input[type="color"]::-webkit-color-swatch { border: 1px solid var(--color-border-strong); border-radius: 4px; }
.form-hint { margin-top: var(--space-1); font-size: var(--text-xs); color: var(--color-text-tertiary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); min-width: 0; }
.form-grid-span { grid-column: 1 / -1; }
.form-narrow { max-width: 420px; margin: 0 auto; }
.form-row { display: flex; gap: var(--space-4); }
.form-row .form-group { flex: 1; }
.checkbox-row { display: flex; align-items: center; gap: var(--space-4); min-height: 36px; }
.checkbox-row label { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); cursor: pointer; }
.check-line { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); color: var(--color-text-primary); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); }
.inline-checks { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.inline-checks .check-line { margin-top: 0; }

/* ============================================================
   Table
   ============================================================ */
.table { width: 100%; border-collapse: collapse; }
.table th,
.table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--color-border);
}
.table th {
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-surface-alt);
    white-space: nowrap;
    font-size: var(--text-xs);
}
.table tbody tr:hover td { background: transparent; }

/* Key cell */
.key-cell, .secret-cell { max-width: 220px; word-break: break-all; }
.key-inline { display: grid; grid-template-columns: minmax(120px, 1fr) auto; align-items: center; gap: var(--space-2); width: 100%; }
.key-modal-inline { grid-template-columns: 1fr auto auto; align-items: start; }
.key-inline span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.key-inline .btn { flex-shrink: 0; }
.key-modal-inline span { white-space: normal; word-break: break-all; overflow: visible; text-overflow: clip; }
.key-actions-inline { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.code-block { background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-3); font-family: monospace; font-size: var(--text-xs); line-height: 1.6; white-space: pre-wrap; word-break: break-all; max-height: 300px; overflow-y: auto; margin: 0; }
.key-cell .key-inline { min-width: 260px; }
.app-keys-cell { width: 290px; max-width: 290px; }
.app-key-row { display: grid; grid-template-columns: 44px minmax(72px, 1fr) auto; align-items: center; gap: var(--space-2); width: 100%; }
.app-key-row + .app-key-row { margin-top: var(--space-2); }
.app-key-row > span:not(.key-label) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.key-label { font-size: var(--text-xs); color: var(--color-text-tertiary); }
.app-run-control { display: flex; flex-direction: column; gap: var(--space-2); min-width: 160px; }
.app-run-control .btn { font-size: var(--text-xs); padding: 3px 10px; height: auto; }
.card-no-cell .key-inline { min-width: 180px; }
.card-app-cell { min-width: 0; width: 130px; max-width: 130px; }
.card-app-name { display: block; width: 20em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-agent-cell { width: 110px; min-width: 110px; max-width: 110px; vertical-align: middle; }
.card-agent-name, .card-agent-parent { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; text-align: left; }
.card-agent-parent { color: var(--color-text-tertiary); font-size: var(--text-xs); }
.card-status-cell { width: 72px; min-width: 72px; white-space: nowrap; }
.secret-cell .key-inline { grid-template-columns: minmax(80px, 1fr) auto; min-width: 300px; }
.device-id-text { display: inline-block; max-width: 100%; overflow-wrap: anywhere; word-break: break-all; white-space: normal; line-height: 1.4; }
.view-list .device-id-cell { max-width: 220px; }
.capture-device-id-cell { width: 200px; min-width: 200px; max-width: 200px; white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.capture-device-id-cell .device-id-text { display: inline; max-width: 100%; overflow-wrap: anywhere; word-break: break-all; white-space: normal; }
.key-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.date-stack { display: inline-flex; flex-direction: column; gap: 2px; line-height: 1.15; white-space: nowrap; }
.date-stack span { font-size: var(--text-sm); color: var(--color-text-primary); }
.date-stack small { font-size: var(--text-xs); color: var(--color-text-tertiary); }
.cell-content { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announcement-title-cell { max-width: 260px; }
.material-name-cell { max-width: 240px; }
.material-remark-cell { max-width: 160px; }
.material-remark-empty { max-width: 24px; color: var(--color-text-tertiary); }
.cell-sm { max-width: 150px; }
.cell-wide { max-width: 280px; }
.app-name-cell { width: 160px; max-width: 160px; }
.app-name-cell > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-table-ellipsis {
    display: block;
    min-width: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-nav-ellipsis {
    display: inline-block;
    min-width: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.account-text-wrap {
    display: block;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.account-select { min-width: 0; max-width: 240px; }
.topbar-user { min-width: 0; }

/* ============================================================
   Badge
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: 500;
    border-radius: var(--radius-sm);
}
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-error { background: #fef2f2; color: #991b1b; }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-secondary { background: var(--color-surface-alt); color: var(--color-text-secondary); }
.badge-info { background: #eff6ff; color: #1e40af; }

/* ============================================================
   Alert
   ============================================================ */
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
}
.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* ============================================================
   Toast
   ============================================================ */
.toast-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}
.toast-item {
    min-width: 220px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-2);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    line-height: 1.5;
    pointer-events: auto;
    animation: toast-in .18s ease-out;
}
.toast-success { border-left: 4px solid var(--color-success); }
.toast-error { border-left: 4px solid var(--color-error); }
.toast-info { border-left: 4px solid var(--color-primary); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   Confirm Dialog
   ============================================================ */
.confirm-mask {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.4);
}
.confirm-card {
    width: 100%;
    max-width: 380px;
    padding: var(--space-6);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-2);
    animation: toast-in .18s ease-out;
}
.confirm-title { font-size: var(--text-lg); font-weight: var(--fw-semibold); margin-bottom: var(--space-2); }
.confirm-message { color: var(--color-text-secondary); line-height: 1.6; }
.confirm-actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-6); }

/* ============================================================
   Pagination
   ============================================================ */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-4); flex-wrap: wrap; }
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 var(--space-2);
    font-size: var(--text-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    background: #ffffff;
}
.pagination a:hover { background: var(--color-surface-alt); border-color: var(--color-border-strong); text-decoration: none; }
.pagination .current { background: var(--color-primary); border-color: var(--color-primary); color: #ffffff; }
.pagination .disabled { opacity: 0.5; cursor: not-allowed; }
.pagination-pages { display: inline-flex; align-items: center; gap: var(--space-3); }
.pagination-info { color: var(--color-text-secondary); font-size: var(--text-sm); }
.pagination-size { display: inline-flex; align-items: center; }
.pagination-size .form-select { width: auto; min-width: 110px; }
.pagination-ellipsis { color: var(--color-text-secondary); padding: 0 var(--space-1); }

/* ============================================================
   Admin Layout
   ============================================================ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    padding: 0 var(--space-6);
    height: 64px;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    color: var(--color-text-primary);
}
.sidebar-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.system-logo-preview { width: 72px; height: 72px; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface-alt); flex: 0 0 auto; }
.system-logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.system-logo-empty { display: flex; align-items: center; justify-content: center; color: var(--color-text-tertiary); font-size: var(--text-xs); }
.settings-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); align-items: stretch; }
.settings-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.settings-card .card-body { flex: 1; }
.settings-card-primary { min-width: 0; }
.settings-card-head { padding: var(--space-6); display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); border-bottom: 1px solid var(--color-border); background: linear-gradient(135deg, var(--color-surface-alt), #ffffff); }
.settings-card-head-simple { min-height: 112px; }
.settings-card-head h3 { font-size: var(--text-lg); font-weight: var(--fw-semibold); margin-bottom: var(--space-1); }
.settings-card-head p { color: var(--color-text-secondary); font-size: var(--text-sm); line-height: 1.6; }
.settings-logo-large { width: 88px; height: 88px; border-radius: 22px; overflow: hidden; background: #ffffff; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); flex: 0 0 auto; }
.settings-logo-large img { width: 100%; height: 100%; object-fit: cover; }
.settings-form { max-width: 560px; }
.settings-upload-row { display: flex; gap: var(--space-4); align-items: center; }
.settings-upload-main { flex: 1; min-width: 0; }
.settings-actions { padding-top: var(--space-2); display: flex; justify-content: flex-start; }
.settings-actions .btn { min-width: 132px; height: 42px; }
@media (max-width: 960px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-card-head-simple { min-height: 0; }
}
@media (max-width: 560px) {
    .settings-card-head { align-items: flex-start; }
    .settings-logo-large { width: 64px; height: 64px; border-radius: 16px; }
    .settings-upload-row { align-items: flex-start; }
}
.sidebar-nav {
    flex: 1;
    padding: var(--space-3) 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 2px; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: 2px 10px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--color-surface-alt); color: var(--color-text-primary); text-decoration: none; }
.nav-item.active { background: var(--color-primary-light); color: var(--color-primary); font-weight: var(--fw-semibold); }
.nav-item.active::before { content: ''; position: absolute; top: 9px; bottom: 9px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--color-primary); }
.nav-item.active .icon { color: var(--color-primary); }
.nav-item .icon { width: 20px; height: 20px; flex-shrink: 0; color: currentColor; }

.main { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    flex: 0 0 auto;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    padding: 0 var(--space-8);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar-title { font-size: var(--text-base); font-weight: var(--fw-semibold); }
.topbar-left { display: flex; align-items: center; gap: var(--space-2); min-width: 0; flex: 1; }
.topbar-title { flex: 0 0 auto; }
.topbar-notice { flex: 1 1 auto; min-width: 260px; max-width: none; height: 34px; display: inline-flex; align-items: center; gap: var(--space-2); border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface-alt); color: var(--color-text-primary); padding: 0 var(--space-3); cursor: pointer; overflow: hidden; }
.topbar-notice span { color: var(--color-primary); font-size: var(--text-xs); font-weight: var(--fw-semibold); flex: 0 0 auto; }
.topbar-notice marquee { font-size: var(--text-sm); }
.topbar-user { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-secondary); }
.topbar-user .user-name { color: var(--color-text-primary); }
.content { flex: 1; padding: var(--space-8); }

/* ============================================================
   Stat Cards
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-6); }
.stat-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: var(--space-6);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}
.stat-label { font-size: var(--text-sm); color: var(--color-text-secondary); margin-bottom: var(--space-2); }
.stat-value { font-size: var(--text-2xl); font-weight: var(--fw-semibold); color: var(--color-text-primary); }
.stat-hint { font-size: var(--text-xs); color: var(--color-text-tertiary); margin-top: var(--space-2); }
.stat-footer { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; padding-top: var(--space-3); }
.stat-link { font-size: var(--text-xs); color: var(--color-primary); text-decoration: none; font-weight: 500; transition: color 0.15s; }
.stat-link:hover { color: var(--color-primary-hover); }

/* ============================================================
   Toolbar & Filter
   ============================================================ */
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); flex-wrap: wrap; gap: var(--space-3); }
.toolbar h2 { font-size: var(--text-lg); }
.filter-form,
.bulk-bar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.filter-form .form-input,
.filter-form .form-select,
.bulk-bar .form-input,
.bulk-bar .form-select { width: auto; min-width: 160px; height: 42px; font-size: var(--text-sm); }
.filter-form .btn { height: 42px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.list-action-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }

/* ============================================================
   Tabs
   ============================================================ */
.tabs { display: flex; gap: var(--space-2); border-bottom: 1px solid var(--color-border); }
.tab-item {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 var(--space-4);
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.tab-item:hover { color: var(--color-text-primary); text-decoration: none; }
.tab-item.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: var(--fw-semibold); }

/* ============================================================
   Modal
   ============================================================ */
.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.4);
}
.modal-card {
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    height: fit-content;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-2);
}
.modal-card-lg { max-width: 860px; height: 720px; max-height: calc(100vh - 48px); }
.modal-card .card-header {
    padding: var(--space-4) var(--space-6);
    background: var(--color-surface);
}
.modal-card form {
    padding: var(--space-6);
    overflow-y: auto;
    min-height: 0;
}
.modal-card form:has(.modal-scroll-body) {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-card .modal-scroll-body {
    flex: 1;
    min-height: 0;
}
.modal-card .form-narrow { max-width: none; width: 100%; }
.modal-card .flex.mt-6,
.modal-card .modal-actions {
    flex-shrink: 0;
    justify-content: flex-end;
    padding: var(--space-4) var(--space-6);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}
.modal-scroll-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding: var(--space-6);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
}
.modal-scroll-body::-webkit-scrollbar { width: 6px; }
.modal-scroll-body::-webkit-scrollbar-track { background: transparent; }
.modal-scroll-body::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 3px; }
.modal-scroll-body::-webkit-scrollbar-thumb:hover { background: var(--color-text-tertiary); }

/* ============================================================
   Auth Layout (login)
   ============================================================ */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--color-surface-alt);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: var(--space-8);
}
.auth-card h1 { font-size: var(--text-xl); margin-bottom: var(--space-2); text-align: center; }
.auth-card .auth-subtitle { text-align: center; color: var(--color-text-secondary); margin-bottom: var(--space-6); }

/* Slider Captcha */
.slider-captcha { position: relative; width: 100%; height: 40px; background: var(--color-surface-alt); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); user-select: none; overflow: hidden; touch-action: none; }
.slider-captcha .slider-track { position: absolute; top: 0; left: 0; height: 100%; background: #d1fae5; border-radius: var(--radius-sm); transition: none; }
.slider-captcha .slider-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); color: var(--color-text-tertiary); pointer-events: none; }
.slider-captcha .slider-thumb { position: absolute; top: 0; left: 0; width: 40px; height: 40px; background: #ffffff; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: grab; z-index: 2; transition: none; }
.slider-captcha .slider-thumb:active { cursor: grabbing; }
.slider-captcha .slider-thumb svg { width: 18px; height: 18px; color: var(--color-text-secondary); }
.slider-captcha.success { border-color: var(--color-success); }
.slider-captcha.success .slider-track { background: #a7f3d0; }
.slider-captcha.success .slider-thumb { background: var(--color-success); border-color: var(--color-success); }
.slider-captcha.success .slider-thumb svg { color: #ffffff; }
.slider-captcha.success .slider-text { color: #065f46; }

/* Checkbox */
.form-checkbox { display: flex; align-items: center; gap: var(--space-3); cursor: pointer; font-size: var(--text-sm); color: var(--color-text-secondary); }
.form-checkbox input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.form-checkbox-check { width: 18px; height: 18px; border: 1.5px solid var(--color-border-strong); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease; flex-shrink: 0; }
.form-checkbox input[type="checkbox"]:checked + .form-checkbox-check { background: var(--color-primary); border-color: var(--color-primary); }
.form-checkbox input[type="checkbox"]:checked + .form-checkbox-check::after { content: '\2713'; color: #ffffff; font-size: 12px; font-weight: bold; line-height: 1; }
.form-checkbox input[type="checkbox"]:focus + .form-checkbox-check { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ============================================================
   Install Layout
   ============================================================ */
.install-wrap { min-height: 100vh; padding: var(--space-8) var(--space-4); display: flex; align-items: flex-start; justify-content: center; }
.install-card { width: 100%; max-width: 640px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.install-header { padding: var(--space-6) var(--space-8); border-bottom: 1px solid var(--color-border); }
.install-header h1 { font-size: var(--text-xl); margin-bottom: var(--space-1); }
.install-header p { color: var(--color-text-secondary); font-size: var(--text-sm); }
.install-body { padding: var(--space-8); }
.install-footer { padding: var(--space-4) var(--space-8); border-top: 1px solid var(--color-border); display: flex; justify-content: space-between; align-items: center; background: var(--color-surface-alt); border-bottom-left-radius: var(--radius-md); border-bottom-right-radius: var(--radius-md); }
.stepper { display: flex; align-items: center; padding: var(--space-6) var(--space-8); background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border); gap: var(--space-3); }
.step { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-tertiary); flex-shrink: 0; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--color-surface); border: 1px solid var(--color-border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: var(--fw-semibold); flex-shrink: 0; }
.step.active { color: var(--color-primary); font-weight: var(--fw-semibold); }
.step.active .step-num { background: var(--color-primary); border-color: var(--color-primary); color: #ffffff; }
.step.done { color: var(--color-success); }
.step.done .step-num { background: var(--color-success); border-color: var(--color-success); color: #ffffff; }
.step-sep { flex: 1; height: 1px; background: var(--color-border-strong); }
.check-list { list-style: none; }
.check-list li { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); }
.check-list li:last-child { border-bottom: none; }
.check-list .check-name { color: var(--color-text-primary); }
.check-list .check-value { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); }
.section-title { font-size: var(--text-sm); color: var(--color-text-secondary); margin-bottom: var(--space-4); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border); }
.done-state { text-align: center; padding: var(--space-8) 0; }
.done-state .done-icon { width: 48px; height: 48px; border-radius: 50%; background: #ecfdf5; color: var(--color-success); display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); }
.done-state h2 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.done-state p { color: var(--color-text-secondary); margin-bottom: var(--space-6); }

/* ============================================================
   Build Page
   ============================================================ */
.build-env-card { padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.env-check-item { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.env-check-item:last-child { border-bottom: none; }
.build-log-card { padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }

/* ============================================================
   API Doc
   ============================================================ */
.api-method { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-2); border-radius: 999px; font-size: var(--text-xs); font-weight: var(--fw-semibold); }
.api-method-get { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.api-method-post { background: rgba(17, 24, 39, 0.1); color: var(--color-primary); }

/* ============================================================
   Gateway Docs
   ============================================================ */
.gateway-docs { max-width: 1320px; margin: 0 auto; color: var(--color-text-primary); }
.gateway-docs-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-6); margin-bottom: var(--space-5); padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--color-surface), var(--color-surface-alt)); box-shadow: var(--shadow-1); }
.gateway-docs-kicker { margin-bottom: var(--space-2); color: var(--color-primary); font-size: var(--text-xs); font-weight: var(--fw-semibold); letter-spacing: .08em; text-transform: uppercase; }
.gateway-docs-header h1 { margin-bottom: var(--space-2); font-size: clamp(28px, 4vw, 42px); letter-spacing: 0; }
.gateway-docs-header p { max-width: 650px; color: var(--color-text-secondary); }
.gateway-endpoint { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 290px; padding: var(--space-4); border-left: 3px solid var(--color-primary); background: var(--color-surface); }
.gateway-endpoint span, .gateway-config-summary span { color: var(--color-text-tertiary); font-size: var(--text-xs); }
.gateway-endpoint code, .gateway-config-summary code, .gateway-panel-title code { word-break: break-all; font-family: Consolas, Monaco, "Courier New", monospace; font-size: var(--text-xs); }
.gateway-endpoint.is-missing { border-left-color: var(--color-danger); }
.gateway-docs-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); padding: var(--space-2); border-bottom: 1px solid var(--color-border); }
.gateway-docs-nav button { min-height: 38px; padding: 0 var(--space-4); border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--color-text-secondary); cursor: pointer; font-size: var(--text-sm); }
.gateway-docs-nav button:hover, .gateway-docs-nav button.is-active { border-bottom-color: var(--color-primary); color: var(--color-primary); font-weight: var(--fw-semibold); }
.gateway-doc-section { display: none; animation: gateway-doc-in .18s ease-out; }
.gateway-doc-section.is-active { display: block; }
@keyframes gateway-doc-in { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.gateway-section-heading { display: flex; gap: var(--space-4); align-items: flex-start; margin-bottom: var(--space-5); }
.gateway-section-heading > span { color: var(--color-primary); font-family: Consolas, Monaco, monospace; font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.gateway-section-heading h2 { margin-bottom: var(--space-1); font-size: var(--text-xl); }
.gateway-section-heading p { color: var(--color-text-secondary); }
.gateway-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: var(--space-5); border: 1px solid var(--color-border); background: var(--color-border); }
.gateway-flow > div { display: flex; flex-direction: column; gap: var(--space-2); min-height: 142px; padding: var(--space-4); background: var(--color-surface); }
.gateway-flow b { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--color-primary); color: #fff; font-size: var(--text-xs); }
.gateway-flow span { font-weight: var(--fw-semibold); }
.gateway-flow small, .gateway-action-list small { color: var(--color-text-tertiary); line-height: 1.6; }
.gateway-panel, .gateway-details, .gateway-config-block { margin-bottom: var(--space-5); padding: var(--space-5); border: 1px solid var(--color-border); background: var(--color-surface); box-shadow: var(--shadow-1); }
.gateway-panel-title { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.gateway-panel > p, .gateway-config-block p { color: var(--color-text-secondary); line-height: 1.7; }
.gateway-schema { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: var(--space-5); border: 1px solid var(--color-border); background: var(--color-border); }
.gateway-schema > div { padding: var(--space-4); background: var(--color-bg); }
.gateway-schema span { margin-right: var(--space-2); font-family: Consolas, Monaco, monospace; font-weight: var(--fw-semibold); }
.gateway-schema em { color: var(--color-primary); font-size: var(--text-xs); font-style: normal; }
.gateway-schema p { margin-top: var(--space-2); color: var(--color-text-secondary); font-size: var(--text-sm); line-height: 1.6; }
.gateway-callout, .gateway-alert { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); padding: var(--space-4); border-left: 3px solid var(--color-primary); background: var(--color-primary-light); }
.gateway-callout p, .gateway-alert span { color: var(--color-text-secondary); line-height: 1.65; }
.gateway-alert.is-error { border-left-color: var(--color-danger); background: rgba(239, 68, 68, .08); }
.gateway-subheading { margin: var(--space-6) 0 var(--space-3); font-size: var(--text-base); }
.gateway-procedure { display: grid; gap: 1px; margin-bottom: var(--space-5); border: 1px solid var(--color-border); background: var(--color-border); }
.gateway-procedure > div { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); background: var(--color-surface); }
.gateway-procedure b { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border: 1px solid var(--color-primary); color: var(--color-primary); font-size: var(--text-xs); }
.gateway-procedure p { color: var(--color-text-secondary); line-height: 1.65; }
.gateway-action-docs { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.gateway-action-docs article { padding: var(--space-4); border: 1px solid var(--color-border); background: var(--color-surface); }
.gateway-action-docs header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.gateway-action-docs header code { color: var(--color-primary); font-weight: var(--fw-semibold); }
.gateway-action-docs p, .gateway-action-docs small { display: block; margin-top: var(--space-2); color: var(--color-text-secondary); line-height: 1.6; }
.gateway-action-docs pre { overflow: auto; margin-top: var(--space-3); padding: var(--space-3); background: var(--color-surface-alt); font-family: Consolas, Monaco, monospace; font-size: var(--text-xs); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.gateway-status-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-bottom: var(--space-5); border: 1px solid var(--color-border); background: var(--color-border); }
.gateway-status-table > div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--color-surface); }
.gateway-status-table code { color: var(--color-primary); font-weight: var(--fw-semibold); }
.gateway-status-table span { color: var(--color-text-secondary); font-size: var(--text-sm); }
.gateway-action-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.gateway-action-list article, .gateway-security-grid article { padding: var(--space-4); border: 1px solid var(--color-border); background: var(--color-surface); }
.gateway-action-list code { color: var(--color-primary); font-size: var(--text-base); font-weight: var(--fw-semibold); }
.gateway-action-list p { margin: var(--space-2) 0; color: var(--color-text-secondary); }
.gateway-details summary { cursor: pointer; font-weight: var(--fw-semibold); }
.gateway-details pre, .gateway-config-block pre, .gateway-debug-columns pre { overflow: auto; margin-top: var(--space-3); padding: var(--space-4); background: #111827; color: #d1fae5; font-family: Consolas, Monaco, monospace; font-size: var(--text-xs); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.gateway-debug-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.gateway-debug-form, .gateway-debug-output { padding: var(--space-5); border: 1px solid var(--color-border); background: var(--color-surface); }
.gateway-debug-input { min-height: 220px; resize: vertical; font-family: Consolas, Monaco, monospace; font-size: var(--text-xs); line-height: 1.6; }
.gateway-debug-warning { margin-bottom: var(--space-4); padding: var(--space-3); background: rgba(245, 158, 11, .1); color: var(--color-text-secondary); font-size: var(--text-xs); line-height: 1.6; }
.gateway-debug-empty { display: flex; min-height: 340px; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); color: var(--color-text-tertiary); text-align: center; }
.gateway-debug-empty strong { color: var(--color-text-primary); }
.gateway-debug-result[hidden], .gateway-debug-empty[hidden] { display: none; }
.gateway-debug-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.gateway-debug-meta span { padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); color: var(--color-text-secondary); font-size: var(--text-xs); }
.gateway-debug-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.gateway-debug-columns > div { min-width: 0; }
.gateway-debug-columns > .is-wide { grid-column: 1 / -1; }
.gateway-debug-columns h3 { font-size: var(--text-sm); }
.gateway-debug-flow-columns > div { padding: var(--space-3); border: 1px solid var(--color-border); background: var(--color-surface-alt); }
.gateway-debug-flow-columns h3 { display: flex; align-items: center; gap: var(--space-2); }
.gateway-debug-flow-columns h3 span { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border: 1px solid var(--color-primary); color: var(--color-primary); font-size: var(--text-xs); }
.gateway-debug-flow-columns pre { min-height: 220px; max-height: 420px; overflow-wrap: anywhere; word-break: break-all; }
.gateway-debug-form [hidden] { display: none; }
.gateway-security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.gateway-security-grid b { font-size: var(--text-sm); }
.gateway-security-grid p { margin-top: var(--space-2); color: var(--color-text-secondary); font-size: var(--text-sm); line-height: 1.6; }
.gateway-config-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.gateway-config-summary > div { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; padding: var(--space-4); border: 1px solid var(--color-border); background: var(--color-surface); }
.gateway-config-block h3 { margin-bottom: var(--space-2); font-size: var(--text-base); }
.gateway-config-block code { word-break: break-word; }

/* ============================================================
   API Reference Docs
   ============================================================
*/
.gateway-reference { width: 100%; max-width: 1440px; margin: 0 auto; color: var(--color-text-primary); }
.gateway-page-header { align-items: flex-end; margin-bottom: 18px; }
.gateway-page-header h1 { margin-bottom: 5px; font-size: 22px; line-height: 1.3; letter-spacing: -.02em; }
.gateway-page-header p { color: var(--color-text-secondary); font-size: 13px; line-height: 1.55; }
.gateway-page-tabs { gap: 0; margin-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.gateway-page-tabs .tab-item { appearance: none; min-width: 112px; min-height: 42px; justify-content: center; padding: 0 20px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--color-text-secondary); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.gateway-page-tabs .tab-item:hover { color: var(--color-text-primary); }
.gateway-page-tabs .tab-item.active { border-bottom-color: var(--color-primary); color: var(--color-primary); font-weight: var(--fw-semibold); }
.gateway-reference-endpoint { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 8px 7px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.gateway-reference-endpoint > span { padding: 3px 7px; border-radius: 4px; background: #ecfdf5; color: #047857; font-family: Consolas, Monaco, monospace; font-size: 11px; font-weight: var(--fw-semibold); }
.gateway-reference-endpoint code { max-width: 480px; overflow: hidden; color: #374151; font-family: Consolas, Monaco, monospace; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gateway-reference-layout { display: block; }
.gateway-reference-content { min-width: 0; padding: 34px 42px 44px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.gateway-reference-intro { max-width: 920px; padding-bottom: 30px; }
.gateway-reference-eyebrow { margin-bottom: 9px; color: var(--color-text-tertiary); font-family: Consolas, Monaco, monospace; font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: .08em; }
.gateway-reference-intro h1 { margin-bottom: 10px; font-size: 27px; line-height: 1.3; letter-spacing: -.025em; }
.gateway-reference-intro > p { max-width: 820px; color: var(--color-text-secondary); font-size: 15px; line-height: 1.75; }
.gateway-reference-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 22px; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.gateway-reference-quick > div { min-width: 0; padding: 13px 15px; border-right: 1px solid var(--color-border); background: var(--color-surface-alt); }
.gateway-reference-quick > div:last-child { border-right: 0; }
.gateway-reference-quick span { display: block; margin-bottom: 5px; color: var(--color-text-tertiary); font-size: 12px; }
.gateway-reference-quick strong { display: block; overflow: hidden; color: #374151; font-family: Consolas, Monaco, monospace; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.gateway-reference-section { max-width: none; padding: 30px 0; border-top: 1px solid var(--color-border); scroll-margin-top: 76px; }
.gateway-reference-section-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 18px; }
.gateway-reference-section-head > span { display: inline-flex; min-width: 28px; height: 28px; align-items: center; justify-content: center; margin-top: 1px; border-radius: 50%; background: var(--color-primary-light); color: var(--color-primary); font-family: Consolas, Monaco, monospace; font-size: 11px; font-weight: var(--fw-semibold); }
.gateway-reference-section-head h2 { margin-bottom: 4px; font-size: 20px; line-height: 1.4; letter-spacing: -.015em; }
.gateway-reference-section-head p { color: var(--color-text-secondary); font-size: 13px; line-height: 1.65; }
.gateway-reference-section h3 { margin: 23px 0 10px; font-size: 15px; line-height: 1.5; }
.gateway-reference-section > p { color: var(--color-text-secondary); font-size: 14px; line-height: 1.75; }
.gateway-reference-table-wrap { overflow-x: auto; margin: 14px 0 20px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.gateway-reference-table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 13px; }
.gateway-reference-table th { background: var(--color-surface-alt); color: #4b5563; font-size: 12px; font-weight: var(--fw-semibold); text-align: left; }
.gateway-reference-table th, .gateway-reference-table td { padding: 11px 14px; border-bottom: 1px solid var(--color-border); vertical-align: top; line-height: 1.6; }
.gateway-reference-table tr:last-child td { border-bottom: 0; }
.gateway-reference-table tbody tr:hover { background: #fafafa; }
.gateway-reference-table td:first-child { width: 160px; color: var(--color-text-primary); font-weight: var(--fw-semibold); }
.gateway-reference-table td:nth-child(2) { width: 190px; color: #374151; font-family: Consolas, Monaco, monospace; font-size: 12px; }
.gateway-reference-table td:not(:first-child) { color: var(--color-text-secondary); }
.gateway-reference-table code, .gateway-reference-section p code, .gateway-reference-steps code { color: #1f2937; font-family: Consolas, Monaco, monospace; font-size: .94em; }
.gateway-reference-code { overflow: auto; margin: 12px 0 20px; padding: 16px 18px; border: 1px solid #25324a; border-left: 3px solid #64748b; border-radius: var(--radius-sm); background: #172033; color: #e5edf8; font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 1.7; white-space: pre; tab-size: 2; }
.gateway-reference-steps { display: grid; gap: 0; margin: 12px 0 20px; padding: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-sm); list-style: none; counter-reset: reference-step; }
.gateway-reference-steps li { counter-increment: reference-step; position: relative; padding: 12px 15px 12px 49px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-secondary); font-size: 13px; line-height: 1.65; }
.gateway-reference-steps li:last-child { border-bottom: 0; }
.gateway-reference-steps li::before { content: counter(reference-step); position: absolute; top: 12px; left: 15px; width: 21px; height: 21px; border-radius: 50%; background: var(--color-primary); color: #fff; font-family: Consolas, Monaco, monospace; font-size: 10px; line-height: 21px; text-align: center; }
.gateway-reference-callout { display: flex; flex-direction: column; gap: 5px; margin: 18px 0; padding: 13px 15px; border: 1px solid #dbe4ef; border-left: 3px solid #64748b; border-radius: var(--radius-sm); background: #f8fafc; }
.gateway-reference-callout strong { font-size: 13px; }
.gateway-reference-callout span { color: var(--color-text-secondary); font-size: 13px; line-height: 1.65; }
.gateway-action-reference { display: grid; gap: 0; margin-top: 14px; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.gateway-action-reference article { display: grid; grid-template-columns: 155px minmax(220px, 1fr) minmax(220px, 290px); gap: 18px; align-items: start; padding: 15px 16px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.gateway-action-reference article:last-child { border-bottom: 0; }
.gateway-action-reference article:hover { background: #fafafa; }
.gateway-action-reference header { display: flex; flex-direction: column; gap: 4px; }
.gateway-action-reference header strong { font-size: 14px; line-height: 1.5; }
.gateway-action-reference header code { color: #4b5563; font-family: Consolas, Monaco, monospace; font-size: 12px; }
.gateway-action-reference p, .gateway-action-reference small { color: var(--color-text-secondary); font-size: 13px; line-height: 1.6; }
.gateway-action-reference pre { overflow: auto; margin: 0; padding: 9px 11px; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-surface-alt); color: #4b5563; font-family: Consolas, Monaco, monospace; font-size: 11px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.gateway-action-reference small { padding-top: 3px; font-size: 12px; }
.gateway-debug-page { padding: 28px 32px 34px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.gateway-debug-page[hidden], [data-api-panel][hidden] { display: none; }
.gateway-debug-page-head { margin-bottom: 18px; }
.gateway-debug-page-head h2 { margin-bottom: 5px; font-size: 20px; line-height: 1.4; letter-spacing: -.015em; }
.gateway-debug-page-head p { color: var(--color-text-secondary); font-size: 13px; line-height: 1.65; }
.gateway-debug-page .gateway-reference-callout { margin: 0 0 20px; }
.gateway-debug-page .gateway-debug-grid { grid-template-columns: 320px minmax(0, 1fr); gap: 20px; }
.gateway-debug-page .gateway-debug-form, .gateway-debug-page .gateway-debug-output { padding: 20px; border-radius: var(--radius-sm); }
.gateway-debug-page .gateway-debug-form .form-group { margin-bottom: 15px; }
.gateway-debug-page .gateway-debug-form label { margin-bottom: 6px; font-size: 13px; }
.gateway-debug-page .gateway-debug-form .btn { width: 100%; justify-content: center; }
.gateway-debug-page .gateway-debug-warning { margin-bottom: 15px; border-radius: 4px; font-size: 12px; }
.gateway-debug-page .gateway-debug-empty { min-height: 300px; }
.gateway-debug-page .gateway-debug-meta span { border-radius: 4px; background: var(--color-surface-alt); font-size: 12px; }
.gateway-debug-page .gateway-debug-flow-columns { gap: 14px; }
.gateway-debug-page .gateway-debug-flow-columns > div { padding: 13px; border-radius: var(--radius-sm); }
.gateway-debug-page .gateway-debug-flow-columns h3 { margin-bottom: 9px; font-size: 13px; }
.gateway-debug-page .gateway-debug-flow-columns pre { min-height: 210px; max-height: 390px; margin-top: 0; padding: 13px; border-radius: 4px; font-size: 11px; line-height: 1.65; }
.gateway-connect-page { padding: 28px 32px 32px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.gateway-connect-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.gateway-connect-head h2 { margin-bottom: 5px; font-size: 20px; line-height: 1.4; letter-spacing: -.015em; }
.gateway-connect-head p { max-width: 760px; color: var(--color-text-secondary); font-size: 13px; line-height: 1.65; }
.gateway-connect-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; align-items: start; }
.gateway-connect-options { display: flex; flex-direction: column; gap: 15px; }
.gateway-connect-options .form-group { margin: 0; padding: 17px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-alt); }
.gateway-connect-options label { margin-bottom: 7px; font-size: 13px; }
.gateway-connect-generate { width: 100%; justify-content: center; margin-top: 10px; }
.gateway-connect-options .form-group > small { display: block; margin-top: 8px; color: var(--color-text-secondary); font-size: 11px; line-height: 1.55; }
.gateway-connect-summary, .gateway-connect-security { padding: 17px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.gateway-connect-summary strong, .gateway-connect-security strong { display: block; margin-bottom: 9px; font-size: 13px; }
.gateway-connect-summary ol { padding-left: 20px; color: var(--color-text-secondary); font-size: 13px; line-height: 1.75; }
.gateway-connect-security { border-color: #fde3ad; background: #fffbeb; }
.gateway-connect-security p { color: #78590c; font-size: 12px; line-height: 1.7; }
.gateway-connect-security code { font-family: Consolas, Monaco, monospace; }
.gateway-connect-prompt-wrap { min-width: 0; overflow: hidden; border: 1px solid #25324a; border-radius: var(--radius-sm); background: #172033; }
.gateway-connect-prompt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 15px; border-bottom: 1px solid #2c3a52; color: #e5edf8; }
.gateway-connect-prompt-toolbar div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gateway-connect-prompt-toolbar strong { font-size: 13px; }
.gateway-connect-prompt-toolbar span { overflow: hidden; color: #93a4bc; font-family: Consolas, Monaco, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.gateway-connect-prompt { display: block; width: 100%; height: 720px; resize: vertical; padding: 18px 20px; border: 0; outline: 0; background: #172033; color: #e5edf8; font-family: Consolas, Monaco, "Microsoft YaHei", monospace; font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.gateway-connect-prompt::selection { background: #475569; color: #fff; }

/* ============================================================
   App Config
   ============================================================ */
.button-config-list { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); }
.button-config-row { display: grid; grid-template-columns: 160px minmax(260px, 1fr) 90px 110px 64px; gap: var(--space-3); align-items: center; }
.button-config-head { display: grid; grid-template-columns: 160px minmax(260px, 1fr) 90px 110px 64px; gap: var(--space-3); color: var(--color-text-secondary); font-size: var(--text-xs); }
.button-config-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.button-config-row .btn { justify-content: center; }
.app-price-list { display: flex; flex-direction: column; gap: var(--space-3); }
.app-price-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease; }
.app-price-card.is-open { border-color: var(--color-border-strong); box-shadow: var(--shadow-1); }
.app-price-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--color-bg); }
.app-price-toggle { margin: 0; font-weight: var(--fw-semibold); }
.app-price-collapse { gap: var(--space-1); }
.app-price-card.is-open .app-price-collapse .icon { transform: rotate(180deg); }
.app-price-collapse .icon { transition: transform .18s ease; }
.app-price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); padding: var(--space-4); border-top: 1px solid var(--color-border); }
.price-item { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); }
.price-item label { font-size: var(--text-xs); color: var(--color-text-secondary); font-weight: var(--fw-semibold); }
.price-item .form-input { background: var(--color-surface); }
.price-item-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.price-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; margin: 0; font-weight: var(--fw-normal); }
.price-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.price-switch-track { display: inline-flex; align-items: center; width: 36px; height: 20px; padding: 2px; border-radius: 999px; background: var(--color-border-strong); transition: background .15s; }
.price-switch-knob { width: 16px; height: 16px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.price-switch input:checked + .price-switch-track { background: var(--color-success); }
.price-switch input:checked + .price-switch-track .price-switch-knob { transform: translateX(16px); }
.price-switch input:focus-visible + .price-switch-track { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.price-min-hint { font-size: var(--text-xs); color: var(--color-text-tertiary); white-space: nowrap; }
.token-row { display: flex; gap: 8px; align-items: start; }
.form-label-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.form-label-row .form-label { margin-bottom: 0; }
.pre-wrap-text { white-space: pre-wrap; word-break: break-all; font-family: monospace; font-size: var(--text-xs); }
.token-result { margin-top: 8px; min-height: 60px; font-family: monospace; font-size: var(--text-xs); }

/* ============================================================
   Agent Count Link
   ============================================================ */
.agent-count-link { color: var(--color-primary); cursor: pointer; font-weight: 500; }
.agent-count-link:hover { text-decoration: underline; }
.agent-list { display: flex; flex-direction: column; gap: 4px; }
.material-picker-list { display: flex; flex-direction: column; gap: var(--space-2); }
.material-picker-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; transition: all .15s; }
.material-picker-item:hover { border-color: var(--color-primary); background: var(--color-bg); }
.material-picker-name { font-weight: 500; font-size: var(--text-sm); }
.material-picker-remark { font-size: var(--text-xs); color: var(--color-text-tertiary); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-picker-source {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: var(--text-xs);
    font-weight: 600;
}
.material-action-group {
    width: auto;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}
.material-action-group .btn {
    min-width: 64px;
    justify-content: center;
    white-space: nowrap;
}
.material-preview-btn {
    min-width: 72px;
    justify-content: center;
}
.material-readonly-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    background: var(--color-surface-alt);
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    line-height: 1;
    white-space: nowrap;
}

.announcement-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--space-3); }
.announcement-media-item { display: block; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface-alt); }
.announcement-media-item img,
.announcement-media-item video { width: 100%; height: 84px; object-fit: cover; display: block; }
.announcement-media-item span { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2); font-size: var(--text-xs); }
.rich-editor-wrap { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.rich-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border); }
.rich-tool,
.rich-select,
.rich-color { height: 34px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rich-tool { min-width: 34px; padding: 0 10px; font-size: var(--text-sm); }
.rich-tool-text,
.rich-upload { font-weight: var(--fw-semibold); position: relative; }
.rich-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rich-select { min-width: 84px; padding: 0 10px; }
.rich-color { width: 46px; padding: 0; position: relative; overflow: hidden; }
.rich-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rich-color span { width: 26px; height: 18px; border-radius: 2px; background: #e3342f; }
.rich-editor { min-height: 220px; max-height: 52vh; overflow-y: auto; overflow-x: hidden; padding: var(--space-4); background: var(--color-surface); color: var(--color-text-primary); line-height: 1.8; outline: none; overscroll-behavior: contain; }
.rich-editor img,
.rich-editor video { max-width: 100%; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: #000; display: block; margin: var(--space-3) 0; }
.rich-editor:empty::before { content: attr(data-placeholder); color: #8da0bd; }
.rich-editor-input { border: 0; border-radius: 0; min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.rich-editor:focus { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.12); }
.rich-content { color: var(--color-text-primary); line-height: 1.8; word-break: break-word; }
.rich-content p { margin: 0 0 var(--space-3); }
.rich-content ul,
.rich-content ol { padding-left: 1.4em; margin: var(--space-2) 0; }
.rich-content img,
.rich-content video { max-width: 100%; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: #000; cursor: zoom-in; display: block; margin: var(--space-3) 0; }
.announcement-modal-mask { z-index: 1500; }
.announcement-dialog,
.announcement-list-dialog { max-width: 760px; height: auto; max-height: calc(100vh - 48px); }
.announcement-dialog .modal-scroll-body { overflow: hidden; }
.announcement-header-actions { display: flex; align-items: center; gap: var(--space-2); }
.announcement-force-progress { min-width: 38px; color: var(--color-text-secondary); font-size: var(--text-sm); text-align: center; white-space: nowrap; }
.announcement-detail-head { padding: var(--space-5); margin-bottom: var(--space-4); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(14,165,233,.08)); border: 1px solid var(--color-border); }
.announcement-detail-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-2); border-radius: 999px; background: var(--color-primary); color: #fff; font-size: var(--text-xs); font-weight: var(--fw-semibold); margin-bottom: var(--space-3); }
.announcement-detail-head h2 { margin: 0; font-size: 22px; line-height: 1.35; color: var(--color-text-primary); }
.announcement-detail-head p { margin: var(--space-2) 0 0; color: var(--color-text-tertiary); font-size: var(--text-sm); }
.announcement-detail-content { max-height: 58vh; overflow-y: auto; overflow-x: hidden; padding: 0 var(--space-1); overscroll-behavior: contain; }
.announcement-media-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-3); margin-top: var(--space-4); }
.announcement-media-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.announcement-media-open span { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.58); color: #fff; font-size: var(--text-xs); }
.announcement-media-preview { width: 100%; height: 110px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: #000; cursor: pointer; display: block; }
.announcement-history-list { display: flex; flex-direction: column; gap: var(--space-3); }
.announcement-history-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.announcement-history-item > button { width: 100%; display: flex; justify-content: space-between; gap: var(--space-3); border: 0; background: var(--color-surface-alt); padding: var(--space-3); text-align: left; cursor: pointer; }
.announcement-history-item > button strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announcement-history-item > button span { color: var(--color-text-tertiary); font-size: var(--text-xs); flex: 0 0 auto; }
.announcement-history-body { padding: var(--space-4); line-height: 1.8; }
.media-preview-mask { z-index: 2600; }
.media-preview-card { position: relative; max-width: min(90vw, 960px); max-height: 88vh; }
.media-preview-card img,
.media-preview-card video { max-width: 100%; max-height: 88vh; border-radius: var(--radius-lg); background: #000; }
.media-preview-close { position: absolute; right: -12px; top: -12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #fff; color: var(--color-text-primary); font-size: 22px; cursor: pointer; box-shadow: var(--shadow-md); }
/* ============================================================
   Menu Toggle (mobile)
   ============================================================ */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--color-text-primary);
    border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: var(--color-surface-alt); }
.menu-toggle .icon { width: 24px; height: 24px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 99; }
.sidebar-overlay.show { display: block; }

/* ============================================================
   View Toggle (card / list)
   ============================================================ */
.view-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--color-surface-alt); border-radius: var(--radius-sm); }
.view-toggle-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; border: none; border-radius: var(--radius-sm); background: transparent; color: var(--color-text-tertiary); cursor: pointer; transition: all 0.15s; }
.view-toggle-btn:hover { color: var(--color-text-primary); }
.view-toggle-btn.active { background: var(--color-surface); color: var(--color-primary); box-shadow: var(--shadow-1); }
.view-toggle-btn .icon { width: 16px; height: 16px; }
.card-view-toolbar { display: none; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.card-view-toolbar .check-line {
    margin-top: 0;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
}
.card-view-toolbar input[type="checkbox"] { margin: 0; }
.view-card .card-view-toolbar { display: flex; }

/* Desktop: card-view → multi-column grid of cards */
.view-card .table { display: block; overflow: visible; }
.view-card .table thead { display: none; }
.view-card .table th { display: none; }
.view-card .table tbody {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-3);
}
.view-card .table tr {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    box-shadow: var(--shadow-1);
    transition: box-shadow 0.15s;
}
.view-card .table tr:hover { box-shadow: var(--shadow-2); }
.view-card .table td {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    min-height: 32px;
}
.view-card .table td.card-app-cell,
.view-card .table td.card-agent-cell,
.view-card .table td.card-status-cell,
.view-card .table td.card-no-cell {
    width: auto;
    min-width: 0;
    max-width: none;
}
.view-card .table td.card-no-cell .key-inline {
    width: auto;
    min-width: 0;
    margin-left: auto;
    grid-template-columns: minmax(0, 180px) auto;
}
.view-card .table td.card-no-cell .key-inline span { text-align: right; }
.view-card .table td.device-id-cell .device-id-text {
    margin-left: auto;
    text-align: right;
}
.view-card .table td.card-app-cell .card-app-name,
.view-card .table td.card-agent-cell .card-agent-name,
.view-card .table td.card-agent-cell .card-agent-parent {
    width: auto;
    max-width: 100%;
    text-align: right;
}
.view-card .table td[data-label="ID"] { display: none; }
.view-card .table td.card-select-cell {
    order: -3;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 0;
    padding: 0 0 var(--space-1);
    margin: 0;
    border-bottom: none;
}
.view-card .table td.card-select-cell:before { display: none; }
.view-card .table td.card-select-cell input[type="checkbox"] { margin: 0 auto 0 0; }
.view-card .table td[data-label="创建时间"] { order: -1; color: var(--color-text-tertiary); font-size: var(--text-xs); border-bottom: none; padding-bottom: 0; }
.view-card .table td[data-label="状态"] { order: -1; }
.view-card .table td:last-child { border-bottom: none; }
.view-card .table td:before {
    content: attr(data-label);
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 60px;
}
.view-card .table td:last-child { padding-top: var(--space-3); margin-top: auto; border-top: 1px solid var(--color-border); flex-wrap: wrap; }
.view-card .table td:last-child:before { display: none; }
.view-card .table td .flex { flex-wrap: wrap; width: 100%; gap: var(--space-2); }
.view-card .table td .flex .btn { flex: 1 1 calc(50% - var(--space-2)); min-width: 0; justify-content: center; padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.view-card .table td .material-action-group {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: var(--space-2);
}
.view-card .table td .material-action-group .btn {
    flex: 1 1 0;
    min-width: 0;
}
.view-card .table td .material-action-group .material-preview-btn {
    flex: 1 1 0;
    min-width: 0;
}
.view-card .table td .material-action-group .material-readonly-note {
    flex: 0 0 auto;
}

/* ============================================================
   Responsive: Tablet (max-width: 900px)
   ============================================================ */
@media (max-width: 900px) {
    .gateway-docs-header { flex-direction: column; }
    .gateway-endpoint { width: 100%; min-width: 0; }
    .gateway-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gateway-debug-grid { grid-template-columns: 1fr; }
    .gateway-config-summary { grid-template-columns: 1fr; }
    .button-config-head { display: none; }
    .button-config-row,
    .check-grid,
    .app-price-grid { grid-template-columns: 1fr; }
    .build-overview-columns { grid-template-columns: 1fr; }
}

/* ============================================================
   Responsive: Mobile (max-width: 768px)
   ============================================================ */
/* App config */
.token-row { display: flex; gap: 8px; align-items: flex-start; }
.token-result { margin-top: 8px; min-height: 60px; font-family: monospace; font-size: 12px; }
.agent-count-link { color: var(--color-primary); cursor: pointer; border-bottom: 1px dashed var(--color-primary); }
.agent-count-link:hover { opacity: .8; }
.agent-list { display: flex; flex-direction: column; gap: var(--space-1); }
.app-keys-cell { line-height: 1.8; }
.app-key-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.key-label { font-size: 12px; color: var(--color-text-tertiary); width: 42px; flex-shrink: 0; }
.key-actions-inline { display: inline-flex; gap: 4px; margin-left: 4px; }
.app-run-control { display: flex; flex-direction: column; gap: 4px; }
.icon-upload-row { display: flex; align-items: center; gap: 12px; }
.icon-preview { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; border: 1px solid var(--color-border); flex-shrink: 0; }
.icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.color-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.color-item { display: flex; align-items: center; gap: 8px; }
.color-item label { font-size: 13px; color: var(--color-text-secondary); min-width: 80px; }
.color-item input[type="color"] { width: 60px; height: 36px; padding: 0; border: 1px solid var(--color-border); border-radius: 4px; cursor: pointer; }
.animation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }

/* Logs */
.cell-content { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-content:hover { white-space: normal; overflow: visible; position: relative; z-index: 1; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); border-radius: 4px; padding: 4px 8px; }
.cell-sm { font-size: 12px; }
.cell-wide { max-width: 300px; }

/* Build */
.build-app-overview { margin-bottom: 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-1); overflow: hidden; }
.build-app-overview summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; cursor: pointer; list-style: none; user-select: none; }
.build-app-overview summary::-webkit-details-marker { display: none; }
.build-app-overview summary:hover { background: var(--color-surface-alt); }
.build-app-summary-main { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.build-app-summary-title { font-weight: 600; white-space: nowrap; }
.build-app-summary-text { color: var(--color-text-secondary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.build-app-summary-side { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.build-app-toggle { color: var(--color-text-secondary); font-size: 12px; }
.build-app-toggle::after { content: '⌄'; display: inline-block; margin-left: 5px; transition: transform .18s ease; }
.build-app-toggle-close { display: none; }
.build-app-overview[open] .build-app-toggle-open { display: none; }
.build-app-overview[open] .build-app-toggle-close { display: inline; }
.build-app-overview[open] .build-app-toggle::after { transform: rotate(180deg); }
.build-app-overview-body { padding: 0 18px 18px; border-top: 1px solid var(--color-border); }
.build-meta-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 16px; }
.build-meta-wide { grid-column: span 2; }
.env-check-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #f0f0f0; border-radius: 4px; transition: background .15s; }
.env-check-row:hover { background: #fafafa; }
.env-check-row:last-child { border-bottom: none; }
.env-check-name { width: 110px; font-weight: 500; font-size: 13px; flex-shrink: 0; }
.env-check-detail { flex: 1; color: #666; font-size: 13px; word-break: break-all; }
.env-check-fix { color: #999; font-size: 12px; flex-shrink: 0; }
.env-cmd-block { margin-bottom: 16px; border: 1px solid #e8e8e8; border-radius: 6px; overflow: hidden; }
.env-cmd-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f5f5f5; border-bottom: 1px solid #e8e8e8; }
.env-cmd-title { font-size: 13px; font-weight: 500; color: #333; }
.env-cmd-pre { margin: 0; padding: 12px; background: #1e1e1e; color: #d4d4d4; font-family: monospace; font-size: 13px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.build-tab { }
.build-shell { display: block; }
.build-platform-field { margin-bottom: var(--space-4); }
.build-platform-switch { display: inline-flex; gap: 4px; padding: 3px; background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: 8px; }
.build-platform-switch .platform-opt { border: 1px solid transparent; background: transparent; padding: 7px 22px; border-radius: 6px; font-size: var(--text-sm); font-weight: var(--fw-medium, 500); color: var(--color-text-secondary); cursor: pointer; }
.build-platform-switch .platform-opt.active { background: var(--color-surface); border-color: var(--color-border-strong); color: var(--color-text-primary); }
.plugin-download-list-scroll { max-height: 294px; overflow-y: auto; scrollbar-width: thin; }
.build-card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--color-border); gap: 12px; flex-wrap: wrap; }
.build-card-head h3 { margin: 0; font-size: var(--text-base); font-weight: var(--fw-semibold, 600); }
.build-head-tools { display: flex; align-items: center; gap: 10px; }
.build-head-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; line-height: 1; }
.build-head-check input[type="checkbox"] { margin: 0; cursor: pointer; flex: 0 0 auto; }
.build-card-body { padding: 18px; }
.build-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 768px) {
  .build-config-grid { grid-template-columns: 1fr; }
  .build-config-grid .build-delay-field { order: 1; }
  .build-config-grid .build-version-field { order: 2; }
}
.build-app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: 84px; gap: 12px; max-height: 180px; overflow-y: auto; }
@media (max-width: 768px) {
  .build-app-grid { grid-template-columns: repeat(2, 1fr); max-height: 276px; }
}
.build-app-card { position: relative; display: block; padding: 14px 16px; border: 2px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); cursor: pointer; transition: all .2s; overflow: hidden; }
.build-app-card:hover { border-color: var(--color-primary); background: var(--color-surface-alt); }
.build-app-card input[type="checkbox"] { position: absolute; top: 12px; right: 12px; margin: 0; cursor: pointer; }
.build-app-card input[type="checkbox"]:checked ~ .build-app-card-content { opacity: 1; }
.build-app-card:has(input:checked) { border-color: var(--color-primary); background: var(--color-surface-alt); }
.build-app-card-content { padding-right: 24px; opacity: 0.7; transition: opacity .2s; }
.build-app-card-name { font-size: 14px; font-weight: 500; margin-bottom: 8px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.build-app-card-meta { display: flex; align-items: center; gap: 8px; }
.build-delay-input-wrapper { position: relative; }
.build-delay-input-wrapper .form-input { padding-right: 12px; }
.build-delay-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.filter-form.agent-filter .btn { margin-left: auto; }
@media (max-width: 768px) {
  .filter-form.agent-filter { flex-wrap: wrap; }
  .filter-form.agent-filter .form-input,
  .filter-form.agent-filter .form-select { flex: 1 1 calc(50% - var(--space-3)); min-width: 0; }
  .filter-form.agent-filter .btn { flex: 1 1 calc(50% - var(--space-3)); margin-left: 0; }
}
.plugin-download-list-scroll .table th { position: sticky; top: 0; z-index: 1; }
.env-platform-tabs { border-bottom: 1px solid var(--color-border); }
.build-app-card input[type="checkbox"]:checked { accent-color: var(--color-primary); }
.build-delay-input-wrapper { display: flex; flex-direction: column; gap: 8px; }
.build-delay-tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; }
.delay-list { display: grid; gap: 8px; }
.delay-input { display: flex; align-items: center; gap: 8px; }
.filter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.build-encrypt-key-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.build-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: 999px; font-size: 13px; }
.build-tag button { border: none; background: none; color: var(--color-text-secondary); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; margin: 0; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
.build-tag button:hover { color: var(--color-danger); }
.build-encrypt-key-input .form-input { min-width: 0; }
.build-usage-note { background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-3); font-size: var(--text-sm); line-height: 1.7; }
.build-usage-note p { margin: 0 0 6px; }
.build-usage-note p:last-child { margin-bottom: 0; }
.build-usage-note code { font-family: monospace; font-size: var(--text-xs); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 3px; padding: 1px 5px; word-break: break-all; }
.build-encrypt-mode-field,
.build-encrypt-key-field { grid-column: auto; }
.build-main { min-width: 0; }
.build-overview-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; padding-top: 16px; }
.build-overview-title { margin-bottom: 9px; color: var(--color-text-secondary); font-size: 12px; font-weight: var(--fw-semibold); }
.log-textarea { min-height: 480px; font-family: monospace; font-size: 12px; background: #1e1e1e; color: #d4d4d4; line-height: 1.5; resize: vertical; }
.env-empty { padding: 24px; text-align: center; color: #999; }
.env-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.env-header h4 { margin: 0; }
.env-loading { padding: 16px; text-align: center; color: #999; }
.env-error { color: #dc3545; padding: 16px; }
.btn-gap { margin-right: 4px; }
.tabs-wrap { margin-top: 16px; }
.build-log-card { margin-top: 16px; }
.btn-build { margin-top: 8px; }
.config-text { min-height: 48px; font-family: monospace; font-size: 12px; }
.delay-input { max-width: 200px; }
.env-check-list { border: 1px solid #e8e8e8; border-radius: 6px; overflow: hidden; }
.card-body-flush { padding: 0; }
.env-fix-block { padding: 0 12px 10px; }
.env-cmd-block-fix { margin: 0; }
.history-file-name { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-encrypt-key { max-width: 180px; }
.history-encrypt-key code { display: block; white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.history-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.history-actions .btn { justify-content: center; }
.capture-blacklist-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; white-space: nowrap; }
.capture-blacklist-actions .btn { flex: 0 0 auto; }
.log-row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.log-bulk-control { display: inline-flex; align-items: center; }
.log-mobile-select-label { display: none; }
.capture-summary-cell { width: 200px; max-width: 200px; }

@media (max-width: 768px) {
    html,
    body,
    .layout,
    .main,
    .content {
        max-width: 100%;
        overflow-x: hidden;
    }
    .sidebar {
        width: 50vw;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: none;
    }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.15); }
    .sidebar-brand { height: 64px; padding: 0 22px; gap: var(--space-3); font-size: 17px; }
    .sidebar-logo { width: 34px; height: 34px; border-radius: 9px; }
    .sidebar-nav { padding: 14px 0; }
    .sidebar-nav .nav-item { min-height: 54px; margin: 5px 10px; padding: 14px 15px; gap: 13px; border-radius: var(--radius-md); font-size: 16px; }
    .sidebar-nav .nav-item .icon { width: 23px; height: 23px; }
    .sidebar-nav .nav-item.active::before { top: 10px; bottom: 10px; }
    .main { margin-left: 0; padding-top: 52px; }
    .topbar { position: fixed; top: 0; left: 0; right: 0; width: 100%; padding: 0 var(--space-4); height: 52px; }
    .topbar-title { font-size: var(--text-base); font-weight: var(--fw-semibold); flex: 0 0 auto; }
    .topbar-notice { flex: 1 1 auto; min-width: 0; max-width: none; height: 30px; padding: 0 var(--space-2); }
    .topbar-notice marquee { font-size: var(--text-xs); }
    .topbar-user { font-size: var(--text-xs); max-width: none; overflow: visible; white-space: nowrap; gap: var(--space-2); }
    .topbar-user .user-name { display: inline-block; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
    .topbar-user .btn { height: 32px; padding: 0 var(--space-2); }
    .topbar-user .btn svg { width: 16px; height: 16px; }
    .menu-toggle { display: inline-flex; }
    .content { padding: var(--space-2); }

    .card { overflow-x: visible; }
    .card-header { padding: var(--space-3); flex-wrap: wrap; gap: var(--space-2); }
    .card-header h3 { font-size: var(--text-base); }
    .card-body { padding: var(--space-4); }
    .material-page-header { align-items: flex-start; }
    .material-page-header h3 { width: 100%; }
    .material-page-header > .flex { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
    .material-page-header > .flex .btn { width: 100%; justify-content: center; padding-left: var(--space-2); padding-right: var(--space-2); }
    .agent-material-page-header { align-items: center; }
    .agent-material-page-header h3 { width: auto; }
    .agent-material-page-header > .flex { width: auto; display: flex; flex-wrap: wrap; gap: var(--space-2); }
    .agent-material-page-header > .flex .btn { width: auto; justify-content: center; padding-left: var(--space-4); padding-right: var(--space-4); }
    .material-page-card .card-body { padding: var(--space-3); }
    .table { width: 100%; overflow: visible; }

    .form-row { flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .modal-scroll-body .form-grid { grid-template-columns: 1fr; gap: var(--space-3); }
    .modal-scroll-body .announcement-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .announcement-title-group,
    .announcement-form-grid .form-grid-span { grid-column: 1 / -1; }
    .announcement-scope-group,
    .announcement-force-group { min-width: 0; }
    .modal-scroll-body .form-group { min-width: 0; }
    .rich-editor-wrap,
    .rich-editor,
    .rich-editor img,
    .rich-editor video,
    .rich-content img,
    .rich-content video { width: 100%; max-width: 100%; box-sizing: border-box; }
    .rich-editor { height: 42vh; min-height: 260px; max-height: 42vh; -webkit-overflow-scrolling: touch; }
    .rich-editor-input { height: 42vh; min-height: 260px; max-height: 42vh; overflow-y: auto; }
    .rich-editor video,
    .rich-content video { height: auto; max-height: 56vh; }
    .form-group { margin-bottom: var(--space-3); }
    .form-input, .form-select, .form-textarea { font-size: 16px; height: 44px; min-height: 44px; }
    .form-input[type="date"], .form-input[type="datetime-local"], .form-input[type="number"] { appearance: none; -webkit-appearance: none; }
    .form-textarea { height: auto; min-height: 80px; }
    .form-label { font-size: var(--text-sm); }
    .form-hint { font-size: var(--text-xs); }

    .btn { min-height: 44px; font-size: var(--text-base); }
    .btn-sm { min-height: 36px; font-size: var(--text-sm); padding: var(--space-2) var(--space-4); }
    .filter-form .form-input, .filter-form .form-select, .filter-form .btn { height: 42px; flex: 0 0 calc(50% - var(--space-2)); min-width: 0; justify-content: center; font-size: 16px; }
    .filter-form .btn { justify-content: center; }
    .card-view-toolbar { display: flex; }

    /* Table card layout */
    .table,
    .card { overflow-x: hidden; }
    .card-body { min-width: 0; }
    .table { width: 100%; max-width: 100%; table-layout: fixed; }
    .table tbody { width: 100%; }
    .table thead,
    .table tbody,
    .table th,
    .table td,
    .table tr { display: block; max-width: 100%; box-sizing: border-box; }
    .table thead { display: none; }
    .table tr {
        background: #ffffff;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        margin-bottom: var(--space-4);
        padding: var(--space-4);
        box-shadow: var(--shadow-1);
    }
    .table tbody tr:hover td { background: transparent; }
    .table td {
        padding: var(--space-2) 0;
        border-bottom: 1px solid var(--color-surface-alt);
        font-size: var(--text-sm);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-2);
        min-height: 32px;
        min-width: 0;
        width: 100%;
    }
    .table td[data-label="ID"] { display: none; }
    .table td.card-select-cell {
        order: -3;
        justify-content: flex-start;
        align-items: flex-start;
        min-height: 0;
        padding: 0 0 var(--space-1);
        margin: 0;
        border-bottom: none;
    }
    .table td.card-select-cell:before { display: none; }
    .table td.card-select-cell input[type="checkbox"] { margin: 0 auto 0 0; }
    .table td[data-label="创建时间"] { order: -1; color: var(--color-text-tertiary); font-size: var(--text-xs); border-bottom: none; padding-bottom: 0; }
    .table td[data-label="状态"] { order: -1; }
    .table .log-card-row .log-time-cell { order: -2; color: var(--color-text-tertiary); font-size: var(--text-xs); border-top: none; border-bottom: none; margin-top: 0; padding-top: 0; padding-bottom: var(--space-2); }
    .filter-form .log-bulk-control { display: flex; flex: 0 0 100%; max-width: none; align-items: center; justify-content: space-between; gap: var(--space-3); height: auto; margin-top: var(--space-1); padding: var(--space-3); background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
    .log-mobile-select-label { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); font-size: var(--text-sm); }
    .filter-form .log-bulk-control .btn { flex: 0 0 auto; min-height: 36px; height: 36px; justify-content: center; }
    .log-card-row .log-action-cell { order: 20; display: block; border-top: 1px solid var(--color-border); border-bottom: none; padding-top: var(--space-3); margin-top: var(--space-2); }
    .log-card-row .log-action-cell:before { display: block; margin-bottom: var(--space-2); }
    .log-card-row .log-row-actions { display: flex; width: 100%; gap: var(--space-2); white-space: normal; }
    .log-card-row .log-row-actions .btn { flex: 1 1 0; min-width: 0; min-height: 36px; justify-content: center; padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
    .log-card-row .capture-summary-cell { align-items: flex-start; white-space: normal; overflow-wrap: anywhere; }
    .log-card-row .capture-device-id-cell { width: 100%; min-width: 0; max-width: 100%; align-items: flex-start; }
    .log-card-row .capture-device-id-cell .device-id-text { flex: 1 1 auto; min-width: 0; max-width: 100%; }
    .table td:last-child { border-bottom: none; }
    .table td .account-table-ellipsis,
    .table td .account-text-wrap {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 72px);
        text-align: right;
    }
    .account-nav-ellipsis { max-width: 90px; }
    .account-select { max-width: none; }
    .table td:before {
        content: attr(data-label);
        font-size: var(--text-xs);
        color: var(--color-text-tertiary);
        font-weight: 500;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 60px;
    }
    .table td:last-child { padding-top: var(--space-3); margin-top: var(--space-2); border-top: 1px solid var(--color-border); flex-wrap: wrap; }
    .table td:last-child:before { display: none; }
    .table td .cell-content { flex: 1 1 auto; max-width: calc(100% - 72px); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .table td .announcement-title-cell { max-width: calc(100% - 72px); }
    .table td .flex { flex-wrap: wrap; width: 100%; gap: var(--space-2); }
    .table td .flex .btn { flex: 1 1 calc(50% - var(--space-2)); min-width: 0; justify-content: center; padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
    .table td .flex > form { flex: 1 1 calc(50% - var(--space-2)); min-width: 0; }
    .table td .flex > form .btn { flex: none; width: 100%; }
    .table td .material-action-group {
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: space-between;
        gap: var(--space-2);
    }
    .table td .material-action-group .btn {
        flex: 1 1 0;
        min-width: 0;
        padding-left: var(--space-2);
        padding-right: var(--space-2);
    }
    .table td .material-action-group .material-preview-btn {
        flex: 1 1 0;
        min-width: 0;
    }
    .table td .material-action-group .material-readonly-note {
        flex: 0 0 auto;
    }
    .material-page-card .table tr { padding: var(--space-3); margin-bottom: var(--space-3); }
    .material-page-card .table td[data-label="素材名称"],
    .material-page-card .table td[data-label="备注"] { align-items: flex-start; }
    .material-page-card .table td[data-label="素材名称"]:before,
    .material-page-card .table td[data-label="备注"]:before { padding-top: 1px; }
    .material-page-card .table td .material-name-cell,
    .material-page-card .table td .material-remark-cell { max-width: calc(100% - 72px); }
    .material-page-card .table td .material-remark-empty { max-width: 24px; }
    .material-page-card .table td .material-action-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .material-page-card .table td .material-action-group .btn,
    .material-page-card .table td .material-action-group .material-preview-btn { width: 100%; min-width: 0; }
    .material-page-card .table td .material-action-group .material-readonly-note { grid-column: span 1; min-height: 36px; }
    .table td[data-label="运行控制"] .app-run-control { gap: var(--space-2); }
    .table td[data-label="运行控制"] .key-actions-inline { width: 100%; }
    .table td[data-label="运行控制"] .key-actions-inline .btn { flex: 1; min-height: 36px; }

    .view-list {
        overflow-x: hidden;
    }
    .view-list-table-scroll {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: visible;
    }
    .view-list .view-list-table-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--space-2);
    }
    .view-list .card-view-toolbar { display: none; }
    .view-list .table {
        display: table;
        width: max-content;
        min-width: 100%;
        max-width: none;
        table-layout: auto;
        border-collapse: collapse;
        overflow: visible;
    }
    .view-list .table thead { display: table-header-group; }
    .view-list .table tbody { display: table-row-group; width: auto; }
    .view-list .table tr {
        display: table-row;
        max-width: none;
        background: transparent;
        border: 0;
        border-radius: 0;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    .view-list .table th,
    .view-list .table td {
        display: table-cell;
        max-width: none;
        width: auto;
        min-width: 96px;
        min-height: 0;
        padding: var(--space-3) var(--space-4);
        border-bottom: 1px solid var(--color-border);
        white-space: nowrap;
        vertical-align: middle;
    }
    .view-list .table th {
        background: var(--color-surface-alt);
        color: var(--color-text-secondary);
        font-size: var(--text-xs);
    }
    .view-list .table td:before { display: none; }
    .view-list .table td[data-label="ID"] { display: table-cell; min-width: 64px; }
    .view-list .table td[data-label="操作"] { min-width: 180px; }
    .view-list .table td:last-child {
        padding-top: var(--space-3);
        margin-top: 0;
        border-top: 0;
        border-bottom: 1px solid var(--color-border);
        flex-wrap: nowrap;
    }
    .view-list .table td .flex {
        width: auto;
        flex-wrap: nowrap;
        gap: var(--space-2);
    }
    .view-list .table td .flex .btn {
        flex: 0 0 auto;
        min-width: auto;
        padding: var(--space-2) var(--space-3);
    }
    .view-list .table td .cell-content {
        display: inline-block;
        max-width: 220px;
        vertical-align: middle;
    }

    /* Modal bottom sheet */
    .modal-mask { align-items: flex-end; padding: 0; }
    .modal-card { width: 100%; max-width: 100%; max-height: 92vh; border-radius: var(--radius-md) var(--radius-md) 0 0; }
    .modal-card-lg { max-width: 100%; height: auto; max-height: 90vh; }
    .modal-card .card-header { padding: var(--space-3) var(--space-4); }
    .modal-card form { padding: var(--space-4); overflow-y: auto; }
    .modal-card form:has(.modal-scroll-body) { padding: 0; }
    .modal-card .flex.mt-6,
    .modal-card .modal-actions {
        padding: var(--space-3) var(--space-4);
        padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 20px));
        margin-top: 0;
        flex-wrap: wrap;
    }
    .modal-actions .btn { flex: 1; min-width: 0; justify-content: center; }
    .modal-scroll-body { padding: var(--space-4); -webkit-overflow-scrolling: touch; }
    .modal-card .key-actions-inline { flex-wrap: nowrap; width: auto; }
    .modal-card .key-actions-inline .btn { flex: none; }

    /* Confirm */
    .confirm-mask { padding: var(--space-4); align-items: center; }
    .confirm-card { width: 100%; max-width: 340px; padding: var(--space-5); }
    .generated-cards-textarea { min-height: min(42vh, 360px); height: min(42vh, 360px); }
    .confirm-title { font-size: var(--text-base); }
    .confirm-message { font-size: var(--text-sm); }
    .confirm-actions { margin-top: var(--space-4); }
    .confirm-actions .btn { flex: 1; justify-content: center; min-height: 44px; }

    /* Tabs */
    .tabs { gap: var(--space-2); overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: var(--space-3); }
    .tabs-wrap { background: #ffffff; border: 1px solid var(--color-border); border-radius: var(--radius-md) var(--radius-md) 0 0; }
    .tabs-wrap + .card { border-top-left-radius: 0; border-top-right-radius: 0; margin-top: -1px; }
    .tab-item { font-size: var(--text-sm); padding: var(--space-2) var(--space-4); white-space: nowrap; height: 40px; flex-shrink: 0; }
    .tabs:not(.tabs-wrap) { background: #ffffff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-1); gap: 0; overflow-x: visible; }
    .tabs:not(.tabs-wrap) .tab-item { flex: 1; justify-content: center; border-radius: var(--radius-sm); height: 36px; font-size: var(--text-xs); border-bottom: none; transition: background 0.15s, color 0.15s; }
    .tabs:not(.tabs-wrap) .tab-item.active { background: var(--color-primary-light); color: var(--color-primary); font-weight: var(--fw-semibold); }
    .modal-scroll-body .tabs { display: grid; grid-template-columns: repeat(2, 1fr); overflow-x: visible; border-bottom: none; gap: var(--space-2); margin-bottom: var(--space-3); background: transparent; border: none; padding: 0; }
    .modal-scroll-body .tabs .tab-item { justify-content: center; height: 38px; font-size: var(--text-xs); }

    /* Stat */
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
    .stat-card { padding: var(--space-4); }
    .stat-value { font-size: var(--text-xl); }

    /* Pagination */
    .pagination { padding: var(--space-4) 0; gap: var(--space-2); }
    .pagination a, .pagination span { min-width: 36px; height: 36px; font-size: var(--text-sm); }

    /* Toolbar */
    .toolbar { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
    .toolbar .btn { justify-content: center; }

    /* Filter - only for list pages */
    .list-action-row .filter-form { display: flex; flex-wrap: wrap; gap: var(--space-2); width: 100%; }
    .list-action-row .filter-form .form-input, .list-action-row .filter-form .form-select, .list-action-row .filter-form .btn { min-width: 0; flex: 0 0 calc(50% - var(--space-2)); max-width: none; height: 42px; justify-content: center; }
    .list-action-row .bulk-bar { width: 100%; }
    .bulk-bar { flex-wrap: wrap; gap: var(--space-2); padding: var(--space-3); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
    .bulk-bar .form-select { flex: 1; min-width: 0; }

    /* App price */
    .app-price-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }

    /* Key cell */
    .key-cell, .secret-cell { max-width: none; }
    .device-id-text { flex: 1 1 auto; min-width: 0; max-width: calc(100% - 72px); display: block; word-break: break-all; white-space: normal; }
    .view-list .device-id-cell { max-width: 160px; }
    .view-list .device-id-text { display: inline-block; flex: none; max-width: 100%; }
    .app-keys-cell { width: auto; max-width: none; }
    .app-key-row { grid-template-columns: 1fr; gap: var(--space-2); }
    .app-key-row > span:not(.key-label) { white-space: normal; word-break: break-all; }
    .key-actions-inline { flex-wrap: wrap; width: 100%; justify-content: flex-start; }
    .key-actions-inline .btn { flex: 1; min-width: 0; justify-content: center; }
    .app-run-control { min-width: 0; width: 100%; }
    .app-run-control .key-actions-inline { flex-wrap: wrap; }

    /* Button config */
    .button-config-head { display: none; }
    .button-config-list { padding: var(--space-3); gap: var(--space-3); }
    .button-config-row { grid-template-columns: 1fr 1fr; gap: var(--space-2); padding: var(--space-3); background: #ffffff; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
    .button-config-row .btn { grid-column: span 2; }

    /* Build */
    .build-app-select-list { grid-template-columns: 1fr; }
    .build-config-grid { grid-template-columns: 1fr; gap: var(--space-3); }
    .build-version-field, .build-delay-field { grid-column: 1 / -1; }
    .build-delay-field { order: 1; }
    .build-version-field { order: 2; }
    .build-encrypt-mode-field,
    .build-encrypt-key-field { grid-column: 1 / -1; }
    .build-encrypt-key-input { grid-template-columns: minmax(0, 1fr) auto; }
    .build-version-field .form-hint,
    .build-delay-field .form-hint { font-size: 11px; }
    .build-env-card, .build-log-card { padding: var(--space-3); }
    .log-textarea { min-height: 60vh; font-size: 11px; }
    .env-check-item { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
    .history-file-name { max-width: none; white-space: normal; word-break: break-all; }
    .build-tab[data-tab="history"] .table td.history-encrypt-key { align-items: flex-start; max-width: 100%; }
    .build-tab[data-tab="history"] .table td.history-encrypt-key code { flex: 1 1 auto; min-width: 0; max-width: calc(100% - 72px); line-height: 1.55; }
    .history-actions { width: 100%; }
    .history-actions .btn { flex: 1 1 calc(33.333% - var(--space-2)); min-width: 0; }
    .build-tab[data-tab="history"] .table td[data-label="文件"] { align-items: flex-start; }
    .build-tab[data-tab="history"] .table td[data-label="状态"] .badge { margin-left: auto; }
    .build-tab[data-tab="history"] .table td[data-label="操作"] { padding-top: var(--space-3); margin-top: var(--space-2); border-top: 1px solid var(--color-border); }
    .build-hero { margin: 0 0 12px; border-radius: var(--radius-sm); }
    .build-hero-mark { display: none; }
    .build-card-head { padding: 14px 16px; }
    .build-card-body { padding: 16px; }

    /* API docs */
    .gateway-docs-header { padding: var(--space-4); }
    .gateway-docs-header h1 { font-size: 30px; }
    .gateway-docs-nav { overflow-x: auto; flex-wrap: nowrap; }
    .gateway-docs-nav button { flex: 0 0 auto; padding: 0 var(--space-3); }
    .gateway-flow,
    .gateway-schema,
    .gateway-action-list,
    .gateway-security-grid,
    .gateway-status-table,
    .gateway-debug-columns { grid-template-columns: 1fr; }
    .gateway-page-header { align-items: flex-start; flex-direction: column; gap: 12px; }
    .gateway-page-header h1 { font-size: 20px; }
    .gateway-reference-endpoint { width: 100%; flex-wrap: nowrap; }
    .gateway-reference-endpoint code { flex: 1; max-width: none; }
    .gateway-reference-endpoint .btn { flex: 0 0 auto; }
    .gateway-page-tabs { overflow-x: auto; margin-bottom: 16px; }
    .gateway-page-tabs .tab-item { flex: 1; min-width: 110px; min-height: 40px; justify-content: center; padding: 0 14px; }
    .gateway-reference-layout { display: block; }
    .gateway-reference-content { padding: 24px 20px 30px; }
    .gateway-reference-intro { padding-bottom: 24px; }
    .gateway-reference-eyebrow { margin-bottom: 7px; font-size: 10px; }
    .gateway-reference-intro h1 { font-size: 23px; }
    .gateway-reference-intro > p { font-size: 14px; line-height: 1.7; }
    .gateway-reference-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
    .gateway-reference-quick > div { padding: 11px 12px; border-bottom: 1px solid var(--color-border); }
    .gateway-reference-quick > div:nth-child(2) { border-right: 0; }
    .gateway-reference-quick > div:nth-last-child(-n+2) { border-bottom: 0; }
    .gateway-reference-section { padding: 25px 0; scroll-margin-top: 56px; }
    .gateway-reference-section-head { gap: 10px; margin-bottom: 15px; }
    .gateway-reference-section-head h2 { font-size: 18px; }
    .gateway-reference-section-head > span { min-width: 25px; height: 25px; font-size: 10px; }
    .gateway-reference-section h3 { margin-top: 20px; }
    .gateway-reference-table { min-width: 560px; }
    .gateway-reference-table th, .gateway-reference-table td { padding: 9px 11px; }
    .gateway-reference-table td:first-child { width: 125px; }
    .gateway-reference-table td:nth-child(2) { width: 150px; }
    .gateway-reference-code { padding: 13px 14px; font-size: 11px; }
    .gateway-reference-steps li { padding: 11px 12px 11px 45px; }
    .gateway-reference-steps li::before { top: 11px; left: 13px; }
    .gateway-action-reference article { grid-template-columns: 1fr; gap: 8px; padding: 13px; }
    .gateway-action-reference pre { white-space: pre; word-break: normal; }
    .gateway-debug-page { padding: 22px 18px 26px; }
    .gateway-debug-page .gateway-debug-grid { grid-template-columns: 1fr; gap: 16px; }
    .gateway-debug-page .gateway-debug-form, .gateway-debug-page .gateway-debug-output { padding: 16px; }
    .gateway-debug-page .gateway-debug-flow-columns { grid-template-columns: 1fr; }
    .gateway-debug-page .gateway-debug-flow-columns pre { min-height: 180px; max-height: 340px; }
    .gateway-connect-page { padding: 22px 18px 26px; }
    .gateway-connect-head { flex-direction: column; gap: 14px; }
    .gateway-connect-head .btn { width: 100%; justify-content: center; }
    .gateway-connect-layout { grid-template-columns: 1fr; gap: 16px; }
    .gateway-connect-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gateway-connect-options .form-group { grid-column: 1 / -1; }
    .gateway-connect-prompt { height: 620px; padding: 15px; font-size: 11px; }
    .gateway-flow > div { min-height: 0; }
    .gateway-action-docs header { align-items: flex-start; }
    .gateway-action-docs pre { white-space: pre; word-break: normal; }
    .gateway-panel, .gateway-details, .gateway-config-block, .gateway-debug-form, .gateway-debug-output { padding: var(--space-4); }
    .gateway-debug-columns > .is-wide { grid-column: auto; }
}

@media (max-width: 420px) {
    .gateway-reference-content { padding: 20px 15px 26px; }
    .gateway-page-header p { font-size: 12px; }
    .gateway-reference-endpoint { padding: 7px; }
    .gateway-reference-endpoint code { font-size: 11px; }
    .gateway-reference-endpoint .btn { padding-right: 9px; padding-left: 9px; }
    .gateway-reference-intro h1 { font-size: 21px; }
    .gateway-reference-quick { grid-template-columns: 1fr; }
    .gateway-reference-quick > div { border-right: 0; border-bottom: 1px solid var(--color-border) !important; }
    .gateway-reference-quick > div:last-child { border-bottom: 0 !important; }
    .gateway-reference-section-head h2 { font-size: 17px; }
    .gateway-reference-section-head p { font-size: 12px; }
    .gateway-reference-callout { padding: 11px 12px; }
    .gateway-debug-page { padding: 19px 14px 23px; }
    .gateway-debug-page .gateway-debug-form, .gateway-debug-page .gateway-debug-output { padding: 13px; }
    .gateway-connect-page { padding: 19px 14px 23px; }
    .gateway-connect-options { display: flex; }
    .gateway-connect-summary, .gateway-connect-security, .gateway-connect-options .form-group { padding: 14px; }
    .gateway-connect-prompt-toolbar { align-items: flex-start; padding: 10px 12px; }
    .gateway-connect-prompt-toolbar div { align-items: flex-start; flex-direction: column; gap: 3px; }
    .gateway-connect-prompt { height: 540px; padding: 13px 12px; }
}

@media (max-width: 768px) {
    .login-card, .auth-card { padding: var(--space-6) var(--space-4); }

    /* Preview toolbar: 紧凑模式，避免遮挡内容 */
    .preview-toolbar { top: 8px; right: 8px; left: auto; max-width: calc(100% - 16px); gap: 4px; }
    .preview-toolbar .btn { padding: 4px 10px; font-size: 11px; }

    /* Agent tab */
    .agent-tab-panel .form-grid { gap: var(--space-3); }
    .token-result { min-height: 80px; }
    .inline-checks { gap: var(--space-3); }

    /* Badge */
    .badge { font-size: 11px; }
    .alert { padding: var(--space-3); font-size: var(--text-xs); }

    /* Install */
    .install-header { padding: var(--space-4) var(--space-6); }
    .install-body { padding: var(--space-6); }
    .install-footer { padding: var(--space-3) var(--space-6); flex-direction: column; gap: var(--space-3); }
    .stepper { padding: var(--space-4) var(--space-6); overflow-x: auto; }

    /* Mobile: list-view restores desktop table look */
    .view-list .table { display: table !important; width: 100%; overflow-x: auto; }
    .view-list .table thead { display: table-header-group !important; }
    .view-list .table tbody { display: table-row-group !important; }
    .view-list .table th { display: table-cell !important; }
    .view-list .table td { display: table-cell !important; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); }
    .view-list .table th.card-app-heading,
    .view-list .table td.card-app-cell { width: 90px; min-width: 90px; max-width: 90px; padding-left: var(--space-2); padding-right: var(--space-2); }
    .view-list .table td.card-app-cell .card-app-name { width: 100%; max-width: 100%; }
    .view-list .table th.card-device-heading,
    .view-list .table td.device-id-cell { width: 220px; min-width: 220px; max-width: 220px; padding-left: var(--space-2); padding-right: var(--space-2); }
    .view-list .table td.device-id-cell .device-id-text { display: block; width: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; }
    .view-list .table tr { display: table-row !important; background: transparent; border: none; border-radius: 0; margin-bottom: 0; padding: 0; box-shadow: none; }
    .view-list .table td[data-label="ID"] { display: table-cell !important; }
    .view-list .table td[data-label="创建时间"] { order: 0; color: var(--color-text-secondary); font-size: var(--text-sm); border-bottom: 1px solid var(--color-border); padding-bottom: var(--space-3); }
    .view-list .table td[data-label="状态"] { order: 0; }
    .view-list .table td:before { display: none; }
    .view-list .table td:last-child { padding-top: var(--space-3); margin-top: 0; border-top: none; flex-wrap: nowrap; }
    .view-list .table td .flex { flex-wrap: nowrap; width: auto; gap: var(--space-2); }
    .view-list .table td .flex .btn { flex: 0 0 auto; min-width: auto; justify-content: initial; padding: var(--space-2) var(--space-4); font-size: var(--text-sm); }
    .view-list .table tbody tr:hover td { background: var(--color-surface-alt); }
}

/* Desktop hover feedback is immediate and does not move or expand content. */
@media (hover: hover) and (pointer: fine) {
    .btn,
    .pagination a,
    .nav-item,
    .stat-link,
    .tab-item,
    .material-picker-item,
    .view-toggle-btn,
    .view-card .table tr,
    .env-check-row {
        transition: none;
    }

    .view-card .table tr:hover {
        box-shadow: var(--shadow-1);
    }

    .cell-content:hover {
        white-space: nowrap;
        overflow: hidden;
        position: static;
        z-index: auto;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }
}
