:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --ink: #161616;
  --muted: #626262;
  --line: #d8d3c9;
  --panel: #fffdf8;
  --accent: #0f7b6c;
  --accent-2: #1f4a8a;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(15, 123, 108, .12), transparent 34%),
    linear-gradient(240deg, rgba(31, 74, 138, .13), transparent 32%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(100% - 32px, 760px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.panel {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(22, 22, 22, .12);
  padding: 28px;
}

.panel.wide {
  max-width: 760px;
}

.panel.compact {
  max-width: 440px;
}

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

.topbar {
  justify-content: space-between;
}

.mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin: 26px 0 12px;
  font-size: 16px;
  letter-spacing: 0;
}

p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

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

.full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
}

label > span,
.meta span,
.status-grid span {
  color: var(--muted);
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  padding: 12px 13px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 123, 108, .16);
}

.suffix-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.suffix-field input {
  border-radius: 8px 0 0 8px;
}

.suffix-field > span {
  display: flex;
  align-items: center;
  max-width: 48vw;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #ece8df;
  color: var(--muted);
  padding: 0 12px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.toggle {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.toggle.inline {
  min-height: auto;
}

button,
.button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button.secondary {
  background: #ece8df;
  color: var(--ink);
}

a.secondary {
  background: #ece8df;
  color: var(--ink);
}

.status-grid,
.meta {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meta.tight {
  margin: 0;
}

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

.status-grid > div,
.meta > div,
.event {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.status-grid strong,
.event strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

code {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.tenant-list {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.tenant-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
}

.tenant-card > div {
  min-width: 0;
}

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

.tenant-card strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.admin-card {
  gap: 16px;
}

.tenant-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.alert,
.notice {
  margin-top: 18px;
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
}

.alert {
  background: #fee4e2;
  color: var(--danger);
}

.notice {
  background: #dcfce7;
  color: #166534;
}

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

.event span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .panel {
    padding: 22px;
  }

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

  .topbar {
    align-items: flex-start;
  }
}
