:root {
  color-scheme: dark;
  --bg: #111318;
  --panel: #1a1d24;
  --panel-2: #20252e;
  --text: #edf0f4;
  --muted: #9aa4b2;
  --line: #303744;
  --accent: #4cc38a;
  --accent-2: #58a6ff;
  --danger: #ef6461;
  --warn: #f7b955;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
  max-width: 100%;
}

button {
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

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

.auth-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
  display: grid;
  gap: 16px;
}

.auth-message {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
}

.sidebar {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #151821;
  padding: 20px;
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.minecraft-nuke-logo {
  overflow: visible;
  perspective: 180px;
}

.logo-scene,
.grass-block,
.grass-face,
.mushroom-cloud,
.cloud-stem,
.cloud-cap,
.cloud-lobe {
  display: block;
}

.logo-scene {
  position: relative;
  width: 52px;
  height: 52px;
  transform-style: preserve-3d;
  animation: logo-orbit 8s linear infinite;
  filter: drop-shadow(0 10px 10px rgb(0 0 0 / 28%));
}

.grass-block {
  position: absolute;
  left: 13px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  transform-style: preserve-3d;
  transform: rotateX(-28deg) rotateY(38deg);
}

.grass-face {
  position: absolute;
  inset: 0;
  border: 1px solid rgb(255 255 255 / 12%);
  image-rendering: pixelated;
}

.grass-top {
  transform: rotateX(90deg) translateZ(12px);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 10%) 1px, transparent 1px) 0 0 / 6px 6px,
    linear-gradient(#4fa33f, #2f7c32);
}

.grass-front {
  transform: translateZ(12px);
  background:
    linear-gradient(90deg, rgb(74 47 25 / 52%) 1px, transparent 1px) 0 0 / 6px 6px,
    linear-gradient(#4c3522 0 24%, #6b4827 24% 100%);
}

.grass-right {
  transform: rotateY(90deg) translateZ(12px);
  background:
    linear-gradient(90deg, rgb(46 30 18 / 48%) 1px, transparent 1px) 0 0 / 6px 6px,
    linear-gradient(#3b7f32 0 24%, #56391f 24% 100%);
}

.grass-back {
  transform: rotateY(180deg) translateZ(12px);
  background:
    linear-gradient(90deg, rgb(46 30 18 / 42%) 1px, transparent 1px) 0 0 / 6px 6px,
    linear-gradient(#356e2d 0 24%, #52371f 24% 100%);
}

.grass-left {
  transform: rotateY(-90deg) translateZ(12px);
  background:
    linear-gradient(90deg, rgb(46 30 18 / 48%) 1px, transparent 1px) 0 0 / 6px 6px,
    linear-gradient(#438f37 0 24%, #644326 24% 100%);
}

.grass-bottom {
  transform: rotateX(-90deg) translateZ(12px);
  background:
    linear-gradient(90deg, rgb(40 25 14 / 46%) 1px, transparent 1px) 0 0 / 6px 6px,
    linear-gradient(#5a3a21, #3f2918);
}

.mushroom-cloud {
  position: absolute;
  left: 15px;
  bottom: 26px;
  width: 24px;
  height: 26px;
  transform-style: preserve-3d;
  transform: translateZ(20px);
  animation: cloud-breathe 2.8s ease-in-out infinite;
}

.cloud-stem {
  position: absolute;
  left: 9px;
  bottom: 0;
  width: 7px;
  height: 19px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(#fff0bc, #eaa65a 55%, #9f542e);
  box-shadow: 0 0 10px rgb(255 194 91 / 42%);
  transform: translateZ(2px);
}

.cloud-cap,
.cloud-lobe {
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle at 34% 28%, #fff8cb, #f0a64e 54%, #7b321f 100%);
  box-shadow: 0 0 14px rgb(255 180 71 / 48%);
}

.cloud-cap {
  left: 3px;
  top: 0;
  width: 19px;
  height: 13px;
  transform: translateZ(8px);
}

.cloud-lobe {
  top: 7px;
  width: 13px;
  height: 11px;
}

.cloud-lobe-left {
  left: 0;
  transform: translateZ(4px) rotateY(-18deg);
}

.cloud-lobe-right {
  right: 0;
  transform: translateZ(4px) rotateY(18deg);
}

.cloud-lobe-front {
  left: 5px;
  top: 8px;
  width: 15px;
  height: 10px;
  opacity: 0.96;
  transform: translateZ(13px) scale(0.9);
}

.cloud-lobe-back {
  left: 5px;
  top: 5px;
  width: 15px;
  height: 10px;
  opacity: 0.72;
  transform: translateZ(-7px) scale(0.95);
}

@keyframes logo-orbit {
  from {
    transform: rotateX(10deg) rotateY(0deg);
  }
  to {
    transform: rotateX(10deg) rotateY(360deg);
  }
}

@keyframes cloud-breathe {
  0%,
  100% {
    transform: translateZ(20px) scale(0.94);
    opacity: 0.92;
  }
  50% {
    transform: translateZ(23px) scale(1.06);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-scene,
  .mushroom-cloud {
    animation: none;
  }
}

.brand-copy strong,
.brand-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--muted);
  font-size: 13px;
}

.brand-links {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  margin-left: auto;
}

.brand-link {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  text-decoration: none;
}

.brand-link:hover {
  border-color: #465061;
  color: var(--text);
}

.brand-link img {
  width: 16px;
  height: 16px;
  display: block;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 11px 12px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.workspace {
  min-width: 0;
  width: 100%;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar > div:first-child,
.panel-heading > div,
.file-manager-header > div {
  min-width: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-status,
.panel-heading,
.toolbar,
.actions,
.invite-link-row {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-status {
  justify-content: flex-end;
}

#active-server-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.panel-heading {
  justify-content: space-between;
  margin-bottom: 16px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}

.hero-panel {
  min-height: 260px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: #252b35;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-running {
  border-color: #47785d;
  background: #193427;
  color: #b7f4cb;
}

.status-starting,
.status-stopping {
  border-color: #785f2e;
  background: #352a18;
  color: #ffd990;
}

.status-error {
  border-color: #894141;
  background: #3a1c22;
  color: #ffb3ad;
}

.status-off {
  color: var(--muted);
}

.btn {
  max-width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  padding: 8px 13px;
}

.btn:hover {
  border-color: #566170;
}

.btn.primary {
  border-color: #3d7054;
  background: #214331;
  color: #d8ffe7;
}

.btn.danger {
  border-color: #794042;
  background: #3a2024;
  color: #ffd6d3;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.server-actions {
  align-items: flex-start;
  justify-content: space-between;
}

.secondary-actions {
  margin-left: auto;
}

.btn.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.summary-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 10px;
  margin-top: 18px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171b22;
  padding: 12px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.metric strong {
  display: block;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.log-window {
  min-height: 420px;
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d1015;
  color: #d8dee9;
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-window.compact {
  min-height: 180px;
  max-height: 260px;
}

.map-panel {
  min-height: calc(100vh - 150px);
}

.map-frame {
  width: 100%;
  height: min(72vh, 820px);
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #05070a;
}

.map-placeholder {
  display: grid;
  min-height: 520px;
  place-content: center;
  gap: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.map-placeholder h2,
.map-placeholder p {
  margin: 0;
}

.servers-list,
.invite-box {
  display: grid;
  gap: 8px;
}

.add-server-box {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-top: 14px;
}

.add-server-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invite-link-row {
  align-items: stretch;
}

.invite-link-row input {
  flex: 1 1 220px;
}

.server-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171b22;
  padding: 12px;
}

.server-row > div {
  min-width: 0;
}

.server-row strong,
.server-meta,
.file-meta {
  overflow-wrap: anywhere;
}

.file-manager-panel {
  display: grid;
  gap: 14px;
}

.file-manager-header,
.file-command-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.file-command-row {
  align-items: stretch;
}

.file-breadcrumbs {
  min-width: 0;
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.breadcrumb-button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 7px 9px;
}

.breadcrumb-button:hover {
  border-color: var(--line);
  background: var(--panel-2);
}

.breadcrumb-separator {
  color: var(--muted);
}

.search-field {
  flex: 1 1 220px;
  width: min(280px, 100%);
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 154px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented button {
  min-height: 36px;
  border: 0;
  background: #10141b;
  color: var(--muted);
  cursor: pointer;
  padding: 7px 10px;
}

.segmented button.active {
  background: var(--panel-2);
  color: var(--text);
}

.file-browser-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 14px;
  min-height: 420px;
}

.file-main-pane {
  min-width: 0;
  overflow-x: auto;
}

.file-list-header,
.file-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(80px, 0.45fr) minmax(72px, 0.3fr) minmax(110px, 0.55fr);
  gap: 12px;
  align-items: center;
}

.file-list-header,
.file-list:not(.grid-mode) .file-row {
  min-width: 480px;
}

.file-list-header {
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0 12px 8px;
}

.file-list {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.file-row {
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #171b22;
  padding: 10px 12px;
}

.file-row:hover,
.file-row.selected {
  border-color: #465061;
  background: #1d232c;
}

.file-name-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.file-name-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name-cell > span:last-child {
  min-width: 0;
}

.file-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-title-line strong {
  min-width: 0;
}

.file-tag {
  flex: 0 0 auto;
  border: 1px solid #6f5b22;
  border-radius: 999px;
  background: #2b2517;
  color: #ffd990;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
}

.file-icon {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #18202c;
}

.file-icon.folder {
  border-color: #6a5621;
  background: #332b17;
}

.file-icon.folder::before,
.file-icon.folder::after,
.file-icon.file::before {
  position: absolute;
  content: "";
}

.file-icon.folder::before {
  left: 7px;
  top: 8px;
  width: 12px;
  height: 5px;
  border-radius: 4px 4px 0 0;
  background: #d7ad4b;
}

.file-icon.folder::after {
  left: 6px;
  right: 6px;
  bottom: 8px;
  height: 14px;
  border-radius: 4px;
  background: #e6bd5a;
}

.file-icon.file {
  border-color: #2e5d89;
  background: #16283a;
}

.file-icon.file::before {
  inset: 7px 9px;
  border: 1px solid #7db7e8;
  border-radius: 3px;
  background: #d8edf9;
}

.file-type-col,
.file-size-col,
.file-date-col {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list.grid-mode {
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  gap: 10px;
}

.file-list.grid-mode .file-row {
  grid-template-columns: 1fr;
  align-content: start;
  min-height: 150px;
}

.file-list.grid-mode .file-name-cell {
  align-items: flex-start;
  flex-direction: column;
}

.file-list.grid-mode .file-type-col,
.file-list.grid-mode .file-size-col,
.file-list.grid-mode .file-date-col {
  display: none;
}

.file-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.file-details-pane {
  border-left: 1px solid var(--line);
  padding-left: 14px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.file-details-pane h3 {
  overflow-wrap: anywhere;
  margin: 0;
}

.file-details-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.file-details-list div {
  display: grid;
  gap: 4px;
}

.file-details-list dt {
  color: var(--muted);
  font-size: 12px;
}

.file-details-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.file-details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-only {
  display: none;
}

.server-meta,
.file-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.row-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
}

.modal-form {
  padding: 14px;
}

.server-form-modal {
  width: min(920px, 100%);
}

.upload-progress {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171b22;
  padding: 12px;
}

.upload-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.upload-progress-header strong {
  color: var(--text);
  font-size: 13px;
}

.upload-progress progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #10141b;
}

.upload-progress progress::-webkit-progress-bar {
  background: #10141b;
}

.upload-progress progress::-webkit-progress-value {
  background: var(--accent);
}

.upload-progress progress::-moz-progress-bar {
  background: var(--accent);
}

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

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.checkbox-row input {
  width: auto;
}

.console-panel {
  display: grid;
  gap: 12px;
}

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

.code-editor {
  min-height: 320px;
  resize: vertical;
  font-family: "Cascadia Mono", "Consolas", monospace;
  line-height: 1.45;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgb(7 10 14 / 72%);
  padding: 20px;
}

.modal {
  width: min(1100px, 100%);
  max-height: min(860px, calc(100vh - 40px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.code-editor-wrap {
  position: relative;
  min-height: min(620px, calc(100vh - 220px));
  background: #0d1015;
  overflow: hidden;
}

.code-editor-wrap .code-editor,
.code-highlight {
  position: absolute;
  inset: 0;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  overflow: auto;
  padding: 14px;
  resize: none;
  tab-size: 2;
  white-space: pre;
}

.code-highlight {
  color: #d8dee9;
  pointer-events: none;
}

.code-editor-wrap.json-mode .code-editor,
.code-editor-wrap.properties-mode .code-editor {
  background: transparent;
  caret-color: var(--text);
  color: transparent;
}

.json-key {
  color: #7db7e8;
}

.json-string {
  color: #b7f4cb;
}

.json-number {
  color: #ffd990;
}

.json-boolean {
  color: #e7b9ff;
}

.json-null {
  color: #ffb3ad;
}

.properties-comment {
  color: #7f8a99;
}

.properties-key {
  color: #7db7e8;
}

.properties-separator {
  color: #d8dee9;
}

.properties-value {
  color: #b7f4cb;
}

.properties-section {
  color: #ffd990;
}

.placeholder {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.placeholder p:last-child {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #222834;
  color: var(--text);
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  transform: translateY(10px);
  transition: 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .file-browser-layout,
  .server-row {
    grid-template-columns: 1fr;
  }

  .file-details-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }

  .server-row {
    align-items: start;
  }

  .row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .dashboard-grid,
  .form-grid,
  .file-browser-layout {
    grid-template-columns: 1fr;
  }

  .file-details-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }
}

@media (max-width: 620px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-card,
  .panel {
    padding: 14px;
  }

  .workspace,
  .sidebar {
    padding: 14px;
  }

  h1 {
    font-size: 24px;
  }

  .topbar,
  .topbar-status,
  .panel-heading,
  .file-manager-header,
  .file-command-row,
  .actions,
  .action-group,
  .toolbar,
  .invite-link-row {
    align-items: stretch;
    flex-direction: column;
  }

  .secondary-actions {
    margin-left: 0;
  }

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

  .btn {
    width: 100%;
  }

  .pill {
    justify-content: center;
  }

  .summary-grid,
  .metric-grid,
  .server-row,
  .file-row {
    grid-template-columns: 1fr;
  }

  .console-form,
  .file-list.grid-mode {
    grid-template-columns: 1fr;
  }

  .file-list:not(.grid-mode) .file-row {
    min-width: 0;
  }

  .file-name-cell {
    width: 100%;
  }

  .search-field {
    width: 100%;
  }

  .file-list-header,
  .file-type-col,
  .file-size-col,
  .file-date-col {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 10px;
  }

  .modal {
    max-height: calc(100dvh - 20px);
  }

  .modal-header,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }
}
