:root {
  --page: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f4;
  --text: #17202a;
  --muted: #667085;
  --line: #d9e0e7;
  --primary: #2454d6;
  --primary-strong: #163ba3;
  --teal: #0f766e;
  --success: #16875a;
  --warning: #b26a00;
  --danger: #c5365a;
  --shadow: 0 18px 44px rgba(21, 32, 54, 0.10);
  --shadow-soft: 0 8px 24px rgba(21, 32, 54, 0.08);
  --radius: 8px;
}

:root[data-theme="dark"] {
  --page: #0b1015;
  --surface: #141b23;
  --surface-soft: #10171f;
  --text: #edf2f8;
  --muted: #9ba8ba;
  --line: #2b3645;
  --primary: #6387ff;
  --primary-strong: #7b9aff;
  --teal: #3cc4b7;
  --success: #4fd18f;
  --warning: #f2aa4c;
  --danger: #ff6b72;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(36, 84, 214, 0.08) 0%, rgba(15, 118, 110, 0.06) 36%, transparent 72%),
    var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(180deg, rgba(60, 196, 183, 0.08) 0%, rgba(99, 135, 255, 0.06) 36%, transparent 72%),
    var(--page);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: var(--primary);
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.topbar,
.operation-center,
.notice-panel,
.login-card,
.guide-panel,
.workspace-panel,
.activity-panel,
.sidebar,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  color: #f3f7fb;
  background: #111820;
  border-color: #2a3442;
  box-shadow: none;
}

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

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  background: #05070b;
  border: 1px solid #303a48;
}

.brand h1 {
  color: #f7fbff;
  font-size: 22px;
  font-weight: 900;
}

.brand p {
  margin: 1px 0 0;
  color: #d7e1ec;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(26px, 4vw, 36px);
}

h2 {
  font-size: 20px;
}

p {
  margin: 0;
}

.topbar-actions,
.toolbar-actions,
.action-row,
.upload-actions,
.guide-actions,
.dialog-actions,
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.connection-pill,
.path-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.topbar .connection-pill {
  min-height: 30px;
  padding: 5px 9px;
  background: rgba(79, 209, 143, 0.08);
  border-color: rgba(79, 209, 143, 0.28);
  color: #a7f0c8;
  font-size: 12px;
}

.connection-pill.online {
  color: var(--success);
  background: rgba(22, 135, 90, 0.10);
  border-color: rgba(22, 135, 90, 0.28);
}

.connection-pill.offline {
  color: var(--danger);
  background: rgba(197, 54, 90, 0.10);
  border-color: rgba(197, 54, 90, 0.28);
}

.topbar .connection-pill.online {
  color: #a7f0c8;
  background: rgba(79, 209, 143, 0.08);
  border-color: rgba(79, 209, 143, 0.28);
}

.topbar .connection-pill.offline {
  color: #ffb8bd;
  background: rgba(255, 107, 114, 0.10);
  border-color: rgba(255, 107, 114, 0.32);
}

.nav-user,
.nav-link {
  color: #f3f7fb;
  font-size: 14px;
  font-weight: 900;
}

.nav-user {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-divider {
  width: 2px;
  height: 20px;
  background: #536071;
}

.nav-link {
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-link:hover {
  color: #7ce0d5;
}

.nav-link.active {
  color: #7ce0d5;
}

.signout-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.power-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffe2e3;
  background: rgba(255, 107, 114, 0.22);
  border: 1px solid rgba(255, 107, 114, 0.36);
  font-size: 18px;
  line-height: 1;
}

.theme-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  border: 1px solid #364253;
  border-radius: 8px;
  color: #f3f7fb;
  background: #1b2531;
  font-weight: 900;
  cursor: pointer;
}

.theme-track {
  width: 52px;
  height: 28px;
  padding: 3px;
  border-radius: 999px;
  background: #263445;
}

.theme-knob {
  width: 22px;
  height: 22px;
  display: block;
  border-radius: 999px;
  background: #dce5ef;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

:root[data-theme="dark"] .theme-knob {
  transform: translateX(24px);
  background: #3cc4b7;
}

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(21, 32, 54, 0.12);
}

.btn:focus-visible,
.nav-link:focus-visible,
.theme-toggle:focus-visible,
input:focus-visible,
select:focus-visible,
.upload-zone:focus-visible,
.operation-center:focus-visible,
.guide-panel:focus-visible {
  outline: 3px solid rgba(36, 84, 214, 0.22);
  outline-offset: 2px;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-strong);
}

.btn-secondary,
.btn-quiet {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

:root[data-theme="dark"] .btn-secondary,
:root[data-theme="dark"] .btn-quiet {
  background: #18212c;
}

.btn-quiet {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--muted);
}

.btn-danger {
  color: #fff;
  background: var(--danger);
}

.operation-center {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 360px) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-color: rgba(36, 84, 214, 0.24);
}

.operation-center.is-active {
  box-shadow: 0 18px 44px rgba(36, 84, 214, 0.18);
}

.operation-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.operation-kicker,
.metric-card span,
.sidebar-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#operationTitle {
  font-size: 17px;
}

#operationDetail {
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.progress-shell {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe4ef;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  transition: width 0.2s ease;
}

.operation-meta {
  display: grid;
  gap: 3px;
  justify-items: end;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

#progressText {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.notice-panel,
.login-card {
  padding: 22px;
}

.notice-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-color: rgba(197, 54, 90, 0.28);
}

.notice-panel p,
.login-copy p {
  color: var(--muted);
}

.login-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: end;
  box-shadow: var(--shadow);
}

.login-copy h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: var(--surface);
  color: var(--text);
}

:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="password"],
:root[data-theme="dark"] select {
  background: #101720;
}

input::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, transparent);
}

select {
  min-width: 92px;
}

input[type="file"] {
  display: none;
}

.guide-panel {
  padding: 18px;
  scroll-margin-top: 96px;
}

.guide-panel h3 {
  margin: 0;
  font-size: 18px;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: center;
}

.guide-copy {
  display: grid;
  gap: 10px;
}

.guide-copy h2 {
  max-width: 560px;
  font-size: clamp(28px, 4vw, 44px);
}

.guide-copy p {
  max-width: 660px;
  color: var(--muted);
  line-height: 1.55;
}

.guide-flow {
  min-height: 168px;
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.flow-step {
  width: 96px;
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 7px;
  text-align: center;
}

.flow-step span,
.workflow-card span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
}

.flow-step strong {
  font-size: 13px;
}

.flow-arrow {
  color: var(--primary);
  font-size: 30px;
  font-weight: 900;
}

.guide-section {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.guide-card,
.workflow-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.guide-card {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.guide-card p,
.workflow-card p {
  color: var(--muted);
  line-height: 1.45;
}

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

.workflow-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 100px;
  padding: 14px;
  display: grid;
  gap: 18px;
}

.sidebar-links {
  display: grid;
  gap: 6px;
}

.sidebar-item {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 10px;
  text-align: left;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.sidebar-item:hover,
.sidebar-item.active {
  color: var(--text);
  background: var(--surface-soft);
  border-color: var(--line);
}

.sidebar-item.active {
  border-left: 4px solid var(--primary);
}

.sidebar-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(15, 118, 110, 0.08);
  color: var(--teal);
}

.sidebar-summary span {
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
}

.workspace-main {
  display: grid;
  gap: 16px;
}

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

.metric-card {
  min-height: 90px;
  padding: 14px;
  display: grid;
  align-content: space-between;
}

.metric-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-panel,
.activity-panel {
  padding: 16px;
}

.workspace-panel {
  scroll-margin-top: 96px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.workspace-panel.section-focus,
.guide-panel.section-focus {
  border-color: rgba(36, 84, 214, 0.58);
  box-shadow: 0 0 0 3px rgba(36, 84, 214, 0.16), var(--shadow-soft);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.upload-zone {
  min-height: 170px;
  border: 1px dashed rgba(36, 84, 214, 0.45);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(36, 84, 214, 0.08), rgba(15, 118, 110, 0.08)),
    var(--surface-soft);
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.upload-zone.dragover {
  transform: translateY(-2px);
  border-color: var(--teal);
  background: rgba(15, 118, 110, 0.10);
}

.upload-main {
  display: grid;
  gap: 4px;
}

.upload-main strong {
  font-size: 20px;
}

.upload-main span,
.selected-files,
.selection-bar,
.activity-item {
  color: var(--muted);
}

.selected-files {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  word-break: break-word;
}

.selected-files.has-files {
  color: var(--text);
  background: rgba(36, 84, 214, 0.08);
}

.action-row {
  margin-top: 12px;
}

.upload-result {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.upload-link-toolbar {
  margin-top: 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.upload-link-controls {
  display: flex;
  align-items: end;
  gap: 8px;
}

.result-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.result-link a {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  text-overflow: clip;
  white-space: nowrap;
}

.library-toolbar {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) minmax(220px, 340px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.path-pill {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-bar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.selection-bar.has-selection {
  color: var(--text);
  background: rgba(178, 106, 0, 0.08);
  border-color: rgba(178, 106, 0, 0.24);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  background: var(--surface);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  font-size: 14px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

:root[data-theme="dark"] th {
  background: #111923;
}

tbody tr:hover {
  background: #fbfcff;
}

:root[data-theme="dark"] tbody tr:hover {
  background: #111923;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.file-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.file-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.file-mark.folder {
  background: var(--teal);
}

.file-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.file-title strong,
.file-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-title span {
  color: var(--muted);
  font-size: 12px;
}

.cf-link {
  min-width: 280px;
}

.cf-url-box {
  width: 280px;
  min-width: 220px;
  max-width: min(72vw, 900px);
  resize: horizontal;
  overflow: auto hidden;
  padding: 2px 16px 4px 0;
  position: relative;
}

.cf-url-box::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 3px;
  width: 8px;
  height: calc(100% - 10px);
  border-right: 2px solid rgba(96, 165, 250, 0.72);
  border-left: 2px solid rgba(96, 165, 250, 0.28);
  pointer-events: none;
}

.cf-url-box a {
  display: block;
  width: max-content;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.actions {
  white-space: nowrap;
}

.actions .btn {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.pager {
  justify-content: center;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
}

.page-number-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-number {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  font-weight: 900;
  cursor: pointer;
}

.page-number.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.page-ellipsis {
  padding: 0 2px;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.gallery-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 8px 22px rgba(21, 32, 54, 0.06);
}

.gallery-card:hover {
  border-color: rgba(36, 84, 214, 0.34);
  box-shadow: 0 14px 28px rgba(21, 32, 54, 0.12);
}

.gallery-card img,
.gallery-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-soft);
}

.gallery-placeholder {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 900;
}

.gallery-meta {
  padding: 10px;
  display: grid;
  gap: 3px;
}

.gallery-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.gallery-type {
  color: var(--muted);
  font-size: 12px;
}

.activity-log {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.activity-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 13px;
}

.activity-item.success {
  color: var(--success);
  background: rgba(22, 135, 90, 0.08);
  border-color: rgba(22, 135, 90, 0.22);
}

.activity-item.error {
  color: var(--danger);
  background: rgba(197, 54, 90, 0.08);
  border-color: rgba(197, 54, 90, 0.22);
}

.sr-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.app-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-dialog::backdrop {
  background: rgba(23, 32, 42, 0.44);
}

.app-dialog form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.app-dialog p {
  color: var(--muted);
}

.dialog-actions {
  justify-content: flex-end;
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .operation-center {
    grid-template-columns: 1fr;
  }

  .operation-meta {
    justify-items: start;
    grid-template-columns: auto auto;
  }

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

  .library-toolbar {
    grid-template-columns: auto 1fr;
  }

  .guide-hero,
  .guide-card-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .guide-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .flow-arrow {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 12px;
  }

  .topbar,
  .notice-panel,
  .login-card,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions > :not(.nav-divider) {
    flex: 1 1 auto;
  }

  .nav-divider {
    display: none;
  }

  .login-card,
  .login-form,
  .workspace-grid,
  .library-toolbar,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .sidebar-item {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .sidebar-links {
    grid-template-columns: 1fr;
  }

  .btn,
  .action-row > *,
  .upload-actions > *,
  .guide-actions > *,
  .toolbar-actions > * {
    width: 100%;
  }

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

  .flow-step {
    width: auto;
  }

  .operation-meta {
    grid-template-columns: 1fr;
  }
}
