/* Generated by build_tools/build-admin.cjs. Edit the source modules, then rebuild. */
/* styles/theme.css */
:root {
  color-scheme: dark;
  --bg: #0b0f16;
  --sidebar: #10141d;
  --panel: #141a24;
  --raised: #1a2230;
  --line: #252d3c;
  --text: #eaf0fa;
  --muted: #93a1b8;
  --accent: #b3a2ff;
  --accent-bg: #28233e;
  --green: #72d9b1;
  --danger: #ff9ca6;
  --radius: 16px;
  font-family:
    Segoe UI,
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* styles/tools.css */
.console-modal {
  width: min(920px, calc(100vw - 36px));
  max-width: 920px;
}
.console-history {
  height: 340px;
  overflow: auto;
  background: #090e16;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0 18px;
}
.console-entry + .console-entry {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}
.console-entry-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.console-entry-heading .icon-button {
  margin-left: auto;
}
.console-entry pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.55 Consolas,
    monospace;
  margin: 8px 0;
}
.console-input {
  color: var(--accent);
}
.console-output {
  color: #d4dfef;
}
.console-stderr {
  color: var(--danger);
}
#console-command {
  width: 100%;
  resize: vertical;
  min-height: 80px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font:
    13px/1.5 Consolas,
    monospace;
  padding: 12px;
  margin-top: 6px;
}
#console-command:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.console-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.console-controls label {
  max-width: 180px;
}
.console-modal form > .muted {
  font-size: 11px;
  margin-top: 8px;
}
#page-actions {
  flex-wrap: wrap;
}
.avatar {
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.group-chips {
  max-width: 220px;
}
.group-chips .badge {
  margin: 3px 5px 3px 0;
}
.groups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.groups-grid > .panel {
  margin: 0;
}
.groups-grid > .empty-state {
  grid-column: 1/-1;
}
.group-intro {
  display: flex;
  gap: 15px;
  align-items: center;
  background: #1a2030;
  border: 1px solid #35314e;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 12px;
  color: #bac5dc;
}
.group-intro .icon {
  color: var(--accent);
}
.group-card-members {
  padding: 0 25px 20px;
}
.group-member-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.group-explanation {
  font-size: 11px;
  margin: 8px 0 15px;
}
.group-members {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.group-member-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.group-member-option:last-child {
  border-bottom: 0;
}
.group-member-option input {
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
}
.group-member-option:has(input:checked) {
  background: #252039;
}
.group-member-option strong,
.group-member-option small {
  display: block;
  font-size: 12px;
}
.group-member-option small {
  font-size: 10px;
  margin-top: 3px;
}
.account-picture-field {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.account-picture-field > div:last-child {
  flex: 1;
}
.account-picture-field .avatar,
#account-picture-preview > img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  font-size: 25px;
}
.account-picture-field input {
  font-size: 10px;
}
.account-picture-field .checkbox-row {
  margin-top: -6px;
}
@media (max-width: 950px) {
  .groups-grid {
    grid-template-columns: 1fr;
  }
}

/* styles/layout.css */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button,
a {
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.25px;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
small {
  font-size: 12px;
  color: var(--muted);
}
code {
  font-family: Consolas, monospace;
  font-size: 12px;
  color: #aab8cf;
  overflow-wrap: anywhere;
}
.muted {
  color: var(--muted);
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.8px;
  color: var(--accent);
  margin-bottom: 10px;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  padding: 12px;
  background: var(--accent);
  color: #18132d;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.sidebar {
  overflow-y: auto;
  width: 232px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 30px 18px;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 46px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.5px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.6px;
  margin-top: 2px;
  font-weight: 500;
}

.nav-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #68768e;
  padding: 0 14px;
  margin-bottom: 12px;
}
nav {
  display: grid;
  gap: 6px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 500;
}
nav a:hover {
  background: var(--raised);
  color: var(--text);
}
nav a.active {
  background: var(--accent-bg);
  color: #c8baff;
}
nav a.active:after {
  content: '';
  margin-left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.sidebar-footer {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 7px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: #c6d0df;
}
.sidebar-footer small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.admin-auth-controls {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.admin-auth-controls button {
  width: 100%;
}
.sidebar-footer .icon {
  margin-left: auto;
  width: 16px;
  color: #71829c;
}
.local-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.workspace {
  margin-left: 232px;
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 38px 42px 20px;
  min-height: 100vh;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-heading > div > p:last-child {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}
.page-heading .eyebrow {
  margin-top: 0 !important;
  color: var(--accent) !important;
  font-size: 10px !important;
}
.page-heading #page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 39px;
}
.primary {
  background: #b3a2ff;
  color: #1c1731;
  box-shadow: 0 3px 12px #0002;
}
.primary:hover {
  background: #c7baff;
}
.secondary {
  background: #1b2330;
  border-color: #303a4e;
  color: #c6d2e5;
}
.secondary:hover {
  background: #252e40;
  border-color: #44516c;
}
.danger {
  background: #42232d;
  border-color: #65303d;
  color: #ffa6b0;
}
.danger:hover {
  background: #5a2c39;
}
.primary .icon,
.secondary .icon,
.danger .icon {
  width: 16px;
  height: 16px;
}
.icon-button {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: transparent;
  border: 1px solid transparent;
  color: #8f9fb9;
  padding: 6px;
}
.icon-button .icon {
  width: 17px;
  height: 17px;
}
.icon-button:hover {
  background: #242e40;
  border-color: #354159;
  color: #d6dff0;
}
.icon-button[aria-label^='Delete']:hover {
  background: #42232d;
  color: var(--danger);
  border-color: #65303d;
}
.text-link {
  font-size: 12px;
  font-weight: 500;
  color: #b3a2ff;
}
.text-link:hover {
  color: #d6ccff;
}
.button-row,
.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.button-row {
  gap: 10px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 550;
  line-height: 1.5;
  border: 1px solid #2c3648;
  border-radius: 5px;
  padding: 4px 8px;
  white-space: nowrap;
  color: #a6b4ca;
  background: #1b2432;
}
.badge.success {
  color: #7edeb8;
  background: #172e29;
  border-color: #29463a;
}
.badge.accent {
  color: #c1b1ff;
  background: #29243e;
  border-color: #3c3358;
}
.badge.neutral {
  color: #91a0b7;
  background: #1c2331;
  border-color: #2d3648;
}
.banner {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid;
  font-size: 12px;
}
.banner.error {
  color: #ffacb5;
  border-color: #66323c;
  background: #321f28;
}
.banner.notice {
  color: #8ee5bf;
  border-color: #315747;
  background: #192f27;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px #00000012;
}
.panel-heading {
  padding: 23px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.panel-heading p {
  font-size: 12px;
  margin-top: 5px;
}
.panel-note {
  padding: 16px 25px;
  border-top: 1px solid var(--line);
  background: #121923;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.panel-note .icon {
  width: 15px;
}
.panel-note a {
  margin-left: auto;
}
.empty-state {
  padding: 50px 25px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty-state > .icon {
  width: 32px;
  height: 32px;
  color: #6a7990;
  margin: 0 auto 12px;
}
.empty-state h3 {
  color: #d6e0ef;
  font-size: 16px;
  margin-bottom: 8px;
}
.empty-state a,
.empty-state button {
  margin-top: 20px;
}
.empty-state p {
  max-width: 410px;
  margin: auto;
}
.signin-card {
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-width: 480px;
  background: var(--panel);
  margin: 40px auto;
}
.signin-card > .icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 15px;
}
.signin-card > p {
  margin: 12px 0 24px;
  font-size: 13px;
}
.signin-card > button {
  width: 100%;
  margin-top: 20px;
}

/* styles/pages.css */
.welcome-panel {
  background: linear-gradient(110deg, #211e34, #1a2030 65%, #17232b);
  border: 1px solid #353047;
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.welcome-panel h2 {
  font-size: 26px;
  letter-spacing: -0.65px;
  margin: 15px 0 10px;
}
.welcome-panel p {
  font-size: 12px;
  color: #abb6cd;
  max-width: 420px;
}
.welcome-panel > .icon {
  width: 95px;
  height: 95px;
  color: #9d90d7;
  stroke-width: 0.8;
  margin-right: 25px;
  transform: rotate(-8deg);
}
.welcome-panel .badge {
  font-size: 8px;
  letter-spacing: 1.2px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.stat-card:hover {
  border-color: #504569;
  background: #192030;
}
.stat-heading {
  display: flex;
  justify-content: space-between;
  color: #9baac1;
  font-size: 11px;
  gap: 8px;
}
.stat-heading .icon {
  color: #8c7abf;
  width: 17px;
  height: 17px;
}
.stat-card strong {
  font-size: 32px;
  display: block;
  line-height: 1.3;
  font-weight: 600;
  margin: 10px 0;
}
.stat-card small {
  font-size: 10px;
  color: #7989a4;
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.server-details {
  margin: 0;
  padding: 0 25px 20px;
}
.server-details > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #222c3c;
  font-size: 12px;
}
.server-details > div:last-child {
  border-bottom: 0;
}
.server-details dt {
  color: #8a9ab4;
  white-space: nowrap;
}
.server-details dd {
  margin: 0;
  font-family: Consolas, monospace;
  font-size: 11px;
  text-align: right;
  overflow-wrap: anywhere;
  color: #bfcae0;
}
.terminal-status-list,
.registration-list {
  padding: 0 25px 18px;
}
.callback-policy-body {
  display: grid;
  gap: 16px;
  padding: 0 25px 24px;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #252d3c;
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row > div {
  flex: 1;
}
.list-row strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
.list-row small {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: #283346;
  border: 1px solid #38465d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 550;
  color: #bfd0ee;
  object-fit: cover;
}
.terminal-avatar {
  background: #2c2642;
  border-color: #44375e;
  color: #c3b4f9;
}
.event-list {
  padding: 0 25px 16px;
}
.event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #222c3c;
  font-size: 12px;
  color: #b5c1d7;
}
.event-row:last-child {
  border: 0;
}
.event-row > span:nth-child(2) {
  flex: 1;
  overflow-wrap: anywhere;
}
.event-row time {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: #7d8da7;
  white-space: nowrap;
}
.event-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8f82be;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px #8f82be10;
}
.table-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 25px 20px;
}
.table-toolbar > span {
  margin-left: auto;
  font-size: 11px;
  white-space: nowrap;
}
.search-field {
  position: relative;
  flex: 1;
  max-width: 340px;
}
.search-field > .icon {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 16px;
  height: 16px;
  color: #7486a3;
}
.search-field input {
  padding-left: 37px;
}
.table-toolbar select {
  width: 170px;
  font-size: 12px;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 10px;
  color: #7c8ca7;
  letter-spacing: 0.3px;
  font-weight: 550;
  white-space: nowrap;
  background: #111824;
  padding: 13px 25px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
td {
  padding: 20px 25px;
  border-bottom: 1px solid #232c3b;
  font-size: 12px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.accounts-table tbody tr:hover {
  background: #182030;
}
.person-cell {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 190px;
}
.person-cell strong {
  display: block;
  font-weight: 550;
  font-size: 13px;
}
.person-cell code {
  display: block;
  color: #7e90ae;
  font-size: 11px;
  margin-top: 2px;
}
.accounts-table td.row-actions {
  display: table-cell;
  white-space: nowrap;
}
.accounts-table td.row-actions .icon-button {
  margin-right: 3px;
}

.terminal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 25px 23px;
  border-bottom: 1px solid var(--line);
}

/* styles/forms.css */
dialog {
  color: var(--text);
  border: 1px solid #354058;
  border-radius: 18px;
  background: #151c28;
  padding: 28px;
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  box-shadow: 0 28px 90px #0009;
}
dialog::backdrop {
  background: #04070ec9;
  backdrop-filter: blur(5px);
}
dialog.compact {
  max-width: 440px;
}
.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 25px;
}
.modal-heading h2 {
  font-size: 22px;
}
.modal-heading .eyebrow {
  font-size: 9px;
  margin-bottom: 7px;
}
.modal-heading > .icon-button {
  margin: -4px -7px 0 0;
}
.modal-footer {
  flex-wrap: wrap;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #2b3446;
  margin-top: 26px;
  padding-top: 21px;
}
.modal-footer button {
  min-width: 90px;
}
label {
  display: block;
  font-size: 12px;
  color: #b8c6dc;
  font-weight: 500;
  margin-bottom: 19px;
}
label small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 6px;
  color: #7f90ad;
  font-weight: 400;
}
input,
select {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #303d55;
  border-radius: 7px;
  background: #101723;
  color: #e1e9f8;
  margin-top: 7px;
  min-height: 41px;
  font-size: 13px;
}
input::placeholder {
  color: #647793;
}
input:hover,
select:hover {
  border-color: #465573;
}
input:focus,
select:focus {
  border-color: #a899dc;
  outline: 1px solid #a899dc;
}
input[type='file'] {
  font-size: 11px;
  padding: 10px;
}
input[type='file']::file-selector-button {
  background: #283449;
  color: #b7c6e0;
  border: 0;
  border-radius: 4px;
  padding: 5px 10px;
  margin-right: 12px;
  cursor: pointer;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.info-box {
  padding: 14px;
  border: 1px solid #303a51;
  background: #1a2232;
  border-radius: 8px;
  color: #9baecb;
  font-size: 11px;
  line-height: 1.65;
  margin: 18px 0;
}
.danger-icon {
  display: grid;
  place-items: center;
  background: #3a2330;
  border: 1px solid #583342;
  color: #ff9ca6;
  border-radius: 13px;
  width: 47px;
  height: 47px;
}
.compact > h2 {
  margin-bottom: 12px;
}
.compact > p.muted {
  font-size: 12px;
  line-height: 1.8;
}
.credential-list {
  margin-top: 20px;
}
.credential-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 0;
  border-bottom: 1px solid #2a3548;
}
.credential-row > div {
  flex: 1;
  min-width: 0;
}
.credential-row small {
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
}
.credential-row code {
  font-size: 12px;
  color: #cedaf0;
}
.credential-feedback {
  margin-top: 8px;
  color: var(--muted);
}
.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
}
.checkbox-row input {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
}

.backup-controls {
  padding: 0 25px 24px;
}
.backup-controls p {
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.backup-dialog > h2 {
  margin-bottom: 12px;
}
.backup-dialog > hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.backup-dialog input[type='file'] {
  width: 100%;
  margin: 12px 0;
}
.backup-dialog > p {
  margin: 10px 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

/* styles/terminals.css */
.brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
}
.welcome-logo {
  width: 105px;
  height: 105px;
  flex-shrink: 0;
  margin-right: 20px;
}
@media (max-width: 580px) {
  .brand-logo {
    width: 34px;
    height: 34px;
  }
  .welcome-logo {
    display: none;
  }
}
/* Keep terminal layout in this source file; admin.css is generated. */
.terminal-card .panel-heading {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.terminal-card .panel-heading > div {
  min-width: 0;
}
.terminal-card .terminal-summary {
  padding: 0;
  border: 0;
  margin-top: 12px;
  gap: 6px;
}
.terminal-dropdown {
  width: min(440px, 48%);
  margin: 0;
}
.terminal-fields {
  display: block;
}
.terminal-settings-form {
  padding: 16px 22px;
  min-width: 0;
}
.terminal-settings-form[data-kind='devices'] {
  padding: 0;
}
.terminal-settings-form[data-kind='association'] {
  border-bottom: 1px solid var(--line);
}
.terminal-settings-form h3 {
  font-size: 14px;
  margin-bottom: 12px;
}
.terminal-settings-form label {
  margin: 0;
  min-width: 0;
}
.terminal-association-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.6fr) minmax(220px, 1fr) auto;
  gap: 20px;
  align-items: end;
}
.terminal-association-row > button {
  margin-bottom: 1px;
}
.terminal-serial {
  align-self: center;
  min-width: 0;
}
.terminal-serial span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.terminal-serial code {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.terminal-setting-section {
  padding: 16px 22px;
}
.terminal-setting-section + .terminal-setting-section {
  border-top: 1px solid var(--line);
}
.terminal-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.terminal-options select {
  margin-top: 5px;
}
.terminal-calls .terminal-options {
  align-items: center;
}
.terminal-answer-delay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.terminal-answer-delay input {
  margin: 0;
}
.terminal-answer-delay small {
  margin: 0;
}
.terminal-settings-form input[type='number'] {
  width: 100px;
}
.terminal-settings-form .checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.terminal-settings-form .checkbox-row input {
  appearance: none;
  width: 34px;
  height: 20px;
  min-height: 0;
  margin: 0;
  padding: 2px;
  border-radius: 20px;
  background: #354058;
  cursor: pointer;
  flex-shrink: 0;
}
.terminal-settings-form .checkbox-row input::after {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s;
}
.terminal-settings-form .checkbox-row input:checked {
  background: #a996fa;
}
.terminal-settings-form .checkbox-row input:checked::after {
  transform: translateX(14px);
}
.terminal-help {
  font-size: 11px;
  font-weight: normal;
  margin-top: 6px;
  color: var(--muted);
}
.terminal-help summary {
  cursor: pointer;
}
.terminal-help p {
  margin-top: 8px;
  line-height: 1.5;
}
.terminal-tools {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.terminal-setup summary {
  cursor: pointer;
  padding: 11px 16px;
  border-radius: 7px;
  list-style: none;
  font-size: 12px;
}
.terminal-setup summary::after {
  content: ' ▾';
}
.terminal-setup-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.terminal-setup[open] {
  flex-basis: 100%;
}
.terminal-tools > .button-row {
  flex-wrap: wrap;
}
.console-shell-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 16px 0;
}
.console-shell-controls label {
  flex: 1;
  margin: 0;
}
.console-shell-controls .banner {
  flex-basis: 100%;
}
@media (max-width: 700px) {
  .terminal-card .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }
  .terminal-dropdown {
    width: 100%;
  }
  .terminal-association-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .terminal-association-row > button {
    justify-self: start;
  }
  .terminal-options {
    grid-template-columns: 1fr;
  }
  .terminal-tools {
    flex-wrap: wrap;
  }
}

/* styles/responsive.css */
@media (min-width: 1600px) {
  main {
    padding-top: 48px;
  }
  .welcome-panel {
    padding: 38px;
  }
  .welcome-panel h2 {
    font-size: 30px;
  }
}
@media (max-width: 1150px) {
  main {
    padding: 30px 26px;
  }
  .sidebar {
    width: 205px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .workspace {
    margin-left: 205px;
  }
  .brand {
    font-size: 17px;
  }

  .accounts-table th,
  .accounts-table td {
    padding-left: 16px;
    padding-right: 16px;
  }
  .panel-heading {
    align-items: flex-start;
  }

  .page-heading #page-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .overview-grid {
    gap: 16px;
  }
  .terminal-association-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
  .terminal-association-row > button {
    grid-column: 2;
    justify-self: start;
  }
}
@media (max-width: 850px) {
  .sidebar {
    width: auto;
    height: auto;
    position: static;
    padding: 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin: 0 0 16px;
  }
  .sidebar-footer {
    display: none;
  }
  nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  nav a {
    font-size: 13px;
    justify-content: center;
    padding: 10px 6px;
    gap: 6px;
    min-height: 44px;
  }
  nav a .icon {
    width: 18px;
    height: 18px;
  }
  nav a.active:after {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .admin-auth-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 16px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .overview-grid .panel {
    margin-bottom: 8px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  h1 {
    font-size: 27px;
  }
  .welcome-panel > .icon {
    width: 70px;
    height: 70px;
    margin-right: 0;
  }
  .table-toolbar {
    flex-wrap: wrap;
  }
  .table-toolbar > span {
    margin-left: 0;
  }
  .table-toolbar select {
    width: 160px;
  }

  .panel-heading .button-row {
    justify-content: flex-end;
  }
  .terminal-association-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .terminal-association-row > button {
    grid-column: auto;
    justify-self: start;
  }
}
@media (max-width: 580px) {
  .sidebar {
    width: auto;
    height: auto;
    position: static;
    padding: 16px 14px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin: 0 0 16px;
    justify-content: flex-start;
  }
  .brand > span:last-child {
    display: block;
  }
  .brand small {
    font-size: 8px;
  }

  nav {
    display: grid;
    gap: 5px;
  }
  nav a {
    font-size: 12px;
    padding: 9px 4px;
    gap: 6px;
    white-space: nowrap;
  }
  nav a .icon {
    width: 14px;
    height: 14px;
  }
  .workspace {
    margin: 0;
  }
  main {
    padding: 26px 18px 16px;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 18px;
  }
  .page-heading #page-actions {
    justify-content: flex-start;
  }
  .page-heading > div > p:last-child {
    font-size: 12px;
  }
  h1 {
    font-size: 28px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .welcome-panel {
    padding: 23px;
  }
  .welcome-panel h2 {
    font-size: 23px;
  }
  .welcome-panel > .icon {
    display: none;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .stat-card {
    padding: 18px;
  }
  .panel-heading {
    padding: 20px;
    flex-wrap: wrap;
  }
  .panel-heading .button-row {
    justify-content: flex-start;
  }
  .table-toolbar {
    padding: 0 20px 20px;
  }
  .search-field {
    max-width: none;
    min-width: 100%;
  }
  .table-toolbar select {
    width: auto;
    flex: 1;
  }
  .table-toolbar > span {
    margin-left: auto;
  }
  .panel-note {
    padding-left: 20px;
    padding-right: 20px;
  }
  .panel-note {
    flex-wrap: wrap;
  }
  .panel-note a {
    margin-left: 0;
  }
  .server-details,
  .terminal-status-list,
  .registration-list,
  .callback-policy-body,
  .event-list {
    padding-left: 20px;
    padding-right: 20px;
  }
  .terminal-summary {
    padding-left: 20px;
    padding-right: 20px;
  }

  .avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  dialog {
    padding: 23px;
    border-radius: 14px;
  }
  .modal-heading h2 {
    font-size: 21px;
  }
  .event-row time {
    font-size: 9px;
  }
}

/* Flex/grid children must be allowed to shrink around long account/device names. */
.panel-heading > div,
.list-row > div,
.group-member-option > span,
.account-picture-field > div,
.person-cell > div,
.console-shell-controls label,
.field-grid > label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.badge,
.credential-row code {
  white-space: normal;
  overflow-wrap: anywhere;
}
.terminal-settings-form .checkbox-help {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0 10px;
}
.checkbox-help small {
  grid-column: 2;
}

/* @llr LLR-SRV-UI-013 */
/* Use the same rows and controls on both layouts: no duplicated mobile forms. */
@media (max-width: 700px) {
  .accounts-table,
  .accounts-table tbody,
  .accounts-table tr {
    display: block;
  }
  .accounts-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .accounts-table tbody tr {
    padding: 18px;
    border-top: 1px solid var(--line);
  }
  .accounts-table td,
  .accounts-table td.row-actions {
    display: block;
    border: 0;
    padding: 6px 0;
    max-width: none;
    white-space: normal;
  }
  .accounts-table td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .person-cell {
    min-width: 0;
  }
  .list-row {
    flex-wrap: wrap;
  }
  .list-row > div {
    flex-basis: calc(100% - 52px);
  }
  .list-row > .badge {
    margin-left: 46px;
  }
  .console-controls,
  .console-entry-heading {
    flex-wrap: wrap;
  }
  .console-history {
    height: min(340px, 40dvh);
    padding: 12px;
  }
}
@media (max-width: 580px) {
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .signin-card {
    padding: 24px 18px;
    margin: 12px auto;
  }
  dialog {
    padding: 20px;
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
  }
  .console-modal {
    width: calc(100% - 24px);
  }
  .modal-footer > button {
    flex: 1 1 120px;
    white-space: normal;
  }
  .event-row {
    flex-wrap: wrap;
  }
  .event-row time {
    flex-basis: 100%;
    margin-left: 19px;
  }
  .account-picture-field {
    flex-direction: column;
  }
  .account-picture-field > div:last-child {
    width: 100%;
  }
}
/* Keep controls easy to tap, including narrow desktop windows used for testing.
 * 16px form text also avoids automatic input zoom in mobile Safari. */
@media (max-width: 850px), (pointer: coarse) {
  button.primary,
  button.secondary,
  button.danger,
  .terminal-setup summary,
  .checkbox-row,
  .terminal-help summary {
    min-height: 44px;
  }
  .icon-button {
    width: 44px;
    height: 44px;
  }
  input:not([type='checkbox']),
  select,
  textarea,
  .table-toolbar select,
  .account-picture-field input,
  #console-command {
    font-size: 16px;
    min-height: 44px;
  }
  .terminal-help summary {
    padding: 12px 0;
  }
}
