.password-control {
  position: relative;
  display: block;
}
.password-control input { padding-right: 52px; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  line-height: 1;
}
.password-toggle svg {
  display: block;
  width: 23px;
  height: 23px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle:hover,
.password-toggle:focus-visible { background: #e4e9de; }
.password-toggle[aria-pressed="true"] { color: #8d622d; }

.venue-combobox { position: relative; }
.venue-combobox input { margin-bottom: 0; }
.venue-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #aeb9ab;
  border-radius: 6px;
  background: #fffdf8;
  box-shadow: 0 10px 24px #193d3524;
}
.venue-suggestions [role="option"] {
  padding: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: normal;
  cursor: pointer;
}
.venue-suggestions [role="option"] + [role="option"] { border-top: 1px solid var(--line); }
.venue-suggestions [role="option"]:hover,
.venue-suggestions [role="option"][aria-selected="true"] { background: #e4e9de; }

.show-type {
  display: inline-block;
  margin: 3px 0 0 7px;
  padding: 2px 7px;
  border: 1px solid #cbd2c4;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  vertical-align: middle;
}
#detail-type { margin: 3px 0 0; }
.required-marker,
.required-legend > span:first-child { color: #b3261e; font-weight: 700; }
.required-legend { margin: 4px 0 12px; color: var(--muted); font-size: 12px; }
.companion-field { margin: 4px 0 18px; }
.field-label { display: block; margin-bottom: 8px; font-weight: 700; }
.solo-choice { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 500; }
.solo-choice input { width: 20px; height: 20px; margin: 0; }
.companion-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; margin-bottom: 9px; }
.companion-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid #cbd2c4; border-radius: 999px; background: #edf0e8; color: var(--ink); font-size: 13px; }
.companion-chip.solo { background: #eee6d6; border-color: #cdbb98; }
.companion-chip button { width: 28px; height: 28px; margin: -5px -6px -5px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 18px; }
.companion-chip button:hover,.companion-chip button:focus-visible { background: #dce2d6; color: var(--ink); }
.companion-combobox { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.companion-combobox input { margin: 0; }
.companion-suggestions { position: absolute; z-index: 20; left: 0; right: 124px; top: calc(100% + 4px); max-height: 220px; overflow-y: auto; border: 1px solid #aeb9ab; border-radius: 6px; background: #fffdf8; box-shadow: 0 10px 24px #193d3524; }
.companion-suggestions [role="option"] { padding: 12px; color: var(--ink); font-size: 14px; cursor: pointer; }
.companion-suggestions [role="option"] + [role="option"] { border-top: 1px solid var(--line); }
.companion-suggestions [role="option"]:hover,.companion-suggestions [role="option"][aria-selected="true"] { background: #e4e9de; }
.show-companions { margin: 7px 0; color: var(--muted); font-size: 13px; }
.bulk-type-editor { margin: 0 0 24px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fffdf8; }
.bulk-type-editor summary { cursor: pointer; font-weight: 700; }
.bulk-type-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.bulk-type-controls label { font-size: 12px; font-weight: 700; }
.bulk-type-controls select { display: block; width: 100%; margin-top: 6px; padding: 11px; border: 1px solid #cbd2c4; border-radius: 5px; background: #fffdf8; }
.bulk-type-actions,.bulk-type-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#bulk-selection-summary,#bulk-type-status { margin: 12px 0; font-weight: 700; }
.bulk-type-rows { display: grid; gap: 8px; }
.bulk-type-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
.bulk-type-row input { width: 20px; height: 20px; }
.bulk-type-row small { color: var(--muted); }
.bulk-type-row-status { color: #8d2f26; font-weight: 700; }
.bulk-type-pages { justify-content: center; margin-top: 14px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.statistics {
  margin: 48px 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.statistics .section-heading h2 { margin-bottom: 15px; }
.statistics-tools { align-items: end; }
.statistics-tools > label:not(.section-search) { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.statistics-tools select { min-width: 130px; }
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat-cards article,
.stat-rankings section {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 9px;
  padding: 20px;
}
.stat-cards article { padding: 0; overflow: hidden; }
.stat-cards button {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 20px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  text-align: left;
}
.stat-cards button:hover { background: #f5eee9; }
.stat-cards button:focus-visible { outline: 3px solid #6f1d36; outline-offset: -3px; }
.stat-cards strong {
  display: block;
  font: 42px/1 Georgia, serif;
  color: #927137;
}
.stat-cards span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.stat-cards .stat-card-action { color: #6f1d36; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.statistics-note,
.statistics-empty {
  color: var(--muted);
  font-size: 12px;
}
.stats-seen-list { margin: 20px 0; border: 1px solid var(--line); background: #fffdf8; border-radius: 9px; padding: 20px; }
.stats-seen-list h3 { margin-top: 0; }
.stats-seen-list ol { list-style: none; margin: 0; padding: 0; }
.stats-seen-list li + li { border-top: 1px solid var(--line); }
.stats-seen-list button { display: grid; width: 100%; min-height: 54px; padding: 12px 4px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.stats-seen-list button:hover,
.stats-seen-list button:focus-visible { background: #edf0e8; }
.stats-seen-list button span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.stat-rankings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0;
}
.stat-rankings h3 { margin-top: 0; }
.stat-rankings ol { list-style: none; padding: 0; margin: 0; }
.stat-rankings li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.stat-rankings li:first-child { border-top: 0; }
.stat-rankings li strong { color: #927137; }
.venue-counts {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
.venue-counts strong { font-size: 14px; }
.venue-counts i { padding: 0 3px; font-style: normal; }
.venue-counts button {
  min-height: 36px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: inherit;
}
.venue-counts button:hover,
.venue-counts button:focus-visible { border-color: #cbd2c4; background: #edf0e8; color: var(--ink); }
.venue-shows-dialog { width: min(600px, calc(100vw - 28px)); }
#venue-shows-list { list-style: none; margin: 18px 0 0; padding: 0; }
#venue-shows-list li + li { border-top: 1px solid var(--line); }
#venue-shows-list button { display: grid; width: 100%; min-height: 54px; padding: 12px 4px; border: 0; background: transparent; color: var(--ink); text-align: left; }
#venue-shows-list button:hover,
#venue-shows-list button:focus-visible { background: #edf0e8; }
#venue-shows-list button span { margin-top: 4px; color: var(--muted); font-size: 12px; }
@media (max-width: 750px) {
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-rankings { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .bulk-type-controls { grid-template-columns: minmax(0,1fr); }
  .bulk-type-actions > * { width: 100%; }
  .bulk-type-row { grid-template-columns: auto minmax(0,1fr); }
  .bulk-type-row-status { grid-column: 2; }
  .companion-combobox { grid-template-columns: minmax(0,1fr); }
  .companion-combobox button { width: 100%; }
  .companion-suggestions { right: 0; }
}
@media (max-width: 420px) {
  .stat-cards button { min-height: 124px; padding: 16px; }
  .stat-cards strong { font-size: 36px; }
  #stat-venues li { align-items: flex-start; flex-direction: column; gap: 3px; }
  .venue-counts { text-align: left; white-space: normal; }
}
