:root {
    color-scheme: light;
    --bg: #f6f7f9; --surface: #fff; --subtle: #f8fafc; --selected: #eff6ff;
    --text: #111827; --text-2: #374151; --muted: #6b7280; --faint: #9ca3af;
    --line: #e5e7eb; --line-2: #d1d5db; --blue: #2563eb; --blue-2: #1d4ed8;
    --green: #059669; --amber: #b45309; --purple: #7c3aed; --red: #b91c1c;
    --cyan: #0e7490;
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --radius: 3px;
    --font: Inter, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
    --mono: Consolas, "SFMono-Regular", "Courier New", monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { color: var(--text); background: var(--bg); font: 13px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.mono, .mono-text { font-family: var(--mono); }

/* Shell */
body.app-shell-page { height: 100%; overflow: hidden; }
.app-shell { display: grid; grid-template-columns: 184px minmax(0, 1fr); width: 100%; height: 100vh; min-height: 0; }
.app-sidebar { z-index: 2; display: flex; min-height: 0; padding: 10px 8px 8px; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.app-brand { display: flex; min-height: 38px; align-items: center; gap: var(--s2); padding: 0 6px 10px; color: var(--text-2); }
.app-brand:hover { color: var(--text); }
.app-brand-mark, .login-mark { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; color: var(--blue-2); background: var(--selected); border: 1px solid #bfdbfe; border-radius: var(--radius); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.app-brand-copy, .app-user-copy { display: grid; min-width: 0; line-height: 1.25; }
.app-brand-copy strong { font-size: 13px; }
.app-nav { display: grid; gap: 3px; margin-top: 6px; }
.app-nav-label { padding: 0 8px 4px; color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.app-nav-group { display: grid; gap: 3px; margin-top: 5px; padding-top: 7px; border-top: 1px solid var(--line); }
.app-nav-group-toggle { display: flex; width: 100%; min-height: 24px; align-items: center; justify-content: space-between; padding: 0 8px 2px; color: var(--faint); background: transparent; border: 0; border-radius: var(--radius); cursor: pointer; font: inherit; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-align: left; }
.app-nav-group-toggle:hover { color: var(--text-2); background: var(--subtle); }
.app-nav-group-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.app-nav-group-toggle svg { width: 13px; height: 13px; flex: 0 0 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; transition: transform .16s ease; }
.app-nav-group-items { display: grid; gap: 3px; }
.app-nav-group.is-collapsed .app-nav-group-items { display: none; }
.app-nav-group.is-collapsed .app-nav-group-toggle svg { transform: rotate(-90deg); }
.app-nav-link, .app-logout { display: flex; min-height: 34px; align-items: center; gap: var(--s2); padding: 0 9px; color: #4b5563; background: transparent; border: 1px solid transparent; border-radius: var(--radius); font-size: 12px; font-weight: 500; transition: color .12s, background-color .12s, border-color .12s; }
.app-nav-link svg, .app-logout svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.app-nav-link:hover { color: var(--text); background: var(--subtle); border-color: var(--line); }
.app-nav-link.active { color: var(--blue-2); background: var(--selected); border-color: #bfdbfe; border-left-color: var(--blue); }
.app-sidebar-footer { display: grid; gap: var(--s1); margin-top: auto; padding-top: var(--s2); border-top: 1px solid var(--line); }
.app-sidebar form { margin: 0; }
.app-user-card { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 5px 6px; }
.app-user-avatar { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; color: var(--text-2); background: #f3f4f6; border-radius: var(--radius); font-size: 11px; font-weight: 700; }
.app-user-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.app-user-copy small { color: var(--faint); font-size: 9px; }
button.app-logout { width: 100%; text-align: left; }
.app-logout:hover { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.app-shell-main { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.app-topbar { display: flex; min-height: 48px; flex: 0 0 48px; align-items: center; justify-content: space-between; gap: var(--s3); padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.app-topbar-eyebrow { color: #94a3b8; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.app-topbar-title-row { display: flex; min-width: 0; align-items: center; gap: 8px; }
.app-topbar-title { margin: 0; color: #0f172a; font-size: 15px; line-height: 1.2; }
.app-version-badge { display: inline-flex; max-width: 260px; align-items: center; min-height: 18px; padding: 0 6px; overflow: hidden; color: var(--blue-2); background: var(--selected); border: 1px solid #bfdbfe; border-radius: 999px; font-family: var(--mono); font-size: 10px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar-user { display: flex; align-items: center; gap: 7px; color: #475569; font-size: 11px; }
.app-topbar-status { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.app-main-content { min-width: 0; min-height: 0; flex: 1; padding: 14px; overflow: auto; }

/* Service status */
.status-page { display: grid; gap: var(--s3); }
.status-toolbar { align-items: center; margin-bottom: 0; }
.status-page-intro { min-width: 0; }
.status-page-eyebrow { color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.status-page-intro h2 { margin: 2px 0 3px; color: #0f172a; font-size: 16px; line-height: 1.2; }
.status-page-intro p { margin: 0; color: var(--muted); font-size: 10px; }
.status-toolbar-actions { display: flex; align-items: center; gap: var(--s2); }
.status-checked-at { color: var(--faint); font-size: 10px; white-space: nowrap; }
.status-toolbar-actions button { min-width: 88px; }
.service-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.service-status-card { display: grid; min-width: 0; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.service-status-card > header { display: flex; min-width: 0; align-items: center; gap: 9px; }
.service-status-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; color: var(--blue-2); background: var(--selected); border: 1px solid #bfdbfe; border-radius: var(--radius); font-family: var(--mono); font-size: 13px; font-weight: 800; }
.service-status-card h3 { margin: 0; color: var(--text-2); font-size: 13px; }
.service-status-card header p { margin: 2px 0 0; color: var(--faint); font-size: 10px; }
.service-status-badge { min-height: 21px; margin-left: auto; padding: 2px 7px; color: var(--faint); background: #f3f4f6; border: 1px solid var(--line); border-radius: 11px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.service-status-card[data-status-state="checking"] .service-status-badge { color: var(--blue-2); background: var(--selected); border-color: #bfdbfe; }
.service-status-card[data-status-state="success"] { border-color: #a7f3d0; }
.service-status-card[data-status-state="success"] .service-status-icon { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.service-status-card[data-status-state="success"] .service-status-badge { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.service-status-card[data-status-state="failure"] { border-color: #fecaca; }
.service-status-card[data-status-state="failure"] .service-status-icon { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.service-status-card[data-status-state="failure"] .service-status-badge { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.service-status-meta { display: flex; align-items: baseline; justify-content: space-between; padding-top: 12px; border-top: 1px solid #eef0f3; }
.service-status-meta span { color: var(--muted); font-size: 10px; }
.service-status-meta strong { color: var(--text); font-family: var(--mono); font-size: 18px; font-weight: 700; }
.service-status-message { min-height: 30px; margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.5; }

/* System settings */
.system-settings-page { display: grid; width: 100%; max-width: 1100px; margin: 0 auto; gap: var(--s3); }
.system-settings-toolbar { align-items: center; margin-bottom: 0; }
.system-settings-updated { display: grid; justify-items: end; gap: 2px; color: var(--faint); font-size: 9px; }
.system-settings-updated time { color: var(--text-2); font-family: var(--mono); font-size: 10px; font-variant-numeric: tabular-nums; }
.system-settings-form { display: grid; gap: var(--s3); }
.system-settings-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 118px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.system-settings-card-icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--blue-2); background: var(--selected); border: 1px solid #bfdbfe; border-radius: var(--radius); }
.system-settings-card-icon.image { color: var(--purple); background: #f5f3ff; border-color: #ddd6fe; }
.system-settings-card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.system-settings-card-copy { min-width: 0; }
.system-settings-card-title { display: flex; align-items: center; gap: 7px; }
.system-settings-card-title h3 { margin: 0; color: var(--text); font-size: 13px; }
.system-settings-card-title span { padding: 2px 6px; color: var(--muted); background: var(--subtle); border: 1px solid var(--line); border-radius: 999px; font-size: 8px; font-weight: 700; }
.system-settings-card-copy p { margin: 5px 0 2px; color: var(--text-2); font-size: 10px; }
.system-settings-card-copy small { color: var(--faint); font-size: 9px; }
.system-setting-switch { position: relative; display: grid; min-width: 118px; justify-items: center; gap: 6px; cursor: pointer; }
.system-setting-switch input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.system-setting-switch-track { position: relative; width: 40px; height: 22px; background: #cbd5e1; border-radius: 999px; transition: background-color .16s ease; }
.system-setting-switch-track::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; content: ""; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(15, 23, 42, .25); transition: transform .16s ease; }
.system-setting-switch input:checked + .system-setting-switch-track { background: var(--green); }
.system-setting-switch input:checked + .system-setting-switch-track::after { transform: translateX(18px); }
.system-setting-switch input:focus-visible + .system-setting-switch-track { outline: 2px solid var(--blue); outline-offset: 2px; }
.system-setting-switch-label { color: var(--text-2); font-size: 9px; font-weight: 650; }
.system-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); }
.system-settings-actions p { margin: 0; color: #92400e; font-size: 9px; }
.system-settings-actions button { min-height: 34px; padding: 0 15px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 10px; font-weight: 700; white-space: nowrap; }
.system-settings-actions button:hover { background: var(--blue-2); border-color: var(--blue-2); }

/* Dashboard */
.dashboard-page { display: grid; gap: 12px; width: 100%; max-width: 1680px; margin: 0 auto; }
.dashboard-toolbar { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 15px; background: linear-gradient(115deg, #fff 0%, #f8fbff 100%); border: 1px solid var(--line); border-radius: var(--radius); }
.dashboard-eyebrow, .dashboard-section-header > div > span { color: var(--blue-2); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.dashboard-toolbar h2 { margin: 2px 0 3px; color: #0f172a; font-size: 17px; line-height: 1.2; }
.dashboard-toolbar p { margin: 0; color: var(--muted); font-size: 10px; }
.dashboard-toolbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.dashboard-toolbar-actions > span { color: var(--faint); font-size: 9px; white-space: nowrap; }
.dashboard-toolbar-actions time { color: var(--muted); font-variant-numeric: tabular-nums; }
.dashboard-toolbar-actions button { min-height: 31px; padding: 0 12px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 10px; font-weight: 700; }
.dashboard-toolbar-actions button:hover:not(:disabled) { background: var(--blue-2); border-color: var(--blue-2); }
.dashboard-error { padding: 9px 11px; color: var(--red); background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius); font-size: 10px; }
.dashboard-no-access { min-height: 300px; }
.dashboard-section { min-width: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.dashboard-section-header { display: flex; min-height: 37px; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 1px 9px; }
.dashboard-section-header h2 { margin: 2px 0 0; color: var(--text); font-size: 13px; }
.dashboard-section-header > a { align-self: center; color: var(--blue-2); font-size: 9px; font-weight: 650; }
.dashboard-section-header > a:hover { text-decoration: underline; }
.dashboard-refresh-button { min-height: 31px; align-self: center; padding: 0 12px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 10px; font-weight: 700; white-space: nowrap; }
.dashboard-refresh-button:hover:not(:disabled) { background: var(--blue-2); border-color: var(--blue-2); }
.dashboard-section-header > small { align-self: center; color: var(--faint); font-size: 9px; }
.dashboard-section-header p { margin: 3px 0 0; color: var(--faint); font-size: 8px; }
.dashboard-overview-section { display: grid; gap: 11px; }
.dashboard-overview-section > .dashboard-section-header { padding-bottom: 0; }
.dashboard-overview-block { display: grid; gap: 7px; min-width: 0; }
.dashboard-overview-block > h3 { margin: 0; color: var(--muted); font-size: 10px; font-weight: 720; }
.dashboard-overview-block > h3 > a:hover, .dashboard-compact-group > header h3 > a:hover { color: var(--blue-2); text-decoration: underline; }
.dashboard-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dashboard-device-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-metric-card { position: relative; display: flex; min-width: 0; min-height: 102px; align-items: center; gap: 11px; padding: 13px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.dashboard-metric-card::after { position: absolute; top: 0; right: 0; width: 42px; height: 42px; content: ""; background: currentColor; clip-path: polygon(100% 0, 100% 100%, 0 0); opacity: .04; }
.dashboard-metric-card:hover { border-color: #bfdbfe; box-shadow: 0 3px 12px rgba(15, 23, 42, .06); transform: translateY(-1px); }
.dashboard-metric-icon { display: grid; width: 37px; height: 37px; flex: 0 0 37px; place-items: center; color: var(--blue-2); background: var(--selected); border: 1px solid #bfdbfe; border-radius: var(--radius); }
.dashboard-metric-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.dashboard-metric-copy { display: grid; min-width: 0; gap: 1px; }
.dashboard-metric-copy small { color: var(--muted); font-size: 10px; }
.dashboard-metric-copy strong { overflow: hidden; color: #0f172a; font-size: 25px; font-weight: 720; font-variant-numeric: tabular-nums; line-height: 1.18; text-overflow: ellipsis; }
.dashboard-metric-copy em { overflow: hidden; color: var(--faint); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-metric-card.metric-green .dashboard-metric-icon { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.dashboard-metric-card.metric-purple .dashboard-metric-icon { color: var(--purple); background: #f5f3ff; border-color: #ddd6fe; }
.dashboard-metric-card.metric-amber .dashboard-metric-icon { color: var(--amber); background: #fffbeb; border-color: #fde68a; }
.dashboard-metric-card.metric-cyan .dashboard-metric-icon { color: #0e7490; background: #ecfeff; border-color: #a5f3fc; }
.dashboard-compact-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 11px; border-top: 1px solid #eef0f3; }
.dashboard-compact-group { display: grid; min-width: 0; gap: 7px; padding: 10px; background: #fafcff; border: 1px solid var(--line); border-top: 2px solid #94a3b8; border-radius: var(--radius); }
.dashboard-compact-group > header { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 8px; }
.dashboard-compact-group > header > span { overflow: hidden; color: var(--faint); font-size: 7px; font-weight: 800; letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-compact-group > header > h3 { margin: 0; color: var(--text); font-size: 11px; }
.dashboard-compact-group.group-wallet { border-top-color: var(--amber); }
.dashboard-compact-group.group-whatsapp { border-top-color: var(--green); }
.dashboard-compact-group.group-whatsapp-business { border-top-color: var(--purple); }
.dashboard-compact-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dashboard-compact-stat-grid.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-compact-stat-grid.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-compact-stat { display: grid; min-width: 0; min-height: 72px; align-content: center; gap: 1px; padding: 8px 9px; background: #fff; border: 1px solid #e5e7eb; border-radius: var(--radius); transition: border-color .12s ease, box-shadow .12s ease; }
a.dashboard-compact-stat:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(15, 23, 42, .05); }
.dashboard-compact-stat > span { overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-compact-stat > strong { overflow: hidden; color: var(--text); font-size: 19px; font-weight: 720; font-variant-numeric: tabular-nums; line-height: 1.25; text-overflow: ellipsis; }
.dashboard-compact-stat > small { overflow: hidden; color: var(--faint); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-compact-stat.is-warning > strong { color: #b45309; }
.dashboard-resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 7px; }
.dashboard-resource-card { display: grid; min-width: 0; min-height: 104px; align-content: center; gap: 5px; padding: 11px 12px; background: var(--subtle); border: 1px solid var(--line); border-left: 3px solid #94a3b8; border-radius: var(--radius); transition: background-color .12s ease, border-color .12s ease; }
a.dashboard-resource-card:hover { background: #f8fbff; border-color: #93c5fd; border-left-color: var(--blue); }
.dashboard-resource-card > .dashboard-resource-card-title { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-resource-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-resource-values > span { display: grid; min-width: 0; gap: 1px; }
.dashboard-resource-values > span + span { padding-left: 6px; border-left: 1px solid #e5e7eb; }
.dashboard-resource-values small { color: var(--faint); font-size: 7px; }
.dashboard-resource-values strong { overflow: hidden; color: var(--text); font-size: 10px; font-weight: 720; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -.03em; text-overflow: ellipsis; }
.dashboard-resource-card > small { overflow: hidden; color: var(--faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-resource-card.resource-total { border-left-color: var(--blue); background: var(--selected); }
.dashboard-analysis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.dashboard-analysis-card { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--subtle); border: 1px solid var(--line); border-radius: var(--radius); }
.dashboard-analysis-card:hover { border-color: #cbd5e1; }
.dashboard-analysis-card span { color: var(--muted); font-size: 10px; }
.dashboard-analysis-card strong { color: var(--text); font-size: 20px; font-weight: 720; font-variant-numeric: tabular-nums; }
.dashboard-analysis-card.pending strong { color: var(--amber); }
.dashboard-analysis-card.running strong { color: var(--blue-2); }
.dashboard-analysis-card.done strong { color: #047857; }
.dashboard-recent-section { padding-bottom: 0; overflow: hidden; }
.dashboard-table-wrap { margin: 0 -12px; overflow-x: auto; border-top: 1px solid var(--line); }
.dashboard-table-wrap:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
.dashboard-recent-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 9px; }
.dashboard-recent-table th { height: 31px; padding: 0 11px; color: var(--muted); background: #fafafa; border-bottom: 1px solid var(--line); font-weight: 650; text-align: left; white-space: nowrap; }
.dashboard-recent-table td { height: 48px; padding: 6px 11px; color: var(--text-2); border-bottom: 1px solid #eef0f3; vertical-align: middle; white-space: nowrap; }
.dashboard-recent-table tbody tr:last-child td { border-bottom: 0; }
.dashboard-recent-table tbody tr:hover td { background: #fafcff; }
.dashboard-device-cell { display: grid; min-width: 160px; gap: 1px; }
.dashboard-device-cell > a, .dashboard-device-cell > strong { max-width: 240px; overflow: hidden; color: var(--blue-2); font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-device-cell > strong { color: var(--text-2); }
.dashboard-device-cell > small { max-width: 240px; overflow: hidden; color: var(--faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-channel-code { display: inline-block; max-width: 130px; overflow: hidden; color: #4338ca; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.dashboard-state-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.dashboard-state { display: inline-flex; min-height: 19px; align-items: center; padding: 0 6px; color: var(--muted); background: #f3f4f6; border: 1px solid var(--line); border-radius: 10px; font-size: 8px; font-weight: 700; }
.dashboard-state.online { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.dashboard-state.sms-online { color: var(--blue-2); background: var(--selected); border-color: #bfdbfe; }
.dashboard-count, .dashboard-inline-counts { color: var(--text); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dashboard-never { color: var(--faint); }
.dashboard-table-empty { height: 110px !important; color: var(--muted) !important; text-align: center; }
.dashboard-statistics-section { display: grid; gap: 10px; }
.dashboard-statistics-header { padding-bottom: 0; }
.dashboard-statistics-controls { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.dashboard-statistics-tabs { display: inline-flex; min-width: 0; align-items: center; gap: 3px; padding: 3px; overflow-x: auto; background: #f3f4f6; border: 1px solid var(--line); border-radius: var(--radius); }
.dashboard-statistics-tabs button { min-width: 62px; min-height: 29px; padding: 0 11px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 2px; font-size: 10px; font-weight: 650; white-space: nowrap; }
.dashboard-statistics-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, .7); }
.dashboard-statistics-tabs button[aria-selected="true"] { color: var(--blue-2); background: var(--surface); border-color: #bfdbfe; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.dashboard-statistics-tabs button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 1px; }
.dashboard-statistics-resource-filters { display: flex; min-width: 0; align-items: center; gap: 6px; padding: 3px 7px; background: #f8fbff; border: 1px solid #dbeafe; border-radius: var(--radius); }
.dashboard-statistics-resource-filters[hidden] { display: none; }
.dashboard-statistics-resource-filters > label { color: var(--muted); font-size: 9px; font-weight: 650; white-space: nowrap; }
.dashboard-statistics-resource-filters select { min-width: 76px; height: 27px; padding: 0 7px; color: var(--text-2); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 9px; }
.dashboard-statistics-resource-filters select:focus { border-color: #93c5fd; outline: 2px solid #dbeafe; outline-offset: 0; }
.dashboard-statistics-resource-filters #dashboardStatisticsResourceScopeKey { min-width: 140px; }
.dashboard-statistics-resource-filters #dashboardStatisticsResourceScopeKey[hidden] { display: none; }
.dashboard-statistics-range-controls { display: flex; min-width: 0; flex: 0 0 auto; align-items: center; gap: 6px; }
.dashboard-statistics-range-controls > label { color: var(--muted); font-size: 9px; font-weight: 650; }
.dashboard-statistics-range-controls select, .dashboard-statistics-custom-range input { min-height: 31px; padding: 0 8px; color: var(--text-2); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 10px; }
.dashboard-statistics-range-controls select:focus, .dashboard-statistics-custom-range input:focus { border-color: #93c5fd; outline: 2px solid #dbeafe; outline-offset: 0; }
.dashboard-statistics-range-controls button { min-height: 31px; padding: 0 10px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 9px; font-weight: 700; }
.dashboard-statistics-range-controls button:hover:not(:disabled) { background: var(--blue-2); border-color: var(--blue-2); }
.dashboard-statistics-range-controls button.secondary { color: var(--text-2); background: #fff; border-color: var(--line-2); }
.dashboard-statistics-range-controls button.secondary:hover:not(:disabled) { background: var(--subtle); border-color: #94a3b8; }
.dashboard-statistics-custom-range { display: flex; align-items: flex-end; gap: 8px; padding: 9px 10px; background: #f8fbff; border: 1px solid #dbeafe; border-radius: var(--radius); }
.dashboard-statistics-custom-range[hidden] { display: none; }
.dashboard-statistics-custom-range label { display: grid; gap: 3px; }
.dashboard-statistics-custom-range label > span { color: var(--muted); font-size: 8px; font-weight: 650; }
.dashboard-statistics-custom-range input { min-width: 190px; }
.dashboard-statistics-custom-range > small { padding-bottom: 7px; color: var(--faint); font-size: 8px; }
.dashboard-statistics-error { min-width: 0; max-width: 100%; padding: 8px 10px; overflow-wrap: anywhere; color: var(--red); background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius); font-size: 10px; }
.dashboard-statistics-panel { display: grid; min-width: 0; gap: 9px; outline: none; }
.dashboard-statistics-panel:focus-visible { outline: 2px solid #bfdbfe; outline-offset: 2px; }
.dashboard-statistics-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.dashboard-statistics-summary:empty { display: none; }
.dashboard-statistics-summary-card { display: grid; min-width: 0; min-height: 72px; align-content: center; gap: 1px; padding: 9px 11px; background: var(--subtle); border: 1px solid var(--line); border-left: 3px solid #94a3b8; border-radius: var(--radius); }
.dashboard-statistics-summary-card.metric-blue { border-left-color: var(--blue); }
.dashboard-statistics-summary-card.metric-green { border-left-color: var(--green); }
.dashboard-statistics-summary-card.metric-purple { border-left-color: var(--purple); }
.dashboard-statistics-summary-card.metric-amber { border-left-color: var(--amber); }
.dashboard-statistics-summary-card.metric-cyan { border-left-color: var(--cyan); }
.dashboard-statistics-summary-card.metric-red { border-left-color: var(--red); }
.dashboard-statistics-summary-card > span { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-statistics-summary-card > strong { color: var(--text); font-size: 21px; font-weight: 720; font-variant-numeric: tabular-nums; line-height: 1.2; }
.dashboard-statistics-summary-card > small { overflow: hidden; color: var(--faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-statistics-visual { min-width: 0; max-width: 100%; overflow: hidden; }
.dashboard-statistics-chart-copy { display: grid; gap: 1px; }
.dashboard-statistics-chart-copy strong { color: var(--text-2); font-size: 10px; }
.dashboard-statistics-chart-copy small { color: var(--faint); font-size: 8px; }
.dashboard-statistics-chart-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 9px; }
.dashboard-statistics-chart-actions > span { min-width: 0; max-width: 100%; max-width: min(520px, 100%); overflow-wrap: anywhere; color: var(--faint); font-size: 8px; line-height: 1.35; }
.dashboard-statistics-chart-actions .management-trend-legend.is-grouped { max-width: min(900px, 55vw); max-height: 48px; padding: 2px 4px; overflow: auto; align-content: flex-start; scrollbar-width: thin; }
.dashboard-statistics-chart-actions .management-trend-legend.is-grouped span { white-space: nowrap; }
.dashboard-statistics-chart-stage { position: relative; width: 100%; min-width: 0; max-width: 100%; margin-top: 4px; overflow: hidden; }
.dashboard-statistics-chart { width: 100%; height: 100%; min-width: 0; }
.dashboard-statistics-visual .dashboard-statistics-chart-stage.dashboard-statistics-breakdown-stage {
    height: var(--dashboard-statistics-breakdown-height, 220px);
    max-height: 620px;
    max-height: min(620px, max(220px, calc(100vh - 280px)));
    transition: none;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}
.dashboard-statistics-breakdown-stage .dashboard-statistics-chart {
    height: var(--dashboard-statistics-breakdown-content-height, 220px);
    min-height: 0;
}
.dashboard-statistics-breakdown-stage.dashboard-statistics-breakdown-narrow-stage {
    /* Keep the complete chart inside the available phone width.  Older
       versions forced a 280px canvas here, which made a 200px content pane
       look clipped and added an unnecessary horizontal scrollbar.  Labels
       are shortened by the chart callback at this breakpoint instead. */
    overflow-x: hidden;
}
/* DevExtreme can clip rotated argument labels at particular Windows display
   scales even on a wide pane. This synchronized HTML rail is the sole name
   layer at every width, while the SVG continues to render bars and grids. */
.dashboard-statistics-breakdown-labels {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    display: grid;
    grid-template-rows: repeat(var(--dashboard-statistics-breakdown-label-rows, 1), minmax(0, 1fr));
    align-items: stretch;
    box-sizing: border-box;
    padding: 8px 3px 48px 2px;
    overflow: hidden;
    pointer-events: none;
}
.dashboard-statistics-breakdown-labels[hidden] { display: none; }
.dashboard-statistics-breakdown-label {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    line-height: 1;
    text-align: right;
    pointer-events: auto;
    cursor: help;
}
.dashboard-statistics-breakdown-label > span {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* HTML rails keep dates and values readable at every browser display scale,
   independent of DevExtreme's SVG text clipping and overlap calculations. */
.dashboard-statistics-trend-labels,
.dashboard-statistics-trend-value-labels {
    position: absolute;
    z-index: 1;
    box-sizing: border-box;
    pointer-events: none;
}
.dashboard-statistics-trend-labels {
    right: 0;
    bottom: 0;
    left: 0;
    height: 34px;
}
.dashboard-statistics-trend-labels[hidden],
.dashboard-statistics-trend-value-labels[hidden] { display: none; }
.dashboard-statistics-trend-label {
    position: absolute;
    bottom: 2px;
    overflow: hidden;
    max-width: 76px;
    color: var(--text-2);
    font-size: 9px;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
}
.dashboard-statistics-trend-value-labels {
    top: 0;
    bottom: 0;
    left: 0;
    width: 44px;
}
.dashboard-statistics-trend-value-label {
    position: absolute;
    right: 8px;
    max-width: calc(100% - 12px);
    overflow: hidden;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateY(-50%);
}
.dashboard-statistics-loading, .dashboard-statistics-empty { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); background: rgba(255, 255, 255, .9); font-size: 10px; }
.dashboard-statistics-loading[hidden], .dashboard-statistics-empty[hidden] { display: none; }
.dashboard-statistics-loading > span { width: 15px; height: 15px; border: 2px solid #bfdbfe; border-top-color: var(--blue); border-radius: 50%; animation: dashboard-statistics-spin .7s linear infinite; }
@keyframes dashboard-statistics-spin { to { transform: rotate(360deg); } }
.dashboard-statistics-table-wrap { min-width: 0; max-width: 100%; max-height: 330px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.dashboard-statistics-table-wrap[hidden] { display: none; }
.dashboard-statistics-table-wrap table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 9px; }
.dashboard-statistics-table-wrap table.dashboard-statistics-grouped-trend-table { min-width: 420px; }
.dashboard-statistics-table-wrap th { position: sticky; top: 0; z-index: 1; height: 30px; padding: 0 10px; color: var(--muted); background: #fafafa; border-bottom: 1px solid var(--line); font-weight: 650; text-align: right; white-space: nowrap; }
.dashboard-statistics-table-wrap th:first-child { text-align: left; }
.dashboard-statistics-table-wrap td { height: 39px; padding: 5px 10px; color: var(--text-2); border-bottom: 1px solid #eef0f3; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.dashboard-statistics-table-wrap tbody tr:last-child td { border-bottom: 0; }
.dashboard-statistics-table-wrap tbody tr:hover td { background: #fafcff; }
.dashboard-statistics-table-wrap td:first-child { min-width: 180px; text-align: left; }
.dashboard-statistics-table-wrap td:first-child strong { display: block; max-width: 300px; overflow: hidden; color: var(--text); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-statistics-table-wrap td:first-child small { display: block; max-width: 300px; margin-top: 1px; overflow: hidden; color: var(--faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-statistics-table-wrap td.dashboard-statistics-total { color: var(--text); font-weight: 750; }
.dashboard-statistics-note { padding-top: 1px; color: var(--faint); font-size: 8px; line-height: 1.5; }

@media (max-width: 1080px) {
    .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-compact-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-statistics-controls { align-items: stretch; flex-direction: column; }
    .dashboard-statistics-range-controls { align-self: flex-end; }
}

@media (max-width: 660px) {
    .dashboard-toolbar { align-items: flex-start; flex-direction: column; }
    .dashboard-toolbar-actions { width: 100%; justify-content: space-between; }
    .dashboard-metric-grid, .dashboard-analysis-grid { grid-template-columns: 1fr; }
    .dashboard-compact-groups { grid-template-columns: 1fr; }
    .dashboard-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-section-header > small { display: none; }
    .dashboard-statistics-tabs { width: 100%; flex-wrap: wrap; overflow: hidden; }
    .dashboard-statistics-tabs button { flex: 1 1 58px; min-width: 58px; }
    .dashboard-statistics-range-controls { width: 100%; flex-wrap: wrap; align-self: stretch; }
    .dashboard-statistics-range-controls select { min-width: 130px; flex: 1; }
    .dashboard-statistics-custom-range { align-items: stretch; flex-direction: column; }
    .dashboard-statistics-custom-range input { width: 100%; min-width: 0; }
    .dashboard-statistics-custom-range > small { padding-bottom: 0; }
    .dashboard-statistics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-statistics-chart-actions { flex-wrap: wrap; }
    .dashboard-statistics-chart-actions .management-trend-legend { width: auto; }
}

@media (max-width: 520px) {
    .dashboard-resource-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .dashboard-toolbar-actions { align-items: stretch; flex-direction: column; }
    .dashboard-toolbar-actions > span { white-space: normal; }
    .dashboard-toolbar-actions button { width: 100%; }
    .dashboard-resource-grid { grid-template-columns: 1fr; }
    .dashboard-statistics-range-controls > label { width: 100%; }
    .dashboard-statistics-range-controls button { flex: 1; }
    .dashboard-statistics-summary { grid-template-columns: 1fr; }
    .dashboard-statistics-chart-actions { width: 100%; justify-content: flex-start; }
}

/* Device workspace */
.app-main-content > .device-page { width: 100%; height: 100%; min-height: 0; padding: 0; }
.device-workbench { display: grid; grid-template-columns: minmax(600px, var(--device-grid-width, 58%)) 6px minmax(320px, 1fr); gap: var(--s2); width: 100%; height: 100%; min-height: 0; }
.device-grid-pane { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: var(--s2); overflow: hidden; }
.device-pane-resizer { position: relative; display: grid; width: 8px; min-width: 8px; place-items: center; background: #eef0f3; border: 1px solid var(--line); border-radius: 4px; cursor: col-resize; touch-action: none; outline: 0; }
.device-pane-resizer::before { content: ""; width: 2px; height: 32px; background: #cbd5e1; border-radius: 2px; box-shadow: 3px 0 #cbd5e1; opacity: .9; }
.device-pane-resizer:focus-visible { background: #dbeafe; border-color: #60a5fa; outline: 2px solid #bfdbfe; outline-offset: 1px; }
.device-pane-resizer:hover, .device-resizing .device-pane-resizer { background: #dbeafe; border-color: #93c5fd; }
.device-resizing { cursor: col-resize !important; user-select: none; }

.device-filterbar { display: grid; flex: 0 0 auto; gap: 6px; padding: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.device-filter-collapse-head { display: flex; min-height: 30px; align-items: center; justify-content: flex-end; }
.device-filter-primary-row { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 6px; align-items: end; }
.device-filter-advanced { display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid #eef0f3; }
.device-filter-advanced[hidden] { display: none; }
.device-filter-toggle { display: inline-flex; height: 30px; min-width: 92px; align-items: center; justify-content: center; gap: 5px; padding: 0 9px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); white-space: nowrap; }
.device-filter-toggle::after { content: ""; width: 6px; height: 6px; margin: -3px 1px 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .12s ease, margin .12s ease; }
.device-filter-toggle[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(225deg); }
.device-filter-toggle:hover { color: var(--blue-2); border-color: var(--blue); }
.device-filter-count { display: inline-grid; min-width: 17px; height: 17px; place-items: center; padding: 0 4px; color: #fff; background: var(--blue); border-radius: 9px; font-size: 9px; font-weight: 700; }
.device-filter-count[hidden] { display: none; }
.device-filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-items: end; }
.device-filter-date-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 8px; padding-top: 6px; border-top: 1px solid #eef0f3; }
.device-filter-date-range[hidden] { display: none; }
.device-filter-date-apply { width: auto; height: 30px; padding: 0 14px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 11px; font-weight: 600; white-space: nowrap; }
.device-filter-date-apply:hover { background: var(--blue-2); border-color: var(--blue-2); }
.device-filter-main-row { grid-template-columns: minmax(220px, 1fr) minmax(130px, .5fr) repeat(2, minmax(105px, .4fr)); }
.device-filter-status-row { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
.device-filter-field { display: grid; min-width: 0; gap: 3px; }
.device-filter-field label, .device-filter-feature-heading { color: var(--muted); font-size: 11px; font-weight: 500; }
.device-filter-input, .device-filter-select, .device-filter-clear { width: 100%; min-width: 0; height: 30px; padding: 0 8px; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; }
.device-filter-input:focus, .device-filter-select:focus, .remark-editor input:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.device-filter-clear { width: auto; color: var(--muted); white-space: nowrap; }
.device-filter-clear:hover { color: var(--text-2); background: var(--subtle); border-color: #9ca3af; }
.device-filter-feature-group, .device-filter-chips { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 6px; }
.device-filter-feature-heading { display: flex; align-items: baseline; gap: 5px; }
.device-filter-feature-heading small { color: var(--faint); font-size: 9px; }
.device-filter-check { display: inline-flex; height: 30px; align-items: center; gap: 5px; padding: 0 8px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 11px; white-space: nowrap; cursor: pointer; user-select: none; }
.device-filter-check:hover, .device-filter-check:has(input:checked) { color: var(--blue-2); border-color: var(--blue); }
.device-filter-check:has(input:checked) { background: var(--selected); }
.device-filter-check input { width: 13px; height: 13px; margin: 0; accent-color: var(--blue); }

/* Native device grid */
.native-device-grid { display: flex; width: 100%; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.native-grid-toolbar, .native-grid-pager { display: flex; min-height: 34px; flex: 0 0 34px; align-items: center; gap: 7px; padding: 0 8px; color: var(--muted); background: var(--surface); font-size: 11px; }
.native-grid-toolbar { justify-content: space-between; border-bottom: 1px solid var(--line); }
.native-grid-pager { justify-content: flex-end; border-top: 1px solid var(--line); }
.native-grid-toolbar button, .native-grid-pager button, .native-grid-pager select { height: 26px; padding: 0 8px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); }
.native-grid-toolbar button:hover, .native-grid-pager button:hover:not(:disabled) { color: var(--blue-2); border-color: var(--blue); }
.native-grid-pager label { display: inline-flex; align-items: center; gap: var(--s1); }
.native-grid-pager input[type="number"] { width: 58px; height: 26px; padding: 0 6px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); text-align: center; }
.native-grid-page-numbers { display: inline-flex; align-items: center; gap: 3px; }
.native-grid-pager .native-grid-page-button { min-width: 27px; padding: 0 6px; }
.native-grid-pager .native-grid-page-button.active { color: #fff; background: var(--blue); border-color: var(--blue); opacity: 1; }
.native-grid-page-ellipsis { min-width: 16px; text-align: center; }
.native-grid-scroll { width: 100%; min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; }
.project6-native-grid-source { display: none !important; }
.project6-dev-grid-host { width: 100%; min-width: 0; min-height: 0; flex: 1; overflow: hidden; background: var(--surface); }
.project6-dev-grid-host .dx-datagrid { color: var(--text-2); font-size: 11px; }
.project6-dev-grid-host .dx-datagrid-headers { color: var(--text-2); background: var(--subtle); font-weight: 650; }
.project6-dev-grid-host .dx-datagrid-headers .dx-datagrid-text-content { font-size: 11px; }
.project6-dev-grid-host .dx-datagrid-rowsview .dx-row > td { padding-top: 7px; padding-bottom: 7px; vertical-align: middle; }
.project6-dev-grid-host .dx-row.project6-active-row > td { background: var(--selected) !important; }
.project6-dev-grid-host .dx-row.project6-online-row:not(.project6-active-row) > td { background: #fcfffd; }
.project6-dev-grid-host .dx-datagrid-headers .grid-sort-button { display: inline-flex; align-items: center; gap: 4px; width: auto; height: auto; padding: 0; color: inherit; background: transparent; border: 0; font: inherit; font-weight: 650; cursor: pointer; }
.project6-dev-sort-direction { margin-left: 4px; color: var(--blue-2); font-size: 11px; font-weight: 800; }
.user-management-table-wrap[data-dev-grid] { overflow: hidden; }
.user-management-table-wrap .project6-dev-grid-host { height: clamp(480px, calc(100vh - 315px), 820px); min-height: 480px; }
.native-device-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.native-device-table th { position: sticky; top: 0; z-index: 1; height: 34px; padding: 0 8px; color: var(--text-2); background: var(--subtle); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600; text-align: left; }
.native-device-table th.select-column { width: 32px; }
.native-device-table th:nth-child(3) { width: 96px; }
.native-device-table th:nth-child(4) { width: 116px; }
.native-device-table th:nth-child(5) { width: 118px; }
.native-device-table th:nth-child(6) { width: 118px; }
.device-page .native-device-table { --device-column-width: 300px; min-width: 760px; }
.device-page .native-device-table .device-select-column { width: 32px; }
.device-page .native-device-table .device-main-column { width: var(--device-column-width, 300px); min-width: 220px; }
.device-page .native-device-table .device-city-column { width: 118px; }
.device-page .native-device-table .device-city-column[hidden] { display: none; }
.device-page .native-device-table .device-status-column { width: 118px; }
.device-page .native-device-table .device-seen-column { width: 138px; }
.device-page .native-device-table .device-created-column { width: 138px; }
.device-page .native-device-table th.device-column { position: sticky; min-width: 220px; overflow: visible; }
.native-column-resizer { position: absolute; z-index: 2; top: 0; right: 0; display: grid; width: 11px; height: 100%; place-items: center; cursor: col-resize; touch-action: none; outline: 0; }
.native-column-resizer::before { content: ""; width: 2px; height: 18px; background: #cbd5e1; border-radius: 2px; box-shadow: 3px 0 #cbd5e1; opacity: .9; }
.native-column-resizer:hover, .native-column-resizer:focus-visible { background: #dbeafe; }
.native-column-resizer:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
.device-column-resizing { cursor: col-resize !important; user-select: none; }
.device-page .native-device-table th.device-column > .grid-sort-button { width: calc(100% - 12px); }
.grid-sort-button { display: inline-flex; width: 100%; height: 30px; align-items: center; gap: 4px; padding: 0; color: inherit; background: transparent; border: 0; font-weight: inherit; text-align: left; }
.grid-sort-button::after { content: "↕"; color: var(--faint); font-size: 9px; }
th[aria-sort="ascending"] .grid-sort-button, th[aria-sort="descending"] .grid-sort-button { color: var(--blue-2); }
th[aria-sort="ascending"] .grid-sort-button::after { content: "↑"; color: var(--blue); }
th[aria-sort="descending"] .grid-sort-button::after { content: "↓"; color: var(--blue); }
.native-device-table td { padding: 6px 8px; color: var(--text-2); border-bottom: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
.native-device-table tr[data-device-id] { cursor: pointer; }
.native-device-table tr[data-device-id]:hover > td { background: var(--subtle); }
.native-device-table tr.active > td { background: #dbeafe; border-color: #bfdbfe; }
.native-device-table tr.active .device-title { color: var(--blue-2); }
.native-row-selector { display: block; width: 13px; height: 13px; margin: auto; background: var(--surface); border: 1px solid #9ca3af; border-radius: 2px; }
.native-device-table tr.active .native-row-selector { background: var(--blue); border-color: var(--blue); outline: 2px solid var(--surface); outline-offset: -3px; }
.native-grid-message { height: 130px; color: var(--muted) !important; text-align: center; }
.native-grid-message.error, .detail-error { color: var(--red) !important; }
.native-status-line { display: flex; align-items: center; gap: var(--s1); margin: 2px 0; white-space: nowrap; }

.device-cell { display: grid; min-width: 0; gap: 2px; line-height: 1.25; }
.device-title { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.device-subline, .device-remark, .muted-sub { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.device-channel-line { color: var(--text-2); }
.device-agent-line { color: var(--muted); }
.device-remark { color: var(--faint); }
.muted-main, .time-main { overflow: hidden; color: var(--text-2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.badge-line { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.badge-line.compact { margin-top: 3px; }
.dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--line-2); }
.dot.ok { background: var(--green); } .dot.info { background: #3b82f6; } .dot.warn { background: #f59e0b; }
.state-text { color: var(--text-2); font-size: 10px; }
.mini-flag { display: inline-flex; min-height: 18px; align-items: center; padding: 0 5px; color: var(--muted); background: #f3f4f6; border-radius: 2px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.mini-flag.info { color: var(--blue-2); background: var(--selected); }
.mini-flag.warn { color: var(--amber); background: #fffbeb; }
.mini-flag.danger, .mini-flag.star { color: var(--red); background: #fef2f2; }

/* Detail */
.device-detail-panel { min-width: 0; min-height: 0; padding: var(--s3); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.detail-empty { display: grid; width: 100%; height: 100%; min-height: 220px; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }
.detail-empty.compact { height: auto; min-height: 110px; }
.detail-loading { padding: 36px 0; color: var(--muted); text-align: center; }
.detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s3); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.detail-head > div:first-child { min-width: 0; flex: 1 1 220px; }
.detail-title { overflow: hidden; color: var(--text); font-size: 15px; font-weight: 700; text-overflow: ellipsis; }
.detail-sub { margin-top: 2px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.detail-head-side { display: grid; min-width: 0; max-width: 100%; flex: 1 1 230px; justify-items: end; gap: 6px; }
.detail-head-actions, .detail-head-flags { display: flex; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; gap: var(--s1); }
.row-action-chip { height: 26px; padding: 0 8px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 10px; font-weight: 600; white-space: nowrap; }
.row-action-chip:hover:not(:disabled) { color: var(--blue-2); border-color: var(--blue); }
.row-action-chip.info { color: var(--blue-2); background: var(--selected); border-color: #bfdbfe; }
.row-action-chip.warn { color: var(--amber); background: #fffbeb; border-color: #fde68a; }
.row-action-chip.star, .row-action-chip.danger { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.device-delete-dialog { width: min(440px, calc(100vw - 28px)); padding: 0; color: var(--text-1); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 20px 50px rgb(15 23 42 / 24%); }
.device-delete-dialog::backdrop { background: rgb(15 23 42 / 42%); }
.device-delete-dialog form { display: grid; gap: 12px; padding: 16px; }
.device-delete-head { display: grid; gap: 5px; }
.device-delete-head h2 { margin: 0; color: var(--red); font-size: 15px; }
.device-delete-head p, .device-delete-summary p { margin: 0; color: var(--text-2); font-size: 11px; line-height: 1.55; }
.device-delete-head strong { color: var(--text-1); overflow-wrap: anywhere; }
.device-delete-summary { display: grid; gap: 10px; }
.device-delete-tombstone-option { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; padding: 10px; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); cursor: pointer; }
.device-delete-tombstone-option input { margin-top: 2px; }
.device-delete-tombstone-option span { display: grid; gap: 3px; }
.device-delete-tombstone-option strong { color: #92400e; font-size: 11px; }
.device-delete-tombstone-option small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.device-delete-actions { display: flex; justify-content: flex-end; gap: 7px; }
.detail-tabs { display: flex; margin-top: 10px; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.detail-tab { height: 30px; flex: 0 0 auto; padding: 0 9px; color: #4b5563; background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 10px; white-space: nowrap; }
.detail-tab:hover { color: var(--text); background: var(--subtle); }
.detail-tab.active { color: var(--blue-2); background: var(--selected); border-bottom-color: var(--blue); font-weight: 600; }
.detail-tab-content { padding-top: 10px; }
.analysis-tabs { display: flex; gap: 2px; margin-bottom: 10px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.analysis-tab { display: inline-flex; min-width: 76px; height: 32px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0 12px; color: #4b5563; border-bottom: 2px solid transparent; font-size: 11px; text-decoration: none; white-space: nowrap; }
.analysis-tab:hover { color: var(--text); background: var(--subtle); }
.analysis-tab.active { color: var(--blue-2); background: var(--selected); border-bottom-color: var(--blue); font-weight: 650; }
.analysis-page { display: flex; min-height: 0; flex-direction: column; }
.analysis-dev-grid { height: min(620px, calc(100vh - 205px)); min-height: 430px; background: var(--surface); }
.analysis-dev-grid .dx-datagrid { color: var(--text-2); font-size: 11px; }
.analysis-dev-grid .dx-datagrid-headers { color: var(--text-2); background: var(--subtle); font-weight: 600; }
.analysis-dev-grid .dx-datagrid-headers .dx-datagrid-text-content { font-size: 11px; }
.analysis-dev-grid .dx-datagrid-rowsview .dx-row > td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.analysis-dev-grid .dx-toolbar { min-height: 34px; padding: 0 6px; }
.analysis-dev-grid .dx-pager { padding: 7px 8px; }
.analysis-grid-toolbar-label { color: var(--muted); font-size: 11px; }
.analysis-dev-grid .analysis-device-link { display: block; overflow: hidden; color: var(--blue-2); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.analysis-dev-grid .analysis-device-link:hover { text-decoration: underline; }
.analysis-dev-grid .analysis-resource-id { display: block; overflow: hidden; color: var(--text-2); font-family: Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.analysis-dev-grid .analysis-tag { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.detail-status-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.detail-status { display: flex; min-width: 0; align-items: center; gap: 5px; padding: 6px; background: var(--subtle); border: 1px solid var(--line); }
.detail-status-label, .detail-metric-label, .detail-row-label { color: var(--muted); font-size: 10px; }
.detail-status-value { overflow: hidden; color: var(--text); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.detail-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; margin-top: 6px; }
.detail-metric { padding: 7px 4px; background: var(--subtle); border: 1px solid var(--line); text-align: center; }
.detail-metric-value { color: var(--text); font-size: 14px; font-weight: 650; line-height: 1.15; }
.detail-section { margin-top: var(--s3); }
.detail-section-title { margin-bottom: var(--s1); color: var(--text-2); font-size: 11px; font-weight: 700; }
.detail-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: var(--s2); padding: 6px 0; border-top: 1px solid #f0f2f5; }
.detail-row-value { color: var(--text); font-size: 11px; overflow-wrap: anywhere; }
.detail-row-value a { color: var(--blue-2); }
.remark-editor { display: flex; gap: 6px; margin-top: 5px; }
.remark-editor input { min-width: 0; height: 28px; flex: 1; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; }
.detail-summary-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: var(--s2); padding: 7px 8px; color: var(--text-2); background: var(--subtle); border: 1px solid var(--line); font-size: 11px; }
.detail-summary-line span { color: var(--muted); font-size: 10px; }
.detail-list-stack { display: grid; }
.detail-list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 8px 2px; border-top: 1px solid #f0f2f5; }
.detail-list-title { overflow: hidden; color: var(--text); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.detail-list-sub { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.detail-list-tail { color: var(--text-2); font-size: 10px; white-space: nowrap; }
.detail-list-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.detail-memo-text { margin: 0; color: var(--text); font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.detail-image-card { display: grid; width: 100%; min-height: 180px; padding: 0; align-content: stretch; overflow: hidden; color: var(--muted); background: #111827; border: 1px solid var(--line); border-radius: var(--radius); text-align: inherit; cursor: zoom-in; }
.detail-image-card:hover { border-color: #93c5fd; }
.detail-image-card img { width: 100%; height: 155px; display: block; object-fit: contain; background: #111827; }
.detail-image-card small, .image-placeholder { display: grid; min-height: 25px; padding: 5px; place-items: center; color: var(--muted); background: var(--surface); font-size: 9px; }
.detail-image-pager { display: flex; min-height: 36px; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 8px; padding-top: 7px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.detail-image-pager button, .detail-image-pager select { height: 26px; padding: 0 8px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); }
.detail-image-pager button:hover:not(:disabled) { color: var(--blue-2); border-color: var(--blue); }
.detail-image-pager label { display: inline-flex; align-items: center; gap: 5px; }
.detail-image-page-numbers { display: inline-flex; align-items: center; gap: 3px; }
.detail-image-pager .detail-image-page-button { min-width: 27px; padding: 0 6px; }
.detail-image-pager .detail-image-page-button.active { color: #fff; background: var(--blue); border-color: var(--blue); opacity: 1; }
.detail-image-page-ellipsis { min-width: 16px; text-align: center; }
.detail-sms-task, .detail-sms-received { align-items: start; }
.detail-sms-content { margin-top: 5px; }
.detail-sms-error { margin-top: 4px; color: var(--red); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.detail-log-toolbar { display: flex; align-items: center; gap: 7px; }
.detail-log-toolbar .detail-summary-line { min-width: 0; flex: 1; margin-bottom: 0; }
.detail-log-row { align-items: start; }
.detail-log-main { min-width: 0; }
.detail-log-heading { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 5px; }
.detail-log-event { min-width: 0; overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; overflow-wrap: anywhere; }
.detail-log-description { margin: 5px 0 0; color: var(--text); font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-log-meta { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.detail-log-payload { margin-top: 7px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--subtle); }
.detail-log-payload summary { padding: 5px 7px; color: var(--blue-2); font-size: 10px; cursor: pointer; user-select: none; }
.detail-log-payload summary:hover { background: var(--selected); }
.detail-log-payload-content { max-height: 280px; margin: 0; padding: 7px; overflow: auto; color: var(--text-2); background: var(--surface); border-top: 1px solid var(--line); font-size: 9px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-log-pager { display: flex; min-height: 36px; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 8px; padding-top: 7px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.detail-log-pager button, .detail-log-pager select { height: 26px; padding: 0 8px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); }
.detail-log-pager button:hover:not(:disabled) { color: var(--blue-2); border-color: var(--blue); }
.detail-log-pager label { display: inline-flex; align-items: center; gap: 5px; }
.detail-log-page-numbers { display: inline-flex; align-items: center; gap: 3px; }
.detail-log-pager .detail-log-page-button { min-width: 27px; padding: 0 6px; }
.detail-log-pager .detail-log-page-button.active { color: #fff; background: var(--blue); border-color: var(--blue); opacity: 1; }
.detail-log-page-ellipsis { min-width: 16px; text-align: center; }

/* Management statistics */
.management-stats-details { min-width: 0; flex: 0 0 auto; }
.management-stats-details.standalone-stats-details { margin-bottom: var(--s2); }
.management-stats-details > summary { display: inline-flex; min-height: 30px; align-items: center; gap: 6px; padding: 0 9px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 11px; list-style: none; cursor: pointer; }
.management-stats-details > summary::-webkit-details-marker { display: none; }
.management-stats-details > summary::after { content: ""; width: 6px; height: 6px; margin: -3px 1px 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .12s ease, margin .12s ease; }
.management-stats-details[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
.management-stats-details > summary:hover { color: var(--blue-2); border-color: var(--blue); }
.management-stats-details .stats-hide-label { display: none; }
.management-stats-details[open] .stats-show-label { display: none; }
.management-stats-details[open] .stats-hide-label { display: inline; }
.management-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); align-items: stretch; gap: 6px; margin-top: 6px; }
.management-stats-details:not([open]) > .management-stats { display: none; }
.management-stats-refresh { grid-column: 1 / -1; display: flex; min-height: 28px; align-items: center; justify-content: flex-end; gap: 7px; color: var(--faint); font-size: 9px; }
.management-stats-refresh button { height: 26px; padding: 0 9px; color: var(--blue-2); background: var(--surface); border: 1px solid #bfdbfe; border-radius: var(--radius); font-size: 9px; }
.management-stats-refresh button:hover:not(:disabled) { background: var(--selected); border-color: var(--blue); }
.management-stats-range { grid-column: 1 / -1; display: flex; min-height: 30px; align-items: center; justify-content: flex-end; gap: 6px; padding: 6px 8px; color: var(--muted); background: var(--subtle); border: 1px solid var(--line); border-radius: var(--radius); font-size: 9px; }
.management-stats-range input, .management-stats-range select, .management-stats-range button { height: 26px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 9px; }
.management-stats-range input { width: 176px; padding: 0 6px; }
.management-stats-range select { min-width: 88px; padding: 0 6px; }
.management-stats-range button { padding: 0 9px; color: var(--blue-2); }
.management-stats-range button:hover:not(:disabled) { background: var(--selected); border-color: var(--blue); }
.management-stats-range > span { min-width: 120px; color: var(--faint); text-align: right; }
.management-stats-range > span.error { color: var(--red); }
.management-stat-group { grid-column: 1 / -1; display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: stretch; gap: 6px; }
.management-stat-group-title { display: flex; align-items: center; padding: 7px 9px; color: var(--text-2); background: var(--subtle); border: 1px solid var(--line); border-radius: var(--radius); font-size: 10px; font-weight: 700; white-space: nowrap; }
.management-stat-group-content { display: grid; min-width: 0; gap: 6px; }
.management-stat-row { display: grid; gap: 6px; }
.management-stat-row.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.management-stat-row.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.management-stat { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.management-stat span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.management-stat strong { color: var(--text); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.management-trend { grid-column: 1 / -1; padding: 7px 9px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.management-trend-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-2); font-size: 10px; }
.management-trend-head strong { font-size: 10px; }
.management-trend-controls { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; }
.management-trend-controls select, .management-trend-controls button { height: 24px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 9px; }
.management-trend-controls select { padding: 0 20px 0 6px; }
.management-trend-controls button { width: 25px; padding: 0; color: var(--blue-2); font-size: 13px; }
.management-trend-controls button:hover:not(:disabled) { background: var(--selected); border-color: var(--blue); }
.management-trend-controls > span { min-width: 22px; text-align: center; white-space: nowrap; }
.management-trend-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: 9px; }
.management-trend-legend span::before { content: ""; display: inline-block; width: 13px; height: 2px; margin-right: 4px; vertical-align: 3px; background: currentColor; }
.management-trend-legend .devices { color: var(--blue); }
.management-trend-legend .images { color: var(--purple); }
.management-trend-legend .mnemonics { color: var(--red); }
.management-trend-legend .personal { color: var(--green); }
.management-trend-legend .business { color: var(--amber); }
.management-trend-legend .memos { color: var(--cyan); }
.management-trend-chart { position: relative; width: 100%; height: 150px; transition: height .2s ease; }
.management-trend-chart.trend-size-medium { height: 230px; }
.management-trend-chart.trend-size-large { height: 330px; }
.management-trend-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.management-trend-chart .trend-grid { stroke: var(--line); stroke-width: 1; }
.management-trend-chart .trend-axis-label, .management-trend-chart .trend-empty { fill: var(--muted); font: 9px var(--font); }
.management-trend-chart .trend-line { fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.management-trend-chart .trend-point { stroke-width: 1.5; }
.management-trend-chart .trend-line.devices, .management-trend-chart .trend-point.devices { stroke: var(--blue); }
.management-trend-chart .trend-point.devices { fill: var(--surface); }
.management-trend-chart .trend-line.images, .management-trend-chart .trend-point.images { stroke: var(--purple); }
.management-trend-chart .trend-point.images { fill: var(--surface); }
.management-trend-chart .trend-line.mnemonics, .management-trend-chart .trend-point.mnemonics { stroke: var(--red); }
.management-trend-chart .trend-point.mnemonics { fill: var(--surface); }
.management-trend-chart .trend-line.personal, .management-trend-chart .trend-point.personal { stroke: var(--green); }
.management-trend-chart .trend-point.personal { fill: var(--surface); }
.management-trend-chart .trend-line.business, .management-trend-chart .trend-point.business { stroke: var(--amber); }
.management-trend-chart .trend-point.business { fill: var(--surface); }
.management-trend-chart .trend-hover-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.management-trend-chart .trend-hover-point { stroke-width: 2; fill: var(--surface); pointer-events: none; }
.management-trend-chart .trend-hover-point.devices { stroke: var(--blue); }
.management-trend-chart .trend-hover-point.images { stroke: var(--purple); }
.management-trend-chart .trend-hover-point.mnemonics { stroke: var(--red); }
.management-trend-chart .trend-hover-point.personal { stroke: var(--green); }
.management-trend-chart .trend-hover-point.business { stroke: var(--amber); }
.management-trend-chart .trend-hit-area { fill: transparent; pointer-events: all; cursor: crosshair; }
.management-trend-tooltip { position: absolute; z-index: 3; display: grid; min-width: 112px; gap: 3px; padding: 6px 7px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 4px 12px rgb(15 23 42 / 12%); font-size: 9px; pointer-events: none; }
.management-trend-tooltip[hidden] { display: none; }
.management-trend-tooltip > strong { color: var(--text); font-size: 9px; }
.trend-tooltip-row { display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 5px; }
.trend-tooltip-row i { width: 6px; height: 6px; border-radius: 50%; }
.trend-tooltip-row i.devices { background: var(--blue); }
.trend-tooltip-row i.images { background: var(--purple); }
.trend-tooltip-row i.mnemonics { background: var(--red); }
.trend-tooltip-row i.personal { background: var(--green); }
.trend-tooltip-row i.business { background: var(--amber); }
.trend-tooltip-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.management-stats > small { grid-column: 1 / -1; display: flex; align-items: center; padding: 0 4px; color: var(--faint); font-size: 9px; line-height: 1.45; white-space: normal; }

/* WhatsApp management */
.whatsapp-page .device-filter-row { grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(90px, .55fr)) auto; }
.whatsapp-page .native-device-table { min-width: 1040px; }
.whatsapp-page .native-device-table th:nth-child(2) { width: 29%; }
.whatsapp-page .native-device-table th:nth-child(3) { width: 20%; }
.whatsapp-page .native-device-table th:nth-child(4) { width: 76px; }
.whatsapp-page .native-device-table th:nth-child(5) { width: 104px; }
.whatsapp-page .native-device-table th:nth-child(6) { width: 96px; }
.whatsapp-page .native-device-table th:nth-child(7) { width: 96px; }
.whatsapp-page .native-device-table th:nth-child(8) { width: 146px; }
.whatsapp-export-notice { flex: 0 0 auto; padding: 6px 8px; color: var(--blue-2); background: var(--selected); border-bottom: 1px solid #bfdbfe; font-size: 10px; }
.whatsapp-export-notice[hidden] { display: none; }
.whatsapp-device-account { padding-inline: 6px; }
.whatsapp-device-account.active { background: var(--selected); }
.whatsapp-device-account .detail-list-tail { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.whatsapp-device-accounts-empty { min-height: 64px; }
.sensitive-content-notice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 8px; color: var(--text-2); background: #fffbeb; border: 1px solid #fde68a; font-size: 10px; }
.sensitive-content-notice strong { color: var(--amber); white-space: nowrap; }
.sensitive-content-notice span { color: var(--muted); }
.sensitive-content-host:empty { display: none; }
.sensitive-content-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 6px 8px; color: var(--muted); background: var(--subtle); border: 1px solid var(--line); border-bottom: 0; font-size: 10px; }
.sensitive-content-value { max-height: 360px; margin: 0; padding: 9px; overflow: auto; background: var(--subtle); border: 1px solid var(--line); }
.sensitive-content-error { margin-top: 6px; padding: 8px; background: #fef2f2; border: 1px solid #fecaca; font-size: 10px; }

/* Resource and analysis pages */
.page-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.page-filter-details { min-width: 0; flex: 1; }
.page-filter-details > summary { display: inline-flex; min-height: 30px; align-items: center; gap: 6px; padding: 0 9px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 11px; list-style: none; cursor: pointer; }
.page-filter-details > summary::-webkit-details-marker { display: none; }
.page-filter-details > summary::after { content: ""; width: 6px; height: 6px; margin: -3px 1px 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.page-filter-details[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
.page-filter-details > summary:hover { color: var(--blue-2); border-color: var(--blue); }
.page-filter-details > summary small { display: inline-grid; min-width: 17px; height: 17px; place-items: center; padding: 0 4px; color: #fff; background: var(--blue); border-radius: 9px; font-size: 9px; font-weight: 700; }
.page-filter-details > form { margin-top: 8px; padding-top: 8px; border-top: 1px solid #eef0f3; }
.page-toolbar form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--s2); }
.page-toolbar label { display: grid; gap: var(--s1); color: var(--muted); font-size: 10px; font-weight: 600; }
.page-toolbar input, .page-toolbar select { min-width: 170px; height: 30px; padding: 0 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; }
.page-toolbar select { min-width: 120px; }
.page-toolbar input:focus, .page-toolbar select:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.image-custom-date-fields { display: flex; align-items: flex-end; gap: var(--s2); }
.image-custom-date-fields[hidden] { display: none; }
.page-toolbar button, .page-pager a { display: inline-grid; min-height: 30px; place-items: center; padding: 0 11px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 10px; font-weight: 600; }
.page-toolbar button:hover { background: var(--blue-2); }
.page-toolbar > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.image-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.library-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.library-card:hover { border-color: #cbd5e1; }
.library-preview { display: grid; height: 150px; place-items: center; overflow: hidden; color: var(--faint); background: #f1f3f6; font-size: 10px; }
.library-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.library-card > div:last-child { padding: var(--s2); }
.library-card strong, .library-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-card strong { color: var(--text-2); font-size: 10px; }
.library-card small { margin-top: 3px; color: var(--faint); font-size: 9px; }
.library-review { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: 7px; }
.library-review form { display: flex; gap: 4px; }
.native-image-grid { height: min(680px, calc(100vh - 170px)); min-height: 480px; }
.native-image-table { min-width: 1080px; }
.native-image-table th.image-select-column { width: 38px; padding-inline: 11px; }
.native-image-table th.image-preview-column { width: 242px; }
.native-image-table th:nth-child(4) { width: 100px; }
.native-image-table th:nth-child(5) { width: 92px; }
.native-image-table th:nth-child(6) { width: 122px; }
.native-image-table th:nth-child(7) { width: 128px; }
.native-image-table tr[data-image-id]:hover > td { background: var(--subtle); }
.image-grid-toolbar-main, .image-grid-batch-actions { display: flex; min-width: 0; align-items: center; gap: 7px; }
.image-grid-toolbar-main > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-grid-batch-actions { flex: 0 0 auto; }
#imageBatchStatus { max-width: 240px; overflow: hidden; color: var(--blue-2); text-overflow: ellipsis; white-space: nowrap; }
.native-grid-toolbar .image-grid-batch-confirm:not(:disabled) { color: #fff; background: var(--blue); border-color: var(--blue); }
.native-grid-toolbar .image-grid-batch-confirm:hover:not(:disabled) { color: #fff; background: var(--blue-2); }
.image-grid-select-cell { padding-inline: 11px !important; }
.image-grid-select, #imageSelectAll { width: 14px; height: 14px; accent-color: var(--blue); }
.resource-grid-toolbar-main, .resource-grid-batch-actions { display: flex; min-width: 0; align-items: center; gap: 7px; }
.resource-grid-toolbar-main > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-grid-batch-actions { flex: 0 0 auto; }
.resource-grid-batch-status { max-width: 190px; overflow: hidden; color: var(--blue-2); text-overflow: ellipsis; white-space: nowrap; }
.native-grid-toolbar .resource-grid-batch-confirm:not(:disabled) { color: #fff; background: var(--blue); border-color: var(--blue); }
.native-grid-toolbar .resource-grid-batch-confirm:hover:not(:disabled) { color: #fff; background: var(--blue-2); }
.native-grid-toolbar .resource-grid-batch-delete:not(:disabled) { color: #fff; background: var(--red); border-color: var(--red); }
.native-grid-toolbar .resource-grid-batch-delete:hover:not(:disabled) { color: #fff; background: #b91c1c; border-color: #b91c1c; }
.resource-grid-select { width: 14px; height: 14px; accent-color: var(--blue); }
.keystore-page .native-device-table th:nth-child(2) { width: 210px; }
.keystore-page .native-device-table th:nth-child(3) { width: 108px; }
.keystore-page .native-device-table th:nth-child(4),
.keystore-page .native-device-table th:nth-child(5) { width: 66px; }
.keystore-page .native-device-table th:nth-child(6) { width: 138px; }
.keystore-page .native-device-table th:nth-child(7) { width: 64px; }
.keystore-view-cell { text-align: center; }
.mnemonic-page .native-device-table th:nth-child(2) { width: 190px; }
.mnemonic-page .native-device-table th:nth-child(3) { width: 78px; }
.mnemonic-page .native-device-table th:nth-child(4) { width: 108px; }
.mnemonic-page .native-device-table th:nth-child(5),
.mnemonic-page .native-device-table th:nth-child(6) { width: 66px; }
.mnemonic-page .native-device-table th:nth-child(7) { width: 138px; }
.image-grid-preview-cell { padding-block: 4px !important; }
.image-grid-preview { display: grid; width: 220px; height: 136px; padding: 0; place-items: center; overflow: hidden; color: var(--faint); background: #f1f3f6; border: 1px solid var(--line); border-radius: var(--radius); font-size: 8px; cursor: zoom-in; }
.image-grid-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.image-grid-link { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-grid-link { color: var(--blue-2); }
.image-resource-workbench { grid-template-columns: minmax(0, var(--device-grid-width, 52%)) 6px minmax(0, 1fr); }
.image-resource-page .management-stats-range { justify-content: flex-start; flex-wrap: wrap; }
.image-resource-page .management-stats-range > span { width: 100%; text-align: left; }
.image-resource-page .page-toolbar { margin-bottom: 0; }
.image-resource-page .native-image-grid { height: auto; min-height: 0; }
.image-resource-page .native-image-table { min-width: 720px; }
.image-resource-page .native-image-table th.image-preview-column { width: 132px; }
.image-resource-page .native-image-table th:nth-child(4) { width: 78px; }
.image-resource-page .native-image-table th:nth-child(5) { width: 78px; }
.image-resource-page .native-image-table th:nth-child(6) { width: 112px; }
.image-resource-page .native-image-table th:nth-child(7) { width: 100px; }
.image-resource-page .image-grid-preview { width: 112px; height: 72px; }
.image-resource-page .native-image-table tr[data-image-id] { cursor: pointer; }
.image-resource-page .native-image-table tr[data-image-id]:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.image-resource-page .native-grid-pager { min-height: 34px; height: auto; flex: 0 0 auto; flex-wrap: wrap; padding-block: 4px; }
.image-detail-panel { display: flex; overflow-x: hidden; flex-direction: column; }
.image-detail-actions a { display: inline-flex; align-items: center; }
.image-detail-preview { display: grid; width: 100%; max-width: 100%; height: min(58vh, 620px); min-width: 0; min-height: 300px; margin-top: 12px; padding: 0; place-items: center; overflow: hidden; color: #cbd5e1; background: #111827; border: 1px solid var(--line); border-radius: var(--radius); cursor: zoom-in; }
.image-detail-preview:hover { border-color: #93c5fd; }
.image-detail-preview img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.image-detail-preview .image-placeholder { width: 100%; height: 100%; color: #cbd5e1; background: #111827; }
.image-detail-preview-hint { padding: 6px 4px; color: var(--faint); font-size: 9px; text-align: center; }
.image-detail-info { margin-top: 4px; }
.image-preview-dialog { width: min(1100px, calc(100vw - 30px)); max-width: none; height: min(820px, calc(100vh - 30px)); max-height: none; padding: 0; overflow: hidden; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 24px 70px rgba(15, 23, 42, .28); }
.device-image-preview-dialog { width: min(1500px, calc(100vw - 18px)); height: min(960px, calc(100vh - 18px)); }
.image-preview-dialog::backdrop { background: rgba(15, 23, 42, .72); backdrop-filter: blur(2px); }
.image-preview-dialog-head, .image-preview-dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.image-preview-dialog-head { border-bottom: 1px solid var(--line); }
.image-preview-dialog-head > div { display: flex; align-items: baseline; gap: 8px; }
.image-preview-dialog-head strong { font-size: 13px; }
.image-preview-dialog-head span { color: var(--muted); font-size: 10px; }
.image-preview-dialog-head > button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; color: var(--muted); background: var(--subtle); border: 1px solid var(--line); border-radius: 50%; font-size: 20px; line-height: 1; }
.image-preview-tools { align-items: center !important; gap: 4px !important; }
.image-preview-tools button { min-width: 30px; height: 26px; padding: 0 8px; color: var(--text-2); background: var(--subtle); border: 1px solid var(--line); border-radius: 4px; font-size: 10px; font-weight: 600; }
.image-preview-tools button:hover, .image-preview-tools button.active { color: var(--blue-2); background: var(--selected); border-color: #93c5fd; }
.image-preview-tools span { min-width: 46px; text-align: center; }
.image-preview-dialog-body { position: relative; display: grid; height: calc(100% - 104px); grid-template-columns: 46px minmax(0, 1fr) 46px; align-items: center; gap: 8px; padding: 10px; background: #111827; }
.image-preview-stage { position: relative; display: grid; width: 100%; height: 100%; min-height: 0; place-items: center; overflow: hidden; color: #cbd5e1; cursor: zoom-in; touch-action: none; }
.image-preview-stage img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: center; transition: transform .12s ease; user-select: none; -webkit-user-drag: none; }
.image-preview-stage.is-actual img { width: auto; height: auto; max-width: none; max-height: none; object-fit: none; }
.image-preview-stage.is-movable { cursor: grab; }
.image-preview-stage.is-dragging { cursor: grabbing; }
.image-preview-stage.is-dragging img { transition: none; }
.image-preview-nav { display: grid; width: 42px; height: 64px; padding: 0; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; font-size: 30px; line-height: 1; }
.image-preview-nav:hover:not(:disabled) { background: rgba(255, 255, 255, .22); }
.image-preview-nav:disabled { opacity: .25; cursor: default; }
.image-preview-dialog-foot { min-height: 52px; border-top: 1px solid var(--line); }
.device-image-preview-dialog .image-preview-dialog-foot { flex-wrap: wrap; }
.device-image-preview-dialog #deviceImagePreviewMeta { flex: 1 1 220px; }
#imagePreviewMeta, #deviceImagePreviewMeta { display: flex; min-width: 0; align-items: center; gap: 12px; overflow: hidden; color: var(--muted); font-size: 9px; }
#imagePreviewMeta > *, #deviceImagePreviewMeta > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#imagePreviewMeta > strong, #deviceImagePreviewMeta > strong { color: var(--text-2); }
.memo-preview-dialog { width: min(880px, calc(100vw - 30px)); max-width: none; height: min(720px, calc(100vh - 30px)); max-height: none; padding: 0; overflow: hidden; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 24px 70px rgba(15, 23, 42, .28); }
.memo-preview-dialog::backdrop { background: rgba(15, 23, 42, .6); backdrop-filter: blur(2px); }
.memo-preview-dialog-head, .memo-preview-dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.memo-preview-dialog-head { border-bottom: 1px solid var(--line); }
.memo-preview-dialog-head > div { display: flex; min-width: 0; align-items: baseline; gap: 9px; }
.memo-preview-dialog-head strong { color: var(--text); font-size: 13px; white-space: nowrap; }
.memo-preview-dialog-head span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.memo-preview-dialog-head > button { display: grid; width: 30px; height: 30px; flex: 0 0 30px; padding: 0; place-items: center; color: var(--muted); background: var(--subtle); border: 1px solid var(--line); border-radius: 50%; font-size: 20px; line-height: 1; }
.memo-preview-dialog-content { height: calc(100% - 104px); margin: 0; padding: 16px; overflow: auto; color: var(--text); background: #fbfcfe; font-family: inherit; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.memo-preview-dialog-foot { min-height: 52px; border-top: 1px solid var(--line); }
.memo-preview-dialog-foot span { color: var(--muted); font-size: 10px; }
.mnemonic-preview-dialog-content { display: grid; height: calc(100% - 104px); align-content: start; gap: 12px; padding: 16px; overflow: auto; background: #fbfcfe; }
.mnemonic-preview-fields { display: grid; gap: 7px; }
.mnemonic-preview-fields > div { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.mnemonic-preview-fields span { color: var(--muted); font-size: 10px; }
.mnemonic-preview-fields strong { color: var(--text); font-size: 11px; overflow-wrap: anywhere; }
.mnemonic-preview-warning { margin: 0; }
.mnemonic-preview-dialog-content .sensitive-content-value { max-height: none; padding: 12px; overflow: visible; background: #fff; border: 1px solid #fecaca; border-radius: var(--radius); font-size: 12px; line-height: 1.7; user-select: text; }
#openPreviewOriginal, #openDeviceImagePreviewOriginal { flex: 0 0 auto; color: var(--blue-2); font-size: 10px; font-weight: 600; }
@media (max-width: 700px) {
    .image-preview-dialog-head { flex-wrap: wrap; }
    .image-preview-tools { order: 3; width: 100%; justify-content: center; }
    .image-preview-dialog-body { height: calc(100% - 140px); grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 4px; padding: 6px; }
    .image-preview-nav { width: 32px; }
}
.project6-confirm-content { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 12px; padding: 8px 2px 4px; }
.project6-confirm-icon { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-size: 20px; font-weight: 800; box-shadow: 0 5px 14px rgba(37, 99, 235, .2); }
.project6-confirm-icon.danger { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; box-shadow: none; }
.project6-confirm-content strong { color: var(--text); font-size: 13px; }
.project6-confirm-content p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.project6-native-confirm-backdrop { position: fixed; z-index: 5000; inset: 0; display: grid; padding: 18px; place-items: center; background: rgba(15, 23, 42, .46); opacity: 0; backdrop-filter: blur(3px); transition: opacity .14s ease; }
.project6-native-confirm-backdrop.open { opacity: 1; }
.project6-native-confirm { width: min(440px, 100%); overflow: hidden; background: var(--surface); border: 1px solid rgba(148, 163, 184, .42); border-radius: 14px; box-shadow: 0 24px 70px rgba(15, 23, 42, .28); transform: translateY(8px) scale(.985); transition: transform .14s ease; }
.project6-native-confirm-backdrop.open .project6-native-confirm { transform: translateY(0) scale(1); }
.project6-native-confirm > header { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.project6-native-confirm > header span { display: block; color: var(--blue-2); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.project6-native-confirm > header h3 { margin: 3px 0 0; color: var(--text); font-size: 16px; }
.project6-native-confirm-close { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: var(--muted); background: var(--subtle); border: 1px solid var(--line); border-radius: 8px; font-size: 20px; line-height: 1; }
.project6-native-confirm-close:hover { color: var(--text); border-color: var(--line-2); }
.project6-native-confirm-content { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 13px; padding: 20px 18px; }
.project6-native-confirm-icon { display: grid; width: 42px; height: 42px; place-items: center; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; font-size: 20px; font-weight: 800; }
.project6-native-confirm-content strong { color: var(--text); font-size: 13px; }
.project6-native-confirm-content p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.project6-native-confirm > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; background: var(--subtle); border-top: 1px solid var(--line); }
.project6-native-confirm > footer button { min-width: 86px; height: 32px; padding: 0 14px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.project6-native-confirm-cancel { color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); }
.project6-native-confirm-submit { color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.project6-native-confirm-submit:hover { background: var(--blue-2); }
.project6-native-confirm-submit.danger { background: var(--red); border-color: var(--red); }
.project6-native-confirm-submit.danger:hover { filter: brightness(.92); }
.dx-dialog .dx-popup-title { border-bottom: 1px solid var(--line); }
.dx-dialog .dx-popup-bottom { border-top: 1px solid var(--line); }
.page-pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); padding: 8px 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 10px; }
.page-pager > div { display: flex; gap: 6px; }
.page-pager a { min-height: 28px; color: var(--text-2); background: var(--subtle); border-color: var(--line); }
.page-pager a:hover { color: var(--blue-2); border-color: #93c5fd; }
.data-table-panel { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 10px; }
.data-table th { padding: 9px 10px; color: var(--text-2); background: var(--subtle); border-bottom: 1px solid var(--line); font-weight: 600; text-align: left; }
.data-table td { max-width: 320px; padding: 9px 10px; color: #4b5563; border-bottom: 1px solid #edf0f3; vertical-align: top; overflow-wrap: anywhere; }
.data-table tbody tr:hover td { background: #fbfcfd; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table a { color: var(--blue-2); } .data-table small { color: var(--faint); }
.error-cell { color: #9f4b54 !important; }
.analysis-status { display: inline-block; padding: 2px 6px; color: var(--muted); background: #f3f4f6; border-radius: 2px; font-size: 9px; font-weight: 650; }
.analysis-status.pending { color: var(--amber); background: #fffbeb; }
.analysis-status.running { color: var(--blue-2); background: var(--selected); }
.analysis-status.done { color: #047857; background: #ecfdf5; }
.page-empty, .empty-table { display: grid; min-height: 240px; place-items: center; padding: 24px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.page-empty.compact { min-height: 140px; border: 0; }
.page-empty h2 { margin: 0 0 6px; color: var(--text-2); font-size: 16px; }
.page-empty p { margin: 0 0 12px; } .page-empty a { color: var(--blue-2); font-weight: 600; }

/* Login */
.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: var(--bg); }
.login-card { width: min(380px, 100%); padding: 28px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 4px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.login-mark { width: 34px; height: 34px; margin-bottom: var(--s4); }
.login-kicker { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.login-card h1 { margin: 5px 0 6px; font-size: 20px; line-height: 1.3; }
.login-card > p { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.login-form { display: grid; gap: var(--s2); }
.login-form label { color: var(--text-2); font-size: 11px; font-weight: 600; }
.login-form input, .login-form button { height: 38px; padding: 0 10px; border-radius: var(--radius); }
.login-form input { border: 1px solid var(--line-2); outline: 0; }
.login-form input:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.login-form button { margin-top: var(--s1); color: #fff; background: var(--blue); border: 1px solid var(--blue); font-size: 11px; font-weight: 650; }
.login-form button:hover { background: var(--blue-2); }
.login-error { margin-bottom: var(--s3); padding: 8px 9px; color: var(--red); background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius); font-size: 10px; }
.login-error.validation-summary-valid { display: none; }
.login-error.pending { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.login-success { margin-bottom: var(--s3); padding: 8px 9px; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: var(--radius); font-size: 10px; }
.login-field-error { color: var(--red); font-size: 10px; }
.login-field-error:empty { display: none; }
.login-checkbox { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-weight: 500 !important; }
.login-checkbox input { width: 15px; height: 15px; padding: 0; }
.login-footer-link { margin-top: 14px; color: var(--muted); font-size: 10px; text-align: center; }
.login-footer-link a { color: var(--blue-2); font-weight: 600; }

/* Account security */
.account-security-page { display: grid; gap: var(--s3); }
.account-security-state { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 13px; font-size: 10px; font-weight: 700; }
.account-security-state.enabled { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.account-security-notice { padding: 9px 11px; border: 1px solid; border-radius: var(--radius); font-size: 11px; }
.account-security-notice.success { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.account-security-notice.error { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.tombstone-page .device-workbench { display: block; }
.tombstone-page .device-grid-pane { width: 100%; height: 100%; overflow: visible; }
.tombstone-page .account-security-notice { margin-bottom: var(--s2); }
.tombstone-reset-link { display: inline-grid; min-height: 30px; place-items: center; padding: 0 11px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 10px; font-weight: 600; }
.tombstone-dev-grid { width: 100%; height: clamp(480px, calc(100vh - 225px), 900px); min-height: 480px; overflow: hidden; background: var(--surface); border-radius: var(--radius); }
.tombstone-dev-grid .dx-datagrid { color: var(--text-2); font-size: 11px; }
.tombstone-dev-grid .dx-datagrid-headers { color: var(--text-2); background: var(--subtle); font-weight: 650; }
.tombstone-dev-grid .dx-datagrid-headers .dx-datagrid-text-content { font-size: 11px; }
.tombstone-dev-grid .dx-datagrid-rowsview .dx-row > td { padding-top: 7px; padding-bottom: 7px; vertical-align: middle; }
.tombstone-dev-grid .dx-toolbar { padding-right: 8px; padding-left: 8px; background: var(--surface); }
.tombstone-grid-summary { margin-left: 10px; color: var(--muted); font-size: 10px; font-weight: 500; white-space: nowrap; }
.tombstone-device-id, .tombstone-cell-text { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tombstone-device-id { color: var(--text); font-family: var(--mono); font-size: 10px; }
.tombstone-state-badge { display: inline-flex; padding: 3px 7px; color: var(--red); background: #fef2f2; border: 1px solid #fecaca; border-radius: 999px; font-size: 10px; }
.tombstone-remove-button { min-height: 26px; padding: 0 8px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 10px; }
.tombstone-remove-button:hover { background: var(--blue-2); }
.account-security-grid { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(420px, 1.15fr); gap: var(--s3); align-items: start; }
.account-security-card, .account-recovery-codes { min-width: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.account-security-card > header { display: flex; align-items: center; gap: 9px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.account-security-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; color: var(--blue-2); background: var(--selected); border: 1px solid #bfdbfe; border-radius: var(--radius); font-family: var(--mono); font-size: 11px; font-weight: 800; }
.account-security-card h3, .account-recovery-codes h3 { margin: 0; color: var(--text); font-size: 13px; }
.account-security-card header p, .account-recovery-codes header p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.account-security-form { display: grid; gap: 10px; margin-top: 14px; }
.account-security-form.compact { grid-template-columns: minmax(160px, 1fr) auto; align-items: end; }
.account-security-form label { display: grid; gap: 4px; color: var(--text-2); font-size: 10px; font-weight: 650; }
.account-security-form input { width: 100%; height: 34px; padding: 0 9px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; }
.account-security-form input:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.account-primary-button, .account-secondary-button, .account-danger-button { min-height: 32px; padding: 0 11px; border: 1px solid; border-radius: var(--radius); font-size: 10px; font-weight: 650; }
.account-primary-button { color: #fff; background: var(--blue); border-color: var(--blue); }
.account-primary-button:hover { background: var(--blue-2); }
.account-secondary-button { color: var(--text-2); background: var(--surface); border-color: var(--line-2); }
.account-secondary-button:hover { color: var(--blue-2); border-color: var(--blue); }
.account-danger-button { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.account-authenticator-setup { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 14px; }
.account-qr-code { display: grid; width: 196px; height: 196px; place-items: center; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.account-qr-code img { display: block; width: 196px; height: 196px; image-rendering: pixelated; }
.account-authenticator-setup ol { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--text-2); font-size: 11px; line-height: 1.55; }
.account-shared-key { display: grid; gap: 4px; margin-top: 12px; padding: 9px; background: var(--subtle); border: 1px solid var(--line); }
.account-shared-key span { color: var(--muted); font-size: 9px; font-weight: 650; }
.account-shared-key code { overflow-wrap: anywhere; color: var(--text); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; }
.account-inline-reset { margin-top: 8px; text-align: right; }
.account-inline-reset button { padding: 0; color: var(--blue-2); background: transparent; border: 0; font-size: 9px; }
.account-authenticator-enabled { display: grid; gap: 6px; margin-top: 14px; padding: 12px; color: var(--text-2); background: #ecfdf5; border: 1px solid #a7f3d0; font-size: 10px; }
.account-authenticator-enabled strong { color: #047857; font-size: 12px; }
.account-security-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.account-security-actions form { margin: 0; }
.account-recovery-codes header { margin-bottom: 12px; }
.account-recovery-code-grid { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 7px; }
.account-recovery-code-grid code { padding: 8px; color: var(--text); background: var(--subtle); border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; text-align: center; user-select: all; }

/* User management */
.user-management-page { display: grid; gap: var(--s3); }
.user-management-refresh { display: inline-grid; min-height: 30px; place-items: center; padding: 0 11px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 10px; font-weight: 650; }
.user-management-refresh:hover { background: var(--blue-2); }
.user-create-panel { display: grid; grid-template-columns: minmax(220px, .55fr) minmax(520px, 1.45fr); align-items: end; gap: 18px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.user-create-panel h3 { margin: 0; color: var(--text); font-size: 13px; }
.user-create-panel p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.user-create-panel form { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(150px, .8fr) auto; align-items: end; gap: 8px; }
.user-create-panel label { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.user-create-panel input, .user-create-panel select, .user-role-form select { width: 100%; min-width: 0; height: 30px; padding: 0 8px; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; }
.user-create-panel input:focus, .user-create-panel select:focus, .user-role-form select:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.user-create-panel button { height: 30px; padding: 0 12px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 10px; font-weight: 700; white-space: nowrap; }
.user-management-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.user-management-summary article { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.user-management-summary span { color: var(--muted); font-size: 10px; }
.user-management-summary strong { color: var(--text); font-family: var(--mono); font-size: 20px; }
.user-management-summary article.online { border-color: #a7f3d0; }
.user-management-summary article.online strong { color: #047857; }
.user-management-summary article.pending { border-color: #fde68a; }
.user-management-summary article.pending strong { color: #92400e; }
.user-management-summary article.locked { border-color: #fecaca; }
.user-management-summary article.locked strong { color: var(--red); }
.user-management-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.user-management-table { width: 100%; min-width: 1220px; border-collapse: collapse; table-layout: fixed; }
.user-management-table th { padding: 8px 9px; color: var(--muted); background: var(--subtle); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; text-align: left; }
.user-management-table th:nth-child(1) { width: 150px; }
.user-management-table th:nth-child(2) { width: 105px; }
.user-management-table th:nth-child(3) { width: 225px; }
.user-management-table th:nth-child(4) { width: 85px; }
.user-management-table th:nth-child(5) { width: 115px; }
.user-management-table th:nth-child(7) { width: 260px; }
.user-management-table td { padding: 9px; border-bottom: 1px solid #eef0f3; color: var(--text-2); font-size: 10px; vertical-align: middle; }
.user-management-table tbody tr:last-child td { border-bottom: 0; }
.user-management-table tbody tr.online { background: #fcfffd; }
.user-management-identity { display: flex; min-width: 0; align-items: center; gap: 8px; }
.user-management-identity > span { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; color: var(--blue-2); background: var(--selected); border: 1px solid #bfdbfe; border-radius: 50%; font-size: 10px; font-weight: 800; }
.user-management-identity > div, .user-management-stack { display: grid; min-width: 0; gap: 2px; }
.user-management-identity strong, .user-management-stack strong { overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.user-management-identity small, .user-management-stack small { overflow: hidden; color: var(--faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.user-management-stack.client small { max-width: 210px; }
.user-role-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; margin-top: 4px; }
.user-role-form button { min-height: 27px; padding: 0 7px; color: var(--blue-2); background: #fff; border: 1px solid #bfdbfe; border-radius: var(--radius); font-size: 9px; font-weight: 650; white-space: nowrap; }
.user-status-badge { display: inline-flex; min-height: 20px; align-items: center; padding: 1px 6px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #f3f4f6; font-size: 9px; font-weight: 700; white-space: nowrap; }
.user-status-badge.online, .user-status-badge.approved { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.user-status-badge.offline, .user-status-badge.neutral { color: var(--muted); background: #f3f4f6; border-color: var(--line); }
.user-status-badge.pending { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.user-status-badge.locked { margin-left: 3px; color: var(--red); background: #fef2f2; border-color: #fecaca; }
.user-management-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.user-management-actions form { margin: 0; }
.user-reset-password-form { display: grid; min-width: 0; flex: 1 1 100%; grid-template-columns: minmax(100px, 1fr) auto; gap: 4px; }
.user-reset-password-form input[name="newPassword"] { width: 100%; min-width: 0; height: 25px; padding: 0 7px; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; font-size: 9px; }
.user-reset-password-form input[name="newPassword"]:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.user-management-actions button { min-height: 25px; padding: 0 7px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 9px; font-weight: 650; white-space: nowrap; }
.user-management-actions button:hover:not(:disabled) { color: var(--blue-2); border-color: var(--blue); }
.user-management-actions button.approve { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.user-management-actions button.suspend { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.user-management-actions button.reset-password { color: #fff; background: var(--blue); border-color: var(--blue); }
.user-management-actions button.reset-password:hover:not(:disabled) { color: #fff; background: var(--blue-2); }
.user-management-actions button.kick { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.user-management-actions button.delete { color: #fff; background: #b91c1c; border-color: #991b1b; }
.user-management-actions button.delete:hover:not(:disabled) { color: #fff; background: #991b1b; border-color: #7f1d1d; }

/* Agent role and permission management */
.role-management-page { display: grid; width: 100%; max-width: 1500px; margin: 0 auto; gap: var(--s3); }
.role-create-panel { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: end; gap: 18px; padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.role-create-panel h3 { margin: 0; color: var(--text); font-size: 13px; }
.role-create-panel p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.role-create-panel form { display: flex; align-items: end; gap: 7px; }
.role-create-panel label { display: grid; min-width: 240px; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.role-create-panel input { height: 32px; padding: 0 9px; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; }
.role-create-panel input:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.role-create-panel button, .role-permission-form footer button { height: 32px; padding: 0 13px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 10px; font-weight: 700; white-space: nowrap; }
.role-card-list { display: grid; gap: var(--s2); }
.role-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.role-card.admin { border-color: #bfdbfe; box-shadow: inset 3px 0 0 var(--blue); }
.role-card > header { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; background: var(--subtle); border-bottom: 1px solid var(--line); }
.role-card-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.role-card h3 { margin: 0; color: var(--text); font-size: 14px; }
.role-card header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.role-kind-badge { display: inline-flex; min-height: 21px; align-items: center; padding: 0 7px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 11px; font-size: 9px; font-weight: 700; }
.role-kind-badge.admin { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.role-kind-badge.custom { color: #6d28d9; background: #f5f3ff; border-color: #ddd6fe; }
.role-delete-button { min-height: 28px; padding: 0 9px; color: var(--red); background: #fff; border: 1px solid #fecaca; border-radius: var(--radius); font-size: 9px; font-weight: 700; }
.role-permission-form { display: grid; }
.role-permission-group { padding: 13px; }
.role-permission-group-title { display: flex; align-items: baseline; gap: 9px; margin-bottom: 9px; }
.role-permission-group-title strong { color: var(--text); font-size: 11px; }
.role-permission-group-title span { color: var(--muted); font-size: 9px; }
.role-permission-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 7px; }
.role-permission-option { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.role-permission-option:has(input:checked) { background: #f8fbff; border-color: #bfdbfe; }
.role-permission-option input { width: 14px; height: 14px; margin-top: 2px; accent-color: var(--blue); }
.role-permission-option span { display: grid; gap: 2px; }
.role-permission-option strong { color: var(--text-2); font-size: 10px; }
.role-permission-option small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.role-permission-form footer { display: flex; min-height: 51px; align-items: center; justify-content: flex-end; gap: 12px; padding: 9px 13px; color: var(--muted); background: var(--subtle); border-top: 1px solid var(--line); font-size: 9px; }

/* SMS task management */
.sms-task-page { display: grid; width: 100%; max-width: 1720px; margin: 0 auto; gap: 9px; }
.sms-task-warning { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; color: #78350f; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); }
.sms-task-warning-mark { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; color: #fff; background: var(--amber); border-radius: 50%; font-size: 11px; font-weight: 800; }
.sms-task-warning strong { display: block; font-size: 11px; }
.sms-task-warning p { margin: 2px 0 0; color: #92400e; font-size: 10px; }
.sms-feature-disabled-banner { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-left: 3px solid #dc2626; border-radius: var(--radius); }
.sms-feature-disabled-icon { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; color: #fff; background: #dc2626; border-radius: 50%; font-size: 15px; font-weight: 800; line-height: 1; }
.sms-feature-disabled-banner strong { display: block; font-size: 11px; }
.sms-feature-disabled-banner p { margin: 2px 0 0; color: #b91c1c; font-size: 10px; }
.sms-task-create-tab:disabled { color: var(--faint); background: transparent; box-shadow: none; }
.sms-task-create-tab-panel[aria-disabled="true"] { opacity: .55; }
.sms-task-create-panel, .sms-task-list-panel, .sms-device-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sms-task-create-panel { padding: 10px; }
.sms-task-workspace { padding: 0; overflow: hidden; }
.sms-task-workspace .sms-task-create-heading { padding: 10px; }
.sms-task-workspace .sms-task-single-panel { padding: 0 10px 10px; }
.sms-task-workspace .sms-task-batch-panel, .sms-task-workspace .sms-task-filter-queue-panel, .sms-task-workspace .sms-task-records-panel { padding: 10px; }
.sms-task-workspace .sms-device-panel, .sms-task-workspace .sms-task-list-panel { border: 0; }
.sms-task-workspace .sms-task-batch-form { margin-top: 0; padding: 9px 10px 10px; background: #f8fbff; border-top: 1px solid #dbeafe; }
.sms-task-list-panel { display: flex; min-height: 460px; flex-direction: column; overflow: hidden; }
.sms-device-panel { overflow: hidden; }
.sms-task-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sms-task-section-head h2 { margin: 0; color: var(--text); font-size: 13px; line-height: 1.3; }
.sms-task-section-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.sms-task-inline-state { color: var(--muted); font-size: 10px; }
.sms-task-create-heading { display: flex; align-items: center; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.sms-task-create-heading h2 { margin: 0; color: var(--text); font-size: 13px; }
.sms-task-create-tabs { display: inline-flex; gap: 3px; padding: 3px; background: var(--subtle); border: 1px solid var(--line); border-radius: 5px; }
.sms-task-create-tab { min-height: 28px; padding: 0 12px; color: var(--muted); background: transparent; border: 0; border-radius: 3px; font-size: 10px; font-weight: 650; }
.sms-task-create-tab:hover { color: var(--text-2); }
.sms-task-create-tab.active { color: var(--blue-2); background: var(--surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.sms-task-create-tab-panel[hidden] { display: none; }
.sms-task-create-description { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.sms-task-create-description p { margin: 0; }
.sms-task-create-form { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(180px, .65fr) minmax(300px, 1.4fr) auto; align-items: end; gap: 8px; margin-top: 9px; }
.sms-task-create-form label, .sms-task-filters label { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sms-task-content-field > span { display: flex; justify-content: space-between; gap: 8px; }
.sms-task-content-field small { color: var(--faint); font-size: 9px; font-weight: 500; }
.sms-task-content-field textarea { width: 100%; min-height: 54px; padding: 7px 8px; resize: vertical; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; line-height: 1.4; }
.sms-task-content-field textarea:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.sms-task-primary, .sms-task-secondary, .sms-task-danger-button { min-height: 30px; padding: 0 11px; border-radius: var(--radius); font-size: 10px; font-weight: 650; white-space: nowrap; }
.sms-task-primary { min-height: 54px; color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.sms-task-primary:hover { background: var(--blue-2); border-color: var(--blue-2); }
.sms-task-secondary { color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); }
.sms-task-secondary:hover { color: var(--blue-2); border-color: var(--blue); }
.sms-task-danger-button { color: var(--red); background: #fff; border: 1px solid #fecaca; }
.sms-task-danger-button:hover:not(:disabled) { background: #fef2f2; border-color: #f87171; }
.sms-task-list-head { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.sms-task-head-actions { display: flex; align-items: center; gap: 6px; }
.sms-received-head-actions { display: flex; align-items: center; gap: 6px; }
.sms-task-filters { display: grid; grid-template-columns: minmax(170px, .9fr) minmax(145px, .7fr) minmax(135px, .6fr) minmax(170px, 1fr) minmax(125px, .55fr) minmax(125px, .55fr) minmax(105px, .45fr) auto; align-items: end; gap: 7px; padding: 8px 10px; background: var(--subtle); border-bottom: 1px solid var(--line); }
.sms-received-filters { grid-template-columns: minmax(150px, .8fr) minmax(140px, .65fr) minmax(180px, 1fr) minmax(135px, .6fr) minmax(135px, .6fr) auto; }
.sms-device-filters { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(135px, .65fr) minmax(135px, .65fr) auto auto; align-items: end; gap: 8px; padding: 8px 10px; background: var(--subtle); border-bottom: 1px solid var(--line); }
.sms-device-filters > label:first-child { display: grid; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sms-device-online-filter { display: inline-flex; min-height: 30px; align-items: center; gap: 5px; color: var(--text-2); font-size: 10px; white-space: nowrap; }
.sms-device-online-filter input { width: 13px; height: 13px; accent-color: var(--blue); }
.sms-task-notice { margin: 7px 10px 0; padding: 7px 9px; border: 1px solid #bfdbfe; border-radius: var(--radius); color: var(--blue-2); background: var(--selected); font-size: 10px; }
.sms-task-notice[hidden] { display: none; }
.sms-task-notice.success { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.sms-task-notice.warning { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.sms-task-notice.error { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.sms-task-table-scroll { min-height: 0; flex: 1; overflow: auto; }
.sms-device-table-scroll { max-height: 310px; overflow: auto; }
.sms-task-table { width: 100%; min-width: 1630px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 10px; }
.sms-received-table { min-width: 1060px; }
.sms-device-table { width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 10px; }
.sms-task-table th { position: sticky; z-index: 1; top: 0; height: 32px; padding: 0 7px; color: var(--muted); background: #fafafa; border-bottom: 1px solid var(--line); font-weight: 650; text-align: left; white-space: nowrap; }
.sms-device-table th { position: sticky; z-index: 1; top: 0; height: 32px; padding: 0 7px; color: var(--muted); background: #fafafa; border-bottom: 1px solid var(--line); font-weight: 650; text-align: left; white-space: nowrap; }
.sms-task-table td { height: 51px; padding: 6px 7px; vertical-align: middle; border-bottom: 1px solid #eef0f3; color: var(--text-2); }
.sms-device-table td { height: 46px; padding: 5px 7px; vertical-align: middle; border-bottom: 1px solid #eef0f3; color: var(--text-2); }
.sms-task-table tbody tr:hover td { background: #fafcff; }
.sms-device-table tbody tr:hover td { background: #fafcff; }
.sms-task-table th:nth-child(1), .sms-task-table td:nth-child(1) { width: 36px; }
.sms-task-table th:nth-child(2), .sms-task-table td:nth-child(2) { width: 78px; }
.sms-task-table th:nth-child(3), .sms-task-table td:nth-child(3) { width: 225px; }
.sms-task-table th:nth-child(4), .sms-task-table td:nth-child(4) { width: 170px; }
.sms-task-table th:nth-child(5), .sms-task-table td:nth-child(5) { width: 220px; }
.sms-task-table th:nth-child(6), .sms-task-table td:nth-child(6) { width: 145px; }
.sms-task-table th:nth-child(7), .sms-task-table td:nth-child(7) { width: 285px; }
.sms-task-table th:nth-child(8), .sms-task-table td:nth-child(8) { width: 54px; text-align: center; }
.sms-task-table th:nth-child(9), .sms-task-table td:nth-child(9) { width: 148px; }
.sms-task-table th:nth-child(10), .sms-task-table td:nth-child(10) { width: 175px; }
.sms-task-table th:nth-child(11), .sms-task-table td:nth-child(11) { width: 112px; }
.sms-received-table th:nth-child(1), .sms-received-table td:nth-child(1) { width: 230px; }
.sms-received-table th:nth-child(2), .sms-received-table td:nth-child(2) { width: 170px; }
.sms-received-table th:nth-child(3), .sms-received-table td:nth-child(3), .sms-received-table th:nth-child(4), .sms-received-table td:nth-child(4) { width: 145px; }
.sms-received-table th:nth-child(5), .sms-received-table td:nth-child(5) { width: 300px; }
.sms-received-table th:nth-child(6), .sms-received-table td:nth-child(6) { width: 155px; }
.sms-received-table th:nth-child(7), .sms-received-table td:nth-child(7) { width: 90px; text-align: center; }
.sms-received-page[data-can-delete="true"] .sms-received-table { min-width: 1100px; }
.sms-received-page[data-can-delete="true"] .sms-received-table th:nth-child(1), .sms-received-page[data-can-delete="true"] .sms-received-table td:nth-child(1) { width: 36px; text-align: center; }
.sms-received-page[data-can-delete="true"] .sms-received-table th:nth-child(2), .sms-received-page[data-can-delete="true"] .sms-received-table td:nth-child(2) { width: 230px; }
.sms-received-page[data-can-delete="true"] .sms-received-table th:nth-child(3), .sms-received-page[data-can-delete="true"] .sms-received-table td:nth-child(3) { width: 170px; }
.sms-received-page[data-can-delete="true"] .sms-received-table th:nth-child(4), .sms-received-page[data-can-delete="true"] .sms-received-table td:nth-child(4), .sms-received-page[data-can-delete="true"] .sms-received-table th:nth-child(5), .sms-received-page[data-can-delete="true"] .sms-received-table td:nth-child(5) { width: 145px; }
.sms-received-page[data-can-delete="true"] .sms-received-table th:nth-child(6), .sms-received-page[data-can-delete="true"] .sms-received-table td:nth-child(6) { width: 300px; }
.sms-received-page[data-can-delete="true"] .sms-received-table th:nth-child(7), .sms-received-page[data-can-delete="true"] .sms-received-table td:nth-child(7) { width: 155px; text-align: left; }
.sms-received-page[data-can-delete="true"] .sms-received-table th:nth-child(8), .sms-received-page[data-can-delete="true"] .sms-received-table td:nth-child(8) { width: 90px; text-align: center; }
.sms-device-table th:nth-child(1), .sms-device-table td:nth-child(1) { width: 36px; }
.sms-device-table th:nth-child(2), .sms-device-table td:nth-child(2) { width: 88px; }
.sms-device-table th:nth-child(3), .sms-device-table td:nth-child(3) { width: 255px; }
.sms-device-table th:nth-child(4), .sms-device-table td:nth-child(4) { width: 170px; }
.sms-device-table th:nth-child(5), .sms-device-table td:nth-child(5) { width: 145px; }
.sms-device-table th:nth-child(6), .sms-device-table td:nth-child(6) { width: 125px; }
.sms-device-table th:nth-child(7), .sms-device-table td:nth-child(7) { width: 160px; }
.sms-device-table th:nth-child(8), .sms-device-table td:nth-child(8) { width: 85px; text-align: center; }
.sms-task-check-cell { text-align: center !important; }
.sms-task-check-cell input { width: 13px; height: 13px; margin: 0; accent-color: var(--blue); }
.sms-received-check-cell { text-align: center !important; }
.sms-received-check-cell input, #smsReceivedSelectAll { width: 13px; height: 13px; margin: 0; accent-color: var(--blue); }
.sms-task-protected-mark { display: inline-grid; width: 18px; height: 18px; place-items: center; color: var(--muted); background: #f1f5f9; border: 1px solid var(--line-2); border-radius: 50%; font-size: 7px; font-weight: 700; cursor: help; }
.sms-task-status { display: inline-flex; min-height: 21px; align-items: center; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 11px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.sms-task-status-pending { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.sms-task-status-running { color: #1e40af; background: #eff6ff; border-color: #bfdbfe; }
.sms-task-status-sent { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.sms-task-status-failed { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.sms-task-table td.sms-task-device-cell, .sms-task-table td.sms-task-result-cell, .sms-task-table td.sms-task-channel-cell, .sms-task-table td.sms-task-campaign-cell { display: table-cell; min-width: 0; }
.sms-task-device-cell strong, .sms-task-device-cell small, .sms-task-result-cell strong, .sms-task-result-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-task-device-cell strong { color: var(--text); font-size: 10px; }
.sms-task-device-cell small, .sms-task-result-cell small { margin-top: 2px; color: var(--faint); font-size: 9px; }
.sms-task-channel-cell strong, .sms-task-channel-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-task-channel-cell strong { color: var(--text-2); font-size: 9px; }
.sms-task-channel-cell small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.sms-task-campaign-cell strong, .sms-task-campaign-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-task-campaign-cell strong { color: var(--text-2); font-size: 9px; }
.sms-task-campaign-cell small { margin-top: 2px; color: var(--faint); font-size: 8px; }
.sms-task-device-state { width: max-content; color: var(--muted); font-size: 8px; }
.sms-task-device-state::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 4px; background: var(--faint); border-radius: 50%; vertical-align: 1px; }
.sms-task-device-state.online { color: var(--green); }
.sms-task-device-state.online::before { background: var(--green); }
.sms-task-content-cell { overflow: hidden; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.sms-received-content-cell { max-width: 300px; overflow: hidden; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.sms-received-confirm-cell { text-align: center; }
.sms-received-confirm { display: inline-flex; min-height: 21px; align-items: center; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 11px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.sms-received-confirm.confirmed { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.sms-received-confirm.pending { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.sms-task-result-cell strong { font-size: 9px; }
.sms-task-result-cell .success { color: var(--green); }
.sms-task-result-cell .failed { color: var(--red); }
.sms-task-result-cell .running { color: var(--blue-2); }
.sms-task-result-cell .pending { color: var(--amber); }
.sms-task-action-cell { white-space: nowrap; }
.sms-task-row-action { min-height: 24px; margin-right: 4px; padding: 0 7px; color: var(--blue-2); background: #fff; border: 1px solid #bfdbfe; border-radius: var(--radius); font-size: 9px; }
.sms-task-row-action:hover { background: var(--selected); border-color: var(--blue); }
.sms-task-row-action.danger { color: var(--red); border-color: #fecaca; }
.sms-task-row-action.danger:hover { background: #fef2f2; border-color: #f87171; }
.sms-task-row-failed td:first-child { box-shadow: inset 2px 0 0 #fca5a5; }
.sms-task-row-pending td:first-child { box-shadow: inset 2px 0 0 #fcd34d; }
.sms-task-pager { display: flex; min-height: 38px; align-items: center; justify-content: flex-end; gap: 7px; padding: 5px 9px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.sms-device-pager { display: flex; min-height: 34px; align-items: center; justify-content: flex-end; gap: 7px; padding: 4px 9px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.sms-task-pager button, .sms-task-pager select, .sms-device-pager button, .sms-device-pager select { height: 26px; padding: 0 8px; color: var(--text-2); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); }
.sms-task-pager button:hover:not(:disabled), .sms-device-pager button:hover:not(:disabled) { color: var(--blue-2); border-color: var(--blue); }
.sms-task-pager label, .sms-device-pager label { display: inline-flex; align-items: center; gap: 5px; }
.sms-task-batch-form { display: grid; grid-template-columns: minmax(175px, .55fr) minmax(190px, .65fr) minmax(320px, 1.4fr) auto; align-items: end; gap: 8px; margin-top: 8px; }
.sms-task-batch-form > label { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sms-task-batch-selection { display: grid; align-content: center; gap: 2px; min-height: 54px; }
.sms-task-batch-selection strong { color: var(--blue-2); font-size: 12px; }
.sms-task-batch-selection span { color: var(--muted); font-size: 9px; }
.sms-task-batch-selection button { width: max-content; padding: 0; color: var(--blue-2); background: transparent; border: 0; font-size: 9px; }
.sms-task-batch-selection button:disabled { color: var(--faint); }
.sms-task-filter-queue-form { display: grid; gap: 9px; margin-top: 9px; }
.sms-task-filter-queue-filters { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(210px, 1.25fr) minmax(150px, .8fr) minmax(130px, .7fr); align-items: end; gap: 8px; padding: 9px 10px; background: #f8fbff; border: 1px solid #dbeafe; border-radius: var(--radius); }
.sms-task-filter-queue-filters label { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sms-task-filter-queue-filters input, .sms-task-filter-queue-filters select, .sms-task-filter-queue-form > label > input { width: 100%; min-width: 0; height: 32px; padding: 0 8px; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; font-size: 10px; }
.sms-task-filter-queue-filters input:focus, .sms-task-filter-queue-filters select:focus, .sms-task-filter-queue-form > label > input:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.sms-task-filter-check { display: flex !important; min-height: 32px; align-items: center; grid-template-columns: auto 1fr; gap: 6px !important; white-space: nowrap; }
.sms-task-filter-check input { width: 14px; height: 14px; accent-color: var(--blue); }
.sms-task-filter-hint { color: var(--faint); font-size: 9px; line-height: 1.45; }
.sms-task-filter-queue-form > label { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sms-task-filter-queue-form > .sms-task-content-field { min-width: 0; }
.sms-task-filter-queue-form > button { justify-self: end; min-width: 170px; min-height: 36px; }
.sms-dynamic-queue-form > label textarea { width: 100%; min-width: 0; min-height: 72px; padding: 7px 8px; resize: vertical; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; font: inherit; line-height: 1.4; }
.sms-dynamic-queue-form > label textarea:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.sms-dynamic-queue-form > label:nth-last-of-type(2) textarea { min-height: 58px; }
.sms-task-filter-queue-filters.sms-campaign-filter-grid { grid-template-columns: repeat(4, minmax(145px, 1fr)); }
.sms-campaign-filter-grid label > small { color: var(--faint); font-size: 8px; font-weight: 500; }
.sms-campaign-target-grid { display: grid; grid-template-columns: minmax(320px, 1.45fr) minmax(250px, .75fr); gap: 9px; }
.sms-campaign-device-ids-field { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sms-campaign-device-ids-field > span, .sms-campaign-multiple-fields label > span { display: flex; justify-content: space-between; gap: 8px; }
.sms-campaign-device-ids-field small, .sms-campaign-multiple-fields label > span small { color: var(--faint); font-size: 9px; font-weight: 500; }
.sms-campaign-device-ids-field textarea, .sms-campaign-multiple-fields textarea { width: 100%; min-width: 0; min-height: 72px; padding: 7px 8px; resize: vertical; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; font: inherit; line-height: 1.4; }
.sms-campaign-device-ids-field textarea:focus, .sms-campaign-multiple-fields textarea:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.sms-campaign-target-options { display: grid; align-content: center; gap: 7px; padding: 10px 12px; color: var(--muted); background: #f8fbff; border: 1px solid #dbeafe; border-radius: var(--radius); }
.sms-campaign-target-options small { font-size: 9px; line-height: 1.45; }
.sms-campaign-message-fieldset { min-width: 0; margin: 0; padding: 10px; background: #fbfcfe; border: 1px solid var(--line); border-radius: var(--radius); }
.sms-campaign-message-fieldset legend { padding: 0 5px; color: var(--text-2); font-size: 10px; font-weight: 700; }
.sms-campaign-message-options { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 8px; margin-bottom: 9px; }
.sms-campaign-message-options > label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; padding: 9px 10px; color: var(--text-2); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; }
.sms-campaign-message-options > label:has(input:checked) { background: #f8fbff; border-color: #93c5fd; box-shadow: inset 2px 0 0 var(--blue); }
.sms-campaign-message-options input { width: 14px; height: 14px; margin: 2px 0 0; accent-color: var(--blue); }
.sms-campaign-message-options span { display: grid; gap: 2px; }
.sms-campaign-message-options strong { color: var(--text); font-size: 10px; }
.sms-campaign-message-options small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.sms-campaign-message-fields { display: grid; grid-template-columns: minmax(190px, .65fr) minmax(320px, 1.35fr); align-items: end; gap: 8px; }
.sms-campaign-message-fields > label, .sms-campaign-multiple-fields > label { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sms-campaign-message-fields > label > input { width: 100%; min-width: 0; height: 32px; padding: 0 8px; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; }
.sms-campaign-message-fields > label > input:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.sms-campaign-multiple-fields { display: grid; gap: 4px; }
.sms-campaign-multiple-fields > small { color: var(--faint); font-size: 9px; line-height: 1.45; }
.sms-campaign-message-fields[hidden], .sms-campaign-multiple-fields[hidden] { display: none; }
.sms-campaign-preview-result { display: grid; gap: 7px; padding: 9px 10px; color: var(--text-2); background: #f8fbff; border: 1px solid #bfdbfe; border-radius: var(--radius); font-size: 9px; }
.sms-campaign-preview-result[hidden] { display: none; }
.sms-campaign-preview-result .error { color: var(--red); }
.sms-campaign-preview-result .stale { color: var(--amber); }
.sms-campaign-preview-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sms-campaign-preview-heading strong { color: var(--blue-2); font-size: 11px; }
.sms-campaign-preview-heading small { color: var(--muted); font-size: 9px; }
.sms-campaign-preview-result ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0; padding: 0; list-style: none; }
.sms-campaign-preview-result li { overflow: hidden; padding: 5px 7px; color: var(--text-2); background: #fff; border: 1px solid var(--line); border-radius: 3px; text-overflow: ellipsis; white-space: nowrap; }
.sms-campaign-form-actions { display: flex; justify-content: flex-end; gap: 7px; }
.sms-campaign-form-actions .sms-task-primary, .sms-campaign-form-actions .sms-task-secondary { min-width: 150px; min-height: 36px; }
.sms-campaign-progress-panel .sms-task-list-panel { min-height: 420px; }
.sms-campaign-table { min-width: 1432px; }
.sms-campaign-table th:nth-child(1), .sms-campaign-table td:nth-child(1) { width: 190px; }
.sms-campaign-table th:nth-child(2), .sms-campaign-table td:nth-child(2) { width: 86px; }
.sms-campaign-table th:nth-child(3), .sms-campaign-table td:nth-child(3) { width: 260px; }
.sms-campaign-table th:nth-child(4), .sms-campaign-table td:nth-child(4) { width: 82px; text-align: center; }
.sms-campaign-table th:nth-child(5), .sms-campaign-table td:nth-child(5) { width: 78px; text-align: center; }
.sms-campaign-table th:nth-child(6), .sms-campaign-table td:nth-child(6) { width: 72px; text-align: center; }
.sms-campaign-table th:nth-child(7), .sms-campaign-table td:nth-child(7) { width: 76px; text-align: center; }
.sms-campaign-table th:nth-child(8), .sms-campaign-table td:nth-child(8) { width: 72px; text-align: center; }
.sms-campaign-table th:nth-child(9), .sms-campaign-table td:nth-child(9) { width: 72px; text-align: center; }
.sms-campaign-table th:nth-child(10), .sms-campaign-table td:nth-child(10) { width: 135px; }
.sms-campaign-table th:nth-child(11), .sms-campaign-table td:nth-child(11) { width: 166px; }
.sms-campaign-table th:nth-child(12), .sms-campaign-table td:nth-child(12) { width: 132px; }
.sms-campaign-name-cell strong, .sms-campaign-name-cell small, .sms-campaign-time-cell strong, .sms-campaign-time-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-campaign-name-cell strong { color: var(--text); font-size: 10px; }
.sms-campaign-name-cell small, .sms-campaign-time-cell small { margin-top: 2px; color: var(--faint); font-size: 8px; }
.sms-campaign-time-cell strong { color: var(--text-2); font-size: 9px; font-weight: 600; }
.sms-campaign-filter-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-campaign-count-cell { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 650; }
.sms-campaign-count-cell.success { color: var(--green); }
.sms-campaign-count-cell.failed { color: var(--red); }
.sms-campaign-progress-layout { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 6px; }
.sms-campaign-progress-layout progress { width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 4px; accent-color: var(--blue); }
.sms-campaign-progress-layout small { color: var(--muted); font-size: 8px; text-align: right; }
.sms-campaign-status-pending { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.sms-campaign-status-running { color: #1e40af; background: #eff6ff; border-color: #bfdbfe; }
.sms-campaign-status-completed { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.sms-campaign-status-expired { color: #78350f; background: #fffbeb; border-color: #fcd34d; }
.sms-campaign-status-stopped, .sms-campaign-status-failed { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.sms-campaign-status-unknown { color: var(--muted); background: #f8fafc; border-color: var(--line-2); }
.sms-task-mode { display: block; margin-top: 2px; color: var(--faint); font-size: 8px; }
.sms-task-mode.queue { color: var(--blue-2); }
.sms-task-mode.dynamic { color: #7c3aed; }

@media (max-width: 1100px) {
    .account-security-grid { grid-template-columns: 1fr; }
    .account-recovery-code-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
    .device-workbench { height: auto; grid-template-columns: minmax(0, 1fr); }
    .device-pane-resizer { display: none; }
    .device-grid-pane { overflow: visible; }
    .native-device-grid { height: min(620px, calc(100vh - 150px)); min-height: 480px; flex: none; }
    .device-detail-panel { min-height: 460px; overflow: visible; }
    .whatsapp-page .device-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .whatsapp-page .device-filter-row .wide { grid-column: span 2; }
    .sms-task-create-form { grid-template-columns: 1fr 1fr; }
    .sms-task-filter-queue-filters { grid-template-columns: 1fr 1fr; }
    .sms-task-filter-queue-filters.sms-campaign-filter-grid { grid-template-columns: 1fr 1fr; }
    .sms-campaign-target-grid, .sms-campaign-message-fields { grid-template-columns: 1fr; }
    .sms-campaign-preview-result ul { grid-template-columns: 1fr 1fr; }
    .sms-task-filter-check { grid-column: 1 / -1; }
    .sms-task-batch-form { grid-template-columns: 1fr 1fr; }
    .sms-task-batch-selection { grid-column: 1 / -1; min-height: auto; }
    .sms-task-content-field { grid-column: 1 / -1; }
    .sms-task-primary { min-height: 34px; }
    .sms-task-filters { grid-template-columns: 1fr 1fr; }
    .sms-device-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .user-management-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-shell { grid-template-columns: 58px minmax(0, 1fr); }
    .app-sidebar { padding-inline: 7px; }
    .app-brand, .app-nav-link, .app-logout, .app-user-card { justify-content: center; padding-inline: 0; }
    .app-brand-copy, .app-nav-label, .app-nav-link > span, .app-nav-group-toggle > span, .app-user-copy, .app-logout > span { display: none; }
    .app-nav-group-toggle { min-height: 30px; justify-content: center; padding: 0; }
    .app-main-content { padding: var(--s2); }
    .app-topbar { padding-inline: 10px; }
    .page-toolbar { align-items: stretch; flex-direction: column; }
    .page-toolbar form { display: grid; grid-template-columns: 1fr 1fr; }
    .page-toolbar label:first-child { grid-column: 1 / -1; }
    .page-toolbar input, .page-toolbar select { width: 100%; min-width: 0; }
    .device-filter-status-row { grid-template-columns: 1fr 1fr; }
    .device-filter-main-row { grid-template-columns: 1fr 1fr; }
    .device-filter-main-row .device-filter-search-field { grid-column: 1 / -1; }
    .device-filter-date-range { grid-template-columns: 1fr 1fr auto; }
    .whatsapp-page .device-filter-row { grid-template-columns: 1fr 1fr; }
    .whatsapp-page .device-filter-row .wide { grid-column: 1 / -1; }
    .management-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .management-stat-group { grid-template-columns: 82px minmax(0, 1fr); }
    .management-stat-row.columns-3, .management-stat-row.columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .management-trend-head { flex-wrap: wrap; }
    .management-trend-legend { width: 100%; justify-content: flex-start; }
    .device-filter-clear { width: 100%; }
    .service-status-grid { grid-template-columns: 1fr; }
    .status-toolbar { align-items: stretch; }
    .status-toolbar-actions { justify-content: space-between; }
    .system-settings-updated { justify-items: start; }
    .detail-head-side { justify-items: start; }
    .detail-head-actions, .detail-head-flags { justify-content: flex-start; }
    .detail-log-toolbar { align-items: stretch; flex-wrap: wrap; }
    .detail-log-toolbar .detail-summary-line { flex: 1 1 100%; }
    .detail-log-toolbar > .row-action-chip { flex: 1 1 100%; }
    .detail-log-pager { flex-wrap: wrap; justify-content: center; }
    .sensitive-content-notice { grid-template-columns: 1fr; }
    .sms-task-section-head { align-items: flex-start; }
    .sms-task-list-head { flex-direction: column; }
    .sms-task-head-actions { width: 100%; }
    .sms-task-head-actions button { flex: 1; }
    .sms-received-head-actions { width: 100%; }
    .sms-received-head-actions button { flex: 1; }
    .sms-task-create-heading { align-items: stretch; flex-direction: column; gap: 8px; }
    .sms-task-create-tabs { width: 100%; flex-wrap: wrap; }
    .sms-task-create-tab { flex: 1 1 calc(33.333% - 3px); min-width: 0; padding-inline: 7px; }
}
@media (max-width: 520px) {
    .user-management-summary { grid-template-columns: 1fr 1fr; }
    .account-authenticator-setup { grid-template-columns: 1fr; }
    .account-qr-code { margin-inline: auto; }
    .account-security-form.compact { grid-template-columns: 1fr; }
    .account-recovery-code-grid { grid-template-columns: 1fr; }
    .app-topbar-user > span:last-child { display: none; }
    .device-filter-row, .device-filter-status-row { grid-template-columns: 1fr; }
    .device-filter-date-range { grid-template-columns: 1fr; }
    .device-filter-date-apply { width: 100%; }
    .device-filter-primary-row { grid-template-columns: minmax(0, 1fr) auto; }
    .device-filter-toggle { min-width: 76px; padding-inline: 7px; }
    .device-filter-main-row .device-filter-search-field { grid-column: auto; }
    .whatsapp-page .device-filter-row { grid-template-columns: 1fr; }
    .whatsapp-page .device-filter-row .wide { grid-column: auto; }
    .management-stats { grid-template-columns: 1fr; }
    .management-stat-group { grid-template-columns: 1fr; }
    .management-stat-row.columns-3, .management-stat-row.columns-4 { grid-template-columns: 1fr; }
    .management-trend-controls { width: 100%; flex-wrap: wrap; }
    .management-trend-controls select { flex: 1; }
    .management-stats-range { justify-content: flex-start; flex-wrap: wrap; }
    .management-stats-range > span { width: 100%; text-align: left; }
    .management-stats > small { grid-column: 1 / -1; white-space: normal; }
    .device-filter-feature-group { align-items: flex-start; flex-direction: column; }
    .detail-status-row { grid-template-columns: 1fr 1fr; }
    .detail-row { grid-template-columns: 70px minmax(0, 1fr); }
    .page-toolbar form { grid-template-columns: 1fr; }
    .page-toolbar label:first-child { grid-column: auto; }
    .image-library { grid-template-columns: 1fr 1fr; gap: 7px; }
    .library-preview { height: 125px; }
    .login-card { padding: 22px; }
    .sms-task-warning { align-items: flex-start; }
    .system-settings-card { grid-template-columns: 36px minmax(0, 1fr); align-items: start; padding: 13px; }
    .system-settings-card-icon { width: 36px; height: 36px; }
    .system-setting-switch { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; justify-items: start; }
    .system-settings-actions { align-items: stretch; flex-direction: column; }
    .system-settings-actions button { width: 100%; }
    /* Keep the six task modes in two reachable rows on compact screens. */
    .sms-task-create-form, .sms-task-filters, .sms-task-filter-queue-filters { grid-template-columns: 1fr; }
    .sms-task-filter-queue-filters.sms-campaign-filter-grid, .sms-campaign-message-options { grid-template-columns: 1fr; }
    .sms-task-filter-check { grid-column: auto; }
    .sms-task-content-field { grid-column: auto; }
    .sms-task-primary { width: 100%; }
    .sms-task-pager, .sms-device-pager { flex-wrap: wrap; justify-content: center; }
    .sms-device-filters, .sms-task-batch-form { grid-template-columns: 1fr; }
    .sms-task-batch-selection, .sms-task-content-field { grid-column: auto; }
    .sms-task-filter-queue-form > button { width: 100%; justify-self: stretch; }
    .sms-campaign-preview-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
    .sms-campaign-preview-result ul { grid-template-columns: 1fr; }
    .sms-campaign-form-actions { display: grid; grid-template-columns: 1fr; }
    .sms-campaign-form-actions .sms-task-primary, .sms-campaign-form-actions .sms-task-secondary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Agent channel management */
.channel-page { display: grid; width: 100%; max-width: 1720px; margin: 0 auto; gap: 9px; }
.channel-toolbar { align-items: center; }
.channel-refresh { display: inline-flex; min-height: 30px; align-items: center; padding: 0 11px; color: var(--blue-2); background: var(--surface); border: 1px solid #bfdbfe; border-radius: var(--radius); font-size: 10px; font-weight: 650; text-decoration: none; }
.channel-refresh:hover { background: var(--selected); border-color: var(--blue); }
.channel-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.channel-summary article { display: grid; min-height: 68px; align-content: center; gap: 3px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.channel-summary article.enabled { border-color: #a7f3d0; background: #f7fffb; }
.channel-summary span { color: var(--muted); font-size: 10px; }
.channel-summary strong { color: var(--text); font-size: 20px; line-height: 1; }
.channel-summary article.enabled strong { color: #047857; }
.channel-create-panel { display: grid; grid-template-columns: minmax(220px, .55fr) minmax(480px, 1.45fr); align-items: end; gap: 18px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.channel-create-panel h3, .channel-table-head h3 { margin: 0; color: var(--text); font-size: 13px; }
.channel-create-panel p, .channel-table-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.channel-create-form { display: grid; align-items: end; gap: 8px; }
.channel-create-form.is-admin { grid-template-columns: minmax(150px, .55fr) minmax(190px, .75fr) minmax(260px, 1.25fr) auto; }
.channel-create-form.is-agent { grid-template-columns: minmax(190px, .7fr) minmax(280px, 1.3fr) auto; }
.channel-create-form label { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.channel-create-form input, .channel-create-form select { width: 100%; height: 32px; min-width: 0; padding: 0 8px; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; }
.channel-create-form input:focus, .channel-create-form select:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.channel-create-form > button { height: 32px; padding: 0 13px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: var(--radius); font-size: 10px; font-weight: 700; white-space: nowrap; }
.channel-create-form > button:hover:not(:disabled) { background: var(--blue-2); border-color: var(--blue-2); }
.channel-field-error { min-height: 12px; color: var(--red); font-size: 9px; font-weight: 500; }
.channel-field-error:empty { display: none; }
.channel-grid-filterbar { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 7px; }
.channel-native-grid { height: clamp(500px, calc(100vh - 360px), 760px); min-height: 500px; }
.channel-grid-table { min-width: 1280px; }
.channel-grid-table tbody tr.disabled { opacity: .68; }
.channel-grid-table tbody tr.default td { background: #fffcf2; }
.channel-grid-table tbody tr.default:hover td { background: #fff8dc; }
.channel-grid-table.is-admin th:nth-child(1), .channel-grid-table.is-admin td:nth-child(1) { width: 145px; }
.channel-grid-table.is-admin th:nth-child(2), .channel-grid-table.is-admin td:nth-child(2) { width: 185px; }
.channel-grid-table.is-admin th:nth-child(3), .channel-grid-table.is-admin td:nth-child(3) { width: 170px; }
.channel-grid-table.is-admin th:nth-child(4), .channel-grid-table.is-admin td:nth-child(4) { width: 360px; }
.channel-grid-table.is-admin th:nth-child(5), .channel-grid-table.is-admin td:nth-child(5) { width: 70px; text-align: center; }
.channel-grid-table.is-admin th:nth-child(6), .channel-grid-table.is-admin td:nth-child(6) { width: 85px; }
.channel-grid-table.is-admin th:nth-child(7), .channel-grid-table.is-admin td:nth-child(7) { width: 155px; }
.channel-grid-table.is-admin th:nth-child(8), .channel-grid-table.is-admin td:nth-child(8) { width: 210px; }
.channel-grid-table.is-agent th:nth-child(1), .channel-grid-table.is-agent td:nth-child(1) { width: 190px; }
.channel-grid-table.is-agent th:nth-child(2), .channel-grid-table.is-agent td:nth-child(2) { width: 175px; }
.channel-grid-table.is-agent th:nth-child(3), .channel-grid-table.is-agent td:nth-child(3) { width: 390px; }
.channel-grid-table.is-agent th:nth-child(4), .channel-grid-table.is-agent td:nth-child(4) { width: 70px; text-align: center; }
.channel-grid-table.is-agent th:nth-child(5), .channel-grid-table.is-agent td:nth-child(5) { width: 90px; }
.channel-grid-table.is-agent th:nth-child(6), .channel-grid-table.is-agent td:nth-child(6) { width: 160px; }
.channel-grid-table.is-agent th:nth-child(7), .channel-grid-table.is-agent td:nth-child(7) { width: 210px; }
.channel-table-panel { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.channel-table-head { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.channel-table-head code { padding: 1px 4px; color: var(--blue-2); background: var(--selected); border-radius: 3px; }
.channel-empty { padding: 45px 16px; color: var(--muted); font-size: 11px; text-align: center; }
.channel-table-scroll { overflow: auto; }
.channel-table { width: 100%; min-width: 1180px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 10px; }
.channel-table th { height: 32px; padding: 0 8px; color: var(--muted); background: #fafafa; border-bottom: 1px solid var(--line); font-weight: 650; text-align: left; white-space: nowrap; }
.channel-table td { height: 56px; padding: 7px 8px; color: var(--text-2); border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.channel-table tbody tr:last-child td { border-bottom: 0; }
.channel-table tbody tr:hover td { background: #fafcff; }
.channel-table tbody tr.disabled { opacity: .68; }
.channel-table th:nth-last-child(1), .channel-table td:nth-last-child(1) { width: 112px; }
.channel-table th:nth-last-child(2), .channel-table td:nth-last-child(2) { width: 132px; }
.channel-table th:nth-last-child(3), .channel-table td:nth-last-child(3) { width: 68px; text-align: center; }
.channel-table th:nth-last-child(4), .channel-table td:nth-last-child(4) { width: 64px; text-align: center; }
.channel-table th:nth-last-child(5), .channel-table td:nth-last-child(5) { width: 350px; }
.channel-table th:nth-last-child(6), .channel-table td:nth-last-child(6) { width: 218px; }
.channel-name-cell { display: grid; min-width: 0; gap: 2px; }
.channel-name-cell strong, .channel-name-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-name-cell strong, .channel-agent { color: var(--text); font-size: 10px; }
.channel-name-cell small { color: var(--faint); font-size: 8px; }
.channel-code { display: inline-block; max-width: 100%; overflow: hidden; color: #4338ca; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.channel-link-cell { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.channel-link-cell a { overflow: hidden; color: var(--blue-2); text-overflow: ellipsis; white-space: nowrap; }
.channel-link-stack { display: grid; min-width: 0; gap: 3px; }
.channel-link-stack small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.channel-link-stack small.configured { color: #047857; }
.channel-link-cell button, .channel-actions button { min-height: 25px; padding: 0 7px; color: var(--text-2); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 9px; font-weight: 650; }
.channel-link-cell button:hover:not(:disabled), .channel-actions button:hover:not(:disabled) { color: var(--blue-2); border-color: var(--blue); }
.channel-status { display: inline-flex; min-height: 21px; align-items: center; padding: 0 7px; border: 1px solid; border-radius: 11px; font-size: 9px; font-weight: 700; }
.channel-status.enabled { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.channel-status.disabled { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.channel-status-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.channel-default-badge { display: inline-flex; min-height: 21px; align-items: center; padding: 0 7px; color: #92400e; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 11px; font-size: 9px; font-weight: 750; }
.channel-actions { display: flex; gap: 4px; }
.channel-actions { flex-wrap: wrap; }
.channel-actions form { margin: 0; }
.channel-actions button.danger { color: var(--red); border-color: #fecaca; }
.channel-actions button.channel-default-button { color: #92400e; border-color: #fcd34d; }
.channel-actions button.channel-default-button:hover:not(:disabled) { color: #78350f; background: #fffbeb; border-color: #f59e0b; }
.channel-actions button.channel-default-button.active { color: #92400e; background: #fffbeb; border-color: #fde68a; opacity: 1; }
.channel-actions .channel-download-button { min-height: 25px; display: inline-flex; align-items: center; padding: 0 7px; color: var(--blue-2); background: #fff; border: 1px solid #bfdbfe; border-radius: var(--radius); font-size: 9px; font-weight: 650; text-decoration: none; }
.channel-package-meta { max-width: 260px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-package-meta.published { color: #047857; }
.channel-package-meta.pending { color: #b45309; }
.channel-package-meta.processing { color: var(--blue-2); }
.channel-package-meta.failed { color: var(--red); }
.channel-copy-fallback { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#channelUploadProgressPopup:not(.dx-overlay) { display: none; }
.channel-upload-progress-content { display: grid; gap: 12px; padding: 2px; }
.channel-upload-progress-file { display: grid; min-width: 0; gap: 3px; }
.channel-upload-progress-file span { color: var(--muted); font-size: 10px; }
.channel-upload-progress-file strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.channel-upload-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: 10px; }
.channel-upload-progress-meta span { min-width: 0; line-height: 1.45; }
.channel-upload-progress-meta strong { flex: 0 0 auto; color: var(--blue-2); font-size: 12px; }
.channel-upload-progress-content > small { color: var(--muted); font-size: 9px; text-align: right; }
.channel-upload-progress-actions { display: flex; justify-content: flex-end; padding-top: 2px; }
.channel-upload-progress-actions .dx-button { min-width: 96px; }
.channel-custom-link-dialog { width: min(560px, calc(100vw - 28px)); padding: 0; color: var(--text); background: var(--surface); border: 0; border-radius: 10px; box-shadow: 0 22px 60px rgba(15, 23, 42, .24); }
.channel-custom-link-dialog::backdrop { background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); }
.channel-custom-link-dialog form { display: grid; gap: 10px; padding: 16px; }
.channel-custom-link-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.channel-custom-link-dialog header span { color: var(--blue-2); font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.channel-custom-link-dialog h3 { margin: 2px 0 0; font-size: 15px; }
.channel-custom-link-dialog header button { width: 28px; height: 28px; color: var(--muted); background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; font-size: 18px; line-height: 1; }
.channel-custom-link-dialog p { margin: 0; color: var(--muted); font-size: 10px; }
.channel-custom-link-dialog label { color: var(--text-2); font-size: 10px; font-weight: 650; }
.channel-custom-link-dialog input { width: 100%; height: 36px; padding: 0 10px; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); outline: 0; }
.channel-custom-link-dialog input:focus { border-color: var(--blue); outline: 2px solid #dbeafe; outline-offset: -1px; }
.channel-custom-link-dialog small { color: var(--muted); font-size: 9px; line-height: 1.55; }
.channel-custom-link-dialog code { padding: 1px 4px; color: #4338ca; background: #eef2ff; border-radius: 3px; }
.channel-custom-link-dialog footer { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 7px; margin-top: 3px; }
.channel-custom-link-dialog footer button { min-height: 31px; padding: 0 11px; color: var(--text-2); background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 10px; font-weight: 650; }
.channel-custom-link-dialog footer button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }

@media (max-width: 1000px) {
    .channel-create-panel { grid-template-columns: 1fr; }
    .channel-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-create-panel { grid-template-columns: 1fr; }
    .role-permission-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .channel-create-form { grid-template-columns: 1fr; }
    .channel-summary { grid-template-columns: 1fr 1fr; }
    .channel-create-form > button { width: 100%; }
    .user-create-panel form { grid-template-columns: 1fr; }
    .role-create-panel { grid-template-columns: 1fr; }
    .role-create-panel form { align-items: stretch; flex-direction: column; }
    .role-create-panel label { min-width: 0; }
    .role-permission-form footer { align-items: stretch; flex-direction: column; }
}
