:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #697386;
  --line: #dce2ea;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --soft: #eef7f6;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(28, 42, 68, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.auth-panel,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel {
  max-width: 520px;
  margin: 8vh auto 0;
  padding: 28px;
}

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

.brand.small h1,
.brand.small p {
  margin: 0;
}

.brand h1 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.1;
}

.brand p,
.section-head p,
.hint,
.status-strip span {
  color: var(--muted);
}

.hint.compact {
  margin: -3px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 28px 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f5f8;
}

.tab {
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 6px rgba(24, 39, 75, 0.12);
}

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

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 650;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 750;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

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

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

.secondary,
.ghost {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.danger {
  border: 1px solid #f3c5c0;
  background: #fff5f4;
  color: var(--danger);
}

.hidden {
  display: none !important;
}

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

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.status-strip > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.status-strip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
}

.panel {
  padding: 22px;
  box-shadow: none;
}

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

.section-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.section-head p {
  margin: 0;
}

.list {
  display: grid;
  gap: 10px;
}

.key-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.key-row strong,
.key-row span {
  display: block;
}

.key-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.secret-box {
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid #b7e0db;
  border-radius: 8px;
  background: var(--soft);
}

.secret-box code {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

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

.player {
  width: 100%;
  margin-top: 16px;
}

.download {
  display: inline-flex;
  margin-top: 12px;
  color: var(--primary-dark);
  font-weight: 750;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #172033;
  color: #ffffff;
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0;
  }

  .grid,
  .status-strip {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
