:root {
  --bg: #f7f8fb;
  --ink: #18202f;
  --muted: #667085;
  --line: #d9deea;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(31, 41, 55, 0.09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button, .button-secondary {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover, .button-secondary:hover { background: var(--accent-dark); }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 86px; resize: vertical; }
label { display: grid; gap: 6px; font-weight: 700; color: #344054; }
fieldset {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
}
legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}
main { width: min(1428px, calc(100% - 32px)); margin: 0 auto; padding: 12px 0 64px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 max(16px, calc((100vw - 1428px) / 2));
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 30px;
  height: 30px;
  margin-right: 60px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #172554;
  color: #fff;
  font-weight: 800;
  font-size: 0.86rem;
  transform: scale(3);
  transform-origin: left center;
}
.brand-logo {
  width: 30px;
  height: 30px;
  margin-right: 60px;
  object-fit: contain;
  border-radius: 7px;
  transform: scale(3);
  transform-origin: left center;
}
.brand small { display: block; color: var(--muted); font-size: 0.74rem; }
.brand strong { font-size: 0.94rem; }
.topbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; }
.topbar nav a, .link-button, .nav-dropdown-trigger {
  border-radius: 7px;
  padding: 0 8px;
  color: #344054;
  background: transparent;
  min-height: auto;
  line-height: 1.15;
  font-weight: 700;
  font-size: 0.9rem;
}
.topbar nav a:hover, .link-button:hover, .nav-dropdown-trigger:hover { background: #edf3f2; color: var(--accent-dark); }
.nav-dropdown {
  position: relative;
  display: inline-flex;
}
.nav-dropdown-trigger {
  border: 0;
  cursor: default;
}
.nav-dropdown-trigger::after {
  content: "v";
  margin-left: 5px;
  color: var(--muted);
  font-size: 0.72rem;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  display: none;
  min-width: 180px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(22, 42, 38, 0.14);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: grid;
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 8px;
  white-space: nowrap;
}
.inline { display: inline; }
.language-menu { position: relative; }
.language-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  list-style: none;
}
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary::after {
  content: "v";
  font-size: 0.7rem;
}
.language-menu-options {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  min-width: 170px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(22, 42, 38, 0.14);
}
.language-choice {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}
.language-choice:last-child { border-bottom: 0; }
.language-choice small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.language-choice.active {
  background: #edf3f2;
  color: var(--accent-dark);
}
.language-choice:hover { background: #f5f8f7; }
.language-flag {
  display: inline-block;
  width: 18px;
  height: 12px;
  flex: 0 0 18px;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.18);
  border-radius: 2px;
  background: #eef2f6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  font-size: 1.05rem;
  line-height: 1;
}
.language-flag-image {
  object-fit: cover;
  background: #ffffff;
}
.language-flag-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}
.language-flag-field input {
  width: 80px;
  min-width: 80px;
}
.flag-de { background: linear-gradient(to bottom, #000000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%); }
.flag-ua { background: linear-gradient(to bottom, #0057b7 0 50%, #ffd700 50% 100%); }
.flag-rs {
  position: relative;
  background: linear-gradient(to bottom, #c6363c 0 33.33%, #0c4076 33.33% 66.66%, #ffffff 66.66% 100%);
}
.flag-rs::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 5px;
  height: 6px;
  border-radius: 1px;
  background: #f4c542;
}
.flag-gb {
  background:
    linear-gradient(146deg, transparent 0 42%, #ffffff 42% 47%, #cf142b 47% 53%, #ffffff 53% 58%, transparent 58%),
    linear-gradient(34deg, transparent 0 42%, #ffffff 42% 47%, #cf142b 47% 53%, #ffffff 53% 58%, transparent 58%),
    linear-gradient(to bottom, transparent 0 36%, #ffffff 36% 44%, #cf142b 44% 56%, #ffffff 56% 64%, transparent 64%),
    linear-gradient(to right, transparent 0 36%, #ffffff 36% 44%, #cf142b 44% 56%, #ffffff 56% 64%, transparent 64%),
    #012169;
}
.flag-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #344054;
  font-size: 0.55rem;
  font-weight: 900;
}

.hero, .page-head, .auth-panel {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  padding: 14px 0 18px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.hero h1, .auth-panel h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
}
.hero h1.home-title {
  font-size: clamp(1.45rem, 2.4vw, 2.7rem);
  line-height: 1.05;
  white-space: nowrap;
}
.page-head h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0;
}
.page-head > div {
  width: 100%;
}
.hero p, .muted { color: var(--muted); max-width: 650px; }
.page-head .muted {
  margin: 6px 0 0;
  font-size: 0.94rem;
  max-width: none;
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.72rem;
}
.panel, .calendar-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.panel { padding: 20px; }
.panel h2 { margin-top: 0; }
.section-heading-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.section-heading-actions h2 {
  margin: 0;
}
.calendar-shell { overflow: hidden; }
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.calendar-toolbar h2 { margin: 0; }
.calendar-toolbar input { max-width: 280px; }
.calendar-filter-bar {
  margin: 0;
  flex: 1;
  justify-content: center;
}
.calendar-filter-bar label {
  min-width: 130px;
}
.event-list { display: grid; }
.event-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.event-row:last-child { border-bottom: 0; }
.event-row:hover { background: #f2f6f8; }
.event-row small { display: block; margin-top: 4px; color: var(--muted); }
.date-box {
  width: 48px;
  aspect-ratio: 1;
  border-radius: 7px;
  background: #eef2ff;
  display: grid;
  place-items: center;
  line-height: 1;
}
.date-box strong { font-size: 1.25rem; }
.date-box small { margin: 0; }
.color-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--dot); }
.event-badge, .role-pill {
  border-radius: 999px;
  padding: 7px 10px;
  background: #edf3f2;
  color: var(--badge, var(--accent-dark));
  font-weight: 800;
  white-space: nowrap;
}
.form-stack { display: grid; gap: 14px; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; min-height: auto; }
.permission-check {
  display: flex;
  justify-content: center;
}
.permission-check input {
  width: 20px;
  min-height: 20px;
}
.permission-select {
  min-width: 118px;
  min-height: 34px;
  padding: 5px 8px;
  font-size: 0.88rem;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
}
.auth-panel { align-items: center; min-height: 68vh; }
.auth-panel .panel { width: min(420px, 100%); }
.timeline, .program-list { display: grid; gap: 12px; }
.assignment-row, .program-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.assignment-row p, .program-card p { margin: 2px 0; color: var(--muted); }
.program-grid, .manage-layout, .members-layout, .admin-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 18px;
  align-items: start;
}
.manage-layout { grid-template-columns: 1fr 1fr; }
.admin-layout { grid-template-columns: 360px 1fr; }
.members-layout { grid-template-columns: minmax(0, 1fr); }
.members-main { display: grid; gap: 18px; min-width: 0; }
.admin-sidebar, .admin-content { display: grid; gap: 18px; min-width: 0; }
.wide { grid-column: 1 / -1; }
.admin-events-layout {
  grid-template-columns: minmax(0, 1fr);
}
.program-card { grid-template-columns: minmax(240px, 1fr) auto auto; }
.program-card h2 {
  margin: 1px 0 0;
  font-size: 1.05rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.program-card h2 span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}
.program-card h2 .program-title {
  display: inline-block;
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--program-title-bg, transparent);
  color: var(--program-title-text, inherit);
  font-size: inherit;
  font-weight: inherit;
}
.time { color: var(--accent-dark); font-weight: 800; }
.people { display: flex; flex-wrap: wrap; gap: 6px; justify-content: end; }
.people span, .avatar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  border-radius: 999px;
  background: #edf3f2;
  color: var(--accent-dark);
  padding: 0 8px;
  font-weight: 800;
}
.inline-remove {
  display: inline-flex;
  margin: 0;
}
.inline-remove button {
  width: 20px;
  min-height: 20px;
  border-radius: 999px;
  padding: 0;
  background: #d92d20;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1;
}
.assign-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(92px, auto) minmax(72px, auto) minmax(120px, 1fr) auto;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.readonly-field {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 8px;
  background: #f8fafc;
  color: #475467;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.88rem;
}
.program-actions {
  display: flex;
  align-items: start;
  gap: 6px;
  justify-content: flex-end;
}
.program-actions form {
  margin: 0;
}
.program-card .mini-button,
.program-card .danger-button,
.program-card .assign-form button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.82rem;
}
.program-card select {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 0.9rem;
}
.member-table, .member-list-scroll { max-width: 100%; overflow-x: auto; }
.table-panel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: #475467; font-size: 0.84rem; }
.table-link { color: var(--accent-dark); font-weight: 800; }
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.actions form { margin: 0; }
td.actions {
  display: table-cell;
  vertical-align: middle;
  white-space: nowrap;
}
td.actions form {
  display: inline-flex;
  vertical-align: middle;
}
td.actions .mini-button,
td.actions .danger-button {
  margin-right: 6px;
  vertical-align: middle;
}
.table-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 10px;
}
.table-toolbar form {
  margin: 0;
}
.info-inline {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}
.age-highlight {
  color: var(--danger);
  font-weight: 900;
}
.compact-role-form {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
}
.compact-role-form .actions {
  align-items: end;
}
.copy-event-date {
  display: block;
  width: 112px;
  max-width: 100%;
  margin-top: 6px;
  min-height: 30px;
  padding: 4px 6px;
  font-size: 0.78rem;
}
.event-copy-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.event-copy-actions form {
  display: inline-flex;
}
.event-row-editing,
.event-type-row-editing {
  background: #fbfdfc;
}
.event-row-editing input,
.event-row-editing select,
.event-row-editing textarea,
.event-type-row-editing input {
  min-height: 30px;
  padding: 4px 6px;
  font-size: 0.84rem;
}
.event-row-editing textarea {
  min-height: 56px;
}
.event-row-editing td,
.event-type-row-editing td {
  vertical-align: top;
}
.event-row-editing td > input,
.event-row-editing td > select,
.event-row-editing td > textarea {
  margin-bottom: 6px;
}
.inline-time-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 0.84rem;
}
.inline-check input {
  width: auto;
  min-height: 0;
}
.inline-edit-form {
  display: grid;
  gap: 6px;
}
.event-list-scroll .inline-edit-form .mini-button,
.event-list-scroll .inline-edit-form .muted-button {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 0 6px;
  font-size: 0.78rem;
}
.event-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 0.8fr) repeat(3, minmax(130px, 0.6fr)) minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
}
.event-create-notes {
  grid-column: span 2;
}
.event-type-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(110px, 140px) minmax(180px, 320px) auto;
  gap: 10px;
  align-items: end;
  max-width: 920px;
  margin-top: 18px;
}
.event-type-create-form h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 1rem;
}
.filter-bar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}
.filter-bar label {
  min-width: 150px;
  max-width: 260px;
}
.filter-control {
  min-width: 180px;
  max-width: 280px;
}
.filter-control > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}
.filter-dropdown {
  position: relative;
}
.filter-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.filter-dropdown summary::-webkit-details-marker { display: none; }
.filter-dropdown summary::after {
  content: "v";
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}
.filter-dropdown-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 25;
  width: min(320px, 86vw);
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(22, 42, 38, 0.14);
}
.filter-dropdown-options .check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.filter-dropdown-options .check:last-child {
  border-bottom: 0;
}
.language-filter-actions {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.language-filter-actions .filter-bar {
  margin: 0;
}
.mini-button, .danger-button, .muted-button {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 0.9rem;
}
.mini-button {
  display: inline-flex;
  align-items: center;
  background: #edf3f2;
  color: var(--accent-dark);
  font-weight: 800;
}
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fef3f2;
  color: var(--danger);
}
.danger-button:hover {
  background: #fee4e2;
}
.icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  justify-content: center;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}
.icon-button span {
  display: block;
  transform: translateY(-1px);
}
.icon-delete span {
  font-size: 1.05rem;
}
.muted-button {
  background: #eef2f6;
  color: #344054;
}
.muted-button:hover {
  background: #e4e7ec;
}
.lyrics-input { min-height: 360px; }
.song-list-search {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.song-list-search input {
  width: 180px;
  flex: 0 1 180px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.song-list-search button {
  flex: 0 0 auto;
  min-height: 34px;
  width: fit-content;
  border-radius: 7px;
  padding: 0 12px;
}
.song-list-scroll {
  height: 860px;
  max-height: 860px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.service-list-scroll {
  height: 860px;
  max-height: 860px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.event-list-scroll,
.booking-list-scroll,
.member-list-scroll,
.translation-list-scroll {
  height: 860px;
  max-height: 860px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.song-list-scroll table {
  min-width: 980px;
}
.service-list-scroll table {
  min-width: 760px;
}
.event-list-scroll table {
  min-width: 860px;
}
.event-status-line,
.event-audit-cell span,
.event-audit-cell small {
  display: block;
}
.event-status-line {
  margin-top: 5px;
  color: var(--muted);
}
.event-audit-cell {
  min-width: 210px;
}
.event-audit-cell span {
  font-size: 0.84rem;
  font-weight: 700;
}
.event-audit-cell small {
  margin: 1px 0 5px;
  color: var(--muted);
}
.event-list-scroll th:last-child,
.event-list-scroll td.actions {
  width: 116px;
  min-width: 116px;
  max-width: 116px;
}
.event-list-scroll td.actions {
  padding: 8px;
  white-space: normal;
}
.event-list-scroll td.actions .mini-button,
.event-list-scroll td.actions .danger-button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  margin-right: 0;
}
.event-list-scroll .event-row-editing td.actions .inline-edit-form .mini-button,
.event-list-scroll .event-row-editing td.actions .inline-edit-form .muted-button {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 0 6px;
  font-size: 0.78rem;
}
.booking-list-scroll table {
  min-width: 860px;
}
.member-list-scroll table {
  min-width: 1320px;
}
.translation-list-scroll table {
  min-width: 1120px;
}
.song-list-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}
.service-list-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}
.event-list-scroll thead th,
.booking-list-scroll thead th,
.member-list-scroll thead th,
.translation-list-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}
.translation-list-scroll textarea {
  min-height: 72px;
  resize: vertical;
}
.translation-list-scroll textarea[readonly] {
  background: #f8fafc;
  color: #475467;
}
.member-list-scroll th:first-child,
.member-list-scroll td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
}
.member-list-scroll th:nth-child(2),
.member-list-scroll td:nth-child(2) {
  position: sticky;
  left: 220px;
  z-index: 3;
  background: #fff;
}
.member-list-scroll th:first-child,
.member-list-scroll td:first-child {
  width: 220px;
  min-width: 220px;
}
.member-row-editing td {
  vertical-align: top;
  background: #fffdf3;
}
.member-list-scroll tr {
  scroll-margin-top: 54px;
}
.member-row-editing td.actions {
  vertical-align: middle;
}
.member-row-editing td:first-child,
.member-row-editing td:nth-child(2) {
  background: #fffdf3;
}
.inline-field-stack {
  display: grid;
  gap: 6px;
}
.inline-field-stack input,
.member-row-editing input,
.member-row-editing select {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 0.86rem;
}
.song-list-scroll table tbody tr.song-row-highlight > td {
  background: #fff7c2 !important;
}
.song-preview {
  max-width: 520px;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  white-space: normal;
}
.song-fullscreen {
  display: none;
}
.song-fullscreen.active {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #061a3a;
  color: #ffd84d;
}
.song-fullscreen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 216, 77, 0.28);
  background: #061a3a;
  color: #ffd84d;
}
.song-fullscreen-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.song-fullscreen-actions audio {
  width: min(340px, 38vw);
  max-width: 100%;
}
.song-fullscreen pre {
  margin: 0;
  padding: 34px clamp(22px, 7vw, 96px);
  overflow: auto;
  white-space: pre-wrap;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.6rem, 4vw, 4.2rem);
  font-weight: 800;
  line-height: 1.35;
}
@media (max-width: 760px) {
  .song-fullscreen-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .song-fullscreen-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .song-fullscreen-actions audio {
    width: 100%;
  }
}
.avatar { width: 34px; height: 34px; justify-content: center; padding: 0; margin-right: 8px; }
.flash {
  margin-bottom: 14px;
  border-radius: 7px;
  padding: 12px 14px;
  background: #ecfdf3;
  color: #027a48;
  font-weight: 700;
}
.flash.error { background: #fef3f2; color: var(--danger); }
.info-box {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #f8fafc;
}
.info-box summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--accent-dark);
}
.info-box pre {
  overflow-x: auto;
  border-radius: 7px;
  padding: 10px;
  background: #101828;
  color: #fff;
}
.import-log-viewer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.import-log-viewer h3 {
  margin: 0 0 10px;
}
.import-log-content {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  border-radius: 7px;
  padding: 12px;
  background: #101828;
  color: #fff;
}
.empty {
  padding: 24px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .topbar, .hero, .page-head, .auth-panel, .calendar-toolbar { align-items: stretch; flex-direction: column; }
  .hero h1.home-title { white-space: normal; }
  .program-grid, .manage-layout, .members-layout, .admin-layout { grid-template-columns: 1fr; }
  .compact-role-form { grid-template-columns: 1fr; }
  .event-row { grid-template-columns: auto auto 1fr; }
  .event-badge { grid-column: 3; width: fit-content; }
  .program-card, .assign-form { grid-template-columns: 1fr; }
  .people { justify-content: start; }
  .two-cols { grid-template-columns: 1fr; }
  .song-list-search input {
    width: min(180px, 100%);
    flex-basis: min(180px, 100%);
  }
}
