:root { font-family: Inter, "Microsoft YaHei", sans-serif; background: #07101f; color: #e5edf8; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 18% 12%, rgba(56,189,248,.2), transparent 28%), radial-gradient(circle at 82% 4%, rgba(99,102,241,.18), transparent 30%), linear-gradient(rgba(148,163,184,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.055) 1px, transparent 1px), repeating-linear-gradient(135deg, rgba(125,211,252,.07) 0 1px, transparent 1px 18px), linear-gradient(135deg, #020617, #07101f 48%, #111827); background-size: auto, auto, 32px 32px, 32px 32px, auto, auto; }
.hidden { display: none !important; }
.loginPage { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 18% 12%, rgba(56,189,248,.2), transparent 28%), radial-gradient(circle at 82% 4%, rgba(99,102,241,.18), transparent 30%), linear-gradient(rgba(148,163,184,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.055) 1px, transparent 1px), repeating-linear-gradient(135deg, rgba(125,211,252,.07) 0 1px, transparent 1px 18px), linear-gradient(135deg, #020617, #07101f 48%, #111827); background-size: auto, auto, 32px 32px, 32px 32px, auto, auto; }
.loginCard { width: 420px; padding: 38px; border: 1px solid rgba(148,163,184,.22); border-radius: 26px; background: rgba(15,23,42,.88); box-shadow: 0 30px 90px rgba(0,0,0,.42); }
.loginCard h1 { margin: 0 0 10px; }
.loginCard p { margin: 0 0 24px; color: #94a3b8; }
.loginCard input { width: 100%; margin-bottom: 12px; }
.loginCard button { width: 100%; }
.error { min-height: 22px; margin-top: 12px; color: #fecaca; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; background: radial-gradient(circle at 14% 18%, rgba(14,165,233,.15), transparent 28%), radial-gradient(circle at 86% 8%, rgba(79,70,229,.16), transparent 30%), linear-gradient(rgba(148,163,184,.052) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.052) 1px, transparent 1px), repeating-linear-gradient(135deg, rgba(125,211,252,.065) 0 1px, transparent 1px 20px), linear-gradient(135deg, rgba(2,6,23,.86), rgba(15,23,42,.55)); background-size: auto, auto, 32px 32px, 32px 32px, auto, auto; transition: grid-template-columns .18s ease; }
.layout.sidebarCollapsed { grid-template-columns: 82px 1fr; }
aside { min-height: 100vh; display: flex; flex-direction: column; padding: 24px; background: linear-gradient(180deg, rgba(2,6,23,.92), rgba(15,23,42,.78)); border-right: 1px solid rgba(148,163,184,.16); backdrop-filter: blur(18px); }
.sidebarHeader { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebarToggle { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; padding: 0; }
.sidebarToggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
aside h1 { margin: 0; font-size: 28px; letter-spacing: .04em; }
.brandDesc { margin: 6px 0 28px; color: #94a3b8; font-size: 13px; }
.sidebarCollapsed aside { padding: 20px 14px; align-items: center; }
.sidebarCollapsed aside h1, .sidebarCollapsed .brandDesc, .sidebarCollapsed .tab span:last-child { display: none; }
.sidebarCollapsed .sidebarHeader { justify-content: center; }
.sidebarCollapsed .tab { width: 52px; justify-content: center; padding: 0; }
.sidebarCollapsed .tabIcon { width: 34px; height: 34px; }
.tab { width: 100%; height: 52px; display: flex; gap: 12px; align-items: center; margin-bottom: 10px; padding: 0 16px; color: #d6e1f0; border: 0; border-radius: 14px; background: transparent; text-align: left; cursor: pointer; font-size: 17px; }
.tabIcon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: rgba(255,255,255,.08); }
.tabIcon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab.active .tabIcon, .tab:hover .tabIcon { background: rgba(255,255,255,.14); }
.tab.active, .tab:hover { color: #fff; background: rgba(56,189,248,.14); }
.logout { color: #dbeafe; background: rgba(148,163,184,.14); }
.topNav { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 18px; }
main { padding: 28px; }
.panel { display: none; }
.panel.active { display: block; }
.toolbarHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.toolbarHeader h2 { margin: 0; font-size: 28px; }
.toolbarHeader p { margin: 6px 0 0; color: #94a3b8; }
.toolbarActions { display: flex; gap: 10px; align-items: center; }
.filterBar { display: flex; gap: 10px; justify-content: flex-end; margin: 0 0 14px; flex-wrap: wrap; }
.filterBar select, .filterBar input { min-width: 150px; }
.inlineCheck { height: 38px; display: inline-flex; gap: 6px; align-items: center; color: #cbd5e1; }
.inlineCheck input { width: 16px; height: 16px; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 12px; color: #cbd5e1; }
.pagination button { height: 32px; padding: 0 10px; }
.card, .treeCard { padding: 18px; border: 1px solid rgba(148,163,184,.16); border-radius: 18px; background: rgba(15,23,42,.7); margin-bottom: 18px; }
.form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form.single { display: grid; grid-template-columns: 1fr; }
.form.grid { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); }
.form .wide { grid-column: 1 / -1; }
.fieldStack { display: grid; gap: 6px; color: #cbd5e1; font-size: 13px; }
.fieldStack input, .fieldStack select { width: 100%; }
.wideField { grid-column: 1 / -1; }
input, select, textarea { padding: 0 12px; color: #e2e8f0; border: 1px solid rgba(148,163,184,.2); border-radius: 10px; background: #020617; outline: none; }
input, select { height: 38px; }
textarea { min-height: 82px; padding-top: 10px; resize: vertical; }
button { height: 38px; padding: 0 14px; border: 0; border-radius: 10px; color: #00111f; background: linear-gradient(135deg, #38bdf8, #60a5fa); font-weight: 700; cursor: pointer; }
.delete { color: #fecaca; background: rgba(127,29,29,.45); }
.secondary { color: #dbeafe; background: rgba(148,163,184,.14); }
.list { display: grid; gap: 10px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid rgba(148,163,184,.12); border-radius: 14px; background: rgba(15,23,42,.52); }
.item small { color: #94a3b8; }
.itemActions { display: flex; gap: 8px; flex-wrap: wrap; }
.nowrapActions { flex-wrap: nowrap; }
.mutedText { color: #94a3b8; }
.miniMetrics { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; margin: 0 0 14px; }
.miniMetric { padding: 12px 14px; border: 1px solid rgba(148,163,184,.14); border-radius: 12px; background: rgba(15,23,42,.56); }
.miniMetric span { display: block; color: #94a3b8; font-size: 12px; }
.miniMetric strong { display: block; margin-top: 4px; color: #fff; font-size: 22px; }
.tableCard { overflow: auto; border: 1px solid rgba(148,163,184,.16); border-radius: 18px; background: rgba(15,23,42,.7); }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { padding: 13px 14px; border-bottom: 1px solid rgba(148,163,184,.1); text-align: left; vertical-align: middle; }
th { color: #93c5fd; font-weight: 700; background: rgba(15,23,42,.9); }
td { color: #dbeafe; }
.emptyCell { height: 120px; color: #8fb1d8; text-align: center; }
tbody tr:hover { background: rgba(148,163,184,.08); }
tbody tr:last-child td { border-bottom: 0; }
.statusBadge { display: inline-flex; align-items: center; min-width: 52px; justify-content: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.statusBadge.online { color: #bbf7d0; background: rgba(22,163,74,.24); }
.statusBadge.offline { color: #fecaca; background: rgba(185,28,28,.24); }
.statusBadge.unknown { color: #cbd5e1; background: rgba(100,116,139,.24); }
.treeRow { min-height: 42px; display: grid; grid-template-columns: 1fr 90px 240px; gap: 10px; align-items: center; border-bottom: 1px solid rgba(148,163,184,.08); }
.treeRow:last-child { border-bottom: 0; }
.treeRow small { color: #94a3b8; }
.treeRow .itemActions button { height: 30px; padding: 0 9px; border-radius: 8px; font-size: 12px; }
.checks { display: grid; gap: 10px; margin: 14px 0; }
.checks label { display: flex; gap: 8px; align-items: center; color: #cbd5e1; }
.permissionToolbar { display: flex; justify-content: flex-end; margin-bottom: 8px; color: #cbd5e1; }
.permissionToolbar label { display: flex; gap: 8px; align-items: center; }
.permissionToolbar input { width: 16px; height: 16px; }
.permissionTree { gap: 0; max-height: 420px; overflow: auto; border: 1px solid rgba(148,163,184,.12); border-radius: 14px; }
.roleMenuTree { grid-template-columns: repeat(2, minmax(180px, 1fr)); padding: 8px; gap: 0; }
.permissionNode { min-height: 38px; border-bottom: 1px solid rgba(148,163,184,.08); }
.permissionNode:last-child { border-bottom: 0; }
.checks input { width: 16px; height: 16px; }
.channelChoices { margin: 0; }
.channelChoice { padding: 12px; border: 1px solid rgba(148,163,184,.12); border-radius: 12px; background: rgba(15,23,42,.52); }
.channelChoice div { display: grid; gap: 4px; }
.channelChoice small { color: #94a3b8; word-break: break-all; }
.modalMask { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(2,6,23,.45); }
.modal { width: min(980px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow: auto; padding: 22px; border: 1px solid rgba(148,163,184,.2); border-radius: 22px; background: #0f172a; box-shadow: 0 30px 90px rgba(0,0,0,.48); pointer-events: auto; }
.modal.compactModal { width: min(650px, calc(100vw - 48px)); }
.modal.wideModal { width: min(1380px, calc(100vw - 28px)); max-height: calc(100vh - 28px); display: flex; flex-direction: column; overflow: hidden; }
.modalHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modalHeader h3 { margin: 0; font-size: 22px; }
.modalBody { display: grid; gap: 16px; }
.wideModal .modalBody { min-height: 0; overflow: hidden; }
.modalSummary { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; }
.modalSummary div { padding: 12px; border: 1px solid rgba(148,163,184,.12); border-radius: 12px; background: rgba(15,23,42,.52); }
.modalSummary strong { display: block; color: #fff; font-size: 24px; }
.modalSummary span { color: #94a3b8; font-size: 12px; }
.modalTableWide table { min-width: 900px; }
.businessLinkBox { display: grid; gap: 16px; }
.businessLinkBox input { width: 100%; }
.businessQrPanel { display: grid; justify-items: center; gap: 8px; padding: 14px; border: 1px solid rgba(148,163,184,.14); border-radius: 14px; background: rgba(15,23,42,.52); }
.businessQrPanel canvas { width: min(180px, 58vw); height: auto; padding: 8px; border-radius: 12px; background: #fff; }
.businessQrPanel small { color: #94a3b8; text-align: center; }
.qrError { padding: 12px; color: #fecaca; border: 1px solid rgba(248,113,113,.25); border-radius: 12px; background: rgba(69,10,10,.35); }
.scanResults { display: grid; gap: 10px; }
.scanConditionBox { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid rgba(148,163,184,.12); border-radius: 12px; background: rgba(15,23,42,.34); }
.scanConditionBox small { color: #94a3b8; }
.scanProgress { padding: 12px; border: 1px solid rgba(148,163,184,.12); border-radius: 12px; background: rgba(15,23,42,.52); }
.scanProgressText { margin-bottom: 8px; color: #cbd5e1; }
.scanProgressBar { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(51,65,85,.9); }
.scanProgressFill { height: 100%; border-radius: inherit; background: linear-gradient(135deg, #38bdf8, #60a5fa); transition: width .18s ease; }
.scanResult { display: grid; grid-template-columns: 1fr 110px 120px; gap: 10px; align-items: center; padding: 12px; border: 1px solid rgba(148,163,184,.12); border-radius: 12px; background: rgba(15,23,42,.52); }
.confidenceBadge { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 4px; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.confidenceBadge.high { color: #bbf7d0; background: rgba(22,163,74,.24); }
.confidenceBadge.medium { color: #fde68a; background: rgba(202,138,4,.22); }
.confidenceBadge.low { color: #bae6fd; background: rgba(2,132,199,.2); }
.scanResult small { color: #94a3b8; }
.overviewGrid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metricCard { padding: 18px; border: 1px solid rgba(148,163,184,.16); border-radius: 18px; background: rgba(15,23,42,.7); }
.metricCard strong { display: block; margin-top: 8px; font-size: 30px; color: #fff; }
.metricCard span { color: #94a3b8; }
.overviewColumns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.overviewColumns h3 { margin: 0 0 10px; }
.overviewTableCard { overflow-x: hidden; }
.overviewTable { min-width: 0; table-layout: fixed; }
.overviewTable th, .overviewTable td { padding: 11px 10px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.overviewTable .timeCol { width: 132px; }
.overviewTable .nameCol { width: 22%; }
.overviewTable .actionCol { width: 120px; }
.overviewTable .targetCol { width: 72px; }
.toastHost { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 40; display: grid; gap: 10px; width: min(420px, calc(100vw - 48px)); pointer-events: none; }
.toast { padding: 12px 14px; border: 1px solid rgba(148,163,184,.22); border-radius: 14px; color: #e5edf8; background: rgba(15,23,42,.96); box-shadow: 0 18px 50px rgba(0,0,0,.35); pointer-events: auto; }
.toast.error { color: #fecaca; border-color: rgba(248,113,113,.38); background: rgba(69,10,10,.96); }
.toast.success { color: #bbf7d0; border-color: rgba(74,222,128,.36); background: rgba(5,46,22,.96); }
.modalActions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.subtleNotice { color: #cbd5e1; border-color: rgba(56,189,248,.22); background: rgba(14,165,233,.09); }
.settingsGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settingsPanel { padding: 18px; border: 1px solid rgba(148,163,184,.16); border-radius: 18px; background: rgba(15,23,42,.7); }
.settingsPanel h3 { margin: 0 0 14px; color: #dbeafe; }
.settingsMetrics { grid-template-columns: repeat(2, minmax(180px, 1fr)); margin-top: 14px; }
.settingsMetrics .miniMetric strong { font-size: 18px; overflow-wrap: anywhere; }
.gbSectionHeader { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 10px; color: #dbeafe; }
.gbSectionHeader h3 { margin: 0; font-size: 18px; }
.gbSectionHeader p { margin: 3px 0 0; color: #94a3b8; font-size: 13px; }
.gbModalToolbar { justify-content: flex-end; margin-bottom: 10px; }
.gbDeviceChannelsModal { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: calc(100vh - 122px); }
.gbDeviceChannelsTable { max-height: calc(100vh - 210px); overflow: auto; }
.gbDeviceChannelsTable table { min-width: 1480px; }
.gbDeviceChannelsTable th, .gbDeviceChannelsTable td { white-space: nowrap; }
.gbDeviceChannelsTable th:last-child, .gbDeviceChannelsTable td:last-child { min-width: 150px; }
.gbDeviceChannelsTable .wrapCell { max-width: 260px; white-space: normal; line-height: 1.35; }
.gbDeviceChannelsTable .codeCell { font-family: Consolas, "Courier New", monospace; color: #bfdbfe; }
.gbDeviceChannelsTable .strongCell { font-weight: 700; color: #fff; }
.gbStack { display: grid; gap: 3px; }
.gbStack small { color: #94a3b8; }
.sourceBoxCard { display: grid; grid-template-columns: minmax(220px, .34fr) 1fr; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid rgba(148,163,184,.14); border-radius: 12px; background: rgba(15,23,42,.58); margin-bottom: 8px; }
.sourceBoxCard small { display: block; margin-top: 3px; color: #94a3b8; }
.sourceChip { display: inline-flex; align-items: center; min-height: 26px; margin: 3px 5px 3px 0; padding: 0 9px; border-radius: 999px; color: #c7d2fe; background: rgba(79,70,229,.2); font-size: 12px; }
.gbPlatformChannel { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: center; min-height: 42px; padding: 8px 10px; border: 1px solid rgba(148,163,184,.1); border-radius: 8px; background: rgba(15,23,42,.44); }
.gbPlatformChannel input { width: 15px; height: 15px; }
.gbPlatformChannel span { min-width: 0; }
.gbPlatformChannel strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.2; }
.gbPlatformChannel small { display: block; margin-top: 2px; overflow-wrap: anywhere; color: #94a3b8; font-size: 11px; line-height: 1.2; }
.gbChannelsHeader { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: #dbeafe; }
.gbChannelsHeader label { display: inline-flex; gap: 8px; align-items: center; color: #cbd5e1; }
.gbChannelList { display: grid; gap: 6px; max-height: 520px; overflow: auto; padding: 6px; border: 1px solid rgba(148,163,184,.14); border-radius: 14px; background: rgba(2,6,23,.36); }
.gbChannelRow { display: grid; grid-template-columns: 22px minmax(220px, 1fr) minmax(220px, .7fr); gap: 10px; align-items: center; padding: 10px; border: 1px solid rgba(148,163,184,.12); border-radius: 12px; background: rgba(15,23,42,.52); }
.gbChannelRow input[type="checkbox"] { width: 16px; height: 16px; }
.gbChannelRow small { display: block; margin-top: 4px; color: #94a3b8; }
.gbCodeInput { width: 100%; height: 30px; font-size: 12px; }
.gbTreeActions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.gbTreeActions button { height: 28px; padding: 0 9px; }
.gbTreeList { display: block; }
.gbTreeNode { margin: 2px 0; }
.gbTreeRow { min-height: 36px; display: grid; grid-template-columns: 20px 18px minmax(190px, 1fr) minmax(160px, .42fr); gap: 6px; align-items: center; padding: 5px 8px 5px calc(8px + var(--level) * 18px); border: 1px solid rgba(148,163,184,.1); border-radius: 8px; background: rgba(15,23,42,.44); }
.gbTreeNode-org > .gbTreeRow { background: rgba(30,41,59,.72); }
.gbTreeNode-device > .gbTreeRow { background: rgba(15,23,42,.58); }
.gbTreeNode-source > .gbTreeRow { background: rgba(30,41,59,.72); }
.gbTreeToggle, .gbTreeSpacer { width: 20px; height: 20px; padding: 0; display: inline-grid; place-items: center; border-radius: 6px; color: #bfdbfe; background: rgba(148,163,184,.12); line-height: 1; }
.gbTreeSpacer { background: transparent; }
.gbTreeCheck { width: 14px; height: 14px; }
.gbTreeTitle { min-width: 0; }
.gbTreeTitle strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.15; }
.gbTreeTitle small { display: block; margin-top: 1px; color: #94a3b8; font-size: 11px; line-height: 1.1; }
.gbTreeChildren { margin-left: 0; }
.gbTreeCode { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #93c5fd; font-size: 12px; white-space: nowrap; }
.gbCascadeCatalogTree .gbTreeNode-device > .gbTreeRow { border-color: rgba(56,189,248,.18); }
.gbCascadeCatalogTree .gbTreeNode-device > .gbTreeRow .gbTreeToggle { color: #e0f2fe; }
