:root {
  color-scheme: light;
  --ink: #172e28;
  --muted: #50665e;
  --line: #dbe5e0;
  --paper: #fff;
  --accent: #12684d;
  --forest: #132d25;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: #f3f6f4;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration: underline; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--forest); color: #fff; padding: 28px 18px; display: flex; flex-direction: column; gap: 34px; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-weight: 800; letter-spacing: .06em; }
.brand span { display: grid; place-items: center; background: #c3ec9a; color: #19362a; border-radius: 12px; width: 43px; height: 43px; letter-spacing: -.05em; }
.brand small { display: block; color: #bdcfc5; font-weight: 400; letter-spacing: 0; }
nav { display: grid; gap: 5px; }
nav a, .side-bottom > a { display: flex; align-items: center; gap: 11px; color: #d6e5de; text-decoration: none; padding: 10px 12px; border-radius: 8px; }
nav a span { width: 20px; text-align: center; }
nav a[aria-current], nav a:hover { background: #284638; color: #fff; text-decoration: none; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.side-version { margin: 0; color: #8fa89c; font-size: .75rem; letter-spacing: .04em; }
.side-bottom { border-top: 1px solid #3c5449; padding-top: 10px; }
.side-bottom button { width: 100%; background: transparent; border-color: #58776a; color: #f0f7f3; }
.top { background: #fff; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 14px 34px; gap: 14px; }
.top small { display: block; letter-spacing: .1em; color: var(--muted); font-weight: 700; font-size: .75rem; }
.top-tools, .top form, .actions, .inline, .section-title { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.top label { font-size: .875rem; }
.top select { padding: 5px 8px; min-height: 34px; max-width: 230px; }
.top button { padding: 5px 10px; min-height: 34px; }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #e3f0e9; font-weight: 700; }
main { max-width: 1450px; margin: auto; padding: 36px 34px; }
.page-title, .section-title { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.page-title { margin-bottom: 24px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -.045em; line-height: 1.13; }
h2 { font-size: 1.15rem; }
p { color: var(--muted); margin: .55rem 0 1rem; }
.page-title p { margin-bottom: 0; }
h2 + .scroll, h2 + .empty { margin-top: 16px; }
.actions { flex-shrink: 0; }
button, .button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #bacdc2; border-radius: 8px; background: #fff; color: var(--ink); padding: 8px 14px; min-height: 40px; font: inherit; font-size: .9rem; font-weight: 650; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { filter: brightness(.94); text-decoration: none; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button.danger { color: #952b22; border-color: #dbb8b2; }
.delete-form .primary { background: #952b22; border-color: #952b22; }
.payment-instructions { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.personal { grid-column: 1/-1; background: #f3f5f2; min-width: 0; }
.personal main, .personal-top-inner { max-width: 1180px; margin-inline: auto; }
.personal-top { background: #fff; border-bottom: 1px solid var(--line); }
.personal-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 24px; }
.personal-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; line-height: 1.3; color: var(--ink); }
.personal-brand img { border-radius: 9px; flex: none; }
.personal-brand small { display: block; color: var(--muted); font-size: .875rem; margin-top: 3px; }
.personal-top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.personal-top button { background: #fff; color: var(--ink); border-color: var(--line); }
.personal-settings { position: relative; }
.personal-settings-toggle {
  width: 40px;
  min-height: 40px;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
}
.personal-settings-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(92vw, 340px);
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 40, 28, .14);
}
.personal-settings-panel[hidden] { display: none !important; }
.personal-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.personal-settings-close {
  width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}
.personal-settings-section {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.personal-settings-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}
.personal-settings-section h3 {
  margin: 0;
  font-size: .95rem;
}
.personal-settings-section p {
  margin: 0;
  font-size: .9rem;
}
.personal-hero {
  display: flex; align-items: end; min-height: 238px; padding: clamp(24px, 5vw, 46px);
  color: #fff; border-radius: 20px; overflow: hidden;
  background: linear-gradient(90deg, #102417 5%, #102417e8 27%, #10241738 78%),
              #1a3022 url("/assets/sicotrilhos-modalidades.jpg") center 44% / cover no-repeat;
}
.personal-hero-copy { max-width: 520px; min-width: 0; }
.personal-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); overflow-wrap: anywhere; }
.personal-hero p { color: #f5faf1; margin: 8px 0 0; }
.personal-hero span { display: inline-block; margin-top: 13px; padding: 4px 11px; font-size: .875rem; border-radius: 30px; background: #daefc9; color: #244123; }
.personal-nav { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid #d5ded2; margin: 16px 0 20px; }
.personal-nav a { position: relative; padding: 11px 14px; color: #40564a; border-radius: 8px 8px 0 0; font-weight: 650; }
.personal-nav a:hover { background: #eaf0e7; color: var(--accent); }
.personal-nav a[aria-current] { color: #285421; background: #e4eedf; }
.personal-nav a[aria-current]::after { content: ""; position: absolute; inset: auto 0 -1px; border-bottom: 3px solid var(--accent); }
.personal-summary, .personal-data { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.personal-summary { margin-bottom: 16px; }
.personal-summary > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.personal-summary > .personal-summary-status { background: #e8f0e2; border-color: #d3e2cc; color: #25431f; }
.personal-summary span { display: block; font-size: .875rem; color: var(--muted); }
.personal-summary strong { display: block; margin-top: 5px; font-size: clamp(1.05rem, 2.4vw, 1.4rem); line-height: 1.2; }
.personal-panel { padding: clamp(16px, 3vw, 26px); }
.personal-panel .empty { margin-bottom: 0; }
.personal-data dl { grid-template-columns: 1fr; gap: 0; }
.member-data-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.personal form[action="/area-socio/dados"] { margin-bottom: 10px; }
.personal-data dt { margin-top: 8px; }
.personal-data dl > div + div { border-top: 1px solid var(--line); margin-top: 8px; }
.personal-statement { list-style: none; padding: 0; margin: 10px 0 0; }
.personal-statement li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, .75fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.personal-statement li:last-child { padding-bottom: 0; }
.personal-statement h3 { font-size: 1rem; margin: 0; }
.personal-statement li > div:first-child span { color: var(--muted); font-size: .875rem; }
.personal-quota-value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.home-snapshot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.home-stat {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto;
  column-gap: 10px; align-items: center; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
  box-shadow: 0 2px 5px #132d2506; transition: border-color .15s ease;
}
.home-stat:hover { border-color: #9fc8ae; text-decoration: none; }
.home-stat.attention { background: #fff8f2; border-color: #e4c4b0; }
.home-stat-icon {
  grid-row: 1 / span 2; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; background: #e3f1e8; color: #0a6246; font-size: .85rem; font-weight: 800;
}
.home-stat.attention .home-stat-icon { background: #f6e4d8; color: #8a3f1d; }
.home-stat > span:not(.home-stat-icon) { grid-column: 2; color: var(--muted); font-size: .72rem; font-weight: 650; }
.home-stat strong { grid-column: 2; font-size: .95rem; letter-spacing: -.02em; line-height: 1.15; }
.home-stat small { grid-column: 3; grid-row: 1 / span 2; color: var(--muted); font-size: .78rem; text-align: right; max-width: 7rem; line-height: 1.25; }
.home-feed { margin-bottom: 8px; }
.home-feed .section-title { margin-bottom: 14px; align-items: end; }
.home-feed .section-title p { margin: 0; }
.home-notice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.home-card {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  box-shadow: 0 3px 8px #132d2507; border-left: 4px solid #9fc8ae;
}
.home-card-quota { border-left-color: #c97845; background: linear-gradient(180deg, #fffaf6, #fff); }
.home-card-ok { border-left-color: #4f9a5a; background: linear-gradient(180deg, #f5faf4, #fff); }
.home-card-race { border-left-color: #1f7a5c; }
.home-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-card-aside { color: var(--muted); font-size: .85rem; font-weight: 700; }
.home-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.home-card p { margin: 0; font-size: .9rem; flex: 1; }
.home-card .button { align-self: start; margin-top: 6px; }
.home-notice-tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #2a4d2a; background: #e8f0e2; padding: 3px 9px; border-radius: 999px; }
.home-card-quota .home-notice-tag { color: #8a3f1d; background: #f6e4d8; }
.home-card-ok .home-notice-tag { color: #24552c; background: #d9ebd8; }
.race-group { margin: 0 0 24px; }
.race-group h2 { margin-bottom: 12px; }
.race-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 14px; }
.race-card { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.race-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .875rem; color: var(--muted); }
.race-card h3 { margin: 4px 0 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.race-card p { margin: 0 0 4px; }
.race-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.race-card form { margin-top: auto; padding-top: 8px; }
.race-card > .button { align-self: start; }
.race-entrants { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.race-entrants strong { display: block; margin-bottom: 6px; }
.race-entrants p { margin: 0; font-size: .9rem; }
.race-entrant-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .9rem; }
.race-entrant-list li { color: var(--ink); }
.race-poster {
  display: block; margin: -22px -22px 4px; border-radius: 16px 16px 0 0; overflow: hidden;
  background: #eef3ee; border-bottom: 1px solid var(--line);
}
.race-poster img { display: block; width: 100%; height: auto; }
.race-options { display: grid; gap: 7px; padding: 10px 12px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 8px; }
.race-options legend { padding-inline: 5px; font-size: .9rem; font-weight: 650; }
.race-option-editor { padding: 14px; }
.race-option-editor p { margin: 0 0 4px; }
.race-option-editor [data-option-list] { display: grid; gap: 8px; }
.race-option-editor [data-add-option] { justify-self: start; color: var(--accent); margin-top: 5px; }
.race-option-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.race-choice { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.race-choice input { width: 17px; height: 17px; accent-color: var(--accent); }
.race-poster-controls, .race-totals { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.race-totals { padding: 0; list-style: none; }
.race-totals li { background: #e8f0e2; padding: 5px 10px; border-radius: 6px; }
.race-totals strong { margin-left: 6px; }
.race-cancel .primary { color: var(--ink); background: #fff; border-color: var(--line); }
@media (max-width: 720px) {
  .personal-top-inner { padding-inline: 16px; }
  .personal-hero { min-height: 200px; background-position: center, 60% 44%; }
  .personal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .personal-summary > div { padding: 12px; }
  .personal-summary-status { grid-column: 1/-1; }
  .personal-data { grid-template-columns: 1fr; gap: 0; }
  .personal-statement li { grid-template-columns: 1fr; gap: 8px; }
  .personal-statement .button { justify-self: start; }
  .home-snapshot { grid-template-columns: 1fr; gap: 10px; }
  .race-poster { margin: -16px -16px 4px; }
}
.auth-switch { margin: 18px 0 0; }
.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.auth-remember input {
  width: auto;
  min-height: 0;
  flex: none;
}
.auth-card .auth-remember input {
  min-height: 0;
}
.mail-test { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 8px; }
.catalog-nav { position: relative; margin: 0 0 18px; }
.catalog-nav:has(.catalog-new-kind[open]) { margin-bottom: 132px; }
.catalog-new-kind { position: static; }
.catalog-new-kind > summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 11px 14px; color: #7a8b80; border-radius: 8px 8px 0 0; font-weight: 700;
  font-size: 1.15rem; line-height: 1; user-select: none;
}
.catalog-new-kind > summary::-webkit-details-marker { display: none; }
.catalog-new-kind > summary::marker { content: ""; }
.catalog-new-kind > summary:hover,
.catalog-new-kind[open] > summary { background: #eaf0e7; color: var(--accent); }
.catalog-new-kind-body {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 2;
  padding: 14px 16px; border: 1px dashed #c9d5c6; border-radius: 12px; background: #f6f9f4;
}
.catalog-new-kind-body > .muted { margin: 0 0 12px; }
.catalog-delete .primary { background: #fff; color: #952b22; border-color: #dbb8b2; }
.muted { color: var(--muted); font-size: .9rem; }
.dash-alert { margin-bottom: 18px; border-color: #e4c4b0; background: linear-gradient(180deg, #fff8f2, #fff); }
.dash-alert .section-title p { margin: .35rem 0 0; }
.dash-alert-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.dash-alert-list a {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px;
  padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #edd9cb; text-decoration: none; color: inherit;
}
.dash-alert-list a:hover { border-color: #c97845; text-decoration: none; }
.dash-alert-list span { color: var(--muted); font-size: .9rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric, .panel, .auth-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 3px 8px #132d2507; }
.metric { display: grid; align-content: start; gap: 5px; color: var(--ink); text-decoration: none; }
.metric:hover { border-color: var(--accent); text-decoration: none; }
.metric-icon { display: grid; place-items: center; width: 36px; height: 36px; background: #e3f1e8; color: #0a6246; border-radius: 10px; margin-bottom: 7px; font-weight: 800; }
.metric strong, .receipt-total { font-size: clamp(1.35rem, 2.6vw, 2.05rem); letter-spacing: -.05em; }
.metric small, .empty { color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.panel { min-width: 0; margin-bottom: 18px; }
.shortcuts a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
.shortcuts a:last-child { border-bottom: 0; }
.empty { padding: 25px 12px; background: #f6f9f7; border-radius: 9px; margin-top: 12px; }
.scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 9px; border-bottom: 1px solid var(--line); }
th { font-size: .875rem; color: var(--muted); background: #f5f8f6; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; border-radius: 30px; padding: 3px 10px; font-size: .875rem; white-space: nowrap; }
.ok { background: #e4f4e9; color: #125737; }
.pending { background: #f9edda; color: #724714; }
.wait { background: #fde7e5; color: #9b1c1c; }
.review { background: #fff1b8; color: #8a6a00; }
.status-stack { display: grid; gap: 4px; justify-items: start; }
.personal-quota-value .status-stack { display: inline-grid; vertical-align: middle; }
label { display: grid; gap: 4px; font-weight: 600; }
input, select, textarea { font: inherit; width: 100%; min-width: 0; background: #fff; color: inherit; border: 1px solid #abc0b4; border-radius: 8px; padding: 8px 10px; }
.filters { margin-bottom: 18px; }
.grid-form, dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-form button { justify-self: start; }
.wide { grid-column: 1/-1; }
dl { margin-bottom: 0; }
dt { color: var(--muted); font-size: .875rem; }
dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.notice { padding: 10px 14px; border-radius: 8px; background: #e1f3e7; color: #164e36; margin-top: 0; }
.auth { grid-column: 1/-1; display: grid; place-items: center; width: 100%; max-width: none; min-height: 100vh; background: #f1f2f3; }
.auth-card { width: min(100%, 470px); padding: 32px; }
.auth-card .brand { margin-bottom: 24px; }
.stack { display: grid; gap: 14px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-title { align-items: start; flex-direction: column; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { display: block; }
  .sidebar { position: static; height: auto; gap: 15px; padding: 14px; }
  nav { display: flex; flex-wrap: wrap; }
  nav a { padding: 5px 9px; font-size: .875rem; }
  .side-bottom { display: flex; align-items: center; gap: 8px; }
  .top, main { padding: 16px; }
  .top { align-items: start; flex-wrap: wrap; }
  .avatar { display: none; }
  .grid-form, dl { grid-template-columns: 1fr; }
  .metric, .panel { padding: 15px; }
  .metrics { gap: 10px; }
}
.receipt-toolbar, .receipt { width: min(100%, 790px); margin-inline: auto; }
.receipt-toolbar { justify-content: flex-end; margin-bottom: 14px; }
.receipt { padding: clamp(20px, 5vw, 48px); border-top: 5px solid var(--accent); }
.receipt-header, .receipt-issuer, .receipt-summary { display: flex; align-items: center; gap: 14px; }
.receipt-header, .receipt-summary { justify-content: space-between; }
.receipt-header { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.receipt-issuer img { object-fit: contain; flex: none; }
.receipt-issuer strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.receipt-id { text-align: right; }
.receipt-id p { margin: 3px 0 0; color: var(--accent); font-weight: 700; }
.receipt-muted { color: var(--muted); font-size: .9rem; margin-top: 3px; }
.receipt-details { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 26px 0; }
.receipt-details h2 { font-size: .875rem; color: var(--muted); margin: 0 0 5px; }
.receipt-details strong { overflow-wrap: anywhere; }
.receipt-items { border: 1px solid var(--line); }
.receipt-items th, .receipt-items td { padding: 11px 14px; }
.receipt-items td:last-child, .receipt-items th:last-child { white-space: nowrap; text-align: right; }
.receipt-summary { margin-top: 14px; padding: 10px 14px; border-bottom: 2px solid var(--accent); background: #edf5e9; font-weight: 700; }
.receipt-total { color: #285421; white-space: nowrap; }
.receipt-footer { margin-top: 28px; color: var(--muted); font-size: .85rem; }
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff; }
  body { display: block; }
  .sidebar, .top, .actions, .notice, .personal-top, .personal-nav, .personal-hero { display: none; }
  .personal { background: #fff; }
  main { max-width: none; padding: 18mm 17mm; }
  .receipt {
    width: 100%; margin: 0; padding: 10mm 0 0;
    border-radius: 0; border-inline: 0; border-bottom: 0;
    box-shadow: none; break-inside: avoid;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
}

/* Identidade visual da associação */
:root {
  --forest: #223025;
  --accent: #326726;
}
.brand-mark {
  flex: 0 0 48px;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}
.club-photo {
  overflow: hidden;
  position: relative;
  min-height: 190px;
  margin: 0;
  display: flex;
  align-items: end;
  isolation: isolate;
  background: #223025;
  color: #fff;
}
.club-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  z-index: -1;
}
.club-photo figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  width: 100%;
  padding: 18px 20px;
  background: linear-gradient(transparent, #111e13 90%);
  font-weight: 650;
}
.auth-frame {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  width: min(100%, 1180px);
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 18px 52px #20332325;
}
.auth-frame .auth-card {
  width: 100%;
  align-self: center;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(24px, 4vw, 54px);
}
.auth-card .brand { margin-bottom: 32px; }
.auth-card .brand small { color: var(--muted); font-size: .875rem; }
.auth-card .stack { gap: 18px; }
.auth-card input, .auth-card .primary { min-height: 48px; }
.auth-card input:focus-visible, .auth-card button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.password-field { position: relative; margin-top: 4px; }
.password-field:has(button:not([hidden])) input { padding-right: 88px; }
.password-field button {
  position: absolute;
  top: 4px;
  right: 4px;
  min-height: 40px;
  background: #eaf3e7;
  color: #285421;
  border: 0;
  padding: 5px 10px;
}
.password-field button[hidden] { display: none; }
.auth-photo img { object-position: center; }
.auth-photo figcaption { padding: 44px 24px 24px; }
.dashboard-photo {
  grid-column: 1/-1;
  min-height: clamp(205px, 30vw, 355px);
  margin-top: -18px;
  border-radius: 16px;
  margin-bottom: 18px;
}
@media (max-width: 760px) {
  .auth-frame { max-width: 520px; min-height: 0; grid-template-columns: 1fr; }
  .auth-photo { min-height: 0; aspect-ratio: 3 / 2; }
}

.auth-activate {
  place-items: start center;
  padding: clamp(16px, 3vw, 36px) max(16px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  align-content: start;
  overflow-x: clip;
}
.auth-frame-activate {
  width: min(100%, 760px);
  min-height: 0;
  grid-template-columns: 1fr;
  overflow: visible;
}
.auth-frame-activate .auth-card {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: clamp(20px, 3vw, 40px);
}
.activate-head {
  margin: 0 0 18px;
}
.activate-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
}
.activate-head p,
.activate-lead {
  margin: 0 0 8px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.activate-form {
  margin: 0;
  align-items: start;
}
.activate-form > label,
.activate-form > .modality-editor,
.activate-form > .activate-gdpr,
.activate-form > .primary,
.activate-form > .muted,
.activate-form > .activate-lead {
  min-width: 0;
  max-width: 100%;
}
.activate-form .field-hint {
  display: block;
  font-weight: 500;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.35;
}
.activate-form > .primary {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  margin-top: 8px;
}
.activate-form .gdpr-text {
  min-height: 10rem;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}
.catalog-modality {
  margin: 0;
}
.catalog-modality select {
  min-width: 11rem;
}
.modality-editor {
  display: grid;
  gap: 12px;
}
.modality-editor h3 {
  margin: 0;
}
.modality-list {
  display: grid;
  gap: 14px;
}
.modality-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf6;
}
.modality-row > label {
  min-width: 0;
}
.modality-row .button,
.modality-row input[data-remove-modality] {
  grid-column: 1 / -1;
  justify-self: start;
  width: auto;
}
@media (max-width: 760px) {
  .modality-row { grid-template-columns: 1fr; }
}

.member-docs {
  display: grid;
  gap: 18px;
}
.member-doc {
  display: grid;
  gap: 10px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.member-doc:first-child {
  padding-top: 0;
  border-top: 0;
}
.member-doc h3 {
  margin: 0;
}
.member-doc .button {
  justify-self: start;
}
.app-store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.app-store-actions .button {
  min-width: 7.5rem;
  justify-content: center;
}
.app-install-steps {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 6px;
}
.app-install-home .muted,
.personal-settings .muted {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
[data-browser-only][hidden],
html.pwa [data-browser-only] {
  display: none !important;
}
@media (display-mode: standalone) {
  [data-browser-only] {
    display: none !important;
  }
}
.doc-purposes {
  margin: 0;
  padding-left: 1.2rem;
}
.doc-purposes li {
  margin: 4px 0;
}
.activate-gdpr {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.activate-gdpr h2 {
  margin: 0;
  font-size: 1.05rem;
}
.activate-gdpr .muted {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
.gdpr-purposes {
  display: grid;
  gap: 10px;
}
.activate-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
}
.activate-consent-yes {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: #285421;
}
.activate-consent input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
  flex: none;
}
.auth-frame-activate .activate-form .activate-consent input {
  min-height: 0;
}
.auth-frame-activate .activate-form input,
.auth-frame-activate .activate-form select,
.auth-frame-activate .activate-form textarea,
.auth-frame-activate .activate-form .primary {
  min-height: 44px;
  max-width: 100%;
  box-sizing: border-box;
}
.auth-frame-activate .activate-form textarea.gdpr-text {
  min-height: 10rem;
}
@media (max-width: 900px) {
  .activate-form { grid-template-columns: 1fr; }
  .modality-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .auth-frame-activate { max-width: none; }
  .auth-frame-activate .auth-card { padding: 18px 14px; }
  .auth-frame-activate .activate-form input,
  .auth-frame-activate .activate-form select,
  .auth-frame-activate .activate-form textarea {
    font-size: 16px;
  }
  .activate-consent { font-size: .95rem; }
}
