.owner-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.owner-card {
  width: min(100%, 400px);
  padding: 28px;
}
.owner-card .brand {
  margin: 0 0 24px;
}
.owner-card h1 {
  font-size: 24px;
  margin: 0 0 12px;
}
.owner-card [role="status"] {
  margin: 0 0 16px;
  color: var(--muted);
}
.owner-card [role="status"]:empty {
  display: none;
}
.owner-card [aria-invalid="true"] {
  border-color: var(--red);
}
.owner-card form button {
  margin-top: 12px;
}

.owner-card select,
.owner-card [id="owner-code"] {
  width: 100%;
}
.owner-security {
  max-width: 560px;
  padding: 24px;
}
.owner-security img {
  display: block;
  max-width: 100%;
  height: auto;
}
.owner-security form {
  margin: 16px 0;
}
.owner-security code,
#owner-recovery-codes {
  overflow-wrap: anywhere;
  user-select: all;
}
#owner-recovery-codes {
  white-space: pre-wrap;
  padding: 12px;
  background: var(--bg);
}

.api-connection-actions .btn + .btn {
  margin-left: 8px;
}
.api-site-details {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr;
  gap: 10px;
  margin-top: 0;
}
.api-site-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

#api-site-count:not([hidden]) { display: inline-block; }
.api-connection-actions + details .btn { margin: 6px 6px 0 0; }

.api-action-modal {
  width: min(500px, calc(100% - 40px));
  max-height: min(90vh, calc(100dvh - 40px));
  margin: auto;
  padding: 0;
  border: 0;
  color: var(--ink);
}
.api-action-modal::backdrop {
  background: #19223549;
  backdrop-filter: blur(2px);
}
.api-action-modal .drawer-content > .form-help { margin-top: 0; }
.api-action-modal .form-error:empty { display: none; }
.api-action-modal [aria-disabled="true"] { cursor: wait; opacity: .55; }

.api-action-modal .drawer-content > p { white-space: pre-line; }

.backup-comment {
  display: block;
  max-width: 26ch;
}

.backup-comment,
.backup-comment-detail {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

#backup-comment {
  border: 1px solid #dce1e8;
  border-radius: 7px;
  padding: 10px 12px;
  width: 100%;
  background: white;
  color: #5d6675;
  font: inherit;
  resize: vertical;
}

.archive-pin {
  display: inline-flex;
  vertical-align: middle;
}

.queue-banner-summary { min-width: 0; overflow-wrap: anywhere; }
.queue-elapsed { font-variant-numeric: tabular-nums; }
.queue-banner-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; max-width: 100%; justify-content: flex-end; gap: var(--space-2); margin-inline-start: auto; }
.queue-job-banner .queue-banner-actions .btn { min-height: 40px; font-size: 13px; margin-left: 0; }
.queue-job-banner .queue-banner-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.queue-job-banner .queue-banner-identity small { margin: 0; }
.queue-job-banner .queue-banner-identity > b.queue-site-title { font-size: 14px; font-weight: 650; color: #534376; }
.queue-job-banner .queue-banner-type { font-size: 12px; font-weight: 600; color: #665783; }
.queue-job-banner small { color: #675c7c; font-size: 11px; }
.queue-job-banner .queue-banner-stage { font-weight: 600; }
.queue-job-banner .site-icon, .api-queue-table .site-icon { width: 32px; height: 32px; }
.queue-panel-head { flex-wrap: wrap; }
.api-queue-table table { table-layout: fixed; }
.api-queue-table th:nth-child(2) { width: 30%; }
.api-queue-table th:last-child { width: 106px; }
.api-queue-table td { vertical-align: top; overflow-wrap: anywhere; }
.api-queue-table :is(th, td):last-child { text-align: right; padding-right: 16px; }
.api-queue-table td:last-child .btn { white-space: nowrap; }
.api-queue-table .site-name { min-width: 0; }
.api-queue-table .site-name > b.queue-site-title { font-size: 14px; color: var(--ink); }
.api-queue-table .status { white-space: normal; }
.api-queue-table .status::before { flex-shrink: 0; }
.queue-row-dates { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.queue-error-code { color: #9a3e44; }

.api-overview-value { font-size: clamp(16px, 1.8vw, 26px); }
:is(.api-overview-table, .backup-history-table, .api-queue-table, .api-storage-table) td,
:is(.api-overview-table, .ssh-profile-table, .backup-history-table, .api-queue-table, .api-storage-table) th { padding: 10px 8px; white-space: normal; }
.api-overview-table .site-name { overflow-wrap: anywhere; }
.api-overview-table .row-action { gap: 3px; }
.overview-deadline-note { padding: 0 15px 10px; }
.overview-action { position: relative; display: inline-flex; }
.overview-action [aria-disabled="true"] { opacity: .55; }
.overview-action-tip { display: none; position: absolute; right: 0; bottom: 100%; z-index: 2; padding: 5px 7px; border-radius: 5px; background: #353944; color: white; white-space: nowrap; }
.overview-action:hover .overview-action-tip, .overview-action:focus-within .overview-action-tip { display: block; }
@media (min-width: 900px) {
  .api-overview-table table { table-layout: fixed; }
  .api-overview-table th:first-child { width: 24%; }
  .api-overview-table th:nth-child(2) { width: 17%; }
  .api-overview-table th:nth-child(5) { width: 14%; }
  .api-overview-table th:last-child { width: 140px; }
}
.api-overview-table .site-name, .api-overview-table .status { min-width: 0; white-space: normal; }
.overview-panel-head, .overview-panel-caption { flex-wrap: wrap; }
.overview-panel-caption { display: flex; align-items: center; gap: 10px; }

#api-overview-count:not([hidden]) {
  display: inline-block;
  background: #f9e0d4;
  color: #a14c32;
}
:is(.api-overview-table, .ssh-profile-table, .backup-history-table, .api-queue-table, .api-storage-table) th {
  text-transform: uppercase;
  letter-spacing: .55px;
}
:is(.api-overview-table, .ssh-profile-table, .backup-history-table, .api-queue-table, .api-storage-table) th:first-child,
:is(.api-overview-table, .backup-history-table, .api-queue-table, .api-storage-table) td:first-child { padding-left: 16px; }
@media (max-width: 540px) {
  .api-queue-table th:last-child { width: 98px; }
  .api-queue-table :is(th, td):first-child { padding-left: 10px; }
  .api-queue-table :is(th, td):last-child { padding-right: 9px; }
  .api-queue-table td:last-child .btn { padding-inline: 6px; gap: 4px; }
  .api-queue-table .site-cell { gap: 6px; align-items: flex-start; }
  .api-queue-table .site-icon { width: 25px; height: 25px; }
}
.api-site-icon {
  flex-shrink: 0;
  background: color-mix(in srgb, var(--site-color), white 83%);
  border-color: color-mix(in srgb, var(--site-color), white 73%);
}
.api-policy-value {
  font-size: clamp(13px, 1.65vw, 24px);
  letter-spacing: -.25px;
  overflow-wrap: normal;
}

.site-policy-freshness { margin-top: 12px; }
.site-policy-freshness > div { margin-top: 5px; }
.retention-editor .policy-component legend { padding: 0 5px; font-size: 13px; font-weight: 650; }
.retention-editor .policy-component .switch-label { margin: 0 0 14px; }
.retention-editor .policy-component .site-form-grid { gap: 12px; }
.retention-editor .retention-field { display: grid; gap: 8px; min-width: 0; font-size: 11px; font-weight: 550; }
.retention-editor .policy-component .retention-field { margin: 0; }
.retention-editor .retention-component-help { margin: 12px 0 0; }
.retention-editor .form-error:empty { display: none; }
.switch-label .retention-checkbox { flex-shrink: 0; margin: 0; }
.switch-label .retention-checkbox[role="switch"] {
  appearance: none; display: grid; place-items: center; flex-shrink: 0; margin: 0;
  border: 1px solid #a4aebb; border-radius: 4px; background: white; cursor: pointer;
}
.retention-checkbox[role="switch"]:checked { background: var(--accent); border-color: var(--accent); }
.retention-checkbox[role="switch"]:checked::before {
  content: ''; width: 5px; height: 9px; margin-top: -2px; border: solid white; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.retention-checkbox[role="switch"]:hover:enabled { border-color: #b95332; }
.retention-checkbox[role="switch"]:checked:hover:enabled { background: #b95332; }
.retention-checkbox[role="switch"]:disabled { opacity: .7; cursor: default; }
@media (forced-colors: active) {
  .switch-label .retention-checkbox[role="switch"] { appearance: auto; }
  .retention-checkbox[role="switch"]:checked::before { content: none; }
}
.retention-site { gap: 12px; overflow-wrap: anywhere; }
.retention-site { display: grid; grid-template-columns: minmax(0, 1fr) minmax(min(50%, 20em), 1.4fr) auto; align-items: center; column-gap: 6px; }
.retention-site-schedule > :first-child { margin-top: 0; }
.retention-site .retention-site-interval { font-size: 11px; color: #697588; }
@media (max-width: 540px) {
  .retention-site { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .retention-site-schedule { grid-column: 1; grid-row: 2; }
  .retention-site > .btn { grid-column: 2; grid-row: 1 / 3; }
}
.retention-site-status { margin: 12px 24px 0; }
.retention-site-status:empty { display: none; }
.retention-auto { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.retention-auto .switch-label { margin: 0 0 5px; }
.retention-auto .form-help { margin: 5px 0; }
.retention-auto .detail-actions { margin-top: 8px; }

.backup-permission-list { display: grid; gap: 12px; }
.backup-permission-site { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.backup-permission-site .site-cell { flex-wrap: wrap; }
.backup-permission-site .site-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.backup-permission-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 12px; }
.backup-permission-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.backup-permission-toggle input { flex-shrink: 0; }
.backup-permission-controls small { display: block; margin: 4px 0 0; }
.backup-permission-list ~ p:empty, .backup-permission-scroll .cell-note:empty { display: none; }
.api-action-modal.backup-permission-modal { width: min(900px, calc(100% - 40px)); overflow: hidden; }
.backup-permission-form {
  display: flex; flex-direction: column; max-height: min(65vh, calc(100dvh - 200px));
}
.backup-permission-form > :not(.backup-permission-list) { flex: none; }
.backup-permission-form > .backup-permission-list { min-height: 0; overflow: auto; display: block; }
.backup-permission-form > .modal-actions { margin-top: var(--space-2); }
.backup-permission-scroll { overflow: visible; }
.backup-permission-scroll td { vertical-align: top; overflow-wrap: anywhere; }
.backup-permission-scroll .site-name { white-space: normal; }
.backup-permission-scroll th { position: sticky; inset-block-start: 0; z-index: 1; }

.ssh-profile-table td { white-space: normal; }
.ssh-profile-name { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.ssh-profile-table .site-cell { min-width: 108px; }
.ssh-profile-site { justify-content: flex-start; color: var(--ink); }
.ssh-profile-site .site-name { overflow-wrap: anywhere; }
.api-storage-metrics .metric-top { gap: 8px; }
.api-storage-metrics .metric-icon { flex-shrink: 0; }
.api-storage-accounting { margin: 0 0 14px; }
.api-storage-table table { min-width: 780px; }
.api-storage-table td { overflow-wrap: anywhere; }
.api-storage-table .detail-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin: 0; }
.api-storage-table .detail-actions .icon-btn { min-width: 32px; min-height: 32px; }
.api-storage-table .overview-action-tip { max-width: 205px; white-space: normal; width: max-content; }
.storage-default-choice { display: inline-flex; align-items: center; gap: 5px; min-width: 101px; min-height: 32px; cursor: pointer; }
.storage-default-choice input { accent-color: var(--accent); margin: 0; width: 15px; height: 15px; cursor: inherit; }
.storage-default-choice:has(input:disabled) { cursor: default; }
.storage-default-choice input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Move 4px of end padding into the heading gap to preserve the table's intrinsic widths. */
.api-storage-table th:has(> .storage-default-heading) { padding-inline-end: 4px; }
.storage-default-heading { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; vertical-align: middle; }
.storage-default-heading .storage-default-lock { width: 28px; height: 28px; min-width: 28px; padding: 0;
  align-items: center; justify-content: center; }
.storage-default-heading .overview-action-tip { top: calc(100% + 4px); right: auto; bottom: auto; left: 0;
  text-transform: none; letter-spacing: normal; }
.storage-default-status { margin: 8px 16px; font-size: 11px; }
.storage-default-status:empty { display: none; }
@media (max-width: 540px) {
  .api-storage-table { padding-inline-end: 8px; }
  .api-storage-table th:nth-child(5) { width: 122px; }
  .api-storage-table th:nth-child(6) { width: 47px; }
  .api-storage-table th:nth-child(7) { width: 75px; }
  .api-storage-table th:last-child { width: 87px; }
}
.storage-default-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; white-space: nowrap;
  border: 1px solid #dcebe3; border-radius: 6px; color: #376f59; background: #f0f8f4; font-size: 10px; }
.storage-default-badge .icon { width: 12px; height: 12px; }
.storage-card .api-storage-usage-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 9px 0; margin: 0; }
.api-storage-usage-row + .api-storage-usage-row { border-top: 1px solid var(--line); }
.api-storage-usage-heading, .api-storage-usage-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.api-storage-usage-heading > .icon { width: 14px; height: 14px; color: var(--muted); }
.api-storage-usage-line { justify-content: space-between; }
.api-storage-usage-line strong, .storage-card .storage-limit-exceeded { font-size: 10px; color: #95464a; }
.api-storage-usage-line strong { color: var(--ink); }
.storage-capacity-meter { width: 100%; height: 6px; display: block; border: 0; border-radius: 8px;
  appearance: none; background: #edf0f2; color: var(--green); }
.storage-capacity-meter.capacity-warning { color: var(--amber); }
.storage-capacity-meter.capacity-high { color: var(--red); }
.storage-capacity-meter::-webkit-progress-bar { background: #edf0f2; border-radius: 8px; }
.storage-capacity-meter::-webkit-progress-value { background: currentColor; border-radius: 8px; }
.storage-capacity-meter::-moz-progress-bar { background: currentColor; border-radius: 8px; }
.ssh-key-installation, .ssh-profile-check { margin-top: 12px; }
.ssh-profile-check .select { display: block; margin-bottom: 8px; }
.ssh-profile-check .status { margin: 0; white-space: normal; }

.backup-history-table .site-name, .backup-history-table .status { min-width: 0; white-space: normal; }
.backup-history-table .site-name { overflow-wrap: anywhere; }
.backup-history-table .site-name > b { font-size: 14px; }
.backup-history-table .status:before { flex-shrink: 0; }
.backup-history-table table { min-width: 650px; }
@media (min-width: 900px) {
  .backup-history-table table { table-layout: fixed; }
  .backup-history-table th:first-child { width: 24%; }
  .backup-history-table th:nth-last-child(2) { width: 108px; }
  .backup-history-table th:last-child { width: 156px; }
}
.history-disclosure { margin-top: 12px; }
.history-disclosure > summary { cursor: pointer; font-weight: 600; }

.history-archive-actions { flex-wrap: wrap; gap: 6px 8px; align-items: flex-start; margin: 10px 0 4px; }
.history-archive-actions .form-help:empty, .artifact-card > .form-error:empty { display: none; }
.history-archive-actions > .form-help { flex-basis: 100%; margin: 0; }
.artifact-card > .history-disclosure { margin-top: 7px; }
.backup-history-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

.history-archive-card { padding: 14px; margin: 12px 0 15px; }
.history-archive-card > .detail-grid,
.history-archive-card > .form-help > .detail-grid { gap: 10px 12px; }
.history-archive-card > .detail-grid small,
.history-archive-card > .form-help > .detail-grid small { margin-bottom: 3px; }
.history-archive-header { align-items: center; margin-bottom: 6px; }
.history-archive-header > .btn { margin-left: auto; }
.history-archive-name { margin: 0 0 9px; }
.history-archive-card > .form-help:empty { display: none; }

.archive-pin-action.archive-unpinned { background: #e6fff2; border-color: #b1e2c9; color: #1d6546; }
.archive-pin-action.archive-pinned { background: #ffe4e6; border-color: #f0bac0; color: #9f3343; }
.archive-pin-action.archive-unpinned:hover:not(:disabled) { background: #d3f6e3; border-color: #8ecfb0; }
.archive-pin-action.archive-pinned:hover:not(:disabled) { background: #ffd4d9; border-color: #e99ba7; }
.archive-pin-action:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.archive-pin-action:disabled { opacity: .65; }
.archive-pin-action[aria-busy="true"] { cursor: wait; opacity: 1; }

.backup-history-table :is(th, td):nth-last-child(2) { text-align: center; }
.history-pin-state { width: 36px; height: 36px; margin-inline: auto; vertical-align: middle; }
.history-pin-state > .icon { width: 17px; height: 17px; }
.history-pin-state.archive-pinned { background: #ffe4e6; color: #9f3343; }
.history-pin-state.archive-unpinned { background: #e6fff2; color: #1d6546; }
.history-pin-state.archive-mixed { background: #fff3df; color: #895815; }

.api-action-modal .confirmation-subtitle { margin: 4px 0 0; font-weight: 600; }
.confirmation-candidates { padding-inline-start: 20px; overflow-wrap: anywhere; }
.confirmation-candidates li + li { margin-top: 5px; }
.archive-delete-information .detail-grid { gap: 10px 14px; }
.archive-delete-information .detail-grid > div { min-width: 0; overflow-wrap: anywhere; }
.archive-delete-information > .notice { margin-top: 12px; }
.confirmation-technical > .detail-grid { margin-top: 8px; }
.confirmation-check { display: flex; gap: 8px; align-items: flex-start; margin-block: 12px; }
.confirmation-check input { flex-shrink: 0; }

.site-removal-options fieldset { border: 0; margin: 0; padding: 0; }
.site-removal-options fieldset .confirm-check { align-items: flex-start; }
.site-removal-options fieldset small { display: block; }
.site-removal-options .form-row > span { display: block; margin-bottom: 6px; }
.table-toolbar > [hidden] { display: none; }

.site-pending-removals { margin-top: 14px; padding: 14px 16px; }
.site-pending-removals h2 { font-size: 14px; margin: 0 0 10px; }
.site-pending-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 6px 0; overflow-wrap: anywhere; }

.scheduler-panel { margin-top: 20px; }
.scheduler-panel .switch-label, .scheduler-panel .form-help { margin: 0 0 8px; }
.scheduler-next time { color: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.s3-delete-safety { margin-top: 16px; }
.s3-delete-safety .form-help { margin: 6px 0; }
.s3-delete-safety details { margin: 8px 0; overflow-wrap: anywhere; }

.storage-delete-status { display: flex; align-items: baseline; gap: 4px; margin-top: 3px; color: #697588; font-size: 11px; }
.storage-delete-status .icon { flex: none; width: 11px; height: 11px; align-self: flex-start; margin-top: 2px; }
.storage-delete-status.verified .icon { color: var(--green); }

.site-settings { max-width: 1320px; min-width: 0; }
.site-settings-heading { margin-bottom: 18px; }
.site-settings-heading h1 { margin: 12px 0 5px; overflow-wrap: anywhere; }
.site-settings-path { font-size: 12px; color: #697588; overflow-wrap: anywhere; }
.site-settings-path a { color: inherit; }
.site-settings-heading .form-help { margin: 0; overflow-wrap: anywhere; }
.site-settings-summary { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 14px 0 0; }
.site-settings-summary dt { font-size: 11px; color: #697588; }
.site-settings-summary dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.site-settings-tabs { display: flex; flex-wrap: wrap; gap: 5px 12px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.site-settings-tabs :is(a, button) { color: var(--muted); padding: 10px 8px; text-decoration: none; border-bottom: 2px solid transparent; }
.site-settings-tabs :is(a, button)[aria-current] { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.site-settings-card .panel-title { margin: 0; }
.site-settings-card .policy-body { max-width: 900px; }
.site-settings-card :is(input, select, textarea, fieldset) { min-width: 0; max-width: 100%; }
.site-settings-card .form-row { min-width: 0; }
.site-settings-card .form-row > span { display: block; }
.site-settings-extra { margin-block: 12px; }
.site-settings-extra .form-row { max-width: 240px; margin-top: 8px; }
.site-settings-subsection { margin-top: 20px; }
.site-settings-subsection > h3 { margin: 0 0 10px; }
.site-settings-freshness { display: grid; gap: 8px; }
.site-settings-freshness span { display: block; }
.site-settings-storage-summary { margin: 10px 0; overflow-wrap: anywhere; }
.site-settings-return { margin-bottom: 12px; }
@media (max-width: 680px) {
  .site-settings-card .site-form-grid { grid-template-columns: minmax(0, 1fr); }
}

.archive-share-public { max-width: 520px; margin: 8vh auto; width: calc(100% - 32px); }
.archive-share-public h1 { font-size: 20px; margin: 0; }
.archive-share .form-row input { width: 100%; min-width: 0; }
.archive-share-row { gap: 10px; }
.archive-share-row .btn { flex-shrink: 0; }

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}

.api-action-modal .modal-flow { display: flex; flex-direction: column; gap: var(--space-4); }
.modal-flow > :is(p, .modal-actions), .modal-section > :is(p, .form-row, .form-section-title) { margin: 0; }
.modal-flow > .modal-actions { margin-top: var(--space-2); gap: var(--space-2); }
.modal-section { display: grid; gap: var(--space-4); min-width: 0; }
.modal-section > .modal-section { margin-top: var(--space-2); }
.modal-field { display: grid; gap: var(--space-2); min-width: 0; }
.modal-field > :is(input, select, textarea) { min-width: 0; max-width: 100%; box-sizing: border-box; }
:is(.form-row, .modal-field) > :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select) {
  min-height: 40px;
}
.select, .search-wrap { min-height: 40px; }
.form-row:not(.modal-field):has(> :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea)) > span:first-child {
  display: block;
  margin-block-end: var(--space-2);
}
.form-row > label { margin-block-end: var(--space-2); }
.modal-field > textarea {
  width: 100%; padding: 10px 12px; resize: vertical;
  border: 1px solid #dce1e8; border-radius: 7px; font: inherit; background: white; color: #5d6675;
}
.modal-field > textarea:hover:enabled { border-color: var(--muted); }
.modal-field > textarea:focus { outline: none; }
.modal-field > textarea:focus-visible,
.search-wrap:has(input:focus-visible) { outline: 2px solid #d78a66; outline-offset: 3px; }
.search-wrap input:focus-visible { outline: none; }
.modal-field > textarea:disabled { background: #f6f7f9; }
.detail-actions, .modal-actions { gap: var(--space-2); }
.archive-share-links { gap: var(--space-3); }
.archive-share-links > .form-section-title { padding-bottom: var(--space-2); }
.archive-share-links [role="status"]:empty, .archive-share-result [role="status"]:empty { display: none; }
.archive-share-result { gap: var(--space-3); }
.archive-share-result > .btn { justify-self: start; }
.archive-share-details { display: grid; gap: var(--space-3); margin: var(--space-4) 0 var(--space-6); }
.archive-share-details > div { display: grid; gap: var(--space-1); }
.archive-share-details dt { color: var(--muted); font-size: 12px; }
.archive-share-details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.archive-share-indicator { display: inline-flex; align-items: center; flex: none; color: #697588; }
.archive-share-indicator.active { color: #237951; }
.archive-share-indicator .icon { width: 14px; height: 14px; }

.backup-history-actions .history-square { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 0; }
.backup-history-actions .history-square .icon { width: 16px; height: 16px; }
.backup-history-actions .archive-share-indicator { width: 36px; height: 36px; justify-content: center; border: 1px solid var(--line); border-radius: 6px; }
.backup-history-actions .archive-share-indicator.active { background: #eaf7ef; border-color: #237951; }

.backup-history-actions { gap: 8px; }
.backup-history-table td:last-child { padding-right: 16px; }
.backup-history-table .archive-pinned { color: #237951; background: #eaf7ef; border: 1px solid #b7dec8; }
.backup-history-table .archive-unpinned { color: #697588; background: #f6f7fa; border: 1px solid var(--line); }
@media (min-width: 900px) {
  .backup-history-table th:last-child { width: 184px; }
  .backup-history-actions { flex-wrap: nowrap; }
}

.file-manager .policy-body { display: grid; gap: var(--space-6); min-width: 0; }
.file-manager-picker, .file-manager-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
}
.file-manager-picker .form-row { margin: 0; }
.file-manager-picker select { width: 100%; }
.file-manager-crumbs .file-manager-crumb {
  background: #f1f8ec;
  border-color: #d7e7cc;
  color: #416039;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.file-manager-crumbs .file-manager-crumb[aria-current] { background: #e2f1d9; border-color: #acc9a0; }
.file-manager-crumbs .icon { width: 14px; height: 14px; flex-shrink: 0; }
.file-manager-metrics > small { grid-column: 1 / -1; }
@media (max-width: 1000px) {
  .file-manager-picker, .file-manager-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .file-manager-picker { grid-template-columns: minmax(0, 1fr); }
}
.file-manager-toolbar, .file-manager-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.file-manager-metric { display: grid; gap: var(--space-2); min-width: 0; padding: var(--space-4); border: 1px solid var(--line); border-radius: 8px; }
.file-manager-metric small { color: var(--muted); }
.file-manager-metric b { overflow-wrap: anywhere; }
.file-manager-table { max-width: 100%; overflow-x: auto; }
.file-manager-table table { width: 100%; table-layout: fixed; }
.file-manager-table td, .file-manager-table th { white-space: normal; overflow-wrap: anywhere; }
.file-manager-table th:nth-child(2) { width: 36%; }
.file-manager-table .file-manager-select { width: 2rem; padding-inline: var(--space-1); text-align: center; }
.file-manager-bulk { margin-bottom: calc(-1 * var(--space-3)); }
.file-manager-table th { text-transform: uppercase; }
.file-manager-table th:last-child { width: 16%; }
.file-manager-table :is(th, td):last-child { text-align: center; padding-inline: var(--space-1); }
.file-manager-folder { display: inline-flex; align-items: center; gap: var(--space-2); border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; text-align: left; overflow-wrap: anywhere; max-width: 100%; }
.file-manager-warning { margin: 0; padding: var(--space-3); border-radius: 8px; }
.file-manager-warning.warning { background: #fff4e5; color: #9d5a08; }
.file-manager-warning.critical { background: #fff0ef; color: #aa3030; }
.topbar .storage-warning { margin-left: auto; font-size: 11px; padding: 7px 10px; border: 1px solid; border-radius: 6px; white-space: nowrap; text-decoration: none; }
.topbar .storage-warning.warning { color: #9d5a08; background: #fff4e5; border-color: #e9b96c; }
.topbar .storage-warning.critical { color: #aa3030; background: #fff0ef; border-color: #eaa8a8; }
.api-storage-usage-row.capacity-warning { border-color: #e9b96c; }
.api-storage-usage-row.capacity-critical { border-color: #eaa8a8; }
@media (max-width: 800px) { .topbar { flex-wrap: wrap; gap: 8px; } .topbar .storage-warning { order: 3; width: 100%; white-space: normal; } }

.file-manager-drop { min-width: 0; border-radius: 8px; }
.file-manager-drop.is-dragging {
  outline: 2px dashed #8bab78;
  outline-offset: 4px;
  background: #edf5e6;
  box-shadow: 0 0 0 4px #edf5e6;
}
.file-manager-drop.is-dragging .file-manager-table { opacity: .72; }
.owner-uploads-link { white-space: nowrap; }
.file-upload-panel { margin-top: var(--space-4); padding: var(--space-4); min-width: 0; }
.file-upload-panel[hidden], .owner-uploads-link[hidden] { display: none; }
.file-upload-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); }
.file-upload-heading h2 { margin: 0; font-size: 15px; }
.file-upload-list { max-height: 340px; overflow: auto; list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.file-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}
.file-upload-details, .file-upload-summary { display: grid; gap: var(--space-1); overflow-wrap: anywhere; }
.file-upload-row small { color: var(--muted); }
.file-upload-row[data-state="error"] strong { color: var(--red); }
.file-upload-row[data-state="completed"] strong { color: var(--green); }
.file-upload-row progress { grid-column: 1 / 3; grid-row: 2; width: 100%; }
.file-upload-actions { grid-column: 3; grid-row: 1 / 3; display: flex; justify-content: end; flex-wrap: wrap; gap: var(--space-2); }
.file-upload-message.is-error { color: var(--red); }
.file-upload-message { grid-column: 1 / -1; margin: 0; overflow-wrap: anywhere; color: var(--muted); }
@media (max-width: 800px) {
  .topbar:has(.owner-uploads-link:not([hidden])) { height: auto; min-height: 43px; padding-block: var(--space-2); }
  .file-upload-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .file-upload-actions { grid-column: 1 / -1; grid-row: auto; justify-content: start; }
}

.file-upload-conflict .modal-flow, .file-upload-conflict .modal-section { gap: var(--space-2); }
.file-upload-conflict .modal-flow > .modal-actions { margin-top: var(--space-4); flex-wrap: wrap; }
.file-upload-conflict .modal-flow > .form-error:empty { display: none; }
.file-upload-conflict .confirm-check { margin: 0; }
.file-upload-conflict-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.file-upload-conflict-cards > div { display: grid; align-content: start; gap: var(--space-1); border: 1px solid var(--line); border-radius: 8px; padding: var(--space-2) var(--space-3); overflow-wrap: anywhere; }
.file-upload-conflict-cards small { color: var(--muted); }
.file-upload-conflict .modal-flow > p { overflow-wrap: anywhere; }


.file-manager-entry-actions, .file-move-choices { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.file-manager-entry-actions { justify-content: center; }
.file-move-choices { gap: var(--space-2); max-height: 220px; overflow-y: auto; }
.file-move-choices > button { min-width: 0; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }

.file-manager-delete { color: var(--red); }
.file-delete-progress { overflow-wrap: anywhere; }

.file-manager > .form-error:not([hidden]) { margin: var(--space-4) var(--space-6) 0; overflow-wrap: anywhere; }

.database-connection-switch { margin-bottom: var(--space-2); }
.database-connection-switch + .form-help { margin: 0 0 var(--space-4); }
.database-connection-fields { border: 0; margin: 0; padding: 0; min-width: 0; }

.ssh-profile-workspace fieldset { min-width: 0; }
.ssh-profile-workspace .detail-actions { flex-wrap: wrap; }
.ssh-profile-workspace .ssh-wizard-cancel { margin-top: var(--space-4); }
:is(.ssh-profile-workspace, .site-creation) .ssh-fingerprint-confirm { align-items: flex-start; }
:is(.ssh-profile-workspace, .site-creation) .ssh-fingerprint-confirm input { flex: none; }
:is(.ssh-profile-workspace, .site-creation) .ssh-fingerprint-confirm input[type="checkbox"] { width: 15px; height: 15px; padding: 0; }
:is(.ssh-profile-workspace, .site-creation) .ssh-fingerprint-tools { margin-top: var(--space-2); }
.site-settings-tabs button { background: transparent; font: inherit; border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.site-settings-tabs button:hover { color: var(--ink); }
.ssh-profile-credential-fields { border: 0; margin: var(--space-4) 0 0; padding: 0; }
.archive-share-brand { justify-content: flex-start; gap: var(--space-3); }
.archive-share-details dd { overflow-wrap: anywhere; }
.file-manager-size { display: inline-grid; grid-template-columns: 22px auto; gap: var(--space-1); align-items: center; }
.file-manager-size > .archive-share-indicator {
  width: 22px; height: 22px; box-sizing: border-box; border-radius: 5px; justify-content: center;
}
.file-manager-size > .archive-share-indicator.active { background: #eaf7ef; border: 1px solid #237951; }
.file-manager-entry-actions .file-manager-share-active { color: #237951; }
.site-creation .form-help { overflow-wrap: anywhere; }
.site-creation .detail-actions { flex-wrap: wrap; }

.api-storage-table .api-storage-usage-row {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 5px;
  min-width: 0; margin: 0;
}
.api-storage-table .api-storage-usage-row .storage-capacity-meter { width: 100%; min-width: 0; }
.api-storage-table .api-storage-usage-row > small { display: block; white-space: normal; }

.backup-execution-form { display: grid; gap: var(--space-5); max-width: 660px; margin-block-start: var(--space-6); }
.backup-execution-fields {
  display: grid; gap: var(--space-4); min-inline-size: 0; border: 1px solid var(--line);
  border-radius: 8px; padding: var(--space-5); margin: 0;
}
.backup-execution-form[hidden], .backup-execution-form [hidden] { display: none; }
.backup-execution-fields legend { padding-inline: var(--space-2); font-weight: 650; line-height: 1.4; }
.backup-execution-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.backup-execution-fields :is(.form-row, .form-help, .confirmation-check),
.backup-execution-form > .form-help { margin: 0; }
.backup-execution-fields input[type="number"] { font-variant-numeric: tabular-nums; }
.backup-execution-form .detail-actions { margin-block-start: var(--space-1); flex-wrap: wrap; }

.api-overview-table .site-title-button {
  display: block; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left;
}
.api-overview-table .site-name .site-s3-profile { display: flex; align-items: center; gap: var(--space-1); }
.site-s3-profile .icon { width: 10px; height: 10px; }
.site-s3-profile span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.api-action-modal.backup-launch-modal { width: min(530px, calc(100% - 40px)); }
.backup-launch-modal .modal-section { overflow-wrap: anywhere; }
.backup-storage-card { display: grid; gap: var(--space-1); padding: var(--space-3); }
.backup-storage-card > .cell-note { margin: 0; }
.backup-storage-card .api-storage-usage-row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1); margin: 0;
}
.backup-storage-card .api-storage-usage-line > strong { margin-inline-start: auto; }
.backup-type-field { min-width: 0; }
.backup-type-field > legend { margin-bottom: var(--space-2); font-weight: 550; }
.backup-type-options { display: grid; gap: var(--space-1); }
.backup-type-option > label {
  display: flex; min-width: 0; min-height: 0; padding: var(--space-1) 0; gap: var(--space-2);
}
.backup-type-option input { flex: none; }
.backup-type-option > label:hover:has(input:enabled) { color: var(--accent); }
.backup-type-option > label:has(input:disabled), .backup-type-field:disabled label { color: var(--muted); }
.backup-type-estimate { margin-inline-start: auto; color: var(--muted); text-align: right; }
.backup-type-estimate:empty, .backup-launch-modal .modal-section > .form-help:empty { display: none; }
.backup-type-option > .backup-type-reason { margin: 0 0 0 var(--space-6); }
.backup-queued-notice { margin-block: var(--space-2); }
.bulk-backup-settings, .bulk-backup-page > .filters, .bulk-backup-footer { padding: var(--space-4); }
.bulk-backup-settings { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-4); }
.bulk-backup-settings .backup-type-options { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.bulk-backup-page > .filters { justify-content: space-between; flex-wrap: wrap; box-sizing: border-box; }
.bulk-backup-page .search-wrap { flex: 0 1 auto; }
.bulk-backup-page .backup-site-check { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.bulk-backup-page .backup-site-check:disabled { cursor: default; }
.bulk-backup-page td .cell-note { margin-top: var(--space-1); }
.bulk-backup-page td { overflow-wrap: anywhere; }
.bulk-backup-page td .site-s3-profile { display: flex; align-items: center; gap: var(--space-1); }
.bulk-backup-page td .form-error { margin: var(--space-1) 0 0; }
.bulk-backup-footer {
  position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); background: white; border-top: 1px solid var(--line);
}

.site-details .site-settings-heading > .detail-actions { margin-block: var(--space-3); }
.site-details-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: var(--space-6);
}
.site-details-tab { display: grid; gap: var(--space-6); min-width: 0; }
.site-details-card { padding: var(--space-5); min-width: 0; overflow-wrap: anywhere; }
.site-details-card .detail-grid { gap: var(--space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-details-card > :not(h2) { margin-top: var(--space-2); }
.site-details-card .form-help { margin-bottom: 0; }
.site-details-tab > a { justify-self: start; }
.job-details :is(.detail-grid, .artifact-card, .site-details-tab) { min-width: 0; }
.job-details .detail-grid > div { min-width: 0; overflow-wrap: anywhere; }
.job-details .history-archive-card { margin: 0; }
.job-details .job-diagnostic-report { white-space: pre-wrap; overflow-wrap: anywhere; }

.site-schedules-summary { margin-block-end: var(--space-6); }
.site-schedules-summary > .detail-grid { margin-top: 0; }
.site-schedule-modal .confirmation-subtitle { font-size: 12px; }
.site-schedules-table td { vertical-align: top; overflow-wrap: anywhere; }
.site-schedules-table .schedule-site-domain { display: block; font-size: 14px; font-weight: 600; }
.site-schedules-table .schedule-site-description { font-size: 12px; color: var(--muted); }
.site-schedules-table .site-s3-profile { display: flex; align-items: center; gap: var(--space-1); }
.site-schedules-table .scheduler-next { margin-top: var(--space-1); }
.site-schedules-table .scheduler-next time { font-weight: 600; }

.api-action-modal.retention-cleanup-modal { width: min(900px, calc(100% - 40px)); overflow: hidden; }
.retention-cleanup-modal .modal-flow { max-height: min(65vh, calc(100dvh - 180px)); }
.retention-cleanup-modal .modal-flow > :not(.retention-cleanup-content, .retention-confirm-targets) { flex: none; }
.retention-cleanup-modal :is(.retention-cleanup-content, .retention-confirm-targets) {
  min-height: 0; overflow-y: auto; padding-inline-end: var(--space-2);
}
.retention-cleanup-modal .modal-actions { flex-wrap: wrap; }
.retention-cleanup-modal .modal-section { overflow-wrap: anywhere; }
.retention-cleanup-modal .modal-section h3 { margin: 0; }

.storage-profile-editor { max-width: 860px; }
.storage-profile-editor .storage-capacity-field { max-width: 320px; grid-template-columns: minmax(0, 1fr); }
.storage-profile-editor .site-form-grid .form-row { margin: 0; }
.storage-profile-editor fieldset > .detail-actions { margin-top: var(--space-6); }
.storage-profile-editor .api-storage-usage-row { display: grid; gap: var(--space-2); }

.storage-compatibility pre.code-path {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.site-settings.storage-compatibility-wide,
.storage-compatibility-wide > .storage-profile-editor { max-width: none; }

.storage-compatibility-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.storage-compatibility-heading > h3,
.storage-compatibility-cards h4,
.storage-compatibility-wide .s3-delete-safety { margin: 0; }

.storage-compatibility-cards,
.storage-compatibility-pair {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}

.storage-compatibility-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.storage-compatibility-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.storage-compatibility-pair > * { min-width: 0; overflow-wrap: anywhere; }
.storage-compatibility-cards .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.storage-compatibility .table-wrap tbody th { text-align: left; text-transform: none; }
.storage-compatibility .form-help:empty { display: none; }
.storage-compatibility .policy-component,
.storage-compatibility-pair > div > .policy-component {
  margin-block: 0;
  padding: var(--space-5);
}
.storage-compatibility-wide .storage-compatibility-pair > .s3-delete-safety { padding: var(--space-5); }
.storage-compatibility-cards .detail-grid > div { min-width: 0; overflow-wrap: anywhere; }

.storage-special-diagnostics { margin-block: 0; padding: var(--space-5); }
.storage-special-summary { cursor: pointer; }
.diagnostic-summary-warning { color: var(--amber); margin-inline-start: var(--space-2); }
.diagnostic-summary-warning:empty { display: none; }
.storage-diagnostic-resources { margin-block: 0; padding: var(--space-5); }
.diagnostic-summary-warning.diagnostic-summary-error { color: var(--red); }
.storage-cors-layout { container-type: inline-size; }
.storage-cors-facts > div { min-width: 0; overflow-wrap: anywhere; }
@container (min-width: 540px) {
  .storage-cors-layout .storage-cors-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.site-name b.site-domain-heading,
.storage-linked-domain.site-domain-heading { font-size: 14px; }
.storage-linked-domain { color: inherit; font-weight: 600; }
.storage-linked-description { font-size: 12px; }


.retention-site .retention-site-domain { font-size: 14px; }
.retention-site .retention-site-description { font-size: 10px; }
.site-settings-heading .site-settings-subtitle { font-size: 14px; }
.site-settings-return,
.site-settings-permission-actions,
.storage-profile-remove { margin-block-start: var(--space-4); }
.site-settings-return > .icon,
.storage-profile-return > .icon { transform: rotate(180deg); }

.backup-launch-modal .backup-site-domain, .bulk-backup-page .backup-site-domain { font-size: 14px; }
.backup-launch-modal .backup-site-description, .bulk-backup-page .backup-site-description { font-size: 12px; }
.panel-title .job-report-actions { margin: 0; }
.panel-title .job-report-actions .btn { margin-left: 0; }
.job-report-feedback:empty { display: none; }

.owner-app-version { margin: var(--space-2) 5px 0; color: var(--muted); font-size: 12px; }
