:root {
  color-scheme: light;
  --ink: #202d3b;
  --muted: #6d7883;
  --paper: #f6f7f5;
  --line: #e5e9e7;
  --accent: #147d70;
  --soft: #e7f3ee;
  --danger: #b74343;
  font:
    14px/1.5 Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
.button {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
button:hover,
.button:hover {
  background: #eef3f0;
  border-color: #c6d8d0;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
.primary:hover {
  background: #106b60;
  color: #fff;
  border-color: #106b60;
}
.quiet {
  background: transparent;
  border-color: transparent;
}
.danger {
  color: var(--danger);
}
a {
  color: var(--accent);
}
input,
select,
textarea {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  min-width: 0;
}
input[type="checkbox"] {
  accent-color: var(--accent);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #62b9a7;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -1px;
  min-width: 196px;
  flex-shrink: 0;
}
.brand-symbol {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  width: 34px;
  height: 36px;
  border-radius: 10px;
  font: italic 31px Georgia;
}
.workspace-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}
.workspace-nav a {
  padding: 9px 11px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 7px;
}
.workspace-nav a:hover {
  background: var(--paper);
  color: var(--ink);
}
.workspace-nav a[aria-current="page"] {
  background: var(--soft);
  color: var(--accent);
  font-weight: 650;
}
.topbar .account {
  margin-left: auto;
  max-width: 250px;
}
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100dvh - 78px);
}
.sidebar {
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar > .primary {
  margin-bottom: 25px;
  padding: 12px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 8px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title button {
  padding: 3px 8px;
  font-size: 20px;
}
.collection-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.collection-row > button:first-child {
  flex: 1;
  text-align: left;
  white-space: normal;
  min-width: 0;
  overflow-wrap: anywhere;
}
.collection-row button {
  background: transparent;
  border-color: transparent;
  font-size: 13px;
}
.collection-row.active {
  background: var(--soft);
  border-radius: 7px;
}
.collection-row.active > button {
  color: var(--accent);
  font-weight: 600;
}
.collection-row .more {
  padding: 7px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  background: var(--accent);
  margin-right: 8px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
  display: grid;
  gap: 7px;
}
.sidebar-bottom button {
  text-align: left;
  background: transparent;
  font-size: 13px;
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 13px;
  line-height: 1.6;
}
.workspace {
  min-width: 0;
  padding: 30px 32px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}
.page-heading h1 {
  font-size: 29px;
  letter-spacing: -0.8px;
  line-height: 1.3;
  margin: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.toolbar input {
  min-width: 140px;
}
.search {
  width: min(340px, 100%);
  background: white;
}
.status {
  margin: 0;
  background: var(--soft);
  padding: 10px 28px;
  color: #236b5e;
  font-size: 13px;
  white-space: pre-wrap;
}
.status:empty {
  display: none;
}
.status.error {
  background: #fff0ed;
  color: var(--danger);
}
.empty {
  text-align: center;
  padding: 70px 24px;
  color: var(--muted);
}
.empty h2 {
  font-size: 20px;
  color: var(--ink);
  font-weight: 550;
}
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.card-heading {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-heading h2 {
  margin: 0;
  font-size: 19px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 15px;
  font-weight: 650;
}
dialog {
  width: min(740px, 94vw);
  max-height: 92dvh;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 26px;
  color: var(--ink);
  box-shadow: 0 30px 100px #16392b30;
}
dialog::backdrop {
  background: #1a2c3d66;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 15px;
}
.dialog-heading h2 {
  margin: 0;
}
.close {
  font-size: 24px;
  padding: 1px 9px;
  line-height: 1.3;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .full {
  grid-column: 1/-1;
}
label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #52616c;
}
textarea {
  width: 100%;
  min-height: 95px;
  resize: vertical;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.form-section {
  padding: 19px 0;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.form-section h3 {
  margin: 0 0 12px;
}
.form-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 22px;
}
.form-footer .spacer {
  flex: 1;
}
.form-error {
  color: var(--danger);
  background: #fff0ed;
  padding: 10px 13px;
  border-radius: 6px;
  white-space: pre-wrap;
}
.form-error:empty {
  display: none;
}
.repeat-row {
  display: flex;
  align-items: end;
  gap: 9px;
  margin-bottom: 9px;
}
.repeat-row label {
  flex: 1;
}
.repeat-row .remove {
  font-size: 18px;
  padding: 7px 12px;
}
.repeat-row input,
.repeat-row select {
  width: 100%;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.badge {
  font-size: 10px;
  border-radius: 5px;
  padding: 3px 7px;
  background: var(--soft);
  color: var(--accent);
}
.count {
  font-size: 13px;
  color: var(--muted);
}
.import-results {
  white-space: pre-wrap;
  font-size: 12px;
}
.raw-editor {
  font:
    12px/1.6 ui-monospace,
    monospace;
  min-height: 270px;
}
.skip-link {
  position: fixed;
  top: -100px;
  z-index: 100;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  top: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.loading {
  opacity: 0.65;
  pointer-events: none;
}
.error-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.collection-check {
  width: 100%;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px 4px;
}
.collection-check input {
  flex: none;
}
.collection-check span {
  overflow-wrap: anywhere;
}
.collection-check .dot {
  flex-shrink: 0;
}
.mobile-only {
  display: none;
}
@media (max-width: 1050px) {
  .topbar {
    height: auto;
    min-height: 78px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .topbar .workspace-nav {
    order: 5;
    width: 100%;
  }
  .layout {
    min-height: calc(100dvh - 120px);
  }
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .workspace {
    padding: 24px 20px;
  }
  .sidebar {
    padding: 24px 12px;
  }
  .topbar {
    padding: 0 20px;
    gap: 14px;
  }
  .brand {
    min-width: 165px;
  }
  .workspace-nav a {
    padding: 8px;
  }
  .page-heading {
    align-items: start;
    flex-wrap: wrap;
  }
  .topbar .account {
    max-width: 190px;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: auto;
    min-height: 72px;
    padding: 14px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .brand {
    font-size: 22px;
    min-width: 0;
    flex: 1;
  }
  .workspace-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .workspace-nav a {
    flex: 1;
    text-align: center;
  }
  .topbar .account {
    max-width: 180px;
    font-size: 12px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 15px;
    gap: 8px;
  }
  .sidebar > .primary {
    margin: 0 0 8px;
  }
  .sidebar .section-title {
    margin-top: 8px;
  }
  #collections {
    display: flex;
    overflow: auto;
    gap: 5px;
  }
  .collection-row {
    flex-shrink: 0;
    max-width: 220px;
  }
  .sidebar-bottom {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
  }
  .sidebar-bottom button {
    min-height: 40px;
  }
  .sidebar-bottom .hint {
    display: none;
  }
  .workspace {
    padding: 22px 14px;
  }
  .page-heading {
    margin-bottom: 18px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .repeat-row {
    flex-wrap: wrap;
  }
  .repeat-row label {
    min-width: 100px;
  }
  dialog {
    padding: 20px;
  }
  .status {
    padding: 10px 14px;
  }
  .mobile-only {
    display: block;
  }
  .toolbar button,
  .toolbar select {
    min-height: 40px;
    font-size: 12px;
  }
}

.sharing-section {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.sharing-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0;
}
.sharing-row > div {
  flex: 1;
  min-width: 160px;
}
.sharing-row small {
  display: block;
  color: var(--muted);
}
.sharing-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 20px;
}
.sharing-form label {
  flex: 1;
  min-width: 150px;
}
@media (max-width: 600px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
  }
  .topbar .brand {
    grid-column: 1;
    grid-row: 1;
  }
  .topbar #refresh {
    grid-column: 2;
    grid-row: 1;
  }
  .topbar #logout {
    grid-column: 3;
    grid-row: 1;
  }
  .topbar .account {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
  }
  .topbar .workspace-nav {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

.shared-add {
  width: 100%;
  margin: 12px 0;
  text-align: left;
  font-size: 12px;
}
