:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --panel: #ffffff;
  --text: #172026;
  --muted: #65727c;
  --line: #dbe3e8;
  --accent: #0f766e;
  --danger: #b42318;
  --ok: #117b34;
  --shadow: 0 12px 35px rgba(22, 31, 39, 0.08);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

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

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

.topbar p,
.message,
.meta,
.empty {
  color: var(--muted);
}

.token {
  width: min(360px, 100%);
}

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

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--text);
  padding: 9px 11px;
}

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

.panel {
  padding: 20px;
}

.form {
  display: grid;
  gap: 16px;
}

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

button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  padding: 0 16px;
  cursor: pointer;
  justify-self: start;
}

button.secondary {
  background: #e8eef1;
  color: var(--text);
}

button.danger {
  background: var(--danger);
}

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

.list {
  margin-top: 20px;
  overflow: hidden;
}

.listHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.subscriptions {
  display: grid;
}

.sub {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.sub:last-child {
  border-bottom: 0;
}

.title {
  font-weight: 700;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #e6f4ea;
  color: var(--ok);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.badge.revoked {
  background: #fff0ee;
  color: var(--danger);
}

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

.empty {
  padding: 24px 18px;
}

@media (max-width: 900px) {
  .topbar,
  .sub {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

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

  .actions {
    justify-content: start;
  }
}

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

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