:root {
  color-scheme: light dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f4f6f1;
  color: #18211d;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

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

.panel {
  width: min(680px, 100%);
  border: 1px solid #cbd4c4;
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(20, 35, 27, 0.12);
}

.hidden {
  display: none !important;
}

h1 {
  margin: 0 0 20px;
  font-size: 28px;
  line-height: 1.15;
}

.stack {
  display: grid;
  gap: 14px;
}

.header-row,
.link-row,
.role-grid {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-row {
  justify-content: space-between;
  margin-bottom: 20px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #354139;
  font-weight: 600;
}

.toggle {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-bottom: 18px;
}

input[type="password"],
input[type="text"],
input[type="file"],
#transfer-link {
  min-width: 0;
  border: 1px solid #b8c5b3;
  border-radius: 6px;
  padding: 11px 12px;
  background: #fbfcfa;
  color: #18211d;
}

.link-row {
  margin-top: 14px;
}

.link-row input {
  flex: 1;
}

button,
.link-button {
  border: 1px solid #1e5b45;
  border-radius: 6px;
  background: #1e5b45;
  color: #ffffff;
  cursor: pointer;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary {
  border-color: #a9b7a4;
  background: #eef2ea;
  color: #1d2a22;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8dd;
  margin: 18px 0 12px;
}

#progress-bar {
  width: 0%;
  height: 100%;
  background: #2b7a5b;
  transition: width 120ms linear;
}

#status {
  min-height: 160px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid #d7ded2;
  border-radius: 6px;
  padding: 12px;
  background: #f8faf6;
  color: #243028;
}

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

  .panel {
    padding: 18px;
  }

  .header-row,
  .link-row,
  .role-grid {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }
}
