:root {
  --bg: #0b1020;
  --bg-soft: #121a31;
  --panel: rgba(13, 19, 36, 0.86);
  --panel-border: rgba(148, 163, 184, 0.18);
  --text: #e5eefc;
  --muted: #97a5c2;
  --accent: #ffb347;
  --accent-2: #5eead4;
  --danger: #fb7185;
  --warning: #f59e0b;
  --success: #34d399;
  --line: rgba(148, 163, 184, 0.18);
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(94, 234, 212, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.14), transparent 25%),
    linear-gradient(180deg, #0b1020, #050814 58%);
  pointer-events: none;
  z-index: -1;
}

body.is-panel-pending {
  cursor: progress;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre,
textarea,
input,
select {
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

.panel-body {
  padding: 24px;
}

.panel-nav-backdrop,
.panel-nav-toggle,
.panel-nav-close {
  display: none;
}

.panel-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  min-height: calc(100vh - 48px);
  align-items: start;
}

.sidebar-visibility-toggle {
  flex-shrink: 0;
}

.sidebar,
.panel-card,
.login-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.sidebar {
  border-radius: 28px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 24px;
}

.sidebar-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.sidebar-header .brand {
  flex: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
}

.brand-image {
  display: block;
  width: auto;
  min-width: 52px;
  max-width: 180px;
  height: 52px;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: transparent;
  flex-shrink: 0;
}

.brand-image-protected {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
  cursor: default;
}

.brand-mark {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #fb7185);
  color: #111827;
  font-weight: 700;
}

.brand-title,
.page-header h2,
.section-heading h3,
.login-panel h1 {
  margin: 4px 0 0;
}

.brand-title {
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.nav {
  display: grid;
  gap: 10px;
  margin: 32px 0;
}

.nav-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  transition: 160ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sidebar-user {
  margin: 8px 0 0;
  font-size: 1.1rem;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.page-header-main,
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-header-main > div {
  min-width: 0;
}

.stats-grid,
.panel-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel-grid-two {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
}

.panel-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-card,
.stat-card {
  border-radius: 24px;
  padding: 22px;
  min-width: 0;
}

.stat-card {
  background: linear-gradient(180deg, rgba(13, 19, 36, 0.9), rgba(13, 19, 36, 0.7));
  border: 1px solid var(--panel-border);
}

.stat-card h3 {
  margin: 10px 0 6px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.pill-success {
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.28);
}

.pill-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.pill-danger {
  background: rgba(251, 113, 133, 0.12);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.28);
}

.pill-neutral {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.2);
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.data-table th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.path-block,
.subtle-line,
.muted-cell {
  color: var(--muted);
}

.subtle-line {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.subtle-line code,
.meta-list div span,
.meta-list div code {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.path-block {
  word-break: break-all;
}

.dns-tools-panel {
  min-width: 0;
  margin: 10px 0;
}

.dns-tools-panel summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

.compact-form {
  margin-top: 12px;
  gap: 10px;
}

.dns-zone-file {
  max-height: 360px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.panel-grid > *,
.stats-grid > * {
  min-width: 0;
}

.action-stack,
.shortcut-row,
.button-row,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form {
  align-items: flex-end;
}

.shortcut-column {
  display: grid;
  gap: 10px;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-status-list {
  margin-top: 18px;
}

.stacked-form,
.meta-list {
  display: grid;
  gap: 14px;
}

.mini-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mini-stack form {
  margin: 0;
}

.mini-stack:last-child {
  margin-bottom: 0;
}

.trash-list {
  display: grid;
  gap: 12px;
}

.trash-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.36);
}

.trash-entry-title {
  margin: 0 0 6px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.trash-entry form {
  margin: 0;
}

.cleanup-entry {
  grid-template-columns: auto minmax(0, 1fr);
  cursor: pointer;
}

.cleanup-entry input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
}

.cleanup-action-row {
  margin-top: 14px;
}

.stacked-form label,
.inline-form label {
  display: grid;
  gap: 6px;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.meta-list div strong {
  flex: 0 0 auto;
}

.meta-list div span {
  flex: 0 1 auto;
  text-align: right;
}

.meta-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.95rem;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.password-field input {
  padding-right: 5.8rem;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 4.3rem;
  max-width: calc(100% - 16px);
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1;
  transform: translateY(-50%);
}

.password-visibility-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%);
}

.password-visibility-toggle:focus-visible {
  outline: 2px solid rgba(94, 234, 212, 0.7);
  outline-offset: 2px;
}

.password-field input:disabled + .password-visibility-toggle {
  opacity: 0.55;
  pointer-events: none;
}

textarea {
  min-height: 460px;
  resize: vertical;
}

.compact-textarea {
  min-height: 280px;
}

button,
.ghost-button,
.danger-button {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
  white-space: normal;
  text-align: center;
}

button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
[data-activation-locked="true"],
form[data-submit-locked="true"] button:not([type]),
form[data-submit-locked="true"] button[type="submit"] {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

button {
  background: linear-gradient(135deg, var(--accent), #ff8c61);
  color: #111827;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.danger-button {
  background: rgba(251, 113, 133, 0.14);
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.28);
}

.as-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.text-link {
  color: var(--accent-2);
}

.inline-note {
  margin-top: 18px;
  color: var(--muted);
}

.ssh-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ssh-bundle-card,
.advanced-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.4);
}

.ssh-bundle-card .inline-note {
  margin-top: 0;
}

.advanced-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.advanced-panel[open] summary {
  margin-bottom: 16px;
}

.mini-textarea {
  min-height: 120px;
}

.code-textarea {
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.data-table code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.branding-preview-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.branding-preview-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.42);
}

.branding-preview-image {
  display: block;
  width: auto;
  max-width: min(100%, 220px);
  max-height: 140px;
  object-fit: contain;
  border-radius: 0;
  margin-top: 12px;
  background: transparent;
  border: 0;
  padding: 0;
}

.branding-favicon-preview {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  margin: 12px 0;
}

.branding-preview-mark {
  margin-top: 12px;
}

.branding-preview-text {
  margin: 10px 0 8px;
  line-height: 1.12;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.branding-style-list {
  margin-top: 12px;
}

.branding-style-list code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.branding-formatting-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.brand-login {
  margin-bottom: 18px;
}

.login-title {
  margin: 8px 0 0;
}

.info-block {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.42);
}

.website-automation-form {
  margin-top: 16px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.detail-list code {
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.flash {
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
}

.flash-success {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.24);
}

.flash-error {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.24);
}

.maintenance-banner,
.maintenance-home-banner,
.maintenance-login-note {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(15, 23, 42, 0.48);
}

.maintenance-banner-copy,
.maintenance-home-copy {
  max-width: 72ch;
}

.maintenance-home-banner .detail-list,
.maintenance-login-note .detail-list {
  margin-top: 18px;
}

.maintenance-home-banner .detail-list div,
.maintenance-login-note .detail-list div,
.maintenance-banner .detail-list div {
  align-items: flex-start;
}

.code-block {
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.85);
  min-height: 120px;
  overflow: auto;
}

.terminal-output {
  min-height: 320px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-line input {
  width: auto;
}

.deploy-fill {
  justify-content: space-between;
  text-align: left;
}

.deploy-fill span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  word-break: break-all;
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-shell {
  width: min(100%, 560px);
}

.login-panel {
  border-radius: 32px;
  padding: 36px;
}

.login-copy {
  color: var(--muted);
  margin-bottom: 22px;
}

.home-body {
  padding: 24px;
}

.home-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.home-header,
.home-hero,
.home-section,
.home-footer,
.home-preview-card,
.home-preview-feature,
.home-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.home-header {
  border-radius: 28px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.home-main {
  display: grid;
  gap: 24px;
}

.home-hero,
.home-section {
  border-radius: 32px;
  padding: 32px;
}

.home-title {
  margin: 12px 0 0;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.96;
  max-width: 12ch;
}

.home-copy,
.home-card p,
.home-preview-copy,
.home-preview-feature p,
.home-footer p {
  color: var(--muted);
  white-space: pre-line;
}

.home-copy {
  max-width: 62ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.home-primary-link,
.home-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 600;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

.home-primary-link:hover,
.home-secondary-link:hover {
  transform: translateY(-1px);
}

.home-primary-link {
  background: linear-gradient(135deg, var(--accent), #ff8c61);
  color: #111827;
}

.home-secondary-link {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.home-section-heading {
  margin-bottom: 20px;
}

.home-card-grid,
.home-preview-grid {
  display: grid;
  gap: 16px;
}

.home-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-card,
.home-preview-feature {
  border-radius: 22px;
  padding: 20px;
  min-width: 0;
}

.home-card h4,
.home-preview-feature h4 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.home-footer {
  border-radius: 22px;
  padding: 18px 22px;
}

.home-footer p {
  margin: 0;
}

.home-preview-card {
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 18px;
}

.home-preview-title {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.02;
}

.home-preview-copy {
  margin: 14px 0 0;
  line-height: 1.7;
}

.home-editor-grid {
  display: grid;
  gap: 14px;
}

.pending-state-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(10px);
}

.pending-state-backdrop[hidden] {
  display: none !important;
}

.pending-state-card {
  width: min(100%, 620px);
}

.pending-state-header {
  align-items: flex-start;
}

.pending-state-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.pending-state-minimize {
  white-space: nowrap;
}

.pending-state-layout {
  display: grid;
  grid-template-columns: minmax(130px, 160px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.pending-state-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.pending-state-progress-track.is-indeterminate {
  overflow: hidden;
}

.pending-state-progress-track.is-indeterminate .migration-progress-fill {
  width: 36%;
  animation: pending-progress-slide 1.18s ease-in-out infinite;
}

.pending-state-gauge.pending-state-gauge-indeterminate::before {
  animation: pending-gauge-spin 1.3s linear infinite;
}

.pending-state-dock {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 54;
  width: min(380px, calc(100vw - 32px));
}

.pending-state-dock[hidden] {
  display: none !important;
}

.pending-state-dock-button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  text-align: left;
  padding: 18px 20px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(18, 27, 54, 0.96), rgba(8, 12, 30, 0.96));
  color: inherit;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34);
}

.pending-state-dock-copy,
.pending-state-dock-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pending-state-dock-copy strong {
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
}

.pending-state-dock-meta {
  justify-items: flex-end;
}

.pending-state-dock-percent {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text);
}

.background-refresh-dock {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 53;
  width: min(420px, calc(100vw - 32px));
}

.background-refresh-dock[hidden] {
  display: none !important;
}

.background-refresh-card {
  display: grid;
  gap: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(18, 27, 54, 0.96), rgba(8, 12, 30, 0.96));
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34);
}

.background-refresh-copy {
  display: grid;
  gap: 8px;
}

.background-refresh-copy h3,
.background-refresh-copy p {
  margin: 0;
}

.background-refresh-actions {
  display: flex;
  justify-content: flex-end;
}

.session-policy-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.security-table-wrap,
.security-inline-form,
.security-header-list {
  margin-top: 18px;
}

.logs-summary-grid,
.logs-entry-list {
  display: grid;
  gap: 16px;
}

.logs-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.logs-summary-card,
.logs-entry-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.42);
  padding: 20px;
  min-width: 0;
}

.logs-summary-card.is-active {
  border-color: rgba(255, 179, 71, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 179, 71, 0.2);
}

.logs-summary-card .section-heading > div,
.logs-summary-card .subtle-line,
.logs-summary-card .detail-list,
.logs-summary-card .detail-list div,
.logs-summary-card .detail-list span,
.logs-summary-card .detail-list code {
  min-width: 0;
}

.logs-summary-card .section-heading h3,
.logs-summary-card .subtle-line,
.logs-summary-card .pill,
.logs-summary-card .detail-list code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.logs-summary-card .detail-list div {
  align-items: flex-start;
  flex-direction: column;
}

.logs-summary-card .detail-list code {
  text-align: left;
  max-width: 100%;
}

.logs-entry-code {
  margin-top: 16px;
  min-height: 0;
  max-height: 320px;
}

.migration-summary-grid,
.backup-card-grid,
.migration-intake-grid,
.migration-job-list,
.migration-card-grid,
.migration-detail-grid,
.migration-warning-list {
  display: grid;
  gap: 16px;
}

.migration-summary-grid,
.backup-card-grid,
.migration-card-grid,
.migration-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.migration-job-list {
  margin-top: 20px;
}

.migration-intake-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.migration-intake-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.migration-intake-feedback {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.36);
}

.migration-intake-feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.migration-intake-feedback-header strong {
  font-size: 0.95rem;
}

.maintenance-service-list {
  grid-template-columns: 1fr;
}

.maintenance-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.maintenance-service-main {
  min-width: 0;
}

.maintenance-service-heading {
  margin-bottom: 10px;
}

.maintenance-service-actions {
  justify-content: flex-end;
  min-width: 260px;
}

.maintenance-service-actions form {
  margin: 0;
}

.migration-view-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.migration-view-toggle .ghost-button {
  padding: 10px 14px;
}

.migration-view-toggle .ghost-button.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 179, 71, 0.32);
}

.migration-progress-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.42);
}

.migration-progress-layout {
  display: grid;
  grid-template-columns: minmax(130px, 160px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.migration-progress-card .section-heading {
  margin-bottom: 12px;
}

.migration-gauge-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.migration-gauge {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(11, 16, 32, 0.96) 0 57%, transparent 58%),
    conic-gradient(rgba(148, 163, 184, 0.2) 0deg 360deg);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.migration-gauge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at center, transparent 0 66%, rgba(148, 163, 184, 0.1) 67% 100%),
    conic-gradient(var(--migration-gauge-fill, rgba(148, 163, 184, 0.6)) 0deg var(--migration-progress-angle), rgba(148, 163, 184, 0.12) var(--migration-progress-angle) 360deg);
}

.migration-gauge.is-active::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: migration-gauge-pulse 1.8s ease-in-out infinite;
}

.migration-gauge-success {
  --migration-gauge-fill: rgba(52, 211, 153, 0.95);
}

.migration-gauge-warning {
  --migration-gauge-fill: rgba(245, 158, 11, 0.98);
}

.migration-gauge-danger {
  --migration-gauge-fill: rgba(251, 113, 133, 0.98);
}

.migration-gauge-center {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  padding: 0 16px;
}

.migration-gauge-center strong {
  font-size: 1.7rem;
  line-height: 1;
}

.migration-gauge-center span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.migration-progress-native {
  width: 100%;
  height: 8px;
  opacity: 0.0001;
  pointer-events: none;
}

.migration-progress-copy {
  min-width: 0;
}

.migration-progress-phase-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.migration-progress-track {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.migration-progress-track-compact {
  height: 10px;
}

.migration-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(148, 163, 184, 0.4);
  transition: width 160ms ease;
}

.migration-progress-fill-success {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.9), rgba(94, 234, 212, 0.9));
}

.migration-progress-fill-warning {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.95), rgba(255, 179, 71, 0.95));
}

.migration-progress-fill-danger {
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.95), rgba(244, 114, 182, 0.9));
}

.migration-timeline {
  display: grid;
  gap: 12px;
}

.migration-timeline-entry {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.34);
}

.migration-timeline-entry p {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.migration-timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.migration-timeline-entry-success {
  border-color: rgba(52, 211, 153, 0.26);
}

.migration-timeline-entry-warning {
  border-color: rgba(245, 158, 11, 0.24);
}

.migration-timeline-entry-error {
  border-color: rgba(251, 113, 133, 0.28);
}

.migration-error-copy {
  color: #fecdd3;
}

.migration-warning-list .inline-note {
  margin-top: 0;
}

.migration-card-grid-websites {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.migration-card-grid-websites.is-single-list {
  grid-template-columns: 1fr;
}

.migration-card-grid-websites.is-multi-list {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

@keyframes migration-gauge-pulse {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(1);
  }
  50% {
    opacity: 0.62;
    transform: scale(1.03);
  }
}

@keyframes pending-progress-slide {
  0% {
    transform: translateX(-140%);
  }
  100% {
    transform: translateX(320%);
  }
}

@keyframes pending-gauge-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.session-warning-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(10px);
}

.session-warning-backdrop[hidden] {
  display: none !important;
}

.session-warning-modal {
  width: min(100%, 520px);
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(20, 28, 49, 0.98), rgba(9, 14, 26, 0.96));
  border: 1px solid rgba(251, 113, 133, 0.28);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.65);
}

.session-warning-copy {
  color: var(--muted);
  line-height: 1.7;
}

.session-warning-countdown {
  display: grid;
  gap: 6px;
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(251, 113, 133, 0.22);
  background: rgba(251, 113, 133, 0.08);
}

.session-warning-time {
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (max-width: 1400px) {
  .stats-grid,
  .logs-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1101px) {
  html.is-sidebar-hidden .panel-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  html.is-sidebar-hidden .sidebar {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 280px;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(-100% - 48px));
    visibility: hidden;
  }

  html.is-sidebar-hidden .panel-nav-backdrop {
    display: none !important;
  }

  html.is-sidebar-hidden body.is-nav-open {
    overflow: auto;
  }

  .sidebar-visibility-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 1100px) {
  .panel-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .panel-grid-two,
  .session-policy-grid,
  .migration-intake-grid,
  .migration-intake-grid-three {
    grid-template-columns: 1fr;
  }

  .panel-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(6px);
    border: 0;
    padding: 0;
  }

  .panel-nav-backdrop[hidden] {
    display: none;
  }

  .panel-nav-toggle,
  .panel-nav-close {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.22);
  }

  .sidebar-visibility-toggle {
    display: none;
  }

  .panel-nav-toggle-icon {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    position: relative;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }

  .sidebar {
    position: fixed;
    top: 14px;
    left: 14px;
    bottom: 14px;
    width: min(340px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    z-index: 40;
    overflow-y: auto;
    transform: translateX(calc(-100% - 28px));
    opacity: 0;
    pointer-events: none;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  body.is-nav-open {
    overflow: hidden;
  }

  body.is-nav-open .sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .page-header-actions {
    margin-left: auto;
  }

  .panel-grid-three,
  .home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .maintenance-service-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .maintenance-service-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .home-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 860px) {
  .panel-body,
  .home-body,
  .login-body {
    padding: 14px;
  }

  .panel-card,
  .stat-card,
  .login-panel,
  .home-hero,
  .home-section,
  .home-header,
  .home-preview-card,
  .logs-summary-card,
  .logs-entry-card,
  .session-warning-modal {
    padding: 18px;
    border-radius: 22px;
  }

  .sidebar {
    padding: 22px;
    border-radius: 24px;
  }

  .page-header,
  .section-heading,
  .meta-list div,
  .detail-list div,
  .migration-timeline-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .migration-progress-layout {
    grid-template-columns: 1fr;
  }

  .pending-state-layout {
    grid-template-columns: 1fr;
  }

  .pending-state-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .pending-state-dock {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }

  .background-refresh-dock {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }

  .pending-state-dock-button {
    grid-template-columns: 1fr;
  }

  .pending-state-dock-meta {
    justify-items: flex-start;
  }

  .migration-gauge-panel {
    justify-items: flex-start;
  }

  .migration-gauge {
    width: 116px;
  }

  .migration-view-toggle {
    justify-content: flex-start;
  }

  .page-header-main,
  .page-header-actions {
    width: 100%;
  }

  .page-header-actions {
    justify-content: flex-start;
  }

  .home-title {
    font-size: clamp(2rem, 11vw, 3rem);
    max-width: none;
  }

  .panel-grid-three,
  .home-card-grid,
  .stats-grid,
  .logs-summary-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow: visible;
  }

  .ssh-actions-grid {
    grid-template-columns: 1fr;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .data-table tbody tr:first-child {
    padding-top: 0;
  }

  .data-table tbody tr:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .data-table td {
    display: grid;
    grid-template-columns: minmax(96px, 116px) minmax(0, 1fr);
    gap: 8px 14px;
    padding: 0;
    margin-bottom: 12px;
    border: 0;
  }

  .data-table td:last-child {
    margin-bottom: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .data-table td[colspan] {
    grid-template-columns: 1fr;
  }

  .data-table td[colspan]::before {
    content: none;
  }

  .action-stack,
  .shortcut-row,
  .button-row,
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .trash-entry {
    grid-template-columns: 1fr;
  }

  .cleanup-entry {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .action-stack > *,
  .shortcut-row > *,
  .button-row > *,
  .inline-form > * {
    width: 100%;
  }

  .checkbox-line {
    align-items: flex-start;
  }

  .checkbox-line input {
    margin-top: 3px;
  }

  .meta-list div span,
  .detail-list code {
    text-align: left;
  }

  .terminal-output {
    min-height: 260px;
  }

  textarea {
    min-height: 320px;
  }

  .compact-textarea {
    min-height: 220px;
  }

  .code-block {
    padding: 14px;
    font-size: 0.88rem;
  }
}

@media (max-width: 560px) {
  .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }

  .brand-image {
    min-width: 46px;
    max-width: 140px;
    height: 46px;
  }

  .page-header-main {
    align-items: stretch;
  }

  .panel-nav-toggle {
    justify-content: center;
  }

  .home-actions,
  .page-header-actions {
    width: 100%;
  }

  .home-primary-link,
  .home-secondary-link,
  .page-header-actions form,
  .page-header-actions button {
    width: 100%;
  }

  .session-warning-backdrop {
    padding: 14px;
  }

  .data-table td {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .data-table td::before {
    margin-bottom: 2px;
  }
}
