:root {
  --nav: #111c32;
  --ink: #1c2940;
  --muted: #69768b;
  --line: #e5eaf1;
  --bg: #f6f8fb;
  --green: #4f55dc;
  --pale: #eeedff;
  --amber: #956017;
  --radius: 14px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px/1.55 ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 10px 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover,
.button:hover {
  background: #f4f5ff;
  border-color: #c8cbed;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid #9295f4;
  outline-offset: 3px;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: 0 3px 6px #4f55dc16;
}
.primary:hover {
  background: #4147c3;
  border-color: #4147c3;
}
.danger {
  color: #b33949;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 7px;
  color: var(--muted);
  box-shadow: none;
}
.icon-button {
  padding: 9px;
  min-width: 38px;
  min-height: 38px;
  background: transparent;
}
.icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 29px;
  line-height: 1.25;
  letter-spacing: -0.9px;
  margin-bottom: 8px;
  font-weight: 720;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.4px;
  line-height: 1.35;
}
h3 {
  font-size: 15px;
}
p {
  color: var(--muted);
}
small,
.hint {
  font-size: 12px;
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 10px;
}
.sidebar {
  position: fixed;
  width: 248px;
  inset: 0 auto 0 0;
  background: var(--nav);
  color: #f4f6ff;
  display: flex;
  flex-direction: column;
  padding: 31px 18px;
  z-index: 30;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.sidebar .brand {
  padding: 0 10px;
}
.brand small {
  display: block;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.7px;
  margin-top: 4px;
  color: #9ba8c2;
}
.mark {
  width: 38px;
  height: 42px;
  background: #6264eb;
  color: white;
  border-radius: 12px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.mark svg {
  width: 26px;
  height: 26px;
}
.tenant-label {
  font-size: 9px !important;
  letter-spacing: 1.4px;
  color: #97a5bf;
  margin: 36px 10px 25px;
}
.tenant-label select {
  background: #1c2941;
  border: 1px solid #324058;
  color: #f2f4fa;
  font-size: 12px;
  margin-top: 5px;
  width: 100%;
  letter-spacing: 0;
}
.nav-label {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.5px;
  color: #7e8da8;
  margin: 16px 13px 10px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav {
  justify-content: flex-start;
  background: transparent;
  border: 1px solid transparent;
  color: #adb9ce;
  font-size: 12px;
  padding: 12px 13px;
  gap: 12px;
  font-weight: 500;
}
.nav .icon {
  width: 18px;
  height: 18px;
}
.nav.active {
  background: #30315c;
  border-color: #454473;
  color: #e5e3ff;
}
.nav:hover {
  background: #202d46;
  border-color: transparent;
  color: white;
}
.nav.active .icon {
  color: #b5b0ff;
}
.nav small {
  margin-left: auto;
  color: #c7c4ff;
  background: #ffffff10;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 10px 0;
  border-top: 1px solid #29364c;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  color: #bcc8dc;
}
.sidebar-bottom small {
  display: block;
  color: #8999b3;
  font-size: 10px;
  margin-top: 3px;
}
.sidebar-bottom > .icon {
  color: #aaa5ff;
}
.workspace {
  margin-left: 248px;
}
.topbar {
  height: 79px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 36px;
  background: #fff;
  font-size: 12px;
}
.topbar-location {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.breadcrumb-root,
.breadcrumb-separator {
  color: #8b96a7;
}
.identity {
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  height: 35px;
  width: 35px;
  background: #eeedff;
  color: #5550b4;
  border: 1px solid #e1def8;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.identity-text strong {
  display: block;
  font-size: 11px;
}
.identity-text small {
  display: block;
  font-size: 10px;
  margin-top: 2px;
}
.identity form {
  margin-left: 10px;
}
.identity .icon-button {
  border: 0;
  color: var(--muted);
}
.demo-banner {
  padding: 9px 36px;
  background: #fffcf2;
  color: #8a7347;
  border-bottom: 1px solid #f2ead6;
  font-size: 11px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.demo-banner .badge {
  font-size: 8px;
  letter-spacing: 1px;
}
main#app {
  padding: 32px 36px 45px;
  min-height: calc(100vh - 155px);
  max-width: 1680px;
  margin: auto;
  outline: none;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 27px;
  gap: 18px;
}
.page-head p {
  margin: 0;
  font-size: 12px;
  max-width: 620px;
}
.page-head .actions {
  flex-shrink: 0;
}
.page-head button {
  font-size: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 25px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 19px 20px;
  position: relative;
}
.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}
.stat-top > span:first-child {
  font-size: 11px;
  color: var(--muted);
  font-weight: 550;
}
.stat-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f3f2ff;
  color: #7770cb;
}
.stat strong {
  font-size: 31px;
  letter-spacing: -1px;
  display: block;
  font-weight: 650;
  margin: 8px 0 5px;
  line-height: 1.2;
}
.stat small {
  font-size: 10px;
}
.stat.featured {
  border-color: #d4d4f7;
  background: linear-gradient(115deg, #f2f0ff, #fff);
}
.stat.featured strong {
  color: #514bbe;
}
.stat.warn .stat-icon {
  background: #fff4df;
  color: #b38738;
}
.stat.good .stat-icon {
  background: #e8f7f1;
  color: #3a9178;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 21px 23px;
  border-bottom: 1px solid var(--line);
}
.panel-header h2 {
  margin: 0;
  font-size: 15px;
}
.panel-header p {
  font-size: 11px;
  margin: 4px 0 0;
}
.panel-header .text-button {
  font-size: 11px;
  color: var(--green);
  white-space: nowrap;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 22px;
  margin-bottom: 23px;
}
.overview-grid .panel {
  height: 100%;
}
.overview-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.toolbar {
  padding: 17px 21px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar-group {
  display: flex;
  gap: 9px;
  align-items: center;
}
.search-field {
  position: relative;
  flex: 1;
  max-width: 370px;
  min-width: 190px;
}
.search-field .icon {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #8994a7;
  width: 17px;
  height: 17px;
}
.search-field input {
  padding-left: 38px;
  width: 100%;
  font-size: 12px;
}
.toolbar select {
  font-size: 11px;
  max-width: 190px;
}
.filter-chips {
  display: flex;
  gap: 5px;
  padding: 3px;
  background: #f4f6fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.filter-chips button {
  padding: 5px 11px;
  font-size: 10px;
  background: transparent;
  border-color: transparent;
  border-radius: 5px;
  color: var(--muted);
}
.filter-chips button.active {
  background: white;
  color: var(--ink);
  border-color: #e6e9ef;
  box-shadow: 0 1px 3px #23314d09;
}
input,
select,
textarea {
  border: 1px solid #dce2eb;
  background: white;
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  max-width: 100%;
}
input:hover,
select:hover,
textarea:hover {
  border-color: #bfc8d9;
}
input::placeholder,
textarea::placeholder {
  color: #8e9aac;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f5f7fa;
  color: #79859a;
}
input[type="checkbox"] {
  width: 17px !important;
  height: 17px;
  accent-color: var(--green);
  flex-shrink: 0;
}
textarea {
  resize: vertical;
  min-height: 88px;
}
input[type="search"] {
  min-height: 40px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 9px;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  color: #7c879a;
  font-weight: 650;
  padding: 13px 21px;
  background: #fafbfe;
  white-space: nowrap;
}
td {
  padding: 18px 21px;
  border-top: 1px solid #eff2f6;
  vertical-align: middle;
}
td strong {
  display: block;
  font-weight: 600;
}
td small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}
tbody tr:hover {
  background: #fcfcff;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 600;
  border-radius: 5px;
  padding: 4px 7px;
  white-space: nowrap;
  background: #f0f2f6;
  color: #637086;
  line-height: 1.4;
}
.badge.green {
  background: #e9f6ef;
  color: #348160;
}
.badge.amber {
  background: #fff4df;
  color: #996817;
}
.badge.red {
  background: #fcecee;
  color: #b34657;
}
.badge.purple {
  background: #efedff;
  color: #6960bc;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.row-title {
  display: flex;
  align-items: center;
  gap: 11px;
}
.tunnel-icon {
  background: #f2f1fd;
  border: 1px solid #eae7fb;
  border-radius: 10px;
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  color: #7067c3;
  flex-shrink: 0;
}
.row-link {
  border: 0;
  background: transparent;
  text-align: left;
  display: block;
  padding: 0;
  justify-content: flex-start;
  min-width: 110px;
}
.row-link strong {
  font-size: 12px;
}
.row-link:hover {
  background: transparent;
  color: var(--green);
}
.binding-ip {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 3px 0;
  font-size: 10px;
  white-space: nowrap;
}
.binding-ip span {
  font-size: 8px;
  color: #808aa0;
  min-width: 31px;
}
.binding-ip code {
  font-size: 10px;
  color: #526178;
}
.row-open {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px;
  color: #8992a4;
}
.row-open:hover {
  color: var(--green);
}
.row-open .icon {
  width: 15px;
  height: 15px;
}
.panel-foot {
  padding: 13px 21px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-foot { flex-wrap: wrap; }
.table-page-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.page-size-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.page-size-label select {
  width: 76px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}
.pagination button {
  padding: 5px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 6px;
}
.pagination .icon {
  width: 14px;
  height: 14px;
}
.empty {
  padding: 40px 22px;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f0effa;
  color: #8b83c6;
}
.empty h3 {
  color: var(--ink);
  margin-bottom: 6px;
  font-size: 14px;
}
.empty p {
  font-size: 12px;
  max-width: 360px;
  margin: 0 auto 16px;
}
.empty button {
  font-size: 11px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 20px;
}
.cards > .empty {
  grid-column: 1 / -1;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-top .tunnel-icon {
  height: 42px;
  width: 42px;
}
.card h2 {
  margin-top: 18px;
  margin-bottom: 7px;
  font-size: 19px;
}
.card p {
  font-size: 12px;
  min-height: 38px;
}
.card .actions {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.card .actions button {
  font-size: 11px;
}
.quota-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.quota-label strong {
  font-size: 12px;
}
.progress {
  margin: 11px 0 7px;
}
.progress progress {
  width: 100%;
  height: 6px;
  accent-color: var(--green);
  display: block;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
}
.progress progress::-webkit-progress-bar {
  background: #eff0f6;
}
.progress progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 8px;
}
.quota-warning {
  color: #a76b1d;
}
.notice {
  background: #f3f2fc;
  border: 1px solid #e4e1f5;
  padding: 14px 17px;
  border-radius: 10px;
  font-size: 12px;
  color: #625c88;
  margin-bottom: 20px;
  line-height: 1.7;
}
.notice.warn {
  background: #fffbf0;
  border-color: #f2e5c7;
  color: #92713c;
}
.notice p {
  color: inherit;
  margin: 7px 0;
}
.notice small {
  color: inherit;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
footer {
  padding: 17px 36px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #8b95a7;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
footer strong {
  font-weight: 600;
  color: #69758a;
}
.sync-panel {
  padding: 21px 23px;
}
.sync-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.sync-heading h3 {
  margin: 0;
}
.sync-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid #f0f2f6;
  font-size: 11px;
  color: var(--muted);
}
.sync-row strong {
  color: var(--ink);
  font-weight: 500;
  text-align: right;
  font-size: 10px;
}
.sync-note {
  font-size: 10px;
  line-height: 1.7;
  color: #8a94a5;
  margin: 12px 0 0;
}
.activity-list {
  padding: 4px 23px;
}
.activity-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f2f6;
  align-items: flex-start;
}
.activity-item:last-child {
  border-bottom: 0;
}
.activity-icon {
  background: #f3f3fa;
  border-radius: 9px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #8a84bc;
  flex-shrink: 0;
}
.activity-icon .icon {
  width: 15px;
  height: 15px;
}
.activity-text {
  min-width: 0;
  flex: 1;
}
.activity-text strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}
.activity-text small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.activity-time {
  font-size: 9px;
  color: #8d96a7;
  white-space: nowrap;
}
.quick-grid {
  padding: 18px 23px;
  display: grid;
  gap: 10px;
}
.quick-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  padding: 14px;
  text-align: left;
  border: 1px solid #eaeaf3;
  border-radius: 10px;
}
.quick-link > span:nth-child(2) {
  flex: 1;
}
.quick-link strong {
  font-size: 12px;
  display: block;
}
.quick-link small {
  font-size: 10px;
  display: block;
  margin-top: 3px;
  font-weight: 400;
}
.quick-link > .icon:first-child {
  color: #7970c9;
}
.welcome-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 25px;
  background: linear-gradient(100deg, #202645, #343464);
  border-radius: var(--radius);
  margin-bottom: 24px;
  color: white;
}
.welcome-strip h2 {
  font-size: 18px;
  margin: 0 0 5px;
}
.welcome-strip p {
  font-size: 11px;
  color: #c0c3df;
  margin: 0;
}
.welcome-strip button {
  color: #edeaff;
  background: #ffffff0c;
  border-color: #ffffff28;
  font-size: 11px;
  white-space: nowrap;
}
.welcome-symbol {
  color: #b8b0f5;
  display: flex;
  align-items: center;
  gap: 14px;
}
.welcome-symbol > .icon {
  width: 32px;
  height: 32px;
}
.mini-count {
  font-size: 10px;
  background: #f2f1fa;
  color: #7d74b6;
  border-radius: 5px;
  padding: 3px 7px;
}
.role-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.role-card {
  padding: 18px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.role-card p {
  font-size: 11px;
  margin: 9px 0 0;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}
.user-cell .avatar {
  width: 31px;
  height: 31px;
  font-size: 11px;
}
.audit-action {
  font-size: 11px;
}
.audit-detail {
  max-width: 440px;
  overflow-wrap: anywhere;
}
.mobile-menu {
  display: none;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 260px;
  background: white;
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
.loading-state {
  text-align: center;
  padding: 100px 20px;
}
.loading-state h2 {
  font-size: 18px;
  margin: 18px 0 7px;
}
.loading-state p {
  font-size: 12px;
}
.spinner {
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 2px solid #dfdef2;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
dialog {
  border: 1px solid #e4e7f1;
  border-radius: 18px;
  padding: 0;
  width: min(900px, 94vw);
  max-height: 92dvh;
  color: var(--ink);
  box-shadow: 0 12px 36px #10203935;
  background: white;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #101c385e;
}
#modal {
  max-height: 90dvh;
  overflow: hidden;
}
#modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(90dvh - 2px);
  min-height: 0;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
  flex-shrink: 0;
}
.modal-head h2 {
  margin: 0 0 5px;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.modal-head small {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.modal-head > div {
  min-width: 0;
}
.modal-head .text-button {
  background: #f5f6fa;
  border-radius: 8px;
  padding: 5px 10px;
}
.modal-body {
  flex: 1 1 auto;
  padding: 24px 28px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  min-height: 0;
  overscroll-behavior: contain;
}
.modal-body > :last-child {
  margin-bottom: 0;
}
.modal-body .form-help + .notice {
  margin-top: 16px;
}
.modal-foot {
  padding: 17px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #fafbfe;
  flex-shrink: 0;
}
.modal-foot button {
  font-size: 11px;
}
.modal-foot .actions {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.modal-foot > .hint {
  font-size: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid > *,
.bindings > * {
  min-width: 0;
}
.form-grid .full {
  grid-column: 1/-1;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
}
label .hint {
  font-size: 10px;
  font-weight: 400;
}
label.check {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 11px;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  font-size: 12px;
}
.section-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 24px 0 15px;
  color: #69758c;
  border-top: 1px solid var(--line);
  padding-top: 23px;
  font-weight: 700;
}
.bindings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.binding {
  border: 1px solid var(--line);
  padding: 17px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fcfcfe;
}
.binding > label:first-child {
  background: #f0eefb;
  border-color: #e5e1f7;
  color: #665ca1;
}
.binding input {
  font-size: 12px;
}
.binding.inactive {
  background: #f7f8fb;
}
.allocation-tool {
  padding: 20px;
  margin-bottom: 18px;
  border: 1px solid #ddd9fc;
  border-radius: 14px;
  background: linear-gradient(120deg, #f6f4ff, #fafaff);
}
.allocation-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.allocation-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 11px; background: #e9e5ff; color: #5548dc; font-size: 23px; }
.allocation-title h3 { margin: 0; font-size: 15px; }
.allocation-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.allocation-options { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(250px, 1.6fr) auto; gap: 18px; align-items: start; }
.allocation-options > * { min-width: 0; }
.allocation-options input[type="number"] { width: 100%; background: white; font-size: 14px; }
.allocation-preview { font: 11px ui-monospace, monospace; color: #686181; overflow-wrap: anywhere; }
.allocation-choice { border: 0; margin: 0; padding: 0; display: flex; gap: 6px; min-width: 0; }
.allocation-choice legend { font-size: 11px; font-weight: 600; margin-bottom: 7px; padding: 0; }
.allocation-choice label { position: relative; flex: 1; min-width: 0; cursor: pointer; }
.allocation-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.allocation-choice span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 42px; padding: 8px 10px; border: 1px solid #dcd9eb; border-radius: 9px; background: white; font-size: 11px; line-height: 1.4; }
.allocation-choice input:checked + span { color: #4d3dce; background: #ece8ff; border-color: #7864ec; box-shadow: inset 0 0 0 1px #7864ec; }
.allocation-choice input:focus-visible + span { outline: 3px solid #aca0fa; outline-offset: 3px; }
.allocation-choice input:disabled + span { opacity: .55; cursor: default; }
.allocation-generate { margin-top: 21px; min-height: 42px; white-space: nowrap; }
.allocation-policy-note, .allocation-feedback, .allocation-save-note { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.allocation-policy-note { margin: 12px 0 0; color: #645884; }
.allocation-feedback { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: #eeeafc; }
.allocation-feedback:empty { display: none; }
.allocation-feedback[data-state="success"] { background: #e5f5ef; color: #226c56; }
.allocation-feedback[data-state="error"] { background: #fcebed; color: #a42f45; }
.allocation-save-note { margin: 10px 0 0; color: #69758c; }
@media (max-width: 760px) {
  .allocation-options { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
  .allocation-choice { grid-column: 1 / -1; grid-row: 2; }
  .allocation-title p { display: none; }
  .allocation-tool { padding: 16px; }
  .allocation-generate { grid-column: 2; grid-row: 1; margin-top: 21px; width: 100%; }
  .allocation-title { align-items: flex-start; }
}
.tunnel-sharing { min-width: 0; }
.tunnel-sharing .notice { overflow-wrap: anywhere; }
.tunnel-sharing .table-wrap { margin-top: 18px; }
.tunnel-sharing td { overflow-wrap: anywhere; }
.sharing-form-actions { display: flex; justify-content: flex-end; }
.transfer-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.transfer-form > label { min-width: 0; }
.transfer-form select { width: 100%; min-width: 0; font-size: 12px; }
.transfer-form button { min-height: 42px; }
@media (max-width: 760px) {
  .transfer-form { grid-template-columns: minmax(0, 1fr); }
  .sharing-form-actions button, .transfer-form button { width: 100%; }
  .tunnel-sharing .table-wrap table,
  .tunnel-sharing tbody { display: block; width: 100%; }
  .tunnel-sharing thead { display: none; }
  .tunnel-sharing tr { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; margin-bottom: 10px; }
  .tunnel-sharing td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border: 0; text-align: right; }
  .tunnel-sharing td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 11px; flex-shrink: 0; }
  .tunnel-sharing td:not([data-label]) { justify-content: flex-end; }
  .tunnel-sharing td:empty { display: none; }
  .tunnel-sharing td[colspan] { justify-content: flex-start; text-align: left; }
  .tunnel-sharing td button { white-space: nowrap; }
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  gap: 25px;
  flex-shrink: 0;
  overflow-x: auto;
}
.tabs button {
  flex-shrink: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 15px 0;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.tabs button.active {
  color: var(--green);
  border-bottom-color: var(--green);
}
.error {
  background: #fef0f1;
  color: #ad3c4e;
  padding: 12px 15px;
  border-radius: 9px;
  margin-bottom: 16px;
  font-size: 12px;
}
.secrets-panel { max-width: 700px; margin: 0 auto; }
.secrets-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.secrets-emblem { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--pale); color: var(--green); flex-shrink: 0; }
.secrets-emblem .icon { width: 24px; height: 24px; }
.secrets-heading h3 { margin: 0; font-size: 20px; letter-spacing: -.4px; }
.secrets-heading p { margin: 3px 0 0; color: var(--muted); }
.secret-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.secret-choice { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 7px; padding: 16px; border: 2px solid var(--line); }
.secret-choice[aria-pressed="true"] { border-color: var(--green); background: #f6f5ff; box-shadow: 0 0 0 1px #4f55dc0a; }
.secret-choice-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.secret-choice-subtitle { font-weight: 400; font-size: 12px; color: var(--muted); }
.secret-status { display: inline-block; font-size: 11px; font-weight: 600; background: #fff3df; color: #85570d; padding: 3px 7px; border-radius: 6px; }
.secret-status.is-set { background: #e7f5ef; color: #24674e; }
.secret-current { border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.secret-current-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.secret-current h4, .secret-editor h4 { margin: 0; font-size: 15px; }
.secret-protocol { font-size: 11px; color: var(--muted); }
.secret-current-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 8px; padding: 12px 14px; background: var(--bg); border-radius: 9px; }
.secret-current-row code { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 16px; }
.secret-current-actions { display: flex; gap: 7px; flex-shrink: 0; }
.secret-current-actions button { padding: 7px 12px; font-size: 12px; }
.secret-audit { margin: 0 0 20px; font-size: 11px; color: var(--muted); }
.secret-current > .primary { margin-top: 6px; }
.secret-editor { margin-top: 16px; padding: 22px; border: 1px solid #dcdcf4; border-radius: 14px; background: #fafaff; }
.secret-editor label { display: block; font-size: 12px; margin: 18px 0 6px; }
.secret-input-row { display: flex; gap: 8px; }
.secret-input-row input { min-width: 0; flex: 1; width: 100%; }
.secret-input-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; font-size: 11px; color: var(--muted); }
.secret-input-tools button { color: var(--green); font-size: 12px; }
.secret-save-note { font-size: 12px; color: var(--muted); margin: 16px 0; }
.secret-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.secret-feedback { margin: 12px 0; color: #24674e; font-size: 12px; }
.secret-feedback:empty { display: none; }
.secret-help { margin-top: 18px; color: var(--muted); font-size: 12px; }
.secret-help summary { cursor: pointer; width: fit-content; }
.secret-help p { line-height: 1.9; }
@media (max-width: 540px) {
  .secret-choices { grid-template-columns: 1fr; gap: 8px; }
  .secret-choice { padding: 12px 14px; }
  .secrets-heading h3 { font-size: 18px; }
  .secret-current, .secret-editor { padding: 16px; }
  .secret-current-row { align-items: stretch; flex-direction: column; }
  .secret-current-actions button { flex: 1; }
  .secret-current > .primary { width: 100%; }
  .secret-input-tools { flex-wrap: wrap; }
  .secret-editor-actions button { flex: 1; }
}
.form-guide {
  padding: 13px 15px;
  background: #f7f8fc;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 11px;
  color: #748097;
  margin-bottom: 20px;
}
.form-guide strong {
  color: #586178;
}
.form-help {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 11px;
  color: var(--muted);
}
.form-help summary {
  cursor: pointer;
  font-weight: 600;
  color: #5e6b80;
}
.form-help p {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.8;
}
.readonly-note {
  border-left: 3px solid #c9c2e8;
}
.dirty-indicator {
  font-size: 10px;
  color: #a77429;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dirty-indicator:before {
  content: "";
  width: 5px;
  height: 5px;
  background: #c49448;
  border-radius: 50%;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: min(440px, calc(100vw - 32px));
  background: var(--nav);
  color: white;
  border: 1px solid #ffffff20;
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: 0 8px 30px #10292c25;
  z-index: 70;
  font-size: 12px;
}
#confirm-modal {
  width: min(430px, 92vw);
}
.confirm-content {
  padding: 28px;
}
.confirm-content h2 {
  font-size: 20px;
  margin: 15px 0 10px;
}
.confirm-content p {
  font-size: 13px;
  margin: 0;
  line-height: 1.8;
}
.confirm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #efedff;
  color: #7265bb;
  border-radius: 12px;
}
#confirm-modal .modal-foot {
  justify-content: flex-end;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  background: white;
}
.login-story {
  background:
    radial-gradient(ellipse at 10% 50%, #2c3156 0, transparent 60%), #111c32;
  padding: 45px clamp(35px, 5vw, 90px);
  color: white;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-story .brand {
  font-size: 20px;
}
.login-intro {
  margin-top: 70px;
  position: relative;
  z-index: 1;
}
.login-intro .eyebrow {
  color: #a8a3dd;
  font-size: 9px;
}
.login h1 {
  font-size: clamp(42px, 4.8vw, 68px);
  font-weight: 650;
  letter-spacing: -2.6px;
  line-height: 1.1;
  margin: 22px 0;
}
.login h1 em {
  font-style: normal;
  color: #aaa2f4;
}
.login-intro p {
  font-size: 13px;
  color: #a8b5ce;
  max-width: 365px;
  line-height: 1.9;
}
.network-art {
  height: 145px;
  position: relative;
  margin: 16px 0 28px;
  max-width: 460px;
}
.network-art:before {
  content: "";
  position: absolute;
  left: 60px;
  right: 60px;
  top: 40px;
  height: 66px;
  border: 1px solid #6f759750;
  border-radius: 18px;
}
.network-node {
  position: absolute;
  border: 1px solid #4c577a;
  background: #1d2943;
  border-radius: 10px;
  width: 115px;
  padding: 10px 14px;
  font-size: 11px;
}
.network-node span {
  font-size: 8px;
  display: block;
  color: #8e9dba;
  margin-top: 3px;
}
.node-top {
  left: 0;
  top: 8px;
}
.node-bottom {
  right: 0;
  top: 78px;
}
.network-hub {
  position: absolute;
  left: 50%;
  top: 26px;
  transform: translateX(-50%);
  padding: 12px 15px;
  background: #30345a;
  border: 1px solid #6d67a4;
  border-radius: 14px;
  text-align: center;
  font-size: 10px;
  z-index: 1;
}
.network-hub .mark {
  height: 33px;
  width: 33px;
  display: flex;
  margin: 0 auto 7px;
  border-radius: 10px;
}
.network-hub .mark svg {
  width: 22px;
}
.network-label {
  font-size: 7px;
  letter-spacing: 1.7px;
  color: #6e7c9a;
  position: absolute;
  bottom: 0;
  left: 0;
}
.login-features {
  display: flex;
  gap: 25px;
  font-size: 10px;
  color: #827eae;
  border-top: 1px solid #ffffff13;
  padding-top: 23px;
  margin-top: auto;
}
.login-features strong {
  color: #b7c1d5;
  font-weight: 400;
  margin-left: 5px;
}
.login-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px;
  position: relative;
  background:
    radial-gradient(ellipse at 100% 0, #f5f3ff, transparent 60%), #fff;
}
.login-card {
  width: 100%;
  max-width: 365px;
}
.login-card h2 {
  font-size: 28px;
  letter-spacing: -0.9px;
  margin: 14px 0 12px;
}
.login-card > p {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 30px;
}
.login-card .eyebrow {
  font-size: 9px;
}
.login-card .button,
.login-card button {
  width: 100%;
  margin: 20px 0 8px;
  padding: 13px 17px;
  font-size: 12px;
  justify-content: space-between;
}
.login-card .notice {
  font-size: 11px;
}
.login-security {
  margin: 17px 0;
  font-size: 11px;
  color: #8791a3;
  line-height: 1.9;
}
.login-help {
  margin-top: 35px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 11px;
  color: #8a93a2;
  line-height: 1.9;
}
.login-help strong {
  font-weight: 500;
  color: #69758c;
}
.login-footer {
  position: absolute;
  bottom: 24px;
  font-size: 8px;
  letter-spacing: 1.7px;
  color: #9d9aaa;
  margin: 0;
}
.login-footer span {
  margin-left: 20px;
  letter-spacing: 0;
  color: #b1adba;
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: #101c3866;
  border: 0;
  border-radius: 0;
  z-index: 29;
}
.sidebar-overlay:hover {
  background: #101c3866;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1700px) {
  main#app {
    padding-top: 42px;
  }
  .stat {
    padding: 23px;
  }
  .page-head {
    margin-bottom: 32px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 222px;
    padding: 27px 13px;
  }
  .workspace {
    margin-left: 222px;
  }
  .sidebar .brand {
    font-size: 17px;
  }
  .brand small {
    font-size: 7px;
  }
  main#app {
    padding: 27px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 16px;
  }
  .stat-top > span:first-child {
    font-size: 10px;
  }
  .stat-icon {
    width: 27px;
    height: 27px;
  }
  .stat-icon .icon {
    width: 15px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr);
    gap: 17px;
  }
  .overview-bottom {
    gap: 17px;
  }
  th,
  td {
    padding-left: 16px;
    padding-right: 16px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .login-story {
    padding: 35px;
  }
  .login-intro {
    margin-top: 55px;
  }
  .login-features {
    gap: 12px;
    font-size: 9px;
  }
}
@media (max-width: 980px) {
  .overview-grid,
  .overview-bottom {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-grid .panel {
    height: auto;
  }
  .page-head .actions {
    max-width: 180px;
    justify-content: flex-end;
  }
  .page-head .actions button {
    font-size: 11px;
  }
  .toolbar-group {
    flex-wrap: wrap;
  }
  .role-cards {
    gap: 10px;
  }
  .role-card {
    padding: 14px;
  }
  .login-features {
    flex-direction: column;
    gap: 10px;
  }
  .login h1 {
    font-size: 48px;
  }
  .login-side {
    padding: 35px;
  }
  .network-art {
    max-width: 330px;
  }
  .network-node {
    width: 92px;
    font-size: 10px;
  }
  .network-hub {
    padding: 10px;
    font-size: 9px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    width: 248px;
    transition: transform 0.2s;
    padding: 28px 18px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar .brand {
    font-size: 19px;
  }
  .workspace {
    margin: 0;
  }
  .mobile-menu {
    display: inline-flex;
    border: 0;
    padding: 7px;
  }
  .topbar {
    height: 66px;
    padding: 0 16px;
    gap: 8px;
  }
  .topbar-location {
    gap: 9px;
  }
  .breadcrumb-root,
  .breadcrumb-separator {
    display: none;
  }
  #breadcrumb {
    font-size: 11px;
  }
  .identity-text {
    display: none;
  }
  .identity {
    gap: 5px;
  }
  .identity form {
    margin-left: 2px;
  }
  .avatar {
    width: 31px;
    height: 31px;
    font-size: 11px;
  }
  .demo-banner {
    padding: 9px 17px;
    font-size: 9px;
    align-items: flex-start;
  }
  .demo-banner .badge {
    font-size: 7px;
    flex-shrink: 0;
  }
  main#app {
    padding: 24px 17px 30px;
  }
  .page-head {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .page-head p {
    font-size: 11px;
    max-width: 390px;
  }
  .page-head .actions {
    max-width: none;
    justify-content: flex-start;
  }
  .page-head button {
    padding: 8px 11px !important;
  }
  .stats {
    gap: 10px;
    margin-bottom: 18px;
  }
  .stat {
    padding: 14px;
  }
  .stat strong {
    font-size: 27px;
  }
  .stat small {
    font-size: 9px;
  }
  .stat-top > span:first-child {
    font-size: 10px;
  }
  .stat-icon {
    width: 25px;
    height: 25px;
  }
  .welcome-strip {
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
  }
  .welcome-strip h2 {
    font-size: 16px;
  }
  .welcome-symbol > .icon {
    display: none;
  }
  .welcome-strip p {
    font-size: 10px;
  }
  .overview-grid,
  .overview-bottom {
    gap: 18px;
    margin-bottom: 18px;
  }
  .panel-header {
    padding: 17px;
  }
  .panel-header h2 {
    font-size: 14px;
  }
  .panel-header p {
    font-size: 10px;
  }
  .toolbar {
    padding: 13px;
    gap: 10px;
  }
  .search-field {
    max-width: none;
    width: 100%;
    flex-basis: 100%;
  }
  .toolbar-group {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .toolbar select {
    max-width: 170px;
    padding: 8px;
    font-size: 10px;
  }
  .filter-chips button {
    padding: 5px 8px;
    font-size: 9px;
  }
  th,
  td {
    padding: 14px;
    font-size: 11px;
  }
  .tunnels-table .optional-col {
    display: none;
  }
  .tunnels-table th {
    font-size: 8px;
  }
  .tunnels-table td {
    padding: 13px 12px;
  }
  .tunnel-icon {
    width: 30px;
    height: 32px;
    border-radius: 8px;
  }
  .tunnel-icon .icon {
    width: 16px;
  }
  .row-title {
    gap: 9px;
  }
  .row-link strong {
    font-size: 11px;
  }
  .row-link small {
    font-size: 9px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .row-open {
    padding: 5px;
  }
  .panel-foot {
    padding: 12px 14px;
    font-size: 9px;
    flex-wrap: wrap;
  }
  .badge {
    font-size: 8px;
  }
  .sync-panel {
    padding: 18px;
  }
  .activity-list {
    padding: 0 17px;
  }
  .activity-time {
    font-size: 8px;
  }
  .quick-grid {
    padding: 17px;
  }
  .role-cards {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 18px;
  }
  .role-card {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .role-card p {
    margin: 0;
    font-size: 10px;
  }
  .role-card .badge {
    min-width: 90px;
    justify-content: center;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 21px;
  }
  .form-grid,
  .bindings {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  footer {
    padding: 15px 17px;
    font-size: 9px;
  }
  footer > span:first-of-type {
    display: none;
  }
  .modal-body,
  .modal-head {
    padding: 19px;
  }
  .modal-head h2 {
    font-size: 19px;
  }
  .modal-foot {
    padding: 14px 19px;
    flex-wrap: wrap;
  }
  .modal-foot .actions {
    width: 100%;
    justify-content: flex-end;
    gap: 7px;
  }
  .modal-foot button {
    font-size: 10px;
    padding: 9px 11px;
  }
  .tabs {
    padding: 0 19px;
    gap: 22px;
  }
  .tabs button {
    font-size: 10px;
    padding: 12px 0;
  }
  dialog {
    width: calc(100vw - 20px);
    max-height: 94dvh;
    border-radius: 14px;
  }
  #modal {
    max-height: 94dvh;
  }
  #modal-content {
    max-height: calc(94dvh - 2px);
  }
  .modal-body table {
    display: block;
    overflow-x: auto;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 27px;
  }
  .login-intro {
    margin-top: 35px;
  }
  .login h1 {
    font-size: 43px;
    letter-spacing: -1.8px;
  }
  .login-intro p {
    font-size: 12px;
    max-width: 380px;
  }
  .login-features,
  .network-art {
    display: none;
  }
  .login-side {
    padding: 40px 27px 70px;
    min-height: 480px;
  }
  .login-card {
    max-width: 440px;
  }
  .login-card h2 {
    font-size: 25px;
  }
  .login-footer {
    bottom: 18px;
  }
  .skip-link {
    left: 15px;
  }
  .confirm-content {
    padding: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nowrap {
  white-space: nowrap;
}
.standalone-toolbar {
  border: 0;
  padding: 0;
  margin-bottom: 22px;
}

/* Session observations: visible independently of configured VPN bindings. */
.connection-strip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 24px;
  overflow: hidden;
}
.connection-strip-head {
  padding: 17px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.connection-strip-head strong {
  font-size: 13px;
  display: block;
}
.connection-strip-head small {
  font-size: 10px;
  display: block;
  margin-top: 3px;
}
.connection-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 15px 20px 8px;
}
.connection-counters button {
  padding: 13px;
  text-align: left;
  justify-content: flex-start;
  font-size: 11px;
  gap: 11px;
}
.connection-counters button[aria-pressed="true"] {
  border-color: #b5b8f2;
  background: #f4f3ff;
}
.connection-counters button > span:nth-child(2) {
  flex: 1;
}
.connection-counters button strong {
  display: block;
  font-size: 24px;
  line-height: 1.25;
  margin-top: 3px;
  letter-spacing: -0.6px;
}
.connection-counter-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eaf7f0;
  color: #348160;
}
.connection-counters button > .icon {
  width: 15px;
  color: var(--muted);
}
.connection-strip > p {
  font-size: 10px;
  padding: 3px 21px 15px;
  margin: 0;
}
.concentrator-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.concentrator-tag {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.3px;
  color: #286d54;
  background: #f0f8f4;
  border: 1px solid #d8eddf;
  border-radius: 5px;
  padding: 3px 7px;
}
.connection-status {
  min-width: 126px;
}
.connection-status small {
  font-size: 9px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .connection-strip-head {
    padding: 14px;
    align-items: flex-start;
  }
  .connection-strip-head strong {
    font-size: 12px;
  }
  .connection-strip-head small {
    font-size: 9px;
    max-width: 190px;
  }
  .connection-counters {
    gap: 7px;
    padding: 10px;
  }
  .connection-counters button {
    padding: 11px 7px;
    font-size: 9px;
    display: block;
    text-align: center;
    line-height: 1.5;
  }
  .connection-counter-icon {
    display: none;
  }
  .connection-counters button > .icon {
    display: none;
  }
  .connection-counters button strong {
    font-size: 24px;
    margin-top: 6px;
  }
  .connection-strip > p {
    font-size: 9px;
    padding: 3px 13px 13px;
  }
  .connection-status {
    min-width: 112px;
  }
  .concentrator-tag {
    font-size: 9px;
  }
  .connection-strip-head > .badge {
    font-size: 7px;
  }
}

/* Administration, workflow helpers and personal workspace tools. */
.sidebar {
  overflow-y: auto;
}
.sidebar nav {
  flex-shrink: 0;
}
.sidebar .tenant-label {
  margin-top: 25px;
  margin-bottom: 14px;
}
.sidebar .nav {
  padding-top: 10px;
  padding-bottom: 10px;
}
.sidebar-bottom {
  margin-top: 24px;
}
.admin-nav {
  color: #d4ceff;
  border: 1px solid #5e56834d;
  background: #ffffff05;
}
.admin-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 24px;
}
.admin-shortcuts .quick-link {
  font-size: 11px;
}
.admin-shortcuts .quick-link strong {
  flex: 1;
}
.admin-capacities {
  padding: 20px 23px;
  display: grid;
  gap: 20px;
}
.saved-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 17px;
}
.saved-filter-caption {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-right: 5px;
}
.saved-filter-bar button,
.saved-filter-bar select {
  font-size: 11px;
  padding: 8px 11px;
}
.saved-filter-bar select {
  max-width: 230px;
}
.saved-filter-bar button.active {
  color: var(--green);
  background: var(--pale);
  border-color: #d9d6fa;
}
.favorite-button {
  padding: 0;
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
}
.favorite-button.is-favorite {
  background: #fff7dd;
  border-color: #f0e1ac;
  color: #a17a23;
}
.row-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 5px;
  max-width: 200px;
}
.row-tags .badge {
  font-size: 8px;
  padding: 2px 4px;
}
.row-tags:empty {
  display: none;
}
.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.selection-cell {
  width: 35px;
  padding: 12px !important;
}
.selection-cell input {
  margin: 0;
  vertical-align: middle;
}
.bulk-toolbar {
  position: sticky;
  top: 10px;
  z-index: 5;
  background: #252742;
  border: 1px solid #5f6084;
  color: white;
  border-radius: 11px;
  margin-bottom: 15px;
  padding: 12px 17px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
}
.bulk-toolbar .primary {
  margin-left: auto;
}
.bulk-toolbar .text-button {
  color: #d2d0e4;
}
.bulk-toolbar button {
  font-size: 11px;
}
.bulk-preview {
  margin-bottom: 22px;
}
.bulk-preview h3 {
  margin: 12px 0;
}
.comparison-table td {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 280px;
}
.comparison-table .diff-before {
  color: #8c6571;
  background: #fff9fa;
}
.comparison-table .diff-after {
  color: #397759;
  background: #f6fbf8;
}
.organize-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.organize-options + .hint {
  margin-bottom: 25px;
}
.saved-view-list {
  display: grid;
  gap: 10px;
  margin-bottom: 15px;
}
.saved-view-list > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
}
.saved-view-list strong {
  font-size: 12px;
}
.saved-view-list button {
  font-size: 10px;
}
#history-more {
  padding-top: 14px;
  text-align: center;
}
.concentrator-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.concentrator-metrics {
  display: flex;
  justify-content: space-around;
  padding: 22px 15px;
  text-align: center;
  gap: 10px;
}
.concentrator-metrics strong {
  font-size: 26px;
  display: block;
}
.concentrator-metrics small {
  font-size: 10px;
}
.alert-list {
  display: grid;
  gap: 14px;
}
.alert-card {
  display: flex;
  align-items: flex-start;
  gap: 17px;
  padding: 22px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 13px;
}
.alert-symbol {
  background: #fff5e6;
  color: #9d772c;
  border-radius: 11px;
  padding: 11px;
  display: grid;
  place-items: center;
}
.alert-title {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.alert-title h3 {
  margin: 0;
  font-size: 14px;
}
.alert-card > div:nth-child(2) {
  flex: 1;
}
.alert-card p {
  font-size: 12px;
  margin: 8px 0;
}
.alert-card small {
  font-size: 10px;
}
.alert-card .actions {
  align-self: center;
}
.alert-card button {
  font-size: 11px;
}
.wizard-step {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.wizard-progress {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 20px;
  margin-bottom: 23px;
}
.wizard-progress > span {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
}
.wizard-progress b {
  background: #f1f2f6;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.wizard-progress .active {
  color: var(--green);
  font-weight: 650;
}
.wizard-progress .active b {
  color: white;
  background: var(--green);
}
.wizard-progress .done b {
  color: #397759;
  background: #eaf7ef;
}
#wizard-review .comparison-table td:nth-child(2),
#wizard-review .comparison-table th:nth-child(2) {
  display: none;
}
#wizard-review .notice {
  font-size: 11px;
}
.wizard-step .section-label:first-child {
  margin-top: 0;
}
@media (max-width: 1100px) {
  .admin-shortcuts {
    grid-template-columns: 1fr 1fr;
  }
  .concentrator-cards {
    grid-template-columns: 1fr;
  }
  .alert-card .actions {
    max-width: 130px;
  }
  .tabs {
    gap: 19px;
  }
  .tabs button {
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  .admin-shortcuts {
    gap: 9px;
  }
  .admin-shortcuts .quick-link {
    padding: 12px;
    gap: 8px;
  }
  .admin-shortcuts .quick-link strong {
    font-size: 10px;
  }
  .admin-shortcuts .quick-link > .icon:last-child {
    display: none;
  }
  .saved-filter-bar {
    gap: 7px;
  }
  .saved-filter-bar button,
  .saved-filter-bar select {
    font-size: 10px;
  }
  .saved-filter-caption {
    width: 100%;
  }
  .bulk-toolbar {
    flex-wrap: wrap;
    padding: 11px;
    gap: 9px;
  }
  .bulk-toolbar > span {
    width: 100%;
  }
  .bulk-toolbar .primary {
    margin-left: 0;
  }
  .selection-cell {
    padding: 8px !important;
    width: 25px;
  }
  .tunnels-table:has(.row-selection) .row-title {
    gap: 7px;
  }
  .tunnels-table:has(.row-selection) .row-link {
    min-width: 90px;
  }
  .tunnels-table:has(.row-selection) .row-link small {
    max-width: 106px;
  }
  .tunnels-table:has(.row-selection) th:last-child,
  .tunnels-table:has(.row-selection) td:last-child {
    display: none;
  }
  .tunnels-table:has(.row-selection) .favorite-button {
    display: none;
  }
  .alert-card {
    padding: 16px;
    gap: 11px;
    flex-wrap: wrap;
  }
  .alert-card .actions {
    max-width: none;
    margin-left: 44px;
  }
  .alert-title {
    flex-wrap: wrap;
  }
  .alert-title h3 {
    font-size: 12px;
  }
  .alert-card > div:nth-child(2) {
    min-width: 210px;
  }
  .alert-card p {
    font-size: 11px;
  }
  .alert-symbol {
    padding: 8px;
  }
  .organize-options {
    grid-template-columns: 1fr;
  }
  .saved-view-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .wizard-progress {
    gap: 8px;
  }
  .wizard-progress > span {
    font-size: 9px;
    gap: 5px;
  }
  .wizard-progress b {
    width: 23px;
    height: 23px;
  }
  .tabs {
    gap: 20px;
  }
  .tabs button {
    font-size: 10px;
  }
  .comparison-table td {
    font-size: 10px;
    padding: 10px;
  }
  .concentrator-metrics small {
    font-size: 9px;
  }
}
/* Operational tools keep long text and actions usable on narrow screens. */
.ops-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ops-section {
  padding: 20px;
  margin: 16px 0;
  border: 1px solid #e0e6f0;
  border-radius: 14px;
}
.ops-section h3 {
  margin-top: 0;
}
.ops-item {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #e0e6f0;
}
.ops-item p {
  overflow-wrap: anywhere;
}
.ops-result {
  display: block;
  text-align: left;
  width: 100%;
  margin: 8px 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ops-result small {
  display: block;
  margin-top: 4px;
}
.ops-code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 300px;
  overflow: auto;
}
.ops-preview {
  max-height: 240px;
  overflow: auto;
}
.ops-section summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
}
#global-search {
  width: 100%;
  margin-top: 8px;
}
#global-results {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
#global-results > p {
  margin: 0 0 12px;
}
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-editor { display: flex; align-items: flex-start; gap: 20px; }
.photo-controls { min-width: 0; flex: 1; }
#photo-preview { width: 96px; height: 96px; border-radius: 18px; flex-shrink: 0; }
.photo-picker input { max-width: 100%; margin-top: 8px; }
.photo-picker input::file-selector-button {
  border: 0;
  border-radius: 7px;
  padding: 8px 12px;
  margin-right: 12px;
  background: #eeecff;
  color: #4d46b8;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
#photo-status:empty { display: none; }
@media (max-width: 760px) { .photo-editor { flex-direction: column; } }
@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    gap: 10px;
    padding: 12px 16px;
  }
  .ops-shortcuts {
    order: 3;
    width: 100%;
  }
  .ops-shortcuts button {
    flex: 1;
    min-height: 44px;
  }
  .ops-section {
    padding: 12px;
  }
  .ops-item {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .tabs button {
    white-space: nowrap;
    min-height: 44px;
  }
  .modal-foot .actions {
    flex-wrap: wrap;
  }
  .modal-body input,
  .modal-body select,
  .modal-body textarea {
    font-size: 16px;
    max-width: 100%;
  }
  .ops-section .form-grid {
    grid-template-columns: 1fr;
  }
}
.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 6px;
  border-radius: 12px;
}
.profile-trigger:hover {
  background: var(--pale);
}
.profile-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-summary .avatar {
  width: 60px;
  height: 60px;
  font-size: 24px;
  flex-shrink: 0;
}
.profile-summary h3 {
  margin: 0;
}
.profile-summary p {
  overflow-wrap: anywhere;
}
.profile-option {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
}
.profile-option input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.profile-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (min-width: 761px) {
  body.compact-view td,
  body.compact-view th {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
.publication-steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.publication-steps li {
  border-top: 3px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.publication-steps li span {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}
.publication-steps .completed {
  border-color: #24856a;
  color: #24856a;
}
.publication-steps .current {
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}
.progress-link {
  font-size: 12px;
  padding: 4px 6px;
}
@media (max-width: 600px) {
  .publication-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
.entry-screen {
  min-height: 100dvh;
  background: #f3f5fa;
  padding: 0 40px;
  color: #17243d;
}
.entry-header {
  max-width: 1180px;
  margin: auto;
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.entry-brand {
  color: #17243d;
}
.entry-brand small {
  color: #66738b;
}
.entry-private {
  color: #627088;
  font-size: 12px;
}
.entry-private span {
  color: #766aec;
  font-size: 9px;
  margin-right: 8px;
}
.entry-main {
  max-width: 1180px;
  margin: 24px auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid #e1e6f0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 48px #17243d0a;
}
.entry-story {
  background: #121e35;
  padding: 56px;
  color: #fff;
}
.entry-kicker {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #5b50cc;
}
.entry-story .entry-kicker {
  color: #beb7ff;
}
.entry-story h1 {
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.09;
  letter-spacing: -2px;
  margin: 28px 0 22px;
  font-weight: 750;
}
.entry-story h1 em {
  color: #b5aaff;
  font-style: normal;
}
.entry-lead {
  color: #c1cadd;
  font-size: 15px;
  line-height: 1.75;
  max-width: 350px;
  margin-bottom: 34px;
}
.entry-benefits {
  border-top: 1px solid #ffffff20;
  padding-top: 12px;
}
.entry-benefits > div {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-top: 18px;
}
.entry-benefits > div > span {
  color: #aaa0ff;
  font-size: 11px;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.entry-benefits p {
  margin: 0;
}
.entry-benefits strong {
  color: #fff;
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.entry-benefits small {
  display: block;
  color: #b7c2d7;
  font-size: 12px;
  line-height: 1.65;
  margin-top: 4px;
}
.entry-access {
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}
.entry-access-mark {
  margin-bottom: 26px;
}
.entry-access-mark .mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.entry-access h2 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.8px;
  margin: 14px 0;
}
.entry-access-lead {
  color: #64718a;
  line-height: 1.75;
  font-size: 14px;
  margin: 0 0 30px;
}
.entry-access .button,
.entry-access form > button {
  width: 100%;
  min-height: 52px;
  justify-content: space-between;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
}
.entry-access form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.entry-access .notice {
  font-size: 12px;
  margin-bottom: 20px;
}
.entry-access select {
  min-height: 44px;
}
.entry-security {
  color: #64718a;
  font-size: 12px;
  line-height: 1.75;
  margin-top: 18px;
}
.entry-help {
  margin-top: 32px;
  border-top: 1px solid #e5eaf1;
  padding-top: 24px;
  font-size: 12px;
}
.entry-help strong {
  font-weight: 600;
}
.entry-help p {
  color: #64718a;
  line-height: 1.7;
  margin: 6px 0 0;
}
.entry-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: auto;
  padding: 18px 0 28px;
  border: 0;
  font-size: 11px;
  color: #64718a;
}
@media (max-width: 950px) {
  .entry-screen {
    padding: 0 24px;
  }
  .entry-story {
    padding: 36px;
  }
  .entry-access {
    padding: 32px;
  }
}
@media (max-width: 700px) {
  .entry-screen {
    padding: 0 16px;
  }
  .entry-header {
    padding: 22px 0;
  }
  .entry-private {
    display: none;
  }
  .entry-main {
    grid-template-columns: 1fr;
    margin: 8px auto;
    border-radius: 18px;
  }
  .entry-access {
    order: 0;
    padding: 28px;
  }
  .entry-access-mark {
    display: none;
  }
  .entry-access h2 {
    font-size: 26px;
  }
  .entry-access-lead {
    margin-bottom: 22px;
  }
  .entry-access select {
    font-size: 16px;
  }
  .entry-story {
    order: 1;
    padding: 32px 28px;
  }
  .entry-story h1 {
    font-size: 38px;
    letter-spacing: -1px;
    margin-top: 20px;
  }
  .entry-footer {
    flex-direction: column;
    padding: 20px 4px;
    gap: 4px;
  }
}
.sidebar-toggle {
  position: relative;
  align-self: flex-end;
  flex-shrink: 0;
  min-height: 32px;
  margin-bottom: 14px;
  padding: 6px 10px;
  border: 1px solid #46506a;
  border-radius: 8px;
  background: #1c2941;
  color: #e5e9f5;
  z-index: 1;
}
.sidebar-toggle:hover {
  background: #4f55dc;
  color: white;
}
.sidebar-toggle .icon {
  width: 16px;
  height: 16px;
}
.sidebar-space {
  display: none;
}
.sidebar nav {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}
.sidebar .brand,
.sidebar .tenant-label {
  flex-shrink: 0;
}
@media (min-width: 761px) {
  .sidebar-collapsed .sidebar {
    width: 80px;
    padding: 30px 12px 20px;
  }
  .sidebar-collapsed .workspace {
    margin-left: 80px;
  }
  .sidebar-collapsed .sidebar .brand {
    padding: 0;
    justify-content: center;
  }
  .sidebar-collapsed .sidebar .brand > span:not(.mark),
  .sidebar-collapsed .tenant-label,
  .sidebar-collapsed .sidebar-bottom > div {
    display: none;
  }
  .sidebar-collapsed .nav-label {
    font-size: 0;
    padding: 0;
    margin: 18px 8px 10px;
    height: 1px;
    background: #ffffff20;
  }
  .sidebar-collapsed .sidebar .nav {
    position: relative;
    font-size: 0;
    gap: 0;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 12px;
  }
  .sidebar-collapsed .nav small {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 9px;
    padding: 1px 3px;
    margin: 0;
  }
  .sidebar-collapsed .sidebar-bottom {
    padding: 18px 0 0;
    justify-content: center;
  }
  .sidebar-collapsed .sidebar-space {
    display: flex;
    justify-content: center;
    color: #c7d1e4;
    background: #1c2941;
    border: 1px solid #344159;
    margin-top: 24px;
    min-height: 44px;
    padding: 10px;
  }
}
@media (max-width: 760px) {
  .sidebar-toggle,
  .sidebar-space {
    display: none;
  }
}

@media (min-width: 761px) {
  .sidebar-collapsed .sidebar-toggle {
    align-self: center;
  }
  .sidebar-collapsed .sidebar-toggle span {
    display: none;
  }
}
/* Keep native form semantics while styling the dropdown in supporting browsers. */
@supports (appearance: base-select) {
  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker(select) {
    appearance: base-select;
  }
  select:not([multiple]):not([size]) {
    align-items: center;
    gap: 12px;
    min-height: 40px;
    cursor: pointer;
  }
  select::picker(select) {
    background: #fff;
    color: var(--ink);
    border: 1px solid #dce2ef;
    border-radius: 12px;
    padding: 6px;
    margin-top: 6px;
    box-shadow: 0 8px 24px #14213a1a;
    max-height: min(340px, 65dvh);
    max-width: calc(100vw - 24px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
  select::picker-icon {
    color: #79839b;
    font-size: 12px;
  }
  select:open {
    border-color: #7772e5;
  }
  select option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
  }
  select option:hover,
  select option:focus {
    background: #f1f0ff;
    color: #403aa4;
  }
  select option:checked {
    background: #eae8ff;
    color: #4037a5;
    font-weight: 600;
  }
  select option::checkmark {
    order: 2;
    margin-left: auto;
    color: #5b51d8;
  }
  select option:disabled {
    color: #8991a2;
    cursor: default;
  }
  select:disabled {
    cursor: not-allowed;
  }
  @media (max-width: 760px) {
    select option {
      min-height: 44px;
      font-size: 16px;
    }
  }
}

/* Compact navigation header and calmer visual hierarchy. */
.sidebar {
  padding: 24px 14px 18px;
  background: #111c30;
  border-right: 1px solid #ffffff0a;
}
.sidebar-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 0 4px 22px;
  border-bottom: 1px solid #ffffff0c;
}
.sidebar-heading .brand {
  order: -1;
  flex: 1;
  min-width: 0;
  padding: 0;
  gap: 9px;
  font-size: 16px;
  letter-spacing: -.35px;
}
.sidebar-heading .brand small {
  font-size: 6px;
  letter-spacing: 1.25px;
  color: #94a3bb;
}
.sidebar-heading .mark {
  width: 32px;
  height: 36px;
  border-radius: 10px;
}
.sidebar-heading .mark svg { width: 23px; height: 23px; }
.sidebar-heading .sidebar-toggle {
  align-self: center;
  width: 28px;
  min-height: 32px;
  margin: 0;
  padding: 5px;
  border-color: transparent;
  background: transparent;
  color: #9baac2;
}
.sidebar-heading .sidebar-toggle:hover {
  background: #ffffff0c;
  color: white;
}
.sidebar .tenant-label {
  margin: 20px 6px 14px;
  font-size: 8px !important;
  letter-spacing: 1.15px;
}
.sidebar .tenant-label select {
  margin-top: 9px;
  min-height: 42px;
  border-radius: 10px;
  border-color: #ffffff12;
  background-color: #1a2940;
}
.sidebar .nav-label {
  color: #8494ae;
  font-size: 8px;
  letter-spacing: 1.3px;
  margin: 20px 12px 10px;
}
.sidebar nav { gap: 4px; }
.sidebar .nav {
  min-height: 43px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #b7c3d6;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
}
.sidebar .nav .icon { color: #8497b4; }
.sidebar .nav:hover { background: #ffffff07; color: #f5f6ff; }
.sidebar .nav.active {
  background: #7369ee20;
  border-color: #9186ff22;
  box-shadow: inset 3px 0 #a499ff;
  color: #f0edff;
}
.sidebar .nav.active .icon { color: #b4aaff; }
.sidebar .nav small {
  padding: 2px 6px;
  background: #ffffff09;
  color: #afbed5;
  border-radius: 5px;
}
.sidebar .sidebar-bottom {
  margin-top: auto;
  padding: 18px 8px 0;
  border-color: #ffffff0c;
  min-height: 64px;
  flex-shrink: 0;
}
@media (min-width: 761px) {
  .sidebar-collapsed .sidebar { padding-top: 24px; }
  .sidebar-collapsed .sidebar-heading {
    flex-direction: column;
    gap: 12px;
    padding: 0 0 14px;
  }
  .sidebar-collapsed .sidebar .nav-label {
    font-size: 0;
    margin: 14px 8px 8px;
  }
  .sidebar-collapsed .sidebar .nav { padding: 12px; }
  .sidebar-collapsed .sidebar-space { margin-top: 16px; }
}
@media (max-width: 760px) {
  .sidebar-heading .brand { font-size: 18px; }
  .sidebar-heading { padding-bottom: 18px; }
}

/* Short interaction transitions; no animation on periodic data refreshes. */
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  body.sidebar-motion:not(.reduced-motion) .sidebar {
    transition: width 160ms ease-out, padding 160ms ease-out;
  }
  body.sidebar-motion:not(.reduced-motion) .workspace {
    transition: margin-left 160ms ease-out;
  }
}
@keyframes surface-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.reduced-motion) #toast:not([hidden]),
  body:not(.reduced-motion) details[open] > :not(summary) {
    animation: surface-enter 140ms ease-out both;
  }
  body:not(.reduced-motion) .sidebar .nav {
    transition: background-color 120ms ease-out, color 120ms ease-out,
      border-color 120ms ease-out, box-shadow 120ms ease-out;
  }
}
@supports (transition-behavior: allow-discrete) {
  @media (prefers-reduced-motion: no-preference) {
    body:not(.reduced-motion) dialog {
      opacity: 0;
      transform: translateY(6px) scale(.995);
      transition: opacity 140ms ease-out, transform 140ms ease-out,
        display 140ms allow-discrete, overlay 140ms allow-discrete;
    }
    body:not(.reduced-motion) dialog[open] {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    body:not(.reduced-motion) dialog::backdrop {
      opacity: 0;
      transition: opacity 140ms ease-out, display 140ms allow-discrete,
        overlay 140ms allow-discrete;
    }
    body:not(.reduced-motion) dialog[open]::backdrop { opacity: 1; }
    @starting-style {
      body:not(.reduced-motion) dialog[open] {
        opacity: 0;
        transform: translateY(6px) scale(.995);
      }
      body:not(.reduced-motion) dialog[open]::backdrop { opacity: 0; }
    }
  }
}
@supports (appearance: base-select) {
  @media (prefers-reduced-motion: no-preference) {
    body:not(.reduced-motion) select::picker(select) {
      animation: surface-enter 120ms ease-out;
    }
  }
}
/* Include top-layer pseudo-elements in the accessibility preference. */
body.reduced-motion dialog::backdrop,
body.reduced-motion select::picker(select) {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  dialog::backdrop, select::picker(select) {
    animation: none !important;
    transition: none !important;
  }
}

/* Workspace context stays accessible independently of the navigation rail. */
.topbar-location { flex: 1; }
.workspace-selector { position: relative; display: block; width: 220px; min-width: 0; flex-shrink: 0; }
.workspace-selector > span { position: absolute; bottom: calc(100% + 3px); left: 0; color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1; }
.workspace-selector select { width: 100%; min-width: 0; min-height: 36px; padding: 7px 12px; background-color: #f7f8fc; font-size: 12px; font-weight: 600; }
#breadcrumb { white-space: nowrap; }
@media (max-width: 1200px) {
  .topbar .breadcrumb-separator, .topbar #breadcrumb { display: none; }
  .workspace-selector { width: 190px; }
}
@media (max-width: 760px) {
  .topbar-location { flex: 1; }
  .workspace-selector { width: auto; flex: 1; }
  .topbar { padding-top: 24px; }
  .workspace-selector select { min-height: 40px; }
  .topbar .identity { flex-shrink: 0; }
}

/* Popup fallback for browsers without customizable native select pickers. */
.select-picker {
  position: fixed; inset: auto; z-index: 1000; margin: 0; padding: 6px;
  box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; color: var(--ink); border: 1px solid #dce2ef;
  border-radius: 12px; box-shadow: 0 8px 24px #14213a1a;
  font-size: 13px; line-height: 1.4; scrollbar-width: thin;
  animation: picker-appear 120ms ease-out;
}
.select-picker-option {
  display: flex; align-items: center; gap: 12px; min-height: 38px;
  padding: 9px 12px; border-radius: 7px; cursor: pointer;
  overflow-wrap: anywhere;
}
.select-picker-option:hover, .select-picker-option.is-active { background: #f1f0ff; color: #403aa4; }
.select-picker-option[aria-selected=true] { background: #eae8ff; color: #4037a5; font-weight: 600; }
.select-picker-option[aria-selected=true]::after { content: "✓"; margin-left: auto; color: #5b51d8; }
.select-picker-option[aria-disabled=true] { color: #8991a2; cursor: not-allowed; background: transparent; }
.select-picker:focus-visible { outline: 2px solid #7772e5; outline-offset: 2px; }
@keyframes picker-appear { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
body.reduced-motion .select-picker { animation: none; }
@media (prefers-reduced-motion: reduce) { .select-picker { animation: none; } }
@media (max-width: 760px) { .select-picker-option { min-height: 44px; font-size: 16px; } }

/* VPN account: clear actions first, technical detail on demand. */
#modal.account-dialog { width: min(1020px, 96vw); }
.account-dialog .modal-head { padding: 22px 28px 18px; }
.account-dialog .modal-head h2 { font-size: 24px; letter-spacing: -.6px; }
.account-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px 24px; background: #fafbfe; }
.account-tabs button { flex-direction: column; gap: 6px; padding: 10px 4px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; line-height: 1.25; color: var(--muted); white-space: normal; }
.account-tabs button.active { border: 1px solid #dedcff; background: var(--pale); color: #4943c7; box-shadow: 0 2px 4px #4f55dc08; }
.account-tabs .icon { width: 20px; height: 20px; }
.account-dialog .modal-body { padding: 24px 32px; }
.account-dialog .modal-body > section, .account-dialog #diagnostic-content, .account-dialog #disconnect-panel, .account-dialog #history-content { max-width: 820px; margin-left: auto; margin-right: auto; }
.account-dialog .modal-body > .account-heading, .account-dialog .modal-body > .account-steps, .account-dialog .modal-body > .account-form, .account-dialog .modal-body > .account-help, .account-dialog .modal-body > .account-card { max-width: 820px; margin-left: auto; margin-right: auto; }
.account-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.account-heading-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; background: var(--pale); color: var(--green); }
.account-heading-icon .icon { width: 23px; height: 23px; }
.account-heading h3 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.4px; }
.account-heading p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.account-card { margin: 0 0 14px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: white; min-width: 0; }
.account-card h4 { font-size: 15px; margin: 0 0 18px; }
.account-card .form-grid label { font-size: 12px; }
.account-card .form-grid input, .account-card .form-grid select, .account-card .form-grid textarea { font-size: 13px; }
.account-card .form-grid input[type=checkbox] { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--green); }
.account-fold { padding: 0; }
.account-fold > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 20px; cursor: pointer; list-style: none; font-weight: 600; font-size: 13px; border-radius: 13px; }
.account-fold > summary::-webkit-details-marker { display: none; }
.account-fold > summary > span { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.account-fold > summary > small { margin-left: auto; min-width: 0; max-width: 45%; overflow-wrap: anywhere; text-align: right; color: var(--muted); font-size: 11px; font-weight: 400; }
.account-fold > summary::after { content: '›'; font-size: 20px; color: var(--muted); flex: 0 0 10px; line-height: 1; }
.account-fold[open] > summary::after { transform: rotate(90deg); }
.account-fold > summary:hover { background: #f8f8ff; }
.account-fold[open] > summary { border-bottom: 1px solid var(--line); border-radius: 13px 13px 0 0; }
.account-fold-body { padding: 18px 20px 20px; min-width: 0; }
.account-fold-body > :first-child { margin-top: 0; }
.account-fold-body > :last-child { margin-bottom: 0; }
.account-fold-body .table-wrap { margin: 0; }
.account-dialog .account-toggle { align-items: flex-start; padding: 13px; font-weight: 400; background: #fafbfe; }
.account-toggle input { margin: 3px 0 0; accent-color: var(--green); }
.account-toggle strong { display: block; font-size: 12px; }
.account-toggle small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.account-steps { display: flex; align-items: center; gap: 18px; padding: 0; list-style: none; margin: 0 0 22px; }
.account-steps li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.account-steps li + li::before { content: '›'; margin-right: 6px; color: #aab0c2; }
.account-steps span { display: grid; place-items: center; background: var(--pale); color: var(--green); width: 23px; height: 23px; border-radius: 50%; font-weight: 700; }
.account-routing { margin-top: 20px; }
.account-help { margin: 16px 0 20px; font-size: 12px; color: var(--muted); }
.account-help summary { cursor: pointer; }
.account-help p { line-height: 1.8; }
.account-danger { margin-top: 22px; }
.account-danger > summary { color: #a13c4c; }
.account-danger p { color: var(--muted); font-size: 12px; }
.account-form-actions { display: flex; justify-content: flex-end; }
.account-health { display: flex; align-items: center; gap: 16px; padding: 22px; border: 1px solid #e0e4f1; border-radius: 14px; background: #f7f8fc; margin-bottom: 16px; }
.account-health.green { background: #f0faf5; border-color: #cee9dc; }
.account-health.amber { background: #fffaf0; border-color: #f2e4c7; }
.account-health-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 50%; background: white; color: var(--muted); }
.account-health.green .account-health-icon { color: #287553; }
.account-health.amber .account-health-icon { color: #96651b; }
.account-health h3 { font-size: 18px; margin: 0 0 4px; }
.account-health p { font-size: 12px; color: var(--muted); margin: 0; }
.account-health button { margin-left: auto; flex-shrink: 0; font-size: 12px; }
.account-facts { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 20px; }
.account-facts > div { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; padding: 18px 20px; min-width: 0; }
.account-facts > div + div { border-left: 1px solid var(--line); }
.account-facts span, .account-facts small { font-size: 11px; color: var(--muted); }
.account-facts strong { font-size: 14px; overflow-wrap: anywhere; }
.account-facts button { padding: 0; font-size: 11px; color: var(--green); }
.account-facts .icon { width: 14px; height: 14px; }
.account-fold > summary .account-good { color: #287553; }
.account-fold > summary .account-warning { color: #96651b; }
.account-definition { margin: 0; }
.account-definition > div { display: flex; justify-content: space-between; gap: 15px; font-size: 12px; padding: 6px 0; }
.account-definition dt { color: var(--muted); }
.account-definition dd { margin: 0; text-align: right; }
.account-change { padding: 12px 0; font-size: 12px; border-bottom: 1px solid var(--line); }
.account-change summary { cursor: pointer; }
.account-owner { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: #f7f6ff; border: 1px solid #e5e1fb; border-radius: 13px; margin-bottom: 14px; }
.account-owner > .icon { color: var(--green); width: 25px; height: 25px; }
.account-owner > span:not(.badge) { color: var(--muted); font-size: 11px; }
.account-owner strong { display: block; color: var(--ink); font-size: 15px; }
.account-owner .badge { margin-left: auto; }
.account-share-list { margin: 0 0 20px; }
.account-share { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 15px 5px; }
.account-share > div { min-width: 0; flex: 1; }
.account-share strong { font-size: 13px; overflow-wrap: anywhere; }
.account-share p { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.account-share-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--bg); color: var(--muted); }
.account-empty { padding: 24px 16px; text-align: center; border: 1px dashed #dce2ec; border-radius: 12px; background: #fafbfe; font-size: 13px; color: var(--muted); }
.account-empty small { display: block; font-size: 11px; margin-top: 6px; }
.account-inline-note { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--bg); border-radius: 9px; margin: 0 0 18px; font-size: 12px; color: var(--muted); }
.account-session-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }
.account-session-list > .account-empty { grid-column: 1 / -1; }
.account-session { display: flex; align-items: flex-start; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; min-width: 0; }
.account-session-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.account-session-top strong { font-size: 14px; }
.account-session-address { display: flex; flex-direction: column; gap: 4px; }
.account-session-address span, .account-session > small { font-size: 11px; color: var(--muted); }
.account-session-address code { font-size: 18px; overflow-wrap: anywhere; }
.account-session button { width: 100%; }
.account-request { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.account-request p { margin: 5px 0; overflow-wrap: anywhere; }
.account-request small { color: var(--muted); }
.account-request:last-child { border-bottom: 0; }
.account-preferences { display: flex; flex-direction: column; gap: 10px; }
.account-preference { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.account-preference:has(input:checked) { background: #f7f6ff; border-color: #d7d1fa; }
.account-preference-icon { color: var(--green); }
.account-preference > span:nth-child(2) { flex: 1; }
.account-preference strong { display: block; font-size: 13px; }
.account-preference small { display: block; margin-top: 3px; font-size: 11px; font-weight: 400; color: var(--muted); }
.account-preference input { width: 18px; height: 18px; accent-color: var(--green); }
.account-history td { font-size: 12px; }
.account-history td small { font-size: 11px; }
#history-more:not(:empty) { margin-top: 15px; text-align: center; }
@media (max-width: 760px) {
  .account-health { flex-wrap: wrap; padding: 18px; gap: 12px; }
  .account-health > div { flex: 1; min-width: 0; }
  .account-health button { margin: 0; width: 100%; }
  .account-dialog .modal-foot { align-items: stretch; }
  .account-dialog .modal-foot .actions { flex: 1; }
  .account-dialog .modal-foot .actions button { flex: 1; min-width: 0; }
}
@media (max-width: 540px) {
  #modal.account-dialog { width: 96vw; max-height: 94dvh; }
  .account-dialog #modal-content { max-height: calc(94dvh - 2px); }
  .account-dialog .modal-head { padding: 16px 18px 12px; }
  .account-dialog .modal-head h2 { font-size: 21px; }
  .account-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 7px 10px; }
  .account-tabs button { font-size: 10px; padding: 7px 2px; gap: 4px; min-height: 53px; }
  .account-tabs .icon { width: 17px; height: 17px; }
  .account-dialog .modal-body { padding: 18px 16px; }
  .account-heading { gap: 10px; margin-bottom: 18px; }
  .account-heading h3 { font-size: 18px; }
  .account-heading p { font-size: 12px; }
  .account-heading-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .account-card { padding: 16px; }
  .account-fold { padding: 0; }
  .account-fold > summary { padding: 14px; gap: 7px; font-size: 12px; }
  .account-fold > summary > small { font-size: 10px; max-width: 36%; }
  .account-fold-body { padding: 16px 14px; }
  .account-fold > summary .icon { width: 16px; height: 16px; }
  .account-steps { gap: 5px; }
  .account-steps li { font-size: 11px; gap: 4px; }
  .account-steps li + li::before { margin-right: 3px; }
  .account-steps span { width: 20px; height: 20px; }
  .account-health h3 { font-size: 16px; }
  .account-facts { grid-template-columns: 1fr; }
  .account-facts > div { padding: 14px 16px; }
  .account-facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .account-owner { flex-wrap: wrap; padding: 16px; }
  .account-owner .badge { margin-left: 0; }
  .account-owner > span:not(.badge) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .account-session-list { grid-template-columns: 1fr; }
  .account-form-actions button, .sharing-form-actions button { width: 100%; }
  .account-dialog .modal-foot { padding: 12px 16px; }
  .account-dialog .modal-foot > .hint { display: none; }
  .account-history table, .account-history tbody { display: block; width: 100%; }
  .account-history thead { display: none; }
  .account-history tr { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
  .account-history td { display: block; padding: 8px 0; border: 0; overflow-wrap: anywhere; }
  .account-history td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
}

/* Counters, saved views and list controls describe the same current view. */
button.stat { display: block; width: 100%; text-align: left; font-weight: 400; color: var(--ink); }
button.stat:hover { border-color: #bfb9f3; background: #faf9ff; }
button.stat[aria-pressed="true"] { border-color: #a9a0f6; background: #f5f3ff; box-shadow: inset 0 0 0 1px #d7d1fd; }
button.stat[aria-pressed="true"] strong { color: #514bbe; }
button.stat small { display: block; color: var(--muted); font-weight: 400; }
.stat-link { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 14px; color: var(--green); font-size: 11px; font-weight: 600; }
.stat-link .icon { width: 16px; height: 16px; }
.tunnel-view-context { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 22px; background: #fafbfe; border-bottom: 1px solid var(--line); scroll-margin-top: 18px; }
.tunnel-view-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
.tunnel-view-title strong { font-size: 13px; }
.tunnel-view-title > span { font-size: 11px; color: var(--muted); }
.tunnel-view-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.view-filter-chip { border: 1px solid #ded8fa; background: var(--pale); color: #5548c7; border-radius: 7px; padding: 5px 9px; font-size: 11px; min-width: 0; max-width: 100%; }
.view-filter-chip > span:not(:last-child) { overflow-wrap: anywhere; min-width: 0; }
.view-filter-chip > span:last-child { font-size: 17px; line-height: 1; }
.view-filter-chip .icon { width: 14px; height: 14px; }
.tunnel-view-filters .text-button { font-size: 11px; color: var(--green); }
.connection-help { padding: 0 20px 14px; font-size: 11px; color: var(--muted); }
.connection-help summary { cursor: pointer; }
.connection-help p { margin: 8px 0 0; line-height: 1.7; }
@media (max-width: 540px) {
  .stat-link { font-size: 10px; margin-top: 9px; }
  .stat-link .icon { width: 13px; height: 13px; }
  button.stat small { font-size: 10px; }
  .tunnel-view-context { align-items: flex-start; flex-direction: column; padding: 12px 15px; }
  .tunnel-view-filters { width: 100%; }
  .connection-help { padding: 0 15px 12px; }
}
/* Keep hidden column labels inside the horizontally scrolling table. */
#tunnel-directory .table-wrap { position: relative; }

.live-refresh-status { margin: 0 0 16px; color: var(--muted); font-size: 11px; }
.live-refresh-status::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #329371; margin-right: 7px; vertical-align: middle; }
.live-refresh-status.is-error { color: #956017; }
.live-refresh-status.is-error::before { background: #c28a2b; }
.session-collection { margin: -10px 0 16px; }

/* Connections: current activity first, past requests on demand. */
.session-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.session-toolbar .account-heading { margin: 0; }
.session-toolbar .live-refresh-status { margin: 0; text-align: right; font-size: 10px; }
.session-overview { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8f9fc; margin-bottom: 16px; }
.session-overview.green { background: #f1faf6; border-color: #d4eadf; }
.session-overview.amber { background: #fffbf1; border-color: #efe2c5; }
.session-overview-symbol { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 10px; background: white; color: var(--muted); }
.session-overview.green .session-overview-symbol { color: #287553; }
.session-overview.amber .session-overview-symbol { color: #96651b; }
.session-overview > div { flex: 1; min-width: 0; }
.session-overview strong { display: block; font-size: 14px; }
.session-overview .session-collection { display: block; margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.session-card { padding: 17px 18px; gap: 10px; background: white; }
.session-card .account-session-top > strong { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.session-card .account-session-top > strong .icon { color: var(--muted); width: 17px; height: 17px; }
.session-card .account-session-address { gap: 2px; }
.session-card .account-session-address code { font-size: 22px; letter-spacing: -.5px; }
.session-card .session-disconnect { margin-top: auto; min-height: 40px; font-size: 12px; }
.session-disconnect .icon { width: 16px; height: 16px; }
.session-unavailable { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; color: var(--muted); font-size: 11px; min-height: 40px; }
.session-unavailable .icon { width: 15px; height: 15px; }
.session-pending { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; background: #f3f1ff; color: #5546bd; border: 1px solid #e4ddfc; border-radius: 9px; font-size: 12px; margin-top: auto; }
.session-pending > .icon { width: 18px; height: 18px; flex-shrink: 0; }
.session-pending strong { display: block; font-size: 12px; }
.session-pending small { display: block; color: #74699c; font-size: 10px; margin-top: 2px; }
.session-pending-list { margin-bottom: 15px; display: grid; gap: 8px; }
.session-orphan { display: block; padding: 13px 16px; margin: 0; }
.session-orphan p { font-size: 12px; margin: 7px 0 3px; }
.session-request-top { display: flex; align-items: center; gap: 12px; }
.session-request-top .session-request-name { flex: 1; }
.session-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px; padding: 25px 18px; background: #fafbfe; border: 1px dashed #dde3ed; border-radius: 12px; color: var(--muted); }
.session-empty > .icon { width: 26px; height: 26px; color: #8b90a7; margin-bottom: 3px; }
.session-empty strong { color: var(--ink); font-size: 14px; }
.session-empty > span { font-size: 12px; }
.session-reconnect-note { display: flex; align-items: center; gap: 7px; margin: -5px 0 18px; color: var(--muted); font-size: 11px; }
.session-reconnect-note .icon { width: 15px; height: 15px; flex-shrink: 0; }
.session-history { margin-bottom: 14px; }
.session-history-body { padding: 0 16px; }
.session-request { padding: 0; }
.session-request > summary { display: flex; align-items: center; gap: 12px; padding: 13px 0; list-style: none; cursor: pointer; }
.session-request > summary::-webkit-details-marker { display: none; }
.session-request-symbol { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 9px; background: var(--bg); color: var(--muted); }
.session-request-symbol .icon { width: 16px; height: 16px; }
.session-request-symbol.green { background: #e9f6ef; color: #287553; }
.session-request-symbol.red { background: #fceef0; color: #ac4253; }
.session-request-symbol.amber { background: #fff3dc; color: #96651b; }
.session-request-symbol.purple { background: var(--pale); color: var(--green); }
.session-request-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.session-request-name > strong { font-size: 12px; }
.session-request-name > time { color: var(--muted); font-size: 10px; font-weight: 400; }
.session-request-chevron { flex: 0 0 10px; font-size: 19px; color: var(--muted); line-height: 1; text-align: right; }
.session-request[open] > summary .session-request-chevron { transform: rotate(90deg); }
.session-request-body { padding: 0 10px 14px 42px; font-size: 12px; color: var(--muted); }
.session-request-body > p { margin: 0; }
.session-technical { font-size: 11px; margin-top: 10px; }
.session-technical > summary { cursor: pointer; color: var(--green); }
.session-technical > p { overflow-wrap: anywhere; margin-top: 8px; line-height: 1.7; }
.session-history-empty { font-size: 12px; color: var(--muted); padding: 18px 0; margin: 0; }
.session-help { margin-top: 14px; margin-bottom: 0; }
.session-help button { font-size: 12px; }
@media (max-width: 540px) {
  .session-toolbar { align-items: flex-start; flex-direction: column; gap: 7px; margin-bottom: 15px; }
  .session-toolbar .live-refresh-status { text-align: left; }
  .session-overview { flex-wrap: wrap; padding: 12px; gap: 9px; }
  .session-overview strong { font-size: 13px; }
  .session-overview > div { flex: 1 1 calc(100% - 43px); }
  .session-overview > .badge { margin-left: 43px; }
  .session-overview .session-collection { font-size: 10px; }
  .session-card { padding: 15px; }
  .session-request > summary { gap: 8px; }
  .session-history-body { padding: 0 12px; }
  .session-request-body { padding-left: 38px; }
  .session-reconnect-note { align-items: flex-start; line-height: 1.6; }
  .session-reconnect-note .icon { margin-top: 2px; }
}
