/* Shared color tokens keep the entire interface consistent in both modes. */
:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  color-scheme: light;
  color: var(--text);
  background: var(--canvas);
  --text: #302637;
  --strong: #382a3d;
  --muted: #74677b;
  --subtle: #77677f;
  --accent: #560c30;
  --accent-hover: #6c153e;
  --on-accent: #fff7fc;
  --canvas: #faf7fb;
  --gradient: radial-gradient(ellipse at 5% 0%, #f0dce780 0, transparent 53%), radial-gradient(ellipse at 95% 100%, #ebd9ee70 0, transparent 55%), linear-gradient(135deg, #fcf9fc, #f5eef5 55%, #faf7fb);
  --line: #e4dae6;
  --line-soft: #eee6f0;
  --line-hover: #cdbbce;
  --surface: #fffafd;
  --card: #fffdfef0;
  --sidebar: #fffafdf0;
  --soft: #f3ecf4;
  --hover: #f6eff6;
  --active: #eddfeb;
  --input: #fffafd;
  --input-line: #d7cadc;
  --focus-ring: #560c302b;
  --notice: #f3ecf4;
  --notice-text: #726077;
  --warn-bg: #fbf3e6;
  --warn-line: #e5d4b0;
  --warn-text: #89641c;
  --error-bg: #fbeef2;
  --error-line: #e8c6d0;
  --error-text: #a03149;
  --good-bg: #eaf5ee;
  --good-text: #277651;
  --badge-bg: #eee6f1;
  --badge-text: #72617e;
  --toast-bg: #38253d;
  --toast-text: #fff8fd;
  --auth-shadow: 0 12px 50px #560c3009;
  --dialog-shadow: 0 24px 90px #26162930;
  --backdrop: #24102965;
  --terminal-bg: #fff9fd;
  --terminal-text: #302337;
  --terminal-toolbar: #f2e8f1;
  --terminal-muted: #74687a;
  --terminal-line: #dfd0e3;
  --terminal-button-line: #d0bcd3;
  --terminal-hover: #e9ddea;
  --terminal-reason-bg: #f4e4ee;
  --terminal-reason-text: #7d3156;
  --terminal-reason-line: #dfbfd1;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --text: #e6deeb;
  --strong: #f0e8f3;
  --muted: #baadbf;
  --subtle: #aa9ab3;
  --accent: #e6a9c6;
  --accent-hover: #f0bed5;
  --on-accent: #3d102a;
  --canvas: #17121c;
  --gradient: radial-gradient(ellipse at 5% 0%, #560c3045 0, transparent 53%), radial-gradient(ellipse at 95% 100%, #5b325a24 0, transparent 55%), linear-gradient(135deg, #19141d, #211520 55%, #17131d);
  --line: #49384e;
  --line-soft: #3a2c40;
  --line-hover: #745c79;
  --surface: #241c2a;
  --card: #281e2eeb;
  --sidebar: #241c2af0;
  --soft: #33263b;
  --hover: #382a3f;
  --active: #493046;
  --input: #211925;
  --input-line: #604b67;
  --focus-ring: #e6a9c63b;
  --notice: #33253a;
  --notice-text: #c6b4cf;
  --warn-bg: #3d3121;
  --warn-line: #6e5936;
  --warn-text: #e4c48e;
  --error-bg: #442635;
  --error-line: #7f425a;
  --error-text: #f0a3ba;
  --good-bg: #223b31;
  --good-text: #98d3b5;
  --badge-bg: #3b2b43;
  --badge-text: #cbbad7;
  --toast-bg: #dfc9e4;
  --toast-text: #27152e;
  --auth-shadow: 0 12px 50px #0d060d30;
  --dialog-shadow: 0 24px 90px #07030980;
  --backdrop: #100a17b5;
  --terminal-bg: #17131b;
  --terminal-text: #e9e2ee;
  --terminal-toolbar: #281f2e;
  --terminal-muted: #b4a5c0;
  --terminal-line: #514056;
  --terminal-button-line: #75627e;
  --terminal-hover: #392d42;
  --terminal-reason-bg: #392635;
  --terminal-reason-text: #e4abc5;
  --terminal-reason-line: #654455;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--gradient);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
input,
select,
textarea {
  color: var(--text);
  background: var(--input);
  accent-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
  color: var(--subtle);
  opacity: 1;
}
select option {
  color: var(--text);
  background: var(--surface);
}
:focus-visible {
  outline: 2px solid var(--accent);
}
html {
  scrollbar-color: var(--line-hover) var(--canvas);
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: var(--accent);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 17px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
  font-weight: 650;
}
small,
.muted {
  color: var(--muted);
}
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 999;
  background: var(--card);
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.loading-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.brand-mark {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: var(--on-accent);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 19px;
  font-weight: 700;
  flex: none;
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.brand-image {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
}
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 84px 28px 28px;
}
.auth-card {
  width: min(460px, 100%);
  padding: 38px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--auth-shadow);
}
.auth-card .brand {
  margin-bottom: 44px;
}
.auth-card h1 {
  font-size: 28px;
  margin-bottom: 12px;
}
.auth-card .intro {
  color: var(--muted);
  margin-bottom: 28px;
}
.auth-card .btn {
  width: 100%;
}
.auth-card .foot {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
}
.login-card {
  width: min(400px, 100%);
  padding: 36px;
}
.auth-card .login-brand {
  flex-direction: column;
  gap: 18px;
  margin-bottom: 30px;
  text-align: center;
}
.login-brand .brand-image,
.login-brand .brand-mark {
  width: 72px;
  height: 72px;
}
.login-brand .brand-mark {
  font-size: 36px;
  border-radius: 18px;
}
.auth-card .login-brand h1 {
  font-size: 22px;
  margin: 0;
}
.login-card .error {
  margin-bottom: 0;
}
.auth-identity {
  margin: 22px 0;
  background: var(--soft);
  padding: 14px;
  border-radius: 10px;
}
.auth-identity dt {
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
}
.auth-identity dt:first-child {
  margin-top: 0;
}
.auth-identity dd {
  margin: 3px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 28px 18px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  padding: 0 8px;
  margin-bottom: 32px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-label {
  padding: 20px 13px 6px;
  color: var(--subtle);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.nav-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 11px 13px;
  text-align: left;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.25;
}
.nav-item:hover {
  background: var(--hover);
  color: var(--accent);
}
.nav-item.active {
  background: var(--active);
  color: var(--accent);
  font-weight: 600;
}
.nav-icon {
  width: 19px;
  height: 19px;
  flex: none;
  opacity: 0.9;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 24px;
}
.profile {
  border-top: 1px solid var(--line);
  padding: 18px 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar {
  background: var(--active);
  color: var(--accent);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  flex: none;
}
.profile-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 151px;
  font-size: 13px;
  font-weight: 600;
}
.profile small {
  font-size: 11px;
}
.logout {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 9px;
  width: 100%;
  text-align: left;
}
.logout:hover {
  color: var(--accent);
}
.main {
  padding: 86px 40px 24px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-header p {
  color: var(--muted);
  margin-top: 7px;
  font-size: 13px;
}
.header-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.btn:hover {
  background: var(--hover);
  border-color: var(--line-hover);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn.danger {
  color: var(--error-text);
}
.btn.danger:hover {
  background: var(--error-bg);
  border-color: var(--error-line);
}
.btn.small {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}
.btn.quiet {
  border-color: transparent;
  background: transparent;
}
.btn.quiet:hover {
  background: var(--soft);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.stat {
  padding: 23px 25px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat-label {
  color: var(--muted);
  font-size: 12px;
}
.stat-value {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.4;
  margin: 7px 0 3px;
}
.stat-note {
  font-size: 11px;
  color: var(--subtle);
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 19px 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-body {
  padding: 23px;
}
.notice {
  padding: 14px 17px;
  background: var(--notice);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--notice-text);
  font-size: 12px;
  margin-bottom: 22px;
}
.notice strong {
  color: var(--strong);
}
.notice.warning {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn-text);
}
.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: var(--strong);
  font-weight: 550;
  margin-bottom: 6px;
}
.error {
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid var(--error-line);
  border-radius: 7px;
  padding: 11px 13px;
  font-size: 13px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.success {
  color: var(--good-text);
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 11px;
  font-weight: 500;
  color: var(--subtle);
  background: var(--soft);
  padding: 13px 21px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 21px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-size: 13px;
  font-weight: 550;
  display: block;
}
td small {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 3px 8px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.good {
  color: var(--good-text);
  background: var(--good-bg);
}
.badge.warn {
  color: var(--warn-text);
  background: var(--warn-bg);
}
.badge.bad {
  color: var(--error-text);
  background: var(--error-bg);
}
.vm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.vm-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: 23px;
  min-width: 0;
}
.vm-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.vm-title h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.vm-host {
  font-size: 12px;
  color: var(--muted);
}
.vm-description {
  font-size: 12px;
  color: var(--muted);
  margin-top: 15px;
  min-height: 19px;
  overflow-wrap: anywhere;
}
.vm-details {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 19px;
  font-size: 11px;
  color: var(--muted);
}
.vm-bottom {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.vm-bottom .muted {
  font-size: 11px;
}
.footer {
  text-align: center;
  color: var(--subtle);
  font-size: 11px;
  padding: 28px 10px 4px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--input-line);
  border-radius: 6px;
  padding: 9px 11px;
  background: var(--input);
  color: var(--text);
  min-height: 38px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--accent);
}
.field textarea {
  resize: vertical;
  min-height: 90px;
}
.field .hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}
.field label span {
  font-weight: 400;
  color: var(--muted);
}
.field.mono input,
.field.mono textarea {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.form-section {
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 600;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}
.branding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.branding-card {
  min-width: 0;
}
.branding-card .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.branding-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}
.branding-preview img {
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
}
.branding-preview.favicon img {
  width: 40px;
  height: 40px;
}
.branding-filename {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 12px;
  overflow-wrap: anywhere;
}
.branding-file {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 12px;
  margin-bottom: 16px;
}
.branding-file::file-selector-button {
  font: inherit;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--card);
  margin-right: 10px;
  cursor: pointer;
}
.branding-file:disabled::file-selector-button {
  cursor: not-allowed;
}
.settings-meta dt {
  font-size: 11px;
  color: var(--muted);
  margin-top: 15px;
}
.settings-meta dt:first-child {
  margin-top: 0;
}
.settings-meta dd {
  margin: 5px 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.settings-save {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.terminal-pane {
  border: 1px solid var(--terminal-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--terminal-bg);
  margin-bottom: 22px;
}
#terminal-slot {
  scroll-margin-top: 82px;
}
.terminal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 17px;
  background: var(--terminal-toolbar);
  color: var(--terminal-text);
  flex-wrap: wrap;
}
.terminal-title {
  font-size: 13px;
  font-weight: 550;
}
.terminal-title small {
  font-weight: 400;
  color: var(--terminal-muted);
  margin-left: 10px;
}
.terminal-toolbar .btn {
  background: transparent;
  border-color: var(--terminal-button-line);
  color: var(--terminal-text);
}
.terminal-toolbar .btn:hover {
  background: var(--terminal-hover);
}
.terminal-toolbar .badge {
  background: var(--badge-bg);
  color: var(--badge-text);
}
.terminal-toolbar .badge.good {
  background: var(--good-bg);
  color: var(--good-text);
}
.terminal-toolbar .badge.bad {
  background: var(--error-bg);
  color: var(--error-text);
}
.terminal-body {
  height: min(58vh, 600px);
  min-height: 300px;
  padding: 12px 10px 8px;
  position: relative;
}
.terminal-body .xterm {
  height: 100%;
}
.terminal-note {
  font-size: 11px;
  color: var(--muted);
  margin: -8px 0 20px;
}
.terminal-reason {
  padding: 9px 17px;
  background: var(--terminal-reason-bg);
  color: var(--terminal-reason-text);
  border-top: 1px solid var(--terminal-reason-line);
  font-size: 12px;
}
.terminal-placeholder {
  background: var(--terminal-bg);
  color: var(--terminal-muted);
  border-radius: 10px;
  border: 1px solid var(--terminal-line);
  padding: 75px 25px;
  text-align: center;
  margin-bottom: 22px;
}
.terminal-placeholder h2 {
  color: var(--terminal-text);
  margin-bottom: 7px;
}
.terminal-placeholder p {
  font-size: 12px;
}
dialog {
  background: var(--surface);
  width: min(620px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--dialog-shadow);
  max-height: 90vh;
  color: var(--text);
}
dialog::backdrop {
  background: var(--backdrop);
}
dialog .modal-head {
  padding: 22px 25px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
dialog .modal-head h2 {
  flex: 1;
  min-width: 0;
}
dialog form {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
dialog .modal-head,
dialog .modal-footer {
  flex: none;
}
dialog .modal-body {
  padding: 22px 25px;
  max-height: calc(90vh - 160px);
  overflow: auto;
  min-height: 0;
  flex: 1;
}
dialog .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 25px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}
dialog .modal-close {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  padding: 6px;
}
dialog .modal-close:hover {
  background: var(--soft);
}
.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: calc(100vw - 50px);
  z-index: 999;
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--auth-shadow);
  font-size: 13px;
}
.select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.select-row input {
  flex: 1;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  background: var(--card);
}
.select-row label {
  font-size: 12px;
  color: var(--muted);
}
.status-copy {
  font-size: 12px;
  margin-top: 12px;
  color: var(--muted);
}
.bootstrap {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 22px;
}
.bootstrap p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 13px;
}
.bootstrap input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 10px;
}
.user-id {
  max-width: 230px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.detail-list dt {
  font-size: 11px;
  color: var(--muted);
}
.detail-list dd {
  margin: 4px 0 0;
  font-size: 13px;
}
.wrap {
  white-space: normal;
  min-width: 180px;
  max-width: 280px;
  overflow-wrap: anywhere;
}
.header-refresh {
  font-size: 12px;
}
.settings-form .field {
  padding-bottom: 2px;
}
/* Preferences remain available before and after signing in. */
#preferences {
  position: fixed;
  top: 18px;
  right: 28px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 36px);
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sidebar);
  box-shadow: 0 3px 18px #560c3005;
  backdrop-filter: blur(14px);
}
#preferences:empty {
  display: none;
}
.preferences-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}
#preferences label,
.preferences-inline label,
.preference-field {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
#preferences select,
.preferences-inline select,
.preference-select {
  min-height: 30px;
  max-width: 160px;
  border: 0;
  border-radius: 6px;
  padding: 4px 23px 4px 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
#preferences select:hover {
  background: var(--soft);
}
.preferences-inline {
  order: 3;
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
}
.preferences-inline select:hover {
  background: var(--soft);
}
.preference-icon {
  width: 15px;
  height: 15px;
  flex: none;
}
@media (min-width: 1500px) {
  .main {
    padding: 90px 60px 30px;
  }
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .main {
    padding: 86px 24px 28px;
  }
  .sidebar {
    padding: 26px 12px 18px;
  }
  .sidebar .brand {
    font-size: 14px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 18px;
  }
  .vm-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  #preferences {
    top: 12px;
    right: 14px;
    gap: 5px;
    padding: 5px 6px;
    max-width: calc(100vw - 28px);
  }
  #preferences label,
  .preference-field {
    font-size: 11px;
    gap: 4px;
  }
  .preferences-controls {
    gap: 5px;
  }
  #preferences select {
    max-width: 140px;
    padding-left: 5px;
    font-size: 12px;
  }
  .auth-wrap {
    padding: 84px 20px 24px;
  }
  .branding-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    padding: 76px 16px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    margin-bottom: 17px;
    padding: 0;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
    gap: 4px;
    padding-bottom: 3px;
  }
  .nav-label {
    display: none;
  }
  .nav-item {
    width: auto;
    flex: none;
    padding: 9px 12px;
    gap: 6px;
    font-size: 12px;
  }
  .nav-icon {
    width: 15px;
    height: 15px;
  }
  .sidebar-bottom {
    position: absolute;
    top: 77px;
    right: 14px;
    padding: 0;
    margin: 0;
  }
  .profile {
    display: none;
  }
  .logout {
    padding: 6px;
    font-size: 11px;
  }
  .main {
    padding: 25px 16px 16px;
  }
  .page-header {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 21px;
  }
  .page-header h1 {
    font-size: 23px;
  }
  .stats {
    gap: 9px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stat {
    padding: 15px 11px;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-label,
  .stat-note {
    font-size: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .form-section {
    grid-column: auto;
  }
  .auth-card {
    padding: 30px 25px;
  }
  .auth-card .brand {
    margin-bottom: 32px;
  }
  .panel-body {
    padding: 19px;
  }
  .panel-head {
    padding: 17px 19px;
  }
  .vm-card {
    padding: 20px;
  }
  .terminal-body {
    height: 55vh;
    min-height: 280px;
  }
  .terminal-title small {
    display: block;
    margin-left: 0;
    font-size: 10px;
  }
  dialog .modal-body {
    padding: 20px;
  }
  .detail-list {
    grid-template-columns: 1fr;
  }
  .footer {
    padding-top: 20px;
  }
  .toast {
    bottom: 18px;
    right: 18px;
  }
  .settings-save {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  #preferences .preference-label {
    display: none;
  }
}
@media (max-width: 380px) {
  #preferences {
    left: 12px;
    right: 12px;
    justify-content: flex-end;
  }
  #preferences label,
  .preference-field {
    gap: 3px;
  }
  #preferences select {
    max-width: 126px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Alpha.4 persistent terminal workspace. */
.has-shell #preferences { display:none; }
.shell { grid-template-columns:var(--sidebar-width,232px) minmax(0,1fr); position:relative; }
.sidebar { min-width:0; overflow-x:hidden; padding:22px 14px 16px; }
.sidebar .brand { min-width:0; overflow:hidden; flex-shrink:0; }
.sidebar-controls { display:flex; justify-content:flex-end; gap:4px; margin:10px 0 0; }
.sidebar-bottom { flex-shrink:0; }
.sidebar-bottom .preferences-inline { margin-bottom:18px; flex-wrap:wrap; }
.sidebar-bottom .preference-field { min-width:0; flex:1; }
.sidebar-bottom .preference-select { max-width:100%; }
.workspace-vms { overflow-y:auto; flex:1; min-height:64px; margin-top:8px; }
.workspace-vms .nav-label { display:block; margin:12px 10px 8px; }
.workspace-vm-list { display:flex; flex-direction:column; gap:4px; }
.sidebar-vm-row { display:flex; align-items:center; min-width:0; }
.sidebar-vm-row .btn:first-child { text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.sidebar-vm-row .btn:last-child { flex-shrink:0; }
.sidebar-resizer { position:fixed; z-index:20; left:calc(var(--sidebar-width,232px) - 3px);top:0; bottom:0; width:6px; cursor:col-resize; touch-action:none; }
.sidebar-resizer:hover,.sidebar-resizer:focus-visible { background:var(--accent); opacity:.35; }
.shell[data-sidebar="collapsed"] { grid-template-columns:64px minmax(0,1fr); }
.shell[data-sidebar="hidden"] { grid-template-columns:0 minmax(0,1fr); }
.shell[data-sidebar="hidden"] .sidebar { visibility:hidden; padding:0; width:0; }
.shell[data-sidebar="collapsed"] .sidebar { padding:22px 8px 14px; }
.shell[data-sidebar="collapsed"] .brand { justify-content:center; }
.shell[data-sidebar="collapsed"] .brand-text,.shell[data-sidebar="collapsed"] .nav-text,.shell[data-sidebar="collapsed"] .nav-label,.shell[data-sidebar="collapsed"] .workspace-vms,.shell[data-sidebar="collapsed"] .profile>div,.shell[data-sidebar="collapsed"] .logout,.shell[data-sidebar="collapsed"] .preferences-inline,.shell[data-sidebar="collapsed"] .sidebar-controls .btn:last-child { display:none; }
.shell[data-sidebar="collapsed"] .nav-item { justify-content:center; padding:12px 8px; }
.shell[data-sidebar="collapsed"] .profile { justify-content:center; padding:10px 0; }
.shell[data-sidebar="collapsed"] .sidebar-controls { justify-content:center; }
.shell[data-sidebar="collapsed"] .sidebar-resizer,.shell[data-sidebar="hidden"] .sidebar-resizer { display:none; }
.workspace-host { display:none; min-height:0; min-width:0; }
.workspace-active .workspace-host { display:block; width:100%; }
.workspace-active .main { min-width:0; }
.terminal-workspace { display:flex; flex-direction:column; border:1px solid var(--terminal-line);border-radius:12px; overflow:hidden; height:calc(100dvh - 100px); min-height:380px; background:var(--terminal-bg); position:relative; }
.workspace-bar { display:flex; align-items:center; gap:3px; height:40px; flex:none; padding:3px 4px; background:var(--terminal-toolbar); border-bottom:1px solid var(--terminal-line); min-width:0; }
.workspace-bar>.icon-button { flex:none; }
.btn.icon-button { width:30px; height:30px; padding:2px; line-height:1; display:inline-flex; align-items:center;justify-content:center; font-size:18px; border-radius:6px; }
.workspace-tabs { display:flex; align-items:center; align-self:stretch; overflow-x:auto; overflow-y:hidden; flex:1; min-width:0; scrollbar-width:thin; }
.workspace-tabs>.workspace-add { flex:none; margin-inline:3px 6px; }
.workspace-fullscreen[aria-pressed="true"] { color:var(--accent); background:var(--terminal-bg); }
.workspace-tab-group { display:flex; align-items:center; border:1px solid transparent; border-radius:6px; max-width:260px;flex-shrink:0; min-width:100px; }
.workspace-tab-group.selected { border-color:var(--terminal-line);background:var(--terminal-bg); }
.workspace-tab.btn { padding:6px 4px 6px 8px; min-width:0; display:flex; align-items:center; gap:7px; font-size:12px; border:0; }
.tab-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:180px; }
.close-tab.btn { padding:2px 5px; min-height:24px;font-size:15px; border:0; }
.tab-dot { width:6px;height:6px;border-radius:50%;background:var(--muted); flex:none; }
.tab-dot.open {background:#43a578}.tab-dot.connecting{background:#ce9f3f}.tab-dot.failed{background:#d05c80}.tab-dot.preview{background:#8b6cb2}
.font-stepper { display:flex; align-items:center; height:28px; border:1px solid var(--terminal-line); border-radius:5px;flex:none; }
.font-stepper .btn { border:0; padding:1px 6px; height:26px; min-height:0; font-size:16px; }
.font-stepper input { width:39px; height:26px; border:0; padding:0;text-align:center; font-size:12px;background:transparent;border-radius:0; -moz-appearance:textfield; }
.font-stepper input::-webkit-inner-spin-button,.font-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.workspace-stage { flex:1; min-width:0;min-height:0;position:relative; display:flex; }
.workspace-empty { width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:var(--muted);text-align:center;padding:22px; }
.workspace-empty h2 { color:var(--strong); }
.workspace-panel { flex:1; min-width:0;min-height:0;position:relative; display:flex;flex-direction:column; overflow:hidden; }
.workspace-split { display:flex;flex:1;min-height:0;min-width:0; }
.terminal-side { flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;position:relative; }
.terminal-side .terminal-body { flex:1;min-height:0;height:auto; padding:4px 5px;overflow:hidden; }
.terminal-side .terminal-body .xterm {height:100%;}
.session-tools {position:absolute;z-index:4;right:8px;top:3px;display:flex;opacity:.35;background:var(--terminal-toolbar);border-radius:5px;transition:opacity .15s;}
.ssh-panel:focus-within>.session-tools,.ssh-panel:hover>.session-tools {opacity:1;}
.session-tools .btn{height:25px;width:25px;font-size:17px;}
.terminal-reason {position:absolute;bottom:8px;left:8px;right:8px;font-size:11px;padding:6px 10px;border:1px solid var(--terminal-reason-line);border-radius:6px;background:var(--terminal-reason-bg);color:var(--terminal-reason-text);z-index:5;pointer-events:none;}
.terminal-reason:empty{display:none}
.workspace-split.has-preview .terminal-side {flex:0 0 calc(var(--split-ratio,50%) - 3px);}
.workspace-divider { width:6px; flex:none; background:var(--terminal-line);cursor:col-resize;touch-action:none;z-index:4; }
.workspace-divider:hover,.workspace-divider:focus-visible{background:var(--accent)}
.preview-pane {display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;background:var(--surface);}
.preview-toolbar {height:30px;display:flex;align-items:center;gap:2px;padding:1px 3px 1px 8px;flex:none;background:var(--terminal-toolbar);border-bottom:1px solid var(--terminal-line);}
.preview-toolbar .btn{height:25px;width:25px;font-size:16px;}
.preview-target{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;color:var(--terminal-muted);}
.preview-frame {border:0;width:100%;height:100%;flex:1;min-height:0;display:block;background:white;}
.resizing {cursor:col-resize;user-select:none}.resizing iframe {pointer-events:none}.resizing .xterm {pointer-events:none}
.session-actions {display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px;}
.workspace-active.immersive {height:100dvh;min-height:0;overflow:hidden;}
.workspace-active.immersive .sidebar {height:100dvh;}
.workspace-active.immersive .main {padding:0;height:100dvh;min-height:0;overflow:hidden;display:flex;}
.workspace-active.immersive .workspace-host {flex:1;height:100%;}
.workspace-active.immersive .terminal-workspace {height:100%;min-height:0;border:0;border-radius:0;}
.workspace-active.immersive .footer {display:none;}
.workspace-active:not(.immersive) .main {padding-top:28px;}
.brand-text {min-width:0;}
.brand[data-brand-mode="image"] {width:100%;max-width:100%;}
.brand[data-brand-mode="image"] .brand-text{display:none;}
.brand[data-brand-mode="image"] .brand-logo {width:var(--brand-width);height:var(--brand-height);max-width:100%;overflow:hidden;}
.brand[data-brand-mode="image"] .brand-image {width:100%;height:100%;max-width:100%;object-fit:contain;transform:scale(var(--brand-scale,1));}
.shell[data-sidebar="collapsed"] .brand .brand-logo {width:34px;height:34px;}
.shell[data-sidebar="collapsed"] .brand .brand-image {width:34px;height:34px;transform:none;}
.branding-layout {padding:22px;}
.branding-layout-controls {display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0;}
.branding-layout-controls label {display:flex;flex-direction:column;gap:6px; font-size:12px;}
.branding-layout-controls input[type="number"]{width:85px;}
.branding-layout-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
.branding-placement {border:1px solid var(--line);border-radius:10px; padding:14px;min-width:0;}
.branding-placement-controls {display:flex;gap:8px;flex-wrap:wrap;margin:14px 0;}
.branding-placement-controls label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:var(--muted);}
.branding-placement-controls input[type="number"]{width:75px;}
.branding-placement-controls input[type="range"]{width:100%;}
.branding-live-preview {display:flex;align-items:center;justify-content:center;min-height:175px;border:1px dashed var(--line-hover);border-radius:8px;overflow:hidden;padding:10px;background:var(--gradient);}
.branding-live-preview .brand {justify-content:center;}
.branding-live-preview .brand-logo {outline:1px dashed var(--line-hover);}
.branding-live-preview .brand.login-brand {margin:0;}
.branding-preview.wordmark img{max-width:100%;width:auto;height:auto;max-height:84px;}
@media(max-width:1000px){.branding-layout-grid{grid-template-columns:1fr}.branding-live-preview{min-height:135px}.sidebar{padding-top:16px}.workspace-active:not(.immersive) .main{padding:18px;}.terminal-workspace{height:calc(100dvh - 76px);}}
@media(max-width:760px){
 .shell,.shell[data-sidebar="collapsed"],.shell[data-sidebar="hidden"] {grid-template-columns:0 minmax(0,1fr);}
 .shell .sidebar{position:fixed;left:0;top:0;bottom:0;width:min(var(--sidebar-width),82vw);height:100dvh;z-index:40;box-shadow:8px 0 35px var(--backdrop);}
 .shell[data-sidebar="collapsed"] .sidebar,.shell[data-sidebar="hidden"] .sidebar{visibility:hidden;width:0;padding:0;}
 .shell[data-sidebar="expanded"] .sidebar {visibility:visible;}
 .sidebar-resizer{display:none;}
 .shell .main{grid-column:2;min-width:0;padding:16px;}
 .workspace-active:not(.immersive) .main{padding:8px;}
 .terminal-workspace{height:calc(100dvh - 30px);min-height:280px;border-radius:8px;}
 .font-stepper{display:none;}.workspace-bar{height:38px;gap:0;}
 .workspace-tab-group{min-width:90px;max-width:180px;}.tab-title{max-width:110px;}
 .workspace-split.has-preview {flex-direction:column;}
 .workspace-split.has-preview .terminal-side{flex:0 0 calc(var(--split-ratio,50%) - 3px);}
 .workspace-divider{width:auto;height:6px;cursor:row-resize;}
 .workspace-split.has-preview .preview-pane{min-height:80px;}
 .sidebar .brand{margin-bottom:4px;}.sidebar-controls{margin:4px 0;}
 .workspace-active.immersive .sidebar{height:100dvh;}
}
.record-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 14px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}
.record-filters .field > span { font-size: 12px; color: var(--muted); }
.record-filter-actions { min-height: 38px; }
.record-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.record-jump { margin: 0; }
.record-jump input {
  border: 1px solid var(--input-line);
  border-radius: 6px;
  padding: 6px;
  background: var(--input);
  color: var(--text);
}
.record-jump input:focus-visible { outline: 2px solid var(--focus-ring); }
/* Image mode has a separate compact icon for collapsed navigation. */
.brand .brand-wordmark {display:none;}
.brand[data-brand-mode="image"] .brand-icon {display:none;}
.brand[data-brand-mode="image"] .brand-wordmark {display:inline-flex;}
.shell[data-sidebar="collapsed"] .brand[data-brand-mode="image"] .brand-icon {display:inline-flex;}
.shell[data-sidebar="collapsed"] .brand[data-brand-mode="image"] .brand-wordmark {display:none;}
.branding-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
.branding-layout .full {width:100%;}
@media(max-width:900px){.branding-grid{grid-template-columns:1fr;}}
.has-shell .main {padding-top:42px;}
.shell-sidebar-toggle {position:absolute;top:9px;left:calc(var(--sidebar-width,232px) + 16px);z-index:15;}
.shell[data-sidebar="collapsed"] .shell-sidebar-toggle {left:80px;}
.shell[data-sidebar="hidden"] .shell-sidebar-toggle {left:16px;}
.workspace-active .shell-sidebar-toggle {display:none;}
.sidebar-bottom {padding-top:10px;}
.sidebar .nav {flex-shrink:1;min-height:80px;overflow-y:auto;}
.workspace-active.immersive {height:var(--workspace-height,100dvh);}
.workspace-active.immersive .sidebar,.workspace-active.immersive .main {height:var(--workspace-height,100dvh);}
.workspace-active:not(.immersive) .terminal-workspace {height:calc(var(--workspace-height,100dvh) - 100px);}
@media(max-width:760px){.shell .shell-sidebar-toggle{left:10px;}.workspace-active:not(.immersive) .terminal-workspace{height:calc(var(--workspace-height,100dvh) - 30px);}.sidebar .brand{margin-bottom:4px;}.sidebar .nav-item{padding:9px 12px;}.sidebar-bottom .preferences-inline{margin-bottom:8px;}.sidebar .profile{padding-top:10px;}.sidebar .nav-label{padding-top:10px;}}
.shell {display:grid;}
.sidebar .brand-text {white-space:nowrap;font-size:15px;}
.sidebar-bottom .preferences-inline {display:grid;grid-template-columns:1fr;gap:4px;justify-content:stretch;}
.sidebar-bottom .preference-field {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;width:100%;}
.sidebar-bottom .preference-select {max-width:118px;width:auto;}
@media(max-width:760px){
 .shell .sidebar {top:0;padding:16px 14px;border-right:1px solid var(--line);display:flex;flex-direction:column;}
 .shell .sidebar .nav {flex-direction:column;overflow-x:hidden;overflow-y:auto;gap:4px;padding-bottom:0;}
 .shell .sidebar .nav-item {width:100%;flex-shrink:0;gap:10px;font-size:13px;}
 .shell .sidebar .nav-label {display:block;}
 .shell .sidebar-bottom {position:static;top:auto;right:auto;margin-top:auto;padding-top:8px;}
 .shell .profile {display:flex;}
 .shell .nav-icon {width:19px;height:19px;}
}
.terminal-side:focus-within>.session-tools,.terminal-side:hover>.session-tools {opacity:1;}
.preview-management h3{margin-bottom:14px;}
.preview-management-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line-soft);padding:12px 0;flex-wrap:wrap;}
.preview-management-row>div:first-child{min-width:0;overflow-wrap:anywhere;}
.preview-management-row small{display:block;font-size:11px;margin-top:4px;}

/* Account identity stays outside the terminal canvas. */
button.profile { width:100%; border-right:0; border-bottom:0; border-left:0; border-radius:0; background:transparent; color:var(--text); text-align:left; cursor:pointer; font:inherit; }
button.profile:hover { background:var(--hover); }
button.profile:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.profile > div { min-width:0; }
.avatar { position:relative; overflow:hidden; }
.avatar img { position:absolute; inset:0; width:100%; height:100%; border-radius:inherit; object-fit:cover; background:var(--active); }
.account-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:20px; align-items:start; }
.account-layout > * { min-width:0; }
.account-identity-card { padding:24px; }
.account-person { display:flex; align-items:center; gap:16px; margin-bottom:20px; min-width:0; }
.account-person > div { min-width:0; }
.account-person h2 { font-size:20px; margin:0 0 5px; overflow-wrap:anywhere; }
.account-person p { margin:0; }
.account-avatar { width:64px; height:64px; font-size:22px; }
.account-facts { display:grid; grid-template-columns:minmax(110px,.65fr) minmax(0,1fr); gap:10px 18px; margin:20px 0; align-items:baseline; font-size:13px; }
.account-facts dt { color:var(--muted); }
.account-facts dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.account-facts code { font-size:11px; overflow-wrap:anywhere; white-space:normal; }
.account-identifier { display:flex; align-items:flex-start; gap:8px; }
.account-identifier code { flex:1; min-width:0; }
.account-identifier button { flex:none; }
.account-actions .actions { margin:14px 0; }
.account-navigation { align-items:flex-start; }
.account-integration-toggle { display:flex; align-items:center; gap:10px; font-size:14px; font-weight:600; margin-bottom:18px; }
.account-integration-toggle input { width:18px; height:18px; accent-color:var(--accent); }
.account-history { margin:18px 0; }
.account-summary-modal .account-layout { display:block; }
.account-summary-modal .account-identity-card { padding:16px; }
.account-summary-modal .panel { margin-bottom:16px; }
@media(max-width:1050px) { .account-layout { grid-template-columns:minmax(0,1fr); gap:0; } }
@media(max-width:560px) { .account-facts { grid-template-columns:minmax(0,1fr); gap:5px; } .account-facts dd { margin-bottom:10px; } .account-identity-card { padding:18px; } }

/* Service collaboration permissions remain part of each member assignment. */
.service-member-access { display:flex; align-items:end; flex-wrap:wrap; gap:12px 18px; padding:12px 0 0 27px; }
.service-member-role { display:grid; gap:5px; font-size:11px; color:var(--muted); min-width:150px; }
.service-member-role select { font-size:12px; }
.service-member-permissions { display:flex; align-items:center; flex-wrap:wrap; gap:10px 14px; padding-bottom:9px; }
.service-member-permissions>label { display:flex; align-items:center; gap:6px; font-size:11px; cursor:pointer; }
.service-member-permissions input { width:15px; height:15px; accent-color:var(--accent); }
.service-member-access.inactive { opacity:.6; }
@media(max-width:560px) { .service-member-access { padding-left:0; align-items:stretch; } .service-member-role { flex:1; } }
/* scrollbars-1: one sidebar-derived policy for platform-owned scroll regions.
   !important is limited to scrollbar appearance so later legacy component
   rules cannot restore thick tracks. Scroll containers keep their own layout. */
:where(html,html *) {
  scrollbar-width:thin!important;
  scrollbar-color:color-mix(in srgb,var(--terminal-scrollbar-ink,var(--text,#342934)) 14%,transparent) transparent!important;
}
:where(html,html *):is(:hover,:focus-within) {
  scrollbar-color:color-mix(in srgb,var(--terminal-scrollbar-ink,var(--text,#342934)) 27%,transparent) transparent!important;
}
@supports selector(::-webkit-scrollbar) {
  :where(html,html *),:where(html,html *):is(:hover,:focus-within) {
    scrollbar-width:auto!important;scrollbar-color:auto!important;
  }
  :where(html,html *)::-webkit-scrollbar {width:4px!important;height:4px!important;background:transparent!important}
  :where(html,html *)::-webkit-scrollbar-track,
  :where(html,html *)::-webkit-scrollbar-corner {background:transparent!important}
  :where(html,html *)::-webkit-scrollbar-button {display:none!important;width:0!important;height:0!important}
  :where(html,html *)::-webkit-scrollbar-thumb {
    border:0!important;border-radius:999px!important;
    background:color-mix(in srgb,var(--terminal-scrollbar-ink,var(--text,#342934)) 14%,transparent)!important;
  }
  :where(html,html *):is(:hover,:focus-within)::-webkit-scrollbar-thumb {
    background:color-mix(in srgb,var(--terminal-scrollbar-ink,var(--text,#342934)) 27%,transparent)!important;
  }
  :where(html,html *)::-webkit-scrollbar-thumb:hover,
  :where(html,html *)::-webkit-scrollbar-thumb:active {
    background:color-mix(in srgb,var(--terminal-scrollbar-ink,var(--text,#342934)) 40%,transparent)!important;
  }
}
/* xterm 6 paints a DOM slider. Keep its larger transparent drag target and
   scroll geometry; only its visible thumb takes the shared 4px appearance. */
.xterm .xterm-scrollable-element>.scrollbar {background:transparent!important}
.xterm .xterm-scrollable-element>.scrollbar>.slider {
  border:0!important;border-radius:999px!important;
  background:color-mix(in srgb,var(--terminal-scrollbar-ink,var(--terminal-text,var(--text,#342934))) 14%,transparent)!important;
}
.xterm .xterm-scrollable-element>.scrollbar.vertical>.slider {width:4px!important;left:auto!important;right:0!important}
.xterm .xterm-scrollable-element>.scrollbar.horizontal>.slider {height:4px!important;top:auto!important;bottom:0!important}
.xterm .xterm-scrollable-element:is(:hover,:focus-within)>.scrollbar>.slider {
  background:color-mix(in srgb,var(--terminal-scrollbar-ink,var(--terminal-text,var(--text,#342934))) 27%,transparent)!important;
}
.xterm .xterm-scrollable-element>.scrollbar>.slider:is(:hover,:active,.active) {
  background:color-mix(in srgb,var(--terminal-scrollbar-ink,var(--terminal-text,var(--text,#342934))) 40%,transparent)!important;
}
@media(forced-colors:active) {
  :where(html,html *),:where(html,html *):is(:hover,:focus-within) {scrollbar-width:auto!important;scrollbar-color:auto!important}
  :where(html,html *)::-webkit-scrollbar {width:revert!important;height:revert!important}
  :where(html,html *)::-webkit-scrollbar-thumb,
  :where(html,html *):is(:hover,:focus-within)::-webkit-scrollbar-thumb,
  :where(html,html *)::-webkit-scrollbar-thumb:is(:hover,:active),
  .xterm .xterm-scrollable-element>.scrollbar>.slider,
  .xterm .xterm-scrollable-element:is(:hover,:focus-within)>.scrollbar>.slider,
  .xterm .xterm-scrollable-element>.scrollbar>.slider:is(:hover,:active,.active) {background:CanvasText!important}
  .xterm .xterm-scrollable-element>.scrollbar.vertical>.slider {width:100%!important}
  .xterm .xterm-scrollable-element>.scrollbar.horizontal>.slider {height:100%!important}
}

