/* Shared account shell and refinements for the field tools. */
:root {
  --ink: #18372f;
  --muted: #62736b;
  --paper: #f5f6f0;
  --line: #dfe5dc;
  --green: #176b45;
  --soft: #eaf0e7;
  --gold: #dbb45b;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
body.workspace-page,
body.auth-page {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
.workspace-page h1,
.auth-page h1 {
  font-family: Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.12;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  margin: 10px 0 16px;
}
.workspace-page h2,
.auth-page h2 {
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 0 0 14px;
}
.workspace-page h3 {
  font-size: 1rem;
}
.workspace-page p {
  margin: 0 0 16px;
}
a {
  color: var(--green);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
[hidden] {
  display: none !important;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
input:disabled {
  background: #f1f3ee;
}
:focus-visible {
  outline: 3px solid #b6892e;
  outline-offset: 3px;
}
.workspace-page input:not([type="checkbox"]):not([type="color"]),
.workspace-page select,
.workspace-page textarea,
.auth-page input {
  display: block;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #c7d2c6;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  min-height: 44px;
}
.workspace-page input[type="color"] {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px;
}
.workspace-page label,
.auth-page label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}
.workspace-page small,
.muted,
.auth-page small {
  color: var(--muted);
}
.workspace-page .eyebrow,
.auth-page .eyebrow {
  color: #677948;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  margin: 0 0 8px;
}
.workspace-page .primary-action,
.auth-page .primary-action,
.workspace-page .secondary-action,
.workspace-page .danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 650;
  border: 1px solid transparent;
  white-space: nowrap;
}
.workspace-page .primary-action,
.auth-page .primary-action {
  background: var(--green);
  color: #fff;
}
.workspace-page .primary-action:hover,
.auth-page .primary-action:hover {
  background: #115136;
}
.workspace-page .secondary-action {
  background: white;
  color: var(--ink);
  border-color: #cdd7cb;
}
.workspace-page .danger-action {
  color: #8b332e;
  background: #fff4f0;
  border-color: #e9c9bf;
}
.text-button {
  background: none;
  border: 0;
  color: var(--green);
  padding: 8px 4px;
  min-height: 40px;
}
.danger {
  color: #a33932;
}
.workspace-header {
  min-height: 86px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 4vw;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.wordmark img {
  width: 34px;
  height: 40px;
  object-fit: contain;
}
.wordmark span {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.account-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
}
.switcher-label {
  max-width: 245px;
}
.switcher-label select {
  font-size: 0.85rem;
  padding: 8px !important;
  min-height: 36px !important;
}
.app-layout {
  max-width: 1600px;
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  margin: auto;
  min-height: calc(100vh - 155px);
}
#workspace-nav {
  padding: 38px 18px 30px 30px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#workspace-nav a {
  padding: 11px 15px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 550;
}
#workspace-nav a[aria-current="page"] {
  background: #e4eddf;
  color: var(--ink);
  font-weight: 750;
}
#workspace-nav .back-link {
  margin-bottom: 18px;
  font-size: 0.8rem;
}
.workspace-main {
  padding: 42px clamp(20px, 4vw, 64px);
  min-width: 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.page-heading p:last-child {
  margin-bottom: 0;
}
.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.search-label {
  max-width: 330px;
  width: 100%;
}
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 22px;
  margin: 24px 0;
}
.workspace-card,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.workspace-card {
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 8px #18372f03;
}
.workspace-card h2 {
  font-family: Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
  margin-top: 22px;
}
.workspace-card p {
  font-size: 0.9rem;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}
.campaign-initial {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent, var(--green));
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.6rem;
}
.role-badge {
  display: inline-block;
  border: 1px solid #dce5d7;
  border-radius: 6px;
  background: #f1f5ed;
  padding: 4px 9px;
  color: #46643b;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}
.card-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.card-open {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.9rem;
}
.panel {
  margin-bottom: 24px;
}
.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.team-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
}
.narrow {
  max-width: 760px;
}
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.stack-form p {
  margin: 0;
}
.stack-form .primary-action {
  align-self: start;
}
.form-message {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.88rem;
}
.form-message[data-tone="error"] {
  color: #a0392f;
}
.form-message[data-tone="success"] {
  color: #176b45;
}
.authorization-code-result {
  max-width: 760px;
  margin: 18px 0;
  padding: 20px;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  background: var(--soft);
}
.authorization-code-result h3 {
  margin: 0 0 8px;
}
.authorization-code-result p {
  margin: 0 0 12px;
}
.authorization-code-result input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.authorization-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.authorization-code-result #authorization-code-copy-status {
  min-height: 1.2em;
  margin: 10px 0 0;
}
.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.election-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto auto;
  align-items: end;
}
.election-row label {
  font-size: 0.85rem;
}
.member-row small {
  display: block;
  font-size: 0.78rem;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.member-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}
.member-actions select {
  width: 130px;
}
.member-row > select {
  max-width: 180px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.metric {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 22px;
}
.metric strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 2.2rem;
  font-weight: 500;
}
.metric span {
  color: var(--muted);
  font-size: 0.8rem;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.step {
  display: flex;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.87rem;
}
.step-number {
  flex: none;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--green);
}
.step p {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 7px !important;
}
.tool-card {
  text-decoration: none;
  color: var(--ink);
}
.tool-card:hover {
  border-color: #8da77d;
  box-shadow: 0 4px 20px #153d2410;
}
.tool-card h2 {
  margin-top: 10px;
}
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  border: 1px dashed #bdcbb5;
  border-radius: 16px;
  padding: 64px 24px;
  background: #fafcf7;
}
.empty-mark {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: #e4eddf;
  border-radius: 50%;
  font-size: 1.9rem;
  margin-bottom: 20px;
}
.workspace-footer {
  border-top: 1px solid var(--line);
  padding: 22px 4vw;
  color: var(--muted);
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
}
.workspace-page dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  max-width: 500px;
  width: calc(100% - 32px);
  color: var(--ink);
}
dialog::backdrop {
  background: #142c2370;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-heading h2 {
  margin: 0;
}
.dialog-heading button {
  background: transparent;
  border: 0;
  font-size: 1.7rem;
  padding: 4px 10px;
}
.workspace-page fieldset,
.auth-page fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.checkbox-row {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 10px !important;
}
.checkbox-row input {
  width: 18px;
  height: 18px;
  flex: none;
}
.invite-qr {
  display: block;
  width: 180px;
  max-width: 100%;
  margin: 15px 0;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  background: white;
  padding: 12px;
  z-index: 9999;
}
.skip-link:focus {
  top: 10px;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
}
.auth-story {
  padding: 40px 55px;
  background: #153a2f;
  color: #f8f5e8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background-image: repeating-radial-gradient(
    ellipse at 100% 0%,
    transparent 0 55px,
    #aac5970b 56px 57px,
    transparent 58px 90px
  );
}
.auth-story .wordmark {
  color: #fff;
}
.auth-story .wordmark span,
.auth-story small {
  color: #b7c8b6;
}
.auth-story .eyebrow {
  color: #d6b765;
}
.auth-story h1 {
  font-size: clamp(3rem, 5vw, 5.5rem);
  line-height: 1.04;
  margin: 24px 0;
}
.auth-story p:not(.eyebrow) {
  color: #c0cfc2;
  max-width: 360px;
  font-size: 1.05rem;
}
.auth-story > div {
  padding: 50px 0;
}
.auth-main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 45px 35px;
}
.auth-card {
  max-width: 440px;
  width: 100%;
}
.auth-card h2 {
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: 2.25rem;
}
.auth-card .primary-action {
  width: 100%;
  align-self: stretch;
}
.auth-alternate {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 20px;
  font-size: 0.85rem;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.photo-choice {
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #e9ede3;
  min-height: 55px;
}
.photo-choice img {
  width: 100%;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}
.photo-choice[aria-pressed="true"] {
  border-color: var(--green);
  box-shadow: 0 0 0 2px #9ac9a4;
}
.photo-choice:hover {
  border-color: #84a88d;
}
/* Make retained field pages calmer, responsive, and comfortable on touch screens. */
.campaign-app-page {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  --shadow: 0 3px 12px #18372f09;
}
.campaign-app-page::before,
.campaign-app-page::after {
  display: none;
}
.campaign-app-page .campaign-topbar-brand {
  color: var(--ink);
}
.campaign-app-page .campaign-topbar-brand small {
  color: var(--muted);
}
.campaign-app-page .campaign-topbar {
  border: 1px solid var(--line);
  border-radius: 14px;
}
.campaign-app-page .campaign-topbar-actions {
  flex: 1;
  justify-content: flex-end;
  flex-direction: row;
  flex-wrap: wrap;
}
.campaign-app-page .campaign-topbar .secondary-action {
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  border-radius: 8px;
}
.campaign-app-page .campaign-panel {
  background: #fff;
  border: 1px solid var(--line);
}
.campaign-app-page .eyebrow {
  color: #56733e;
  font-weight: 700;
}
.campaign-app-page .campaign-hero-card .eyebrow {
  color: #d6bd7e;
}
.campaign-app-page .campaign-hero-card {
  border-radius: 16px;
  background: #183c30;
}
.workspace-page select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #62736b 50%),
    linear-gradient(135deg, #62736b 50%, transparent 50%) !important;
  background-position:
    calc(100% - 17px) center,
    calc(100% - 12px) center !important;
  background-size: 5px 5px !important;
  background-repeat: no-repeat !important;
  padding-right: 32px !important;
}
.workspace-page .switcher-label select {
  padding-right: 32px !important;
}
@media (max-width: 760px) {
  .workspace-page input,
  .workspace-page select,
  .workspace-page textarea,
  .auth-page input {
    font-size: 16px;
  }
  .campaign-app-page .campaign-topbar-actions {
    justify-content: flex-start;
  }
  .campaign-app-page .campaign-topbar {
    gap: 12px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .switcher-label {
    flex: 1;
  }
  .account-link {
    font-size: 0.78rem;
    max-width: 110px;
  }
  .header-actions .text-button {
    font-size: 0.8rem;
  }
}
.campaign-app-page {
  background: #f5f6f0 !important;
}
.campaign-app-page .campaign-topbar {
  flex-wrap: wrap;
  gap: 12px;
  background: #fff;
  color: #18372f;
  padding: 18px 24px;
}
.campaign-app-page .campaign-topbar-actions {
  flex-wrap: wrap;
  gap: 8px;
}
.campaign-app-page .secondary-action {
  min-height: 42px;
}
.campaign-app-page .campaign-panel {
  border-radius: 14px;
}
.campaign-app-page .turf-hero-branded {
  padding: 24px;
}
.campaign-app-page .turf-page-title {
  font-size: 2rem;
}
.campaign-app-page .turf-instruction-list {
  font-size: 0.88rem;
}
.campaign-app-page .volunteer-device-bar {
  display: none !important;
}
@media (max-width: 1100px) {
  .team-layout {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .app-layout {
    grid-template-columns: 175px minmax(0, 1fr);
  }
  #workspace-nav {
    padding-left: 16px;
  }
  .workspace-main {
    padding: 30px 24px;
  }
}
@media (max-width: 760px) {
  .workspace-header {
    padding: 14px 18px;
    align-items: start;
    flex-wrap: wrap;
  }
  .header-actions {
    gap: 12px;
    flex-wrap: wrap;
  }
  .account-link {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .app-layout {
    display: block;
  }
  #workspace-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 3px;
  }
  #workspace-nav a {
    white-space: nowrap;
    padding: 9px 12px;
  }
  #workspace-nav .back-link {
    margin: 0;
  }
  .workspace-main {
    padding: 26px 18px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .search-label {
    max-width: none;
  }
  .two-column {
    grid-template-columns: 1fr;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 1.8rem;
  }
  .panel,
  .workspace-card {
    padding: 21px;
  }
  .workspace-grid {
    gap: 16px;
  }
  .member-row {
    align-items: start;
    flex-direction: column;
  }
  .member-actions {
    justify-content: start;
  }
  .workspace-footer span {
    display: none;
  }
  .auth-page {
    display: block;
  }
  .auth-story {
    min-height: auto;
    padding: 24px;
  }
  .auth-story > div,
  .auth-story > small {
    display: none;
  }
  .auth-main {
    padding: 34px 22px;
  }
  .auth-card {
    max-width: 440px;
  }
  .switcher-label {
    max-width: 190px;
  }
  .campaign-app-page .campaign-topbar {
    padding: 12px;
  }
  .campaign-app-page .campaign-topbar-actions {
    max-width: 100%;
    overflow: auto;
  }
  .campaign-app-page .turf-instruction-list {
    display: none;
  }
  .campaign-app-page .campaign-shell {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
