:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --card: #fff;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #d6d3d1;
  --accent: #1d4ed8;
  --accent-ink: #fff;
  --ok: #166534;
  --ok-bg: #dcfce7;
  --err: #991b1b;
  --err-bg: #fee2e2;
  --info: #1e3a8a;
  --info-bg: #dbeafe;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.bar h1 {
  margin: 0;
  font-size: 1.1rem;
}

.card {
  max-width: 28rem;
  margin: 2.5rem auto;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card.wide {
  max-width: 48rem;
}

h1,
h2 {
  font-weight: 650;
}

.lede,
.muted {
  color: var(--muted);
}

label {
  display: block;
  margin: 0.85rem 0 0.3rem;
  font-size: 0.9rem;
}

input,
select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

input[readonly] {
  background: #f5f5f4;
  color: var(--muted);
}

button {
  margin-top: 1rem;
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  cursor: pointer;
}

button[hidden] {
  display: none;
}

.status {
  margin-top: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 4px;
}

.status.success {
  color: var(--ok);
  background: var(--ok-bg);
}

.status.error {
  color: var(--err);
  background: var(--err-bg);
}

.status.info {
  color: var(--info);
  background: var(--info-bg);
}

#invite-console,
#team-console,
#team-readonly,
#user-console {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

#invite-console h3,
#team-console h3,
#team-readonly h3,
#user-console h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1.05rem;
}

#team-readonly .team-id {
  margin-top: 0;
  font-size: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
}

#invite-list,
#team-list,
#user-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#invite-list th,
#invite-list td,
#team-list th,
#team-list td,
#user-list th,
#user-list td {
  text-align: left;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

#invite-list button,
#team-list button,
#user-list button {
  margin-top: 0;
  margin-right: 0.35rem;
  padding: 0.3rem 0.55rem;
}

#invite-list button.secondary,
#team-list button.secondary,
#user-list button.secondary,
button.secondary {
  background: #57534e;
}

#user-list button.danger,
button.danger {
  background: var(--err);
}

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

#invite-link-box {
  margin-top: 1rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(28, 25, 23, 0.45);
}

.modal[hidden] {
  display: none;
}

.modal-card {
  width: min(28rem, 100%);
  padding: 1.25rem 1.35rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal-card h3 {
  margin: 0 0 0.5rem;
}

.modal-card p {
  margin: 0 0 0.5rem;
}

#delete-error {
  margin-top: 0.75rem;
}

#activity-log-console {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

#activity-log-console h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1.05rem;
}

#activity-log-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#activity-log-list th,
#activity-log-list td {
  text-align: left;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

#activity-log-list td.ua {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#activity-log-export {
  margin-top: 0.5rem;
}
