:root {
  --panel: #202426;
  --ink: #182020;
  --muted: #687370;
  --line: #d7ded7;
  --bg: #f5f6f1;
  --accent: #0d7f74;
  --accent-soft: #dff3ef;
  --danger: #c93d35;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel,
.app-panel {
  width: min(100%, 460px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 46px rgba(24, 32, 32, .12);
}

.login-brand,
.app-header,
.toolbar,
.card-header,
.share-row,
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, #276fbf, #174a8b);
  font-weight: 900;
}

h1,
h2,
p {
  margin: 0;
}

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

h2 {
  font-size: 16px;
}

p,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.login-form,
.stack,
.section,
.planner-list,
.share-list,
.user-list {
  display: grid;
  gap: 12px;
}

.login-form {
  margin-top: 22px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fbfcf9;
  text-transform: none;
  letter-spacing: 0;
}

.login-form button,
.primary-button {
  min-height: 40px;
  color: white;
  background: var(--accent);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink);
  background: #e9efeb;
  text-decoration: none;
}

.danger-button {
  min-height: 34px;
  padding: 0 10px;
  color: white;
  background: var(--danger);
}

.form-message {
  min-height: 18px;
  color: var(--danger);
  font-weight: 700;
}

.seed-note {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
  background: #eef3ef;
  font-size: 12px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.app-header {
  justify-content: space-between;
  padding: 14px 18px;
  color: white;
  background: var(--panel);
}

.app-header a,
.app-header button {
  color: #dce5e1;
}

.app-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header a,
.link-button {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.content-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px 18px 42px;
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.create-form,
.share-form,
.user-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 84px 132px auto;
  gap: 8px;
  align-items: end;
}

.share-form,
.user-form {
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 170px) auto;
}

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

.card-header {
  justify-content: space-between;
}

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

.planner-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.planner-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: white;
  background: var(--planner-icon-bg, linear-gradient(135deg, #276fbf, #174a8b));
  font-size: 17px;
  font-weight: 900;
}

.planner-icon.small {
  font-size: 12px;
}

.planner-identity-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 72px 132px auto;
  gap: 8px;
  align-items: end;
}

.public-link-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #f4f7f3;
}

.public-link-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 6px;
  align-items: center;
}

.rights-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #0d342e;
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
}

.share-row,
.user-row {
  justify-content: space-between;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f4f7f3;
  font-size: 13px;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 16px;
  align-items: start;
}

@media (max-width: 760px) {
  .grid-two,
  .create-form,
  .planner-identity-form,
  .share-form,
  .user-form,
  .public-link-actions {
    grid-template-columns: 1fr;
  }

  .app-header,
  .toolbar,
  .card-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
