:root {
  color-scheme: light;
  --paper: #f5f7f8; --surface: #fff; --ink: #243136; --muted: #667980;
  --line: #dce5e8; --teal: #008477; --teal-dark: #00695e; --teal-wash: #e7f4f1;
  --blue: #42688b; --blue-wash: #edf3f8; --amber: #8f6117; --amber-wash: #fff5e4;
  --red: #b3374b; --red-wash: #fceef1;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; }
body.dialog-open { overflow: hidden; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, a, summary, p, h1, h2, td { overflow-wrap: anywhere; }
a { color: var(--teal-dark); }
form, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
input, select { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #bfced3; border-radius: 5px; color: var(--ink); background: white; font-size: 16px; }
input::placeholder { color: #74858c; opacity: 1; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #347ca3; outline-offset: 3px; }
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 44px; padding: 9px 13px; border: 1px solid transparent; border-radius: 5px; background: var(--teal); color: white; font-weight: 600; font-size: 13px; line-height: 1.4; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--teal-dark); }
.secondary { color: var(--ink); background: white; border-color: var(--line); }
.secondary:hover { color: var(--teal-dark); background: var(--teal-wash); }
.icon-button { width: 44px; height: 44px; flex: 0 0 44px; padding: 0; }
.lucide { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: middle; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
[hidden] { display: none !important; }
.skip-link { position: absolute; z-index: 100; top: -100px; left: 12px; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
.site-header { background: white; border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.header-inner { max-width: 1440px; min-height: 60px; margin: auto; padding: 6px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; min-width: 0; color: var(--ink); font-weight: 750; font-size: 17px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 6px; background: var(--teal); color: white; }
.brand-mark .lucide { width: 21px; height: 21px; }
.header-end { display: flex; align-items: center; gap: 20px; }
.workspace-label { display: none; color: var(--muted); font-size: 12px; }
.header-end .icon-button { border-color: transparent; }
.header-lock { color: var(--muted); }
main { max-width: 1440px; margin: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
h1, h2, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.3; font-weight: 730; }
h2 { font-size: 18px; }
.muted, .detail-text { color: var(--muted); }
.amber-text { color: var(--amber) !important; }
.danger-text { color: var(--red) !important; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.page-heading > div:first-child { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.heading-line { display: flex; align-items: center; gap: 8px; }
.total-count { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.heading-meta { font-size: 11px; }
.online-count { display: flex; align-items: center; gap: 5px; color: var(--teal-dark); white-space: nowrap; }
.status-dot { display: inline-block; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: currentColor; }
.refresh-block { display: flex; align-items: center; gap: 10px; }
.snapshot { display: none; color: var(--muted); font-size: 11px; }
.snapshot .exact-time, .network-content .exact-time { display: inline; }
.exact-time { display: flex; flex-wrap: wrap; gap: 0 5px; font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1.5; }
.exact-time > span { white-space: nowrap; }
.timezone { color: var(--muted); font-size: 10px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.chevron { width: 14px; height: 14px; }
details[open] > summary .chevron { transform: rotate(180deg); }
.network { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.network-details > summary { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.network-title { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; }
.network-title > .lucide { color: var(--muted); width: 16px; height: 16px; }
.health-healthy .network-title > .lucide { color: var(--teal); }
.health-critical .network-title { color: var(--red); }
.health-degraded .network-title { color: var(--amber); }
.network-checked { display: none; color: var(--muted); font-size: 11px; }
.disclosure-label { display: flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.network-content { padding: 0 10px 12px; }
.health-grid { display: grid; gap: 0 24px; margin: 0 0 10px; padding: 0; list-style: none; }
.health-grid li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 7px 0; font-size: 12px; }
.check-result { display: flex; align-items: center; gap: 5px; }
.ok { color: var(--teal-dark); } .bad { color: var(--red); } .unknown { color: var(--muted); }
.route-line { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 10px; font-size: 11px; }
.route-line > span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.route-label { color: var(--muted); }
.route-line .lucide { width: 13px; height: 13px; }
.create-band { padding: 12px 0 8px; }
.create-form { display: flex; gap: 8px; align-items: center; }
.create-form .field { flex: 1; }
.create-form button { width: 44px; flex: 0 0 44px; padding: 0; }
.create-label { display: none; }
.create-toggle { display: none; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; }
.filters { margin-top: 0; }
.search-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search-field { position: relative; flex: 1 1 130px; min-width: 0; }
.search-field > .lucide { position: absolute; left: 11px; top: 13px; color: var(--muted); pointer-events: none; }
.search-field input { padding-left: 36px; }
.status-select { flex: 0 1 132px; min-width: 0; }
.status-select select { font-size: 12px; }
.filters.is-enhanced .apply-filters { display: none; }
.state-filters { display: flex; overflow-x: auto; margin-top: 7px; gap: 4px; scrollbar-width: thin; }
.filter-option { position: relative; display: flex; flex: 0 0 auto; cursor: pointer; }
.filter-option > input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 44px; opacity: 0; padding: 0; margin: 0; cursor: pointer; }
.filter-option > span { display: flex; align-items: center; gap: 5px; min-height: 44px; padding: 5px 8px; border-bottom: 2px solid transparent; font-size: 11px; color: var(--muted); white-space: nowrap; }
.filter-option > input:checked + span { color: var(--teal-dark); background: var(--teal-wash); border-bottom-color: var(--teal); }
.filter-option > input:focus-visible + span { outline: 2px solid #347ca3; outline-offset: -2px; }
.filter-count { font-size: 10px; font-variant-numeric: tabular-nums; }
.list-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
#result-count { min-height: 32px; display: flex; align-items: center; }
.duration-help { max-width: 65%; }
.duration-help summary { display: flex; align-items: center; gap: 5px; min-height: 44px; }
.duration-help .lucide { width: 14px; height: 14px; }
.duration-help[open] { max-width: 100%; }
.duration-help p { max-width: 680px; padding: 4px 0 12px; color: var(--ink); }
.table-wrap, table, tbody { display: block; width: 100%; }
table { border-collapse: collapse; table-layout: fixed; }
thead { display: none; }
.profile-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 6px; border-top: 1px solid var(--line); background: white; padding: 9px 10px 8px; }
.profile-row:last-child { border-bottom: 1px solid var(--line); }
td { min-width: 0; padding: 0; font-size: 12px; vertical-align: middle; }
.profile-main { grid-column: 1 / 5; grid-row: 1; }
.profile-identity { display: flex; align-items: flex-start; gap: 8px; }
.profile-monogram { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 5px; background: #f0f4f6; color: var(--blue); font-size: 12px; }
.profile-name { min-width: 0; }
.name { font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.profile-subline { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 2px; }
.ip { font-size: 10px; color: var(--blue); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.protected-icon { color: var(--blue); }
.protected-icon .lucide { width: 13px; height: 13px; }
.badge { display: inline-flex; color: var(--muted); font-size: 10px; }
.badge.active { display: none; } .badge.protected { color: var(--blue); }
.badge.suspended { color: var(--amber); } .badge.revoked { color: var(--red); }
.connection-cell { grid-column: 5 / 7; grid-row: 1; justify-self: end; align-self: start; padding-top: 2px; }
.connection { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; white-space: nowrap; }
.connection.online { color: var(--teal-dark); }
.connection.offline, .connection.never, .connection.unknown { color: var(--muted); }
.connection.never .status-dot, .connection.unknown .status-dot { background: transparent; border: 1px solid currentColor; }
.handshake-cell { grid-column: 1 / 3; grid-row: 2; margin-top: 7px; }
.duration-cell { grid-column: 3 / 5; grid-row: 2; margin-top: 7px; text-align: center; }
.duration-value { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.detail-text { display: block; font-size: 10px; margin-top: 2px; }
.traffic-cell { grid-column: 5 / 7; grid-row: 2; margin: 7px 0 0; justify-self: end; }
.traffic { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.traffic > span { display: inline-flex; align-items: center; gap: 3px; }
.traffic .lucide { width: 12px; height: 12px; color: var(--blue); }
.traffic-direction { display: none; }
.actions-cell { grid-column: 1 / -1; grid-row: 3; margin-top: 7px; }
.quick-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 7px; }
.export-group { display: grid; grid-template-columns: 44px 44px; gap: 2px; }
.action-group-label { grid-column: 1 / -1; color: var(--muted); font-size: 9px; line-height: 1.2; margin-bottom: 2px; white-space: nowrap; flex-shrink: 0; }
.quick-action { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; flex: 0 0 44px; padding: 0; border: 1px solid transparent; border-radius: 5px; color: #45616e; background: #f1f5f6; text-decoration: none; cursor: pointer; }
.quick-action:hover { color: var(--teal-dark); background: #deeeeb; }
.qr-action { color: var(--teal-dark); background: var(--teal-wash); }
.manage-group { display: flex; gap: 2px; padding-left: 6px; border-left: 1px solid var(--line); margin-left: auto; }
.manage-group .quick-action { background: transparent; }
.manage-group .quick-action:hover { background: var(--red-wash); }
.quick-action .lucide { width: 17px; height: 17px; }
.protected-note { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-height: 44px; font-size: 11px; color: var(--muted); }
.empty-state { padding: 32px 16px; border-block: 1px solid var(--line); text-align: center; }
.empty-state > .lucide { color: var(--muted); margin-bottom: 10px; }
.empty-state p { color: var(--muted); margin-top: 6px; }
.text-link, .back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 0; }
.panel-footer { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 16px; color: var(--muted); font-size: 11px; padding-top: 8px; }
.import-guide summary { display: flex; align-items: center; gap: 6px; min-height: 44px; }
.import-guide .lucide, .protected-footer .lucide { width: 14px; height: 14px; }
.guide-body { padding: 5px 0 12px; }
.guide-body p + p { margin-top: 6px; }
.protected-footer { display: flex; align-items: flex-start; gap: 6px; padding-top: 12px; }
.notice { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin: 10px 0; border-left: 3px solid var(--teal); background: var(--teal-wash); overflow-wrap: anywhere; font-size: 12px; }
.notice.error { color: var(--red); border-color: var(--red); background: var(--red-wash); }
.login, .utility-page { width: 100%; max-width: 460px; margin: 30px auto 0; }
.utility-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 7px; color: var(--teal); background: var(--teal-wash); }
.utility-icon .lucide { width: 23px; height: 23px; }
.login > p, .utility-page > p { margin-top: 10px; }
.login form { margin-top: 24px; } .login .field + .field { margin-top: 16px; }
.login button { width: 100%; margin-top: 22px; }
.utility-page .back-link { margin-bottom: 20px; }
.utility-page > .button { margin-top: 20px; }
.format-label { color: var(--teal-dark); font-weight: 650; }
.qr { display: block; width: 100%; max-width: 340px; height: auto; aspect-ratio: 1; object-fit: contain; background: white; border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin: 20px auto 0; }
.privacy-note { display: flex; gap: 6px; color: var(--muted); font-size: 11px; }
.privacy-note .lucide { width: 15px; height: 15px; margin-top: 2px; }
.download { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.download > * { flex: 1 1 auto; } .download button { width: 100%; }
.confirmation-profile { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; padding: 14px 0; border-block: 1px solid var(--line); overflow-wrap: anywhere; }
.confirmation > p { color: var(--muted); }
button.warn { background: var(--amber); } button.warn:hover { background: #735019; }
button.danger { background: var(--red); } button.danger:hover { background: #90283c; }
.utility-icon.warn { color: var(--amber); background: var(--amber-wash); }
.utility-icon.danger { color: var(--red); background: var(--red-wash); }
#profile-dialog { width: min(480px, calc(100% - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); box-shadow: 0 16px 70px #182e3d30; overflow: auto; }
#profile-dialog::backdrop { background: #152b4266; }
.dialog-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: white; }
#dialog-title { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
.close-icon { transform: rotate(45deg); }
#dialog-content { padding: 18px; }
#dialog-content .utility-page { margin: 0; }
#dialog-content .utility-icon { display: none; }
#dialog-content h1 { font-size: 20px; }
#dialog-content .qr { max-width: 340px; margin-top: 14px; }
.dialog-loading { padding: 30px 0; color: var(--muted); text-align: center; }
.is-busy { cursor: progress; }
.is-busy button { opacity: .6; }
@media (max-width: 359px) {
  .quick-actions { flex-wrap: wrap; justify-content: flex-start; gap: 6px 12px; }
  .manage-group { width: 100%; justify-content: flex-end; border-left: 0; padding-left: 0; }
}
@media (min-width: 420px) and (max-width: 599px) {
  .export-group { display: flex; align-items: center; gap: 2px; }
  .action-group-label { margin: 0 3px 0 0; }
}
@media (max-width: 599px) {
  h1 { font-size: 19px; }
  .traffic { flex-direction: column; gap: 0; }
  .connection { white-space: normal; font-size: 9px; }
  .exact-time { font-size: 10px; }
  .timezone { font-size: 9px; }
  .duration-value { font-size: 10px; }
  .detail-text { font-size: 9px; }
  .search-field { flex-basis: 95px; }
  .status-select { flex-basis: 114px; }
}
@media (max-width: 1019px) {
  .is-enhanced-dashboard .create-band:not(.is-expanded) { display: none; }
  .is-enhanced-dashboard .create-toggle { display: inline-flex; }
  .filters { margin-top: 10px; }
}
@media (min-width: 600px) {
  .header-inner { padding-inline: 24px; }
  main { padding: 20px 24px 32px; }
  .workspace-label, .snapshot, .network-checked { display: block; }
  .snapshot { text-align: right; }
  .network-checked { margin-left: auto; }
  .disclosure-label { margin-left: 6px; }
  .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .create-form .field { max-width: 300px; }
  .create-form button { width: auto; flex: 0 0 auto; padding-inline: 14px; }
  .create-label { display: inline; }
  .filters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
  .search-line { flex: 1 1 320px; max-width: 510px; }
  .state-filters { margin-top: 0; }
  .profile-row { grid-template-columns: 1.2fr .8fr 1fr 1fr; gap: 4px 14px; padding: 12px; }
  .profile-main { grid-column: 1 / 3; }
  .connection-cell { grid-column: 3 / 5; }
  .handshake-cell { grid-column: 1; }
  .duration-cell { grid-column: 2; text-align: left; }
  .traffic-cell { grid-column: 3 / 5; grid-row: 2; align-self: center; }
  .actions-cell { grid-row: 3; }
  .quick-actions { justify-content: flex-start; gap: 16px; }
  .export-group { display: flex; align-items: center; gap: 3px; }
  .action-group-label { margin: 0 4px 0 0; }
}
@media (min-width: 1020px) {
  main { position: relative; padding-top: 18px; }
  .page-heading { padding-right: 340px; min-height: 44px; }
  .snapshot { display: none; }
  .create-band { position: absolute; top: 18px; right: 24px; width: 310px; padding: 0; }
  .create-form { gap: 0; }
  .create-form input { border-radius: 5px 0 0 5px; }
  .create-form button { border-radius: 0 5px 5px 0; padding-inline: 10px; }
  .create-label { font-size: 12px; }
  .network { margin-bottom: 10px; }
  .filters { gap: 8px; }
  .search-line { max-width: 470px; }
  .state-filters { gap: 2px; }
  .filter-option > span { padding-inline: 7px; }
  table { display: table; }
  thead { display: table-header-group; }
  tbody { display: table-row-group; }
  .profile-row { display: table-row; border: 0; }
  th { text-align: left; padding: 9px 8px; border-block: 1px solid var(--line); background: #eef3f5; color: var(--muted); font-size: 10px; font-weight: 500; }
  th:first-child { width: 21%; padding-left: 12px; }
  th:nth-child(2) { width: 10%; }
  th:nth-child(3) { width: 13%; }
  th:nth-child(4) { width: 13%; }
  th:nth-child(5) { width: 11%; }
  th:last-child { width: 32%; }
  td { display: table-cell; padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .profile-main { padding-left: 12px; }
  .name { font-size: 12px; }
  .profile-subline { gap: 2px 5px; }
  .profile-monogram { width: 29px; height: 29px; flex-basis: 29px; }
  .connection { font-size: 11px; white-space: normal; }
  .handshake-cell::before { display: none; }
  .exact-time { display: flex; flex-direction: column; gap: 0; }
  .duration-cell { text-align: left; }
  .traffic { flex-direction: column; gap: 3px; }
  .traffic-direction { display: none; }
  .quick-actions { gap: 10px; }
  .quick-action { width: 32px; height: 34px; min-height: 34px; flex-basis: 32px; }
  .export-group { gap: 2px; }
  .action-group-label { font-size: 9px; margin-right: 3px; }
  .manage-group { padding-left: 8px; margin-left: auto; }
  .protected-note { min-height: 34px; }
  .health-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .quick-action { width: 36px; flex-basis: 36px; }
  .snapshot { display: block; }
  .page-heading { gap: 20px; }
  .name { font-size: 13px; }
}
@media (pointer: coarse) and (min-width: 1020px) {
  .quick-action { width: 44px; height: 44px; flex-basis: 44px; }
  .quick-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media (forced-colors: active) {
  .status-dot, .brand-mark { border: 1px solid currentColor; }
  .filter-option > input:checked + span { outline: 2px solid Highlight; }
}
