:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #172522;
  background: #f3f6f5;
  --accent: #185e4c;
  --muted: #4a625b;
  --line: #d7e2de;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: var(--accent); }
.skip { position: absolute; top: -4rem; left: 1rem; z-index: 1; background: white; padding: .6rem 1rem; }
.skip:focus { top: .5rem; }
:focus-visible { outline: 3px solid #176a56; outline-offset: 3px; }
.topbar { background: #183c34; color: white; }
.topbar-inner {
  min-height: 4.5rem;
  max-width: 78rem;
  padding: .65rem clamp(1rem, 3vw, 2rem);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .75rem; font-weight: 700; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 2.15rem;
  height: 2.15rem;
  border-radius: .5rem;
  background: #c5ebd9;
  color: #183c34;
}
.topbar button { white-space: nowrap; }
main { max-width: 78rem; padding: clamp(1rem, 3vw, 2rem); margin: 0 auto; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); line-height: 1.14; letter-spacing: -.035em; }
h2 { font-size: 1.25rem; letter-spacing: -.017em; }
.muted, .hint, .empty, .account-identity span { color: var(--muted); }
.page-heading { margin: .6rem 0 1.6rem; }
.page-heading p, .auth > p { margin-top: .5rem; }
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  min-width: 0;
  box-shadow: 0 2px 6px #163a3010;
}
.workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 1fr); align-items: start; gap: 1rem; }
.auth { max-width: 31rem; margin: clamp(1.5rem, 7vw, 5rem) auto; padding: clamp(1rem, 4vw, 2rem); }
.auth h1 { font-size: clamp(1.55rem, 4vw, 2.15rem); }
.stack { display: grid; gap: .9rem; margin-top: 1.25rem; }
.name-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 650; min-width: 0; }
input, textarea, button { font: inherit; }
input, textarea {
  width: 100%;
  min-height: 2.7rem;
  padding: .5rem .65rem;
  border: 1px solid #aebfb8;
  border-radius: .4rem;
  background: #fff;
  color: #172522;
}
input[type=color] { padding: .2rem; width: 3.75rem; }
textarea { resize: vertical; }
.operator-tools, .operator-tools nav { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; }
.operator-tools a { color:white; padding:.25rem; }
.catalog-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; align-items:start; }
.catalog-item { display:grid; gap:.2rem; padding:.7rem 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.catalog-item span { color:var(--muted); }
.hint { font-size: .88rem; margin-top: -.65rem; }
button {
  min-height: 2.65rem;
  padding: .45rem .8rem;
  border-radius: .45rem;
  border: 1px solid transparent;
  font-weight: 650;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: default; }
.primary { color: #fff; background: var(--accent); }
.primary:hover:not(:disabled) { background: #124a3c; }
.secondary { color: #184738; border-color: #b6c8c0; background: #ffffff; }
.secondary:hover { background: #eaf3ef; }
.section-title { display: flex; align-items: center; gap: .65rem; }
.count { font-weight: 700; padding: .05rem .55rem; background: #eaf2ef; border-radius: 2rem; }
.empty { padding: 1.35rem 0 .4rem; }
.accounts { list-style: none; padding: 0; margin: .65rem 0 0; }
.account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: .4rem .8rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.account:last-child { border-bottom: 0; padding-bottom: .1rem; }
.account-identity { display: grid; gap: .15rem; overflow-wrap: anywhere; min-width: 0; }
.account-identity span, .row-actions button { font-size: .875rem; }
.status { padding: .17rem .55rem; border-radius: 2rem; font-size: .875rem; font-weight: 650; }
.status--invited { background: #fff1d2; color: #684715; }
.status--active { background: #d9eee2; color: #174535; }
.status--suspended { background: #f6e8e4; color: #713e34; }
.row-actions, .pagination, .copy-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.row-actions { grid-column: 1 / -1; margin-top: .2rem; }
.pagination { margin-top: 1rem; }
.notice {
  padding: .75rem 1rem;
  border-radius: .45rem;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}
.notice--error { color: #742d28; background: #fcecea; }
.notice--success { color: #134a37; background: #e0f1e7; }
.link-card { margin-bottom: 1rem; }
.link-card p { margin-top: .35rem; }
.copy-row { margin-top: .8rem; }
.copy-row input { flex: 1 1 15rem; min-width: 0; }
.copy-status:not(:empty) { min-height: 1.5rem; color: var(--muted); }
[hidden] { display: none; }

@media (max-width: 48rem) {
  .catalog-grid { grid-template-columns:1fr; }
  .workspace { grid-template-columns: 1fr; }
  .workspace > section:nth-child(2) { grid-row: 1; }
}
@media (max-width: 25rem) {
  .name-fields { grid-template-columns: 1fr; }
  .brand { gap: .4rem; }
  .brand-mark { display: none; }
}
