:root {
  color-scheme: dark;
  --bg: #101214;
  --panel: #171a1d;
  --line: #2a2f34;
  --text: #f4f6f7;
  --muted: #9aa4ad;
  --blue: #0a84ff;
  --green: #00c853;
  --red: #ff3b30;
  --orange: #ff9800;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 "Segoe UI", Arial, sans-serif;
}

button, input, select {
  font: inherit;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #0c0e10;
}

.brand-block {
  min-width: 220px;
}

.vps-stats {
  flex: 1;
  min-width: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #d7dde2;
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.vps-stats > span {
  min-width: 76px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #15191d;
  text-align: center;
}

.vps-stats [data-stat="storage"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 112px;
}

.vps-stats [data-stat="net"] {
  min-width: 176px;
}

.vps-stats [data-stat="ping"] {
  min-width: 86px;
}

.storage-icon {
  width: 13px;
  height: 10px;
  display: inline-block;
  border: 1.5px solid #d7dde2;
  border-radius: 2px;
  position: relative;
}

.storage-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: -4px;
  height: 5px;
  border: 1.5px solid #d7dde2;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.top-actions,
.cap-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cap-form label,
.cap-form span {
  color: var(--muted);
  white-space: nowrap;
}

.cap-form input {
  width: 78px;
  height: 32px;
  padding: 5px 8px;
}

h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: 20px; }
.brand-home {
  color: inherit;
  text-decoration: none;
}

.brand-home:hover {
  color: #d7dde2;
}

h2 { font-size: 16px; }
.subtle { color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 8px var(--form-pane-width, 380px);
  gap: 10px;
  padding: 14px;
}

.table-pane, .form-pane, .login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-pane { min-width: 0; }
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.stream-search {
  width: min(320px, 34vw);
  height: 34px;
  padding: 7px 10px;
  background: #0f1114;
}

.stream-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 112px);
}

.stream-table {
  width: 100%;
  min-width: 1440px;
  border-collapse: collapse;
  table-layout: fixed;
}

.col-dot { width: 28px; }
.col-name { width: 150px; }
.col-owner { width: 156px; }
.col-key { width: 92px; }
.col-type { width: 54px; }
.col-codec { width: 90px; }
.col-status { width: 500px; }
.col-video { width: 78px; }
.col-lived { width: 72px; }
.col-speed { width: 64px; }
.col-actions { width: 242px; }

.stream-table th,
.stream-table td {
  height: 38px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-table th {
  position: sticky;
  top: 0;
  background: #202429;
  z-index: 1;
  color: #d7dde2;
  font-size: 12px;
  font-weight: 600;
}

.stream-table tr.claim-row .status-cell {
  background: #ff0000;
  color: #fff;
  font-weight: 700;
}

.stream-table tr.claim-row .dot {
  color: #ff0000 !important;
  text-shadow: 0 0 8px rgba(255, 0, 0, 0.95);
}

.stream-table tr.error-row .status-cell {
  color: #fff;
  background: #8b1d1d;
  font-weight: 700;
}

.stream-table tr.drive-row .status-cell {
  color: #fff;
  background: #12375d;
}

.stream-table tr.review-row .status-cell {
  color: #fff;
  background: #17314f;
}

.status-cell {
  width: 380px;
}

.video-cell a {
  color: #8dbdff;
  text-decoration: none;
}

.owner-cell {
  padding: 0 6px;
  text-align: center;
  vertical-align: middle;
}

.stream-owner-form {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.owner-cell select,
.stream-owner-form select {
  width: 100%;
  height: 30px;
  min-width: 0;
  padding: 4px 24px 4px 10px;
  font-size: 12px;
  text-align: center;
  text-align-last: center;
}

.owner-name {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-text {
  display: block;
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-progress {
  display: block;
  position: relative;
  width: 100%;
  height: 6px;
  margin-top: 4px;
  border-radius: 999px;
  background: #0c1d31;
  overflow: hidden;
}

.drive-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0a84ff, #48c7ff);
  transition: width 180ms ease;
}

.dot-cell { width: 32px; text-align: center; }
.dot { color: #fff; font-size: 16px; }
.name-cell { font-weight: 600; }
.source-cell {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty {
  color: var(--muted);
  text-align: center;
}

form { margin: 0; }
.icon-btn, .icon-link {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #23282d;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.icon-btn.run { color: var(--green); }
.icon-btn.stop { color: var(--orange); }
.icon-btn.restart, .icon-btn.forever { color: #4dd4ff; }
.icon-btn.danger { color: var(--red); }

.actions-cell {
  vertical-align: middle;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  flex-wrap: nowrap;
}

.action-row form {
  display: inline-flex;
}
.action-row [hidden] { display: none !important; }
.icon-btn.forever { color: #4dd4ff; }

.ghost, .ghost-link, .file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202429;
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.ghost.danger-action {
  border-color: #8f1d2b;
  background: #9f1d2a;
  color: #fff;
}
.ghost.danger-action:hover {
  background: #c32535;
}
.file-btn input { display: none; }
.cookie-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cookie-state { color: var(--muted); }
.proxy-api-form {
  display: grid;
  grid-template-columns: auto minmax(180px, 280px) auto;
  align-items: center;
  gap: 8px;
}

.proxy-api-form input[type="url"] {
  height: 34px;
  padding: 6px 8px;
}

.proxy-api-toggle {
  white-space: nowrap;
  color: #d7dde2;
}

.proxy-error {
  grid-column: 2 / -1;
  color: var(--red);
  font-size: 12px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

#accountManagerBtn {
  flex: 0 0 auto;
  min-width: max-content;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-panel {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171a1d;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  display: grid;
  gap: 10px;
  padding: 14px;
  color: #d7dde2;
}

.modal-body p { margin: 0; }

.domain-panel {
  width: min(720px, calc(100vw - 32px));
}

.domain-form,
.domain-field,
.domain-current,
.domain-guide {
  display: grid;
  gap: 8px;
}

.domain-field span,
.domain-current span {
  color: var(--muted);
  font-size: 12px;
}

.domain-field input {
  width: 100%;
  height: 36px;
  padding: 7px 10px;
}

.domain-current {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1114;
}

.domain-current a {
  color: #4dd4ff;
  overflow-wrap: anywhere;
}

.domain-current b {
  overflow-wrap: anywhere;
}

.domain-guide {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111820;
}

.domain-guide h3 {
  margin: 0;
  font-size: 14px;
}

.domain-guide ol {
  margin: 0;
  padding-left: 20px;
}

.domain-guide li {
  margin: 5px 0;
}

.domain-guide b {
  color: #fff;
}

.form-success {
  color: #d9f7df;
  background: #1e5f35;
  border-radius: 6px;
  padding: 8px 10px;
}
.field-warning {
  color: #ffe9b5;
  background: rgba(255, 152, 0, 0.13);
  border: 1px solid rgba(255, 152, 0, 0.35);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
}

.account-manager-panel {
  width: min(1180px, calc(100vw - 32px));
}

.account-manager-body {
  max-height: min(78vh, 760px);
  overflow: hidden;
  align-content: start;
}

.account-manager-tools,
.account-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-manager-tools {
  justify-content: flex-start;
}

.account-section {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.account-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.account-subpanel {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #12161a;
}

.account-existing-section {
  min-height: 0;
}

.account-section h3 {
  margin: 0;
  color: #f4f6f7;
  font-size: 14px;
}

.account-create-form {
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 120px minmax(170px, 1fr) auto;
}

.account-create-form button {
  grid-column: auto;
}

.account-admin-list,
.stream-access-list,
.group-list {
  display: grid;
  gap: 8px;
}

.account-admin-list {
  max-height: min(48vh, 430px);
  overflow: auto;
  padding-right: 4px;
}

.account-row,
.stream-access-row,
.group-row {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111417;
}

.account-row-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.account-row {
  grid-template-columns: minmax(130px, 1.1fr) 112px minmax(150px, 1fr) auto auto auto;
}

.stream-access-row {
  grid-template-columns: minmax(160px, 1.4fr) minmax(130px, 1fr) minmax(130px, 1fr) auto;
}

.group-row {
  grid-template-columns: minmax(130px, 1fr) minmax(220px, 1fr) minmax(220px, 1.2fr) auto;
}

.group-create-row {
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
}

.group-manager-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
}

.group-members {
  max-height: 92px;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.group-members span {
  color: #d7dde2;
  background: #1b2026;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.locked-account .account-row {
  opacity: 0.58;
  background: #17191c;
}

.locked-account .account-lock {
  opacity: 1;
}

.account-search {
  width: min(420px, 100%);
}

.account-name,
.stream-access-name,
.account-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-name {
  display: grid;
  gap: 2px;
}

.account-name span,
.account-meta {
  color: var(--muted);
  font-size: 12px;
}

.mini-check {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d7dde2;
  white-space: nowrap;
}

.mini-check input {
  width: 16px;
  height: 16px;
}

.force-password-check {
  align-self: center;
}

.password-fields {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr);
  gap: 6px;
  grid-column: 1 / -1;
}

.password-fields[hidden] {
  display: none !important;
}

.group-picker {
  position: relative;
  min-width: 0;
}

.group-picker summary {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1114;
  color: #f4f6f7;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-picker-menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 4px);
  left: 0;
  width: min(280px, 82vw);
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #15191d;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.group-picker-menu label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
}

.group-picker-menu .ghost {
  width: 100%;
}

.account-delete-form {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.log-panel {
  width: min(980px, calc(100vw - 32px));
}

.log-view {
  margin: 0;
  max-height: min(72vh, 760px);
  overflow: auto;
  padding: 12px;
  background: #0b0d10;
  color: #d7dde2;
  border-radius: 0 0 8px 8px;
  white-space: pre-wrap;
  font: 12px/1.45 Consolas, "Courier New", monospace;
}

.paste-panel {
  width: min(620px, calc(100vw - 32px));
}

.quick-paste-area {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1114;
  color: var(--text);
  padding: 10px;
  font: inherit;
}

.paste-hint {
  color: var(--muted);
  font-size: 12px;
}

.primary-action {
  background: #1473e6 !important;
  border-color: #2f8cff !important;
  color: #fff !important;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.form-pane {
  padding: 14px;
  position: sticky;
  top: 78px;
  height: calc(100vh - 92px);
  overflow: auto;
}

.pane-resizer {
  align-self: stretch;
  border-radius: 999px;
  cursor: col-resize;
  background: transparent;
}

.pane-resizer:hover,
.pane-resizer.dragging {
  background: #2f8cff;
}

.stream-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.form-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-paste-tools {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: min(100%, 320px);
}

.quick-paste-manual[hidden] {
  display: none;
}

.quick-paste-manual {
  height: 36px;
  padding: 7px 9px;
  min-width: 0;
}

.account-panel {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.account-panel h2 {
  margin: 0 0 10px;
}

.account-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.account-form input,
.account-form select {
  min-width: 0;
}

.account-form button {
  grid-column: 1 / -1;
}

.account-list {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.quick-paste {
  padding: 7px 10px;
  white-space: nowrap;
}

label {
  display: grid;
  gap: 5px;
  color: #cfd6dc;
}

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #0f1114;
  color: var(--text);
}

.input-invalid,
.paste-wrap:has(.input-invalid) input,
.segmented-input.input-invalid {
  border-color: #ff3b30 !important;
  box-shadow: 0 0 0 1px rgba(255, 59, 48, 0.28);
}

.field-error {
  margin-top: -5px;
  color: #ff8a80;
  font-size: 12px;
}

.paste-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.field-paste {
  min-width: 54px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202429;
  color: var(--text);
  padding: 0 10px;
  opacity: 0.38;
  cursor: pointer;
  transition: opacity 140ms ease, border-color 140ms ease;
}

.paste-wrap:hover .field-paste,
.paste-wrap:focus-within .field-paste,
.field-paste:hover {
  opacity: 1;
  border-color: #4a8fd8;
}

.schedule-field,
.duration-field {
  display: grid;
}

.segmented-input {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: start;
  gap: 0;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #0f1114;
  color: var(--text);
}

.segmented-input:focus-within {
  border-color: #8dbdff;
}

.segmented-input span {
  color: #cfd6dc;
  padding: 0 1px;
  user-select: none;
}

.segmented-input .seg-gap {
  width: 10px;
}

.segmented-input .segmented-hint {
  margin-left: 12px;
  color: rgba(207, 214, 220, 0.42);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

.segment-part {
  width: 25px;
  height: 34px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  text-align: center;
  background: transparent;
  color: var(--text);
  outline: none;
}

.segment-part.year {
  width: 44px;
}

.segment-part::selection {
  color: #fff;
  background: #2f8cff;
}

.segment-popup {
  position: fixed;
  z-index: 30;
  display: grid;
  gap: 8px;
  padding: 10px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #171a1d;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.schedule-quick-popup {
  display: grid;
  grid-template-columns: 260px 72px 72px;
  gap: 10px;
  align-items: stretch;
}

.duration-quick-popup {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 10px;
  align-items: stretch;
}

.calendar-panel,
.time-column {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101316;
}

.calendar-panel {
  padding: 8px;
  box-sizing: border-box;
  width: 260px;
  overflow: hidden;
}

.calendar-head {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.calendar-head strong {
  text-align: center;
  font-size: 13px;
}

.calendar-head button,
.calendar-day,
.time-list button {
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.calendar-head button {
  height: 28px;
  background: #171c21;
  border-color: var(--line);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.calendar-weekdays span {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.calendar-day,
.calendar-empty {
  height: 28px;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.calendar-day:hover,
.calendar-day.active,
.time-list button:hover,
.time-list button.active {
  background: #2f8cff;
  color: #fff;
}

.calendar-day.other-month {
  opacity: 0.36;
}

.calendar-day.other-month:hover {
  opacity: 0.75;
}

.time-column {
  display: grid;
  grid-template-rows: 28px 1fr;
  min-height: 236px;
  max-height: min(300px, calc(100vh - 110px));
  padding: 8px 6px;
}

.time-column b {
  font-size: 12px;
  text-align: center;
}

.time-list {
  display: grid;
  gap: 4px;
  max-height: min(260px, calc(100vh - 150px));
  overflow-y: auto;
  padding-right: 2px;
}

.time-list button {
  height: 26px;
  font-size: 12px;
  min-width: 0;
  padding: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.segment-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.segment-popup-actions button {
  min-width: 64px;
  height: 32px;
}

.segment-popup-actions [data-popup-done] {
  background: #2f8cff;
  border-color: #2f8cff;
  color: #fff;
}

@media (max-width: 560px) {
  .schedule-quick-popup {
    grid-template-columns: minmax(220px, 1fr) 64px 64px;
  }

  .duration-quick-popup {
    grid-template-columns: repeat(3, 64px);
  }

  .calendar-panel {
    min-width: 220px;
    width: auto;
  }
}

.segment-popup[hidden] {
  display: none !important;
}

.segment-popup-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(62px, max-content);
  gap: 8px;
}

.schedule-popup-grid {
  grid-template-columns: 160px 68px 68px;
  grid-auto-flow: initial;
}

.segment-popup label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.segment-popup select,
.segment-popup input[type="date"] {
  min-width: 62px;
  height: 34px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1114;
  color: var(--text);
}

.popup-date-label input[type="date"] {
  min-width: 160px;
}

.segment-popup button {
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202429;
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkline input {
  width: 18px;
  height: 18px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.form-actions button,
.login-form button {
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

.form-actions .ghost {
  border: 1px solid var(--line);
  background: #202429 !important;
  color: var(--text);
}

.login-body {
  display: grid;
  place-items: center;
}
.login-panel {
  width: min(380px, calc(100vw - 28px));
  padding: 22px;
}
.login-team {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 6px;
  color: #e7f8ff;
  background: rgba(56, 189, 248, 0.12);
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.form-error {
  color: #fff;
  background: #8b1d1d;
  border-radius: 6px;
  padding: 8px 10px;
}

@media (max-width: 960px) {
  .topbar { flex-wrap: wrap; padding: 10px 14px; }
  .vps-stats { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
  .top-actions { flex-wrap: wrap; }
  .layout { grid-template-columns: 1fr; }
  .pane-resizer { display: none; }
  .form-pane {
    position: static;
    height: auto;
  }
  .account-create-form,
  .account-row,
  .stream-access-row,
  .account-row-wrap,
  .group-row,
  .group-create-row,
  .group-manager-form {
    grid-template-columns: 1fr;
  }
  .account-delete-form {
    justify-content: stretch;
  }
  .account-delete-form button {
    width: 100%;
  }
}
