:root {
  color-scheme: light;
  --forest: #173d39;
  --forest-deep: #102e2b;
  --ink: #152927;
  --muted: #667773;
  --line: #e0e8e3;
  --canvas: #f4f7f4;
  --white: #fff;
  --orange: #d85835;
  --mint: #e5f2ec;
  --shadow: 0 20px 60px rgba(16, 46, 43, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.login-view {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.2rem;
  background:
    radial-gradient(ellipse at 12% 90%, rgba(216, 88, 53, 0.13), transparent 32%),
    radial-gradient(ellipse at 90% 10%, rgba(49, 119, 95, 0.18), transparent 34%),
    #f3f6f2;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.login-brand > div:last-child,
.sidebar-brand > span:last-child {
  display: grid;
  gap: 0.12rem;
}

.login-brand strong,
.sidebar-brand strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.login-brand span:not(.brand-mark) {
  color: var(--muted);
  font-size: 0.8rem;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--forest);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.login-card {
  width: min(100%, 430px);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid rgba(224, 232, 227, 0.8);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.preview-label,
.sample-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  color: #8f482f;
  background: #fff0e8;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.login-card .eyebrow {
  margin: 1.6rem 0 0.55rem;
}

.eyebrow {
  color: #b04f31;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.login-card h1,
.dashboard-topbar h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.045em;
}

.login-card h1 {
  font-size: clamp(2rem, 8vw, 2.5rem);
}

.login-intro {
  margin: 0.55rem 0 1.6rem;
  color: var(--muted);
  line-height: 1.6;
}

.login-card form {
  display: grid;
  gap: 0.55rem;
}

.login-card label {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.login-card input,
.sales-editor input,
.search-box input {
  min-width: 0;
  border: 1px solid #d8e2dc;
  color: var(--ink);
  background: #fff;
}

.login-card input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
}

.login-card input:focus,
.sales-editor input:focus,
.search-box input:focus {
  outline: 3px solid rgba(49, 119, 95, 0.18);
  border-color: #367b68;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--forest);
  color: #fff;
  background: var(--forest);
}

.primary-button:hover {
  background: var(--forest-deep);
}

.full-width {
  width: 100%;
  margin-top: 0.8rem;
}

.login-footnote {
  margin: 1rem 0 0;
  color: #74817d;
  font-size: 0.72rem;
  line-height: 1.55;
}

.form-status {
  min-height: 1.2em;
  margin: 0.65rem 0 0;
  color: #536661;
  font-size: 0.75rem;
  line-height: 1.45;
}

.form-status.error,
.email-error {
  color: #a43f2b;
}

.form-status.success {
  color: #286c59;
}

.text-button {
  margin-top: 1.1rem;
  padding: 0;
  border: 0;
  color: var(--forest);
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.text-button:hover {
  color: var(--orange);
}

.login-copyright {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.dashboard-view {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  width: 250px;
  flex-direction: column;
  padding: 1.4rem 1rem 1rem;
  color: #e7f0ec;
  background: var(--forest-deep);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.1rem 0.45rem 2rem;
  color: #fff;
  text-decoration: none;
}

.sidebar-brand .brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-brand strong {
  font-size: 0.85rem;
}

.sidebar-brand small {
  color: #b7c9c2;
  font-size: 0.72rem;
}

.nav-label {
  margin: 0 0 0.55rem 0.7rem;
  color: #8ba79e;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.sidebar nav {
  display: grid;
  gap: 0.3rem;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 42px;
  padding: 0 0.7rem;
  border-radius: 8px;
  color: #c0d0ca;
  font-size: 0.84rem;
  text-decoration: none;
}

.workspace-switcher {
  display: grid;
  gap: 0.3rem;
}

.workspace-link {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 8px;
  color: #c0d0ca;
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
}

.workspace-link > span:first-child {
  width: 20px;
  font-size: 1rem;
  text-align: center;
}

.workspace-link:hover,
.workspace-link.selected {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.workspace-link .nav-count {
  margin-left: auto;
}

.workflow-nav-label {
  margin-top: 1.55rem;
}

.side-link span {
  width: 20px;
  font-size: 1.1rem;
  text-align: center;
}

.side-link:hover,
.side-link.selected {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  padding: 1rem 0.35rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.account-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #eaf3ef;
  background: #426960;
  font-size: 0.7rem;
  font-weight: 700;
}

.account-name {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
  font-size: 0.72rem;
}

.account-name small {
  color: #a9bdb6;
  font-size: 0.66rem;
}

.icon-button {
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 0;
  border-radius: 7px;
  color: #e7f0ec;
  background: transparent;
  font-size: 1.2rem;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dashboard-main {
  width: min(1500px, calc(100% - 250px));
  margin-left: 250px;
  padding: 2rem clamp(1.2rem, 3vw, 3rem) 1.2rem;
}

.dashboard-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dashboard-topbar .eyebrow {
  margin: 0 0 0.45rem;
}

.dashboard-topbar h1 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sample-badge {
  color: #835620;
  background: #fff3d5;
}

.sample-badge span {
  color: #dc9d2e;
  font-size: 0.55rem;
}

.secondary-button {
  border: 1px solid #d8e2dc;
  color: var(--forest);
  background: #fff;
}

.secondary-button:hover {
  background: #f3f7f4;
}

.demo-notice {
  margin-bottom: 1.2rem;
  padding: 0.8rem 1rem;
  border: 1px solid #f3dfb4;
  border-radius: 8px;
  color: #765c2b;
  background: #fff9e9;
  font-size: 0.78rem;
  line-height: 1.55;
}

.demo-notice strong {
  color: #59431f;
}

.dashboard-status {
  margin-bottom: 1rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid #c8e1d1;
  border-radius: 8px;
  color: #286448;
  background: #eef8f1;
  font-size: 0.78rem;
  line-height: 1.5;
}

.dashboard-status.error {
  border-color: #efc8be;
  color: #963f2d;
  background: #fff3ef;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.3rem;
}

.metric-card,
.accounts-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(21, 41, 39, 0.025);
}

.metric-card {
  min-width: 0;
  padding: 1rem;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.metric-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  font-weight: 700;
}

.metric-icon.green {
  color: #2f705c;
  background: #e6f3ec;
}

.metric-icon.orange {
  color: #bb5935;
  background: #fff0e8;
}

.metric-icon.blue {
  color: #4777a0;
  background: #eaf2f8;
}

.metric-icon.gold {
  color: #92712c;
  background: #f8f1dd;
}

.metric-value {
  display: block;
  margin-top: 0.55rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  letter-spacing: -0.06em;
}

.metric-caption {
  display: block;
  margin-top: 0.16rem;
  color: #7a8984;
  font-size: 0.67rem;
}

.accounts-panel {
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.3rem;
}

.panel-heading .eyebrow {
  margin: 0 0 0.4rem;
}

.panel-heading h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.panel-heading p:not(.eyebrow) {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.search-box {
  display: flex;
  width: min(245px, 36%);
  min-height: 39px;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.65rem;
  border: 1px solid #d8e2dc;
  border-radius: 8px;
  color: #70817b;
  background: #fff;
}

.search-box > span:first-child {
  font-size: 1.25rem;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 0;
  border: 0;
  outline: 0;
  font-size: 0.75rem;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

thead {
  background: #f7f9f7;
}

th {
  padding: 0.7rem 0.8rem;
  color: #71807b;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 0.9rem 0.8rem;
  border-top: 1px solid #edf1ee;
  color: #485a55;
  font-size: 0.75rem;
  vertical-align: top;
}

.troop-cell {
  min-width: 145px;
}

.troop-cell strong,
.contact-cell strong {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
}

.troop-cell span,
.contact-cell span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.contact-cell {
  min-width: 148px;
}

.contact-cell span {
  max-width: 170px;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  color: #8a6223;
  background: #fff3d7;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.listed {
  color: #2e6b54;
  background: #e5f3eb;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.sales-cell {
  min-width: 146px;
}

.sales-editor {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sales-editor input {
  width: 58px;
  height: 32px;
  padding: 0 0.35rem;
  border-radius: 6px;
  font-size: 0.78rem;
}

.sales-editor button {
  min-height: 32px;
  padding: 0 0.5rem;
  border: 1px solid #dce7e0;
  border-radius: 6px;
  color: var(--forest);
  background: #f5f8f6;
  font-size: 0.68rem;
  font-weight: 700;
}

.sales-editor button:hover {
  border-color: #aac5b7;
  background: var(--mint);
}

.sales-help {
  display: block;
  margin-top: 0.25rem;
  color: #85928e;
  font-size: 0.62rem;
}

.payout-cell {
  color: var(--forest);
  font-weight: 700;
  white-space: nowrap;
}

.notes-cell {
  min-width: 115px;
  max-width: 190px;
  color: #64746f;
  line-height: 1.45;
}

.empty-search {
  margin: 0;
  padding: 1.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.mobile-account-list {
  display: none;
}

.dashboard-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.2rem;
  color: #81908a;
  font-size: 0.68rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 1100px) {
  .sidebar {
    width: 215px;
  }

  .dashboard-main {
    width: calc(100% - 215px);
    margin-left: 215px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .sidebar-brand {
    padding: 0;
  }

  .sidebar-brand .brand-mark {
    width: 36px;
    height: 36px;
  }

  .sidebar > .nav-label {
    display: none;
  }

  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 0.35rem;
    margin-top: 0.7rem;
  }

  .side-link {
    min-height: 36px;
    flex: 0 0 auto;
    padding: 0 0.6rem;
    font-size: 0.75rem;
  }

  .sidebar-bottom {
    display: none;
  }

  .dashboard-main {
    width: 100%;
    margin: 0;
    padding: 1.2rem 1rem;
  }

  .dashboard-topbar {
    align-items: start;
  }

  .dashboard-topbar h1 {
    font-size: 1.55rem;
  }

  .topbar-actions {
    align-items: end;
    flex-direction: column;
    gap: 0.45rem;
  }

  .sample-badge {
    font-size: 0.58rem;
  }

  .secondary-button {
    min-height: 34px;
    padding: 0.4rem 0.55rem;
    font-size: 0.7rem;
  }

  .metric-grid {
    gap: 0.6rem;
  }

  .metric-card {
    padding: 0.75rem;
  }

  .metric-top {
    align-items: start;
    font-size: 0.67rem;
  }

  .metric-value {
    font-size: 1.6rem;
  }

  .panel-heading {
    align-items: stretch;
    flex-direction: column;
    padding: 1rem;
  }

  .search-box {
    width: 100%;
  }

  .table-scroll {
    display: none;
  }

  .mobile-account-list {
    display: grid;
    gap: 0.75rem;
    padding: 0 0.8rem 0.8rem;
  }

  .mobile-account-card {
    padding: 0.9rem;
    border: 1px solid #e6ece8;
    border-radius: 9px;
    background: #fff;
  }

  .mobile-card-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .mobile-account-card .troop-cell {
    min-width: 0;
  }

  .mobile-contact {
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .mobile-contact strong {
    color: var(--ink);
  }

  .mobile-account-card .sales-cell {
    margin-top: 0.75rem;
  }

  .mobile-account-card .notes-cell {
    max-width: none;
    margin-top: 0.6rem;
  }

  .dashboard-footer {
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (max-width: 400px) {
  .login-view {
    justify-content: flex-start;
    padding-top: 1.4rem;
  }

  .login-brand {
    margin-bottom: 1.25rem;
  }

  .dashboard-topbar {
    flex-direction: column;
  }

  .topbar-actions {
    align-items: start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.nav-count,
.tab-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 0.35rem;
  border-radius: 999px;
  color: #67451a;
  background: #fff0c9;
  font-size: 0.66rem;
  font-weight: 700;
}

.side-link .nav-count {
  margin-left: auto;
}

.workflow-panel {
  overflow: hidden;
}

.workflow-tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0 1.3rem;
  border-bottom: 1px solid var(--line);
}

.workflow-tab {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 47px;
  padding: 0 0.8rem;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #6d7b76;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
}

.workflow-tab:hover {
  color: var(--forest);
}

.workflow-tab.selected {
  border-bottom-color: var(--orange);
  color: var(--forest);
}

.workflow-tab.selected .tab-count {
  color: #fff;
  background: var(--forest);
}

.workflow-view {
  padding-bottom: 0.9rem;
}

.stage-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem 0.8rem;
}

.stage-intro h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
}

.stage-intro p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

.stage-hint,
.rate-hint {
  flex: 0 0 auto;
  color: #65766f;
  font-size: 0.68rem;
}

.rate-hint {
  color: #2e6b54;
  font-weight: 700;
}

.troop-card-list {
  display: grid;
  gap: 0.9rem;
  padding: 0 1.3rem;
}

.troop-profile-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e3eae5;
  border-radius: 10px;
  background: #fff;
}

.profile-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}

.profile-kicker {
  color: #a4652a;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.registered-kicker {
  color: #36745c;
}

.profile-header h4 {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.profile-subtitle {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-subtitle span {
  padding: 0 0.1rem;
}

.profile-header .status-pill {
  flex: 0 0 auto;
}

.profile-contact {
  display: grid;
  grid-template-columns: 0.85fr 1.25fr 0.9fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.75rem 0;
  border-top: 1px solid #edf1ee;
  border-bottom: 1px solid #edf1ee;
}

.profile-contact > div {
  min-width: 0;
}

.profile-contact > div > span,
.registered-finances > div > span {
  display: block;
  margin-bottom: 0.25rem;
  color: #81908a;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.profile-contact strong,
.profile-contact a {
  display: block;
  color: #354a44;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-links {
  grid-column: 1 / -1;
}

.profile-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.profile-link-actions .secondary-button {
  min-height: 34px;
  padding: 0.4rem 0.6rem;
  font-size: 0.7rem;
}

.registered-qr-preview {
  margin-top: 0.55rem;
}

.registered-qr-preview summary {
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.registered-qr-preview img {
  display: block;
  width: 140px;
  height: 140px;
  margin-top: 0.55rem;
  border: 1px solid #d8e2dc;
  border-radius: 8px;
  background: #fff;
}

.profile-contact a {
  color: #286c59;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.profile-notes {
  display: flex;
  align-items: start;
  gap: 0.4rem;
  padding-top: 0.65rem;
  color: #667773;
  font-size: 0.7rem;
  line-height: 1.45;
}

.profile-notes strong {
  flex: 0 0 auto;
  color: #435650;
}

.application-workflow,
.listing-fields,
.transfer-section {
  margin-top: 0.85rem;
  padding-top: 0.8rem;
  border-top: 1px solid #edf1ee;
}

.subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.subsection-heading h5,
.sales-update h5 {
  margin: 0;
  color: #2b403a;
  font-size: 0.77rem;
}

.subsection-heading p,
.sales-update p {
  margin: 0.2rem 0 0;
  color: #7b8984;
  font-size: 0.66rem;
  line-height: 1.45;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.8rem;
  margin-top: 0.7rem;
}

.checklist-item {
  display: flex;
  min-width: 0;
  align-items: start;
  gap: 0.5rem;
  color: #4f615b;
  font-size: 0.69rem;
  line-height: 1.4;
  cursor: pointer;
}

.checklist-item input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkmark {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #bdcbc3;
  border-radius: 4px;
  background: #fff;
}

.checklist-item input:focus-visible + .checkmark {
  outline: 3px solid rgba(49, 119, 95, 0.2);
}

.checklist-item input:checked + .checkmark {
  border-color: #33755d;
  color: #fff;
  background: #33755d;
}

.checklist-item input:checked + .checkmark::after {
  content: "✓";
  font-size: 0.72rem;
  font-weight: 700;
}

.checklist-item.complete > span:last-child {
  color: #36745c;
}

.checklist-item small {
  display: block;
  margin-top: 0.15rem;
  color: #8a9792;
  font-size: 0.62rem;
}

.listing-input-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.7rem;
  margin-top: 0.65rem;
}

.listing-input-grid label,
.transfer-form label {
  display: grid;
  min-width: 0;
  gap: 0.32rem;
  color: #52635d;
  font-size: 0.66rem;
  font-weight: 700;
}

.listing-input-grid input,
.transfer-form input,
.registered-sales-input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0.5rem 0.6rem;
  border: 1px solid #d8e2dc;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 0.7rem;
}

.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.listing-actions button,
.subsection-heading .secondary-button {
  min-height: 34px;
  padding: 0.45rem 0.65rem;
  font-size: 0.66rem;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.mock-action-note {
  margin: 0.5rem 0 0;
  color: #899590;
  font-size: 0.61rem;
  line-height: 1.4;
}

.email-error {
  margin: 0.6rem 0 0;
  font-size: 0.69rem;
  line-height: 1.5;
}

.registered-finances {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.registered-finances > div {
  min-width: 0;
  padding: 0.65rem;
  border-radius: 7px;
  background: #f6f8f6;
}

.registered-finances > .available-balance {
  background: #eaf4ee;
}

.registered-finances > div > span {
  min-height: 1.4em;
  font-size: 0.54rem;
  letter-spacing: 0.045em;
}

.registered-finances strong {
  display: block;
  color: #263b35;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.registered-finances small {
  display: block;
  margin-top: 0.1rem;
  color: #80908a;
  font-size: 0.6rem;
}

.available-balance strong {
  color: #287052;
}

.sales-update {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.7rem;
  padding: 0.65rem 0;
  border-top: 1px solid #edf1ee;
}

.sales-update .sales-editor {
  flex: 0 0 auto;
}

.sales-update .registered-sales-input {
  width: 80px;
}

.sales-update .sales-editor button {
  min-height: 36px;
  padding: 0 0.65rem;
  border: 1px solid #dce7e0;
  border-radius: 6px;
  color: var(--forest);
  background: #f5f8f6;
  font-size: 0.67rem;
  font-weight: 700;
}

.transfer-table-wrap {
  overflow-x: auto;
  margin-top: 0.6rem;
}

.transfer-table {
  min-width: 420px;
  font-size: 0.67rem;
}

.transfer-table th {
  padding: 0.45rem 0.55rem;
  font-size: 0.56rem;
}

.transfer-table td {
  padding: 0.5rem 0.55rem;
  font-size: 0.67rem;
}

.transfer-table th:last-child,
.transfer-table td:last-child {
  text-align: right;
}

.no-transfers {
  margin: 0.6rem 0 0;
  color: #7c8a85;
  font-size: 0.68rem;
}

.transfer-form {
  display: grid;
  grid-template-columns: 0.75fr 0.9fr 1.2fr auto;
  align-items: end;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.transfer-form button {
  min-height: 36px;
  padding: 0.45rem 0.65rem;
  white-space: nowrap;
  font-size: 0.66rem;
}

.transfer-validation {
  margin: 0.4rem 0 0;
  color: #a84027;
  font-size: 0.67rem;
}

.email-preview-dialog {
  width: min(620px, calc(100vw - 2rem));
  max-height: min(82vh, 850px);
  padding: 1.5rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.email-preview-dialog::backdrop {
  background: rgba(12, 33, 29, 0.55);
  backdrop-filter: blur(3px);
}

.dialog-close-row {
  display: flex;
  justify-content: end;
}

.dialog-close {
  color: #435650;
  background: #f1f5f2;
  font-size: 1.5rem;
}

.email-preview-dialog > .eyebrow {
  margin: 0.2rem 0 0.45rem;
}

.email-preview-dialog h2 {
  margin: 0 0 0.8rem;
  font-family: "Space Grotesk", sans-serif;
}

.email-preview-content {
  padding: 0.8rem 1rem;
  border: 1px solid #e7ede9;
  border-radius: 8px;
  color: #455650;
  background: #fbfcfb;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.email-preview-content hr {
  border: 0;
  border-top: 1px solid #e2e9e4;
}

.email-preview-content a {
  color: #286c59;
}

.email-preview-dialog .login-footnote {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .workflow-tabs {
    padding: 0 0.7rem;
  }

  .workflow-tab {
    min-height: 44px;
    padding: 0 0.45rem;
    font-size: 0.68rem;
  }

  .stage-intro {
    align-items: start;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.9rem 0.8rem 0.65rem;
  }

  .troop-card-list {
    padding: 0 0.7rem;
  }

  .troop-profile-card {
    padding: 0.8rem;
  }

  .profile-contact {
    grid-template-columns: 1fr 1.3fr;
  }

  .profile-contact > div:last-child {
    grid-column: 1 / -1;
  }

  .profile-contact:has(.profile-links) {
    grid-template-columns: 1fr 1.2fr;
  }

  .profile-contact:has(.profile-links) .profile-links {
    grid-column: 1 / -1;
  }

  .checklist {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .listing-input-grid {
    grid-template-columns: 1fr;
  }

  .listing-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .listing-actions button {
    width: 100%;
  }

  .registered-finances {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transfer-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transfer-form button {
    width: 100%;
  }

  .subsection-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .workflow-tab {
    gap: 0.3rem;
    font-size: 0.63rem;
  }

  .tab-count {
    min-width: 19px;
    height: 19px;
    font-size: 0.6rem;
  }

  .profile-header {
    flex-direction: column;
  }

  .profile-header .status-pill {
    align-self: start;
  }

  .sales-update {
    align-items: start;
    flex-direction: column;
  }
}

.danger-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #b3261e;
  border-radius: 8px;
  background: #fff;
  color: #b3261e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.danger-button:hover {
  background: #b3261e;
  color: #fff;
}

.logout-top-button {
  border-color: #153e35;
  background: #153e35;
  color: #fff;
}

.logout-top-button:hover {
  background: #0f2e27;
}

@media (max-width: 760px) {
  .topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .logout-top-button,
  .danger-button {
    min-height: 44px;
  }
}

.qr-saved-note {
  display: block;
  color: #153e35;
  font-weight: 600;
}

.manual-emails {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #d9e2de;
}

.draft-details {
  margin-top: 10px;
  border: 1px solid #d9e2de;
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
}

.draft-details summary {
  padding: 12px 0;
  font-weight: 700;
  cursor: pointer;
}

.draft-details[open] {
  padding-bottom: 14px;
}

.draft-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.draft-field span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #46615a;
}

.draft-field input,
.draft-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #c4d1cc;
  border-radius: 8px;
  font: inherit;
  background: #f7faf9;
}

.draft-field textarea {
  resize: vertical;
}

.draft-field .copy-draft-button {
  justify-self: start;
}

.draft-sent {
  margin: 8px 0;
  color: #153e35;
  font-weight: 600;
}

.draft-unsent {
  color: #6b7b76;
  font-weight: 500;
}

.draft-qr {
  margin-bottom: 12px;
}

.draft-qr > span {
  font-size: 0.8rem;
  font-weight: 700;
  color: #46615a;
}

.draft-qr-preview img {
  display: block;
  max-width: 220px;
  margin: 8px 0;
  border: 1px solid #c4d1cc;
  border-radius: 8px;
  background: #fff;
}

.draft-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draft-qr-actions .secondary-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
