:root {
  --ink: #18201c;
  --muted: #68736e;
  --line: #d9ded8;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --green: #d7ffd7;
  --green-soft: #e7f5ea;
  --green-header: #e8f5e9;
  --green-border: #14833b;
  --green-strong: #0f6e31;
  --yellow: #fff36a;
  --yellow-border: #d6bd00;
  --red: #ffd5cf;
  --blue: #dceafd;
  --accent: #14833b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
}

button, input, select {
  font: inherit;
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
}

button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.danger {
  color: #9b2418;
  border-color: #e6aaa2;
}

.button-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.chevron-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.chevron {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

.chevron-left {
  transform: rotate(-135deg);
  margin-left: 4px;
}

.chevron-right {
  transform: rotate(45deg);
  margin-right: 4px;
}

.chevron-up {
  transform: rotate(-45deg);
  margin-top: 5px;
}

.chevron-down {
  transform: rotate(135deg);
  margin-bottom: 5px;
}

input, select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  min-width: 0;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto max-content;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: inherit;
  display: inline-grid;
  justify-items: start;
  align-items: start;
  gap: 2px;
  text-decoration: none;
}

.dashboard-brand {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  justify-content: flex-start;
  gap: 14px;
  min-width: 0;
  max-width: min(720px, 52vw);
}

.brand-logo-stack {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 1px;
  width: 178px;
  flex: 0 0 178px;
}

.brand-logo {
  grid-row: 1 / 4;
  display: block;
  width: 46px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

.brand small {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.brand-product,
.brand-tagline {
  display: block;
  color: var(--ink);
  font-style: normal;
  line-height: 1;
}

.brand-product {
  grid-column: 2;
  font-size: 12px;
  font-weight: 900;
}

.brand-tagline {
  grid-column: 2;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-logo-stack small {
  grid-column: 2;
}

.topbar-event-title {
  display: grid;
  gap: 2px;
  min-width: 0;
  justify-items: start;
  text-align: left;
}

.topbar-event-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-event-title span,
.topbar-event-title em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-event-title em {
  font-size: 11px;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

nav {
  display: flex;
  gap: 6px;
  min-width: 0;
}

nav a, .nav-button, .user-pill {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}

nav a,
.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

nav a.is-active {
  background: #0d5f2b;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(1px);
}

.phone-action-row a.is-active {
  background: #0d5f2b;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(1px);
}

.user-pill {
  justify-self: end;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-event-title {
  margin-bottom: 8px;
}

.dashboard-event-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
}

.dashboard-event-title p,
.dashboard-event-title small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
}

.dashboard-event-title p {
  font-size: 15px;
}

.dashboard-event-title small {
  font-size: 12px;
  text-transform: uppercase;
}

.dashboard-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dashboard-view-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-filter select {
  min-height: 34px;
  border-color: var(--green-border);
  color: #102919;
  font-size: 14px;
  font-weight: 700;
}

.status-segments {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  overflow: hidden;
  border: 1px solid #23283a;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.status-segments span {
  display: inline-grid;
  place-items: center;
  gap: 3px;
  min-height: 42px;
  padding: 4px 9px;
  border-right: 1px solid #23283a;
  white-space: nowrap;
}

.status-segments em {
  font-style: normal;
}

.status-segments strong {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #1f2937;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(31, 41, 55, 0.08);
}

.status-segments span:last-child {
  border-right: 0;
}

.segment-neutral {
  background: #fff;
  color: #5c6070;
}

.segment-green {
  background: var(--green);
  color: var(--green-strong);
}

.segment-yellow {
  background: var(--yellow);
  color: #8e1d14;
}

.segment-alert {
  background: #ffd5cf;
  color: #8e1d14;
}

.segment-red {
  background: #ffd5cf;
  color: #8e1d14;
}

.page {
  padding: 22px;
}

.shell {
  padding: 0;
}

.flash-stack {
  display: grid;
  gap: 8px;
  padding: 12px 20px 0;
}

.flash {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--green-border);
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-strong);
  font-weight: 700;
}

.flash-error {
  border-color: #e6aaa2;
  background: #fff0ee;
  color: #7b2016;
}

.flash-warning {
  border-color: #d8c36f;
  background: #fff9dc;
  color: #4a3b00;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 67px);
}

.main-pane {
  padding: 20px;
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head.sticky {
  position: sticky;
  top: 67px;
  z-index: 20;
  background: var(--paper);
  padding: 10px 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1, h2, h3 {
  margin: 0;
}

.clock, [data-clock] {
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  font-weight: 800;
}

.adjust-bar, .weather-delay-bar, .upload-bar, .search, .search-panel, .manual-entry, .note-form, .timing-form, .message-form {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}

.admin-menu {
  position: fixed;
  right: 18px;
  top: 78px;
  z-index: 60;
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(24, 32, 28, 0.2);
}

.admin-menu[hidden] {
  display: none;
}

.adjust-bar {
  padding: 12px;
  background: var(--blue);
  border: 1px solid #c5d5eb;
  border-radius: 6px;
  margin-bottom: 10px;
}

.weather-delay-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)) auto auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  background: #fffbea;
  border: 1px solid #eadf9f;
  border-radius: 6px;
  margin-bottom: 10px;
}

.weather-delay-status {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
}

.weather-delay-status div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.weather-delay-status small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.weather-delay-status b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.weather-delay-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-bar {
  padding: 12px;
  margin-bottom: 0;
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  border-radius: 6px;
}

.tournament-load-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.scenario-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.event-info-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.event-info-form {
  display: grid;
  gap: 8px;
}

.event-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.event-info-grid label:first-child {
  grid-column: 1 / -1;
}

.hole-timing-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.hole-timing-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.hole-timing-form {
  display: grid;
  gap: 8px;
}

.hole-timing-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  align-items: end;
}

.hole-timing-label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.hole-timing-label span {
  text-align: center;
}

.hole-timing-label input {
  width: 100%;
  min-width: 0;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

.hole-timing-turn span {
  color: var(--accent);
}

.scenario-save-form,
.scenario-load-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.scenario-save-form label,
.scenario-load-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scenario-current {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.finish-tournament-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.finish-tournament-panel div {
  display: grid;
  gap: 3px;
}

.finish-tournament-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finished-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--accent) !important;
}

.admin-panel-title {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.tournament-toggle {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--green-border);
  border-radius: 8px;
}

.tournament-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--accent);
}

.tournament-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.tournament-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.tournament-load-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
}

.tournament-load-card div,
.tournament-load-card label {
  display: grid;
  gap: 4px;
}

.tournament-load-card span,
.tournament-load-card label,
.empty-tournament-list {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tournament-load-card select {
  width: 100%;
}

.empty-tournament-list {
  margin: 0;
}

.adjust-bar label,
.weather-delay-bar label,
.upload-bar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.upload-bar input[type="file"] {
  min-width: min(420px, calc(100vw - 80px));
  padding-top: 8px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  background: #fff;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #eef2ed;
  z-index: 2;
}

.pace-table {
  min-width: 1500px;
  font-size: 13px;
}

.pace-table td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.observed {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.status-green { background: var(--green); }
.status-yellow { background: var(--yellow); }
.status-red { background: var(--red); }

.thread {
  position: fixed;
  top: 67px;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(380px, calc(100vw - 34px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  border-left: 1px solid var(--line);
  background: #fff;
  padding: 14px;
  box-shadow: -14px 0 34px rgba(24, 32, 28, 0.18);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.thread.is-open {
  transform: translateX(0);
}

.thread-toggle {
  display: block;
  position: fixed;
  right: 0;
  top: 170px;
  z-index: 45;
  min-width: 0;
  min-height: 46px;
  border-radius: 6px 0 0 6px;
  box-shadow: 0 8px 24px rgba(24, 32, 28, 0.22);
}

.thread-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.thread-head button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.messages {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.messages p {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.messages p.late-message {
  background: var(--yellow);
  border-color: var(--yellow-border);
}

.messages p.schedule-message {
  background: var(--green-header);
  border-color: var(--green-border);
}

.messages p.on-clock-message {
  background: #ffd5cf;
  border-color: #8e1d14;
}

.messages small, .messages span {
  display: block;
}

.messages small {
  color: var(--muted);
  margin: 2px 0 6px;
}

.message-group-label {
  font-weight: 900;
}

.message-form textarea {
  flex: 1;
  width: 100%;
  min-height: 52px;
  max-height: 180px;
  padding: 14px;
  resize: none;
  overflow-y: auto;
  line-height: 1.25;
}

.message-form {
  position: relative;
}

.message-form.is-recording textarea {
  border-color: #9b1c14;
  box-shadow: 0 0 0 4px rgba(155, 28, 20, 0.12);
}

.dictate-live-status {
  position: absolute;
  left: 12px;
  bottom: calc(100% + 8px);
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.12);
}

.dictate-live-status.is-recording {
  border-color: #9b1c14;
  background: #fff3f1;
  color: #9b1c14;
}

.dashboard-workspace .message-form textarea {
  min-height: 52px;
  padding: 14px;
  font-size: 16px;
}

.dictate-button {
  position: relative;
  gap: 8px;
}

.dictate-status {
  display: none;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dictate-button.is-recording {
  background: #9b1c14;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(155, 28, 20, 0.18);
}

.dictate-button.is-recording::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff36a;
  animation: recordingPulse 900ms ease-in-out infinite;
}

.dictate-button.is-recording .dictate-status {
  display: inline;
}

@keyframes recordingPulse {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #f7f8f5, #dceafd);
}

.login-panel {
  display: grid;
  gap: 12px;
  width: min(380px, 100%);
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-panel h1 {
  margin: 0;
}

.login-tagline {
  margin: -6px 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.user-admin-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(24, 32, 28, 0.06);
}

.user-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  align-items: end;
}

.user-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.user-form input,
.user-form select {
  width: 100%;
}

.user-form button {
  width: 100%;
  min-width: 0;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.users-table input,
.users-table select {
  width: 100%;
  min-width: 130px;
}

.users-table input[type="password"] {
  min-width: 150px;
}

.user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.inline-role-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-role-form select {
  min-width: 92px;
}

.inline-role-form button {
  min-height: 36px;
  padding-inline: 12px;
}

.read-only-note {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.course-tools {
  margin-bottom: 12px;
}

.course-search {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.search-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(420px, calc(100vw - 40px));
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(24, 32, 28, 0.18);
}

.search-panel[hidden] {
  display: none;
}

.search-panel input {
  flex: 1;
}

.search-panel a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
}

.course-manual {
  padding: 10px;
  background: var(--blue);
  border: 1px solid #c5d5eb;
  border-radius: 6px;
}

.course-scroll {
  overflow: auto;
  max-width: 100%;
  height: calc(100vh - 220px);
  border: 1px solid var(--line);
  background: #fff;
  overscroll-behavior: contain;
}

.course-table {
  min-width: 1760px;
  table-layout: fixed;
}

.tee-sheet-scroll {
  border: 2px solid #23283a;
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px #6d6f7c;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.tee-sheet-scroll::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.tee-sheet-scroll::-webkit-scrollbar-thumb {
  background: #89958f;
  border: 3px solid var(--green-soft);
  border-radius: 8px;
}

.tee-sheet-scroll::-webkit-scrollbar-track {
  background: var(--green-soft);
}

.tee-sheet-table {
  min-width: 1650px;
  color: #12172b;
  background: #fbfdf9;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 16px;
}

.tee-sheet-table .sheet-group-col {
  width: 70px;
}

.tee-sheet-table .sheet-players-col {
  width: 320px;
}

.tee-sheet-table .sheet-hole-col {
  width: 72px;
}

.course-table th,
.course-table td {
  padding: 6px;
}

.course-table .hole-break {
  border-left: 8px solid var(--paper);
}

.course-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  text-align: center;
  background: #eef2ed;
}

.tee-sheet-table th,
.tee-sheet-table td {
  height: 58px;
  padding: 3px 4px;
  border-right: 2px solid #262a3f;
  border-bottom: 2px solid #262a3f;
  vertical-align: middle;
}

.tee-sheet-table thead th {
  height: 46px;
  background: var(--green-header);
  color: #101527;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.tee-sheet-table .tee-heading {
  position: sticky;
  left: 0;
  z-index: 12;
  width: 390px;
  min-width: 390px;
  background: var(--green-header);
  text-align: center;
}

.tee-sheet-table .hole-heading {
  width: 72px;
  min-width: 72px;
}

.hole-number,
.hole-minutes {
  display: block;
  line-height: 1;
}

.hole-minutes {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tee-sheet-table .hole-break {
  border-left: 3px solid #151a2c;
}

.tee-sheet-table tbody tr {
  background: #fbfdf9;
}

.position-definition-cell {
  padding: 14px 16px !important;
  border-top: 2px solid var(--green-border) !important;
  background: #fff !important;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left !important;
  white-space: normal;
}

.position-definition-cell strong {
  color: var(--ink);
  font-weight: 900;
}

.tee-section-cell {
  position: sticky;
  left: 0;
  z-index: 9;
  width: 390px;
  min-width: 390px;
  height: 28px;
  padding: 4px 10px;
  background: #eaf7ee;
  background-clip: padding-box;
  border-bottom: 2px solid var(--green-border);
  color: #102919;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}

.tee-section-fill {
  height: 28px;
  padding: 0;
  background: #eaf7ee;
  border-bottom: 2px solid var(--green-border);
}

.phone-table .tee-section-cell {
  z-index: 10;
  width: 248px;
  min-width: 248px;
  height: 24px;
  padding: 3px 8px;
  font-size: 12px;
  box-shadow: 4px 0 12px rgba(31, 41, 55, 0.1);
}

.phone-table .tee-section-fill {
  height: 24px;
}

.phone-table .on-clock-detail-cell {
  position: sticky;
  left: 0;
  z-index: 11;
  width: calc(100vw - 8px);
  min-width: calc(100vw - 8px);
  max-width: calc(100vw - 8px);
  height: auto;
  padding: 6px 4px;
  background: #fff8f6;
  border-right: 2px solid #262a3f;
  border-bottom: 3px solid #8e1d14;
  text-align: left;
}

.phone-table .on-clock-card {
  min-width: 0;
  width: 100%;
  padding: 8px;
  border-left-width: 5px;
  border-radius: 8px;
  transform: translateX(var(--phone-table-scroll-left, 0px));
}

.phone-table .on-clock-card-head {
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.phone-table .on-clock-card-head strong {
  font-size: 15px;
}

.phone-table .on-clock-card-head span {
  min-width: 0;
  font-size: 10px;
}

.phone-table .shot-player-header {
  display: none;
}

.phone-table .shot-player-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 8px;
}

.phone-table .phone-shot-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #edd0cc;
  border-radius: 8px;
  background: #fff;
}

.phone-shot-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.phone-shot-card-head strong {
  min-width: 0;
  color: #12172b;
  font-size: 17px;
  line-height: 1.05;
}

.phone-bad-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--green);
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.phone-bad-count.has-bad-times {
  background: var(--yellow);
  color: #8e1d14;
}

.phone-shot-meta {
  color: #5c6070;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.phone-shot-recent-label {
  color: #5c6070;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.phone-table .shot-player-row > strong {
  font-size: 15px;
}

.phone-table .bad-time-checks,
.phone-table .bad-time-header {
  grid-template-columns: repeat(3, 34px);
}

.phone-table .bad-time-checks span {
  min-height: 24px;
}

.phone-table .inline-shot-form {
  display: grid;
  grid-template-columns: 58px 72px auto 64px;
  align-items: end;
  gap: 6px;
}

.phone-table .inline-shot-form input {
  width: 100%;
  min-height: 36px;
  font-size: 15px;
}

.phone-table .inline-shot-form button {
  min-height: 36px;
  font-size: 14px;
}

.phone-table .inline-shot-check {
  justify-content: center;
  min-height: 36px;
  font-size: 11px;
}

.phone-table .inline-shot-check input {
  width: 22px;
  min-height: 22px;
}

.phone-table .shot-player-times {
  gap: 4px;
}

.phone-table .shot-player-times span {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 12px;
}

.phone-table .empty-shot-time {
  border-radius: 999px;
}

.sheet-group-time,
.sheet-players {
  position: sticky;
  background: #fbfdf9;
  z-index: 4;
}

.tee-sheet-table tbody tr.status-green .sheet-group-time,
.tee-sheet-table tbody tr.status-green .sheet-players,
.phone-table tbody tr.status-green .phone-group-cell,
.phone-table tbody tr.status-green .phone-players-cell {
  background: var(--green);
}

.tee-sheet-table tbody tr.status-neutral .sheet-group-time,
.tee-sheet-table tbody tr.status-neutral .sheet-players,
.phone-table tbody tr.status-neutral .phone-group-cell,
.phone-table tbody tr.status-neutral .phone-players-cell {
  background: #ffffff;
}

.tee-sheet-table tbody tr.status-yellow .sheet-group-time,
.tee-sheet-table tbody tr.status-yellow .sheet-players,
.phone-table tbody tr.status-yellow .phone-group-cell,
.phone-table tbody tr.status-yellow .phone-players-cell {
  background: var(--yellow);
}

.tee-sheet-table tbody tr.status-red .sheet-group-time,
.tee-sheet-table tbody tr.status-red .sheet-players,
.phone-table tbody tr.status-red .phone-group-cell,
.phone-table tbody tr.status-red .phone-players-cell {
  background: #ffd5cf;
}

.sheet-group-time {
  left: 0;
  width: 70px;
  min-width: 70px;
  text-align: left;
  font-weight: 800;
  padding-left: 6px;
}

.group-time-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.group-time-stack,
.group-time-stack strong,
.group-time-stack span {
  display: block;
}

.group-time-stack {
  min-width: 30px;
  text-align: center;
}

.group-time-stack strong {
  font-size: 24px;
  line-height: 1;
}

.group-time-stack span {
  margin-top: 5px;
  font-size: 15px;
}

.delta-badge {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.dashboard-pace-badge {
  display: grid;
  place-items: center;
  min-width: 42px;
  padding: 3px 5px;
  border-radius: 4px;
  color: #fff;
  text-align: center;
}

.dashboard-pace-badge.delta-good {
  background: var(--accent);
}

.dashboard-pace-badge.delta-bad {
  background: #8e1d14;
}

.dashboard-pace-badge strong {
  font-size: 17px;
}

.dashboard-pace-badge span {
  margin-top: 2px;
  font-size: 8px;
  font-weight: 900;
}

.dashboard-pace-badge.delta-good,
.dashboard-pace-badge.delta-bad {
  color: #fff;
}

.delta-good {
  color: var(--green-strong);
}

.delta-bad {
  color: #8e1d14;
}

.sheet-players {
  left: 70px;
  width: 320px;
  min-width: 320px;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.08;
  box-shadow: 6px 0 10px rgba(18, 23, 43, 0.14);
}

.dashboard-player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.dashboard-player-names {
  min-width: 0;
}

.dashboard-player-names span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-player-names > span,
.phone-player-names > span {
  min-width: 0;
}

.player-status-inactive {
  color: #6b7280;
}

.dashboard-player-names .player-status-inactive,
.phone-player-names .player-status-inactive,
.shot-player-row .player-status-inactive {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.player-status-inactive .player-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  white-space: nowrap;
}

.player-status-inactive em {
  flex: 0 0 auto;
  color: #9b1c14;
  font-style: normal;
  font-weight: 900;
  text-decoration: none;
}

.sheet-players .dashboard-pace-badge {
  margin-top: 0;
}

.sheet-players span {
  display: block;
  white-space: nowrap;
}

.sheet-players small {
  display: block;
  margin-top: 4px;
  color: #5c6070;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.tee-sheet-table tbody tr.stage-out-of-position .sheet-group-time .group-time-stack {
  color: #8e1d14;
}

.tee-sheet-table tbody tr.stage-on-clock .sheet-group-time .group-time-stack {
  color: #8e1d14;
}

.group-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.monitor-button {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.group-status-label {
  color: #5c6070;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.group-status-label.status-label-green {
  color: var(--green-strong);
}

.group-status-label.status-label-yellow {
  color: #8e1d14;
}

.group-status-label.status-label-red {
  color: #8e1d14;
}

.group-status-label.status-label-alert,
.group-status-label.status-label-clock {
  color: #8e1d14;
}

.phone-status-label {
  display: block;
  margin-top: 3px;
  font-size: 9px;
}

.tee-sheet-table .on-clock-detail-row .on-clock-detail-cell {
  height: auto;
  padding: 0;
  background: #fff;
  border-bottom: 3px solid #8e1d14;
  border-right: 2px solid #262a3f;
}

.on-clock-card {
  margin: 0;
  padding: 8px 10px;
  min-width: 760px;
  border-left: 6px solid #8e1d14;
  background: #fff8f6;
  box-shadow: inset 0 1px 0 rgba(142, 29, 20, 0.14);
}

.on-clock-card-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.on-clock-card-head strong {
  font-size: 16px;
}

.on-clock-card-head span {
  color: #8e1d14;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.shot-timing-table {
  display: grid;
  gap: 4px;
}

.shot-timing-table[hidden] {
  display: none;
}

.shot-player-row {
  display: grid;
  grid-template-columns: 150px 132px auto minmax(180px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border: 1px solid #edd0cc;
  border-radius: 4px;
  background: #fff;
}

.shot-player-header {
  padding-top: 2px;
  padding-bottom: 2px;
  border-color: transparent;
  background: transparent;
  color: #5c6070;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.bad-time-header {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 4px;
  text-align: center;
}

.bad-time-header strong {
  grid-column: 1 / -1;
  color: #8e1d14;
}

.bad-time-header span {
  display: block;
}

.shot-entry-header {
  padding-left: 2px;
}

.shot-player-row > strong {
  color: #12172b;
  font-size: 13px;
}

.bad-time-checks {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 4px;
  align-items: center;
}

.bad-time-checks span {
  display: grid;
  place-items: center;
  min-height: 26px;
  border: 1px solid #e2d8c6;
  border-radius: 4px;
  background: #fff;
  color: #8e1d14;
  font-size: 16px;
  font-weight: 900;
}

.bad-time-checks span.has-bad-time {
  background: #ffd5cf;
  border-color: #8e1d14;
  font-size: 0;
}

.bad-time-checks span.has-bad-time::after {
  content: "\2713";
  font-size: 16px;
}

.shot-player-times {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  overflow: hidden;
}

.shot-player-times span {
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.good-shot-time {
  background: var(--green);
  color: var(--green-strong);
}

.bad-shot-time {
  background: var(--yellow);
  color: #8e1d14;
}

.empty-shot-time {
  background: #f3f3f0;
  color: #5c6070;
}

.inline-shot-form {
  display: flex;
  align-items: end;
  gap: 5px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.inline-shot-form label {
  display: grid;
  gap: 2px;
  color: #5c6070;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.inline-shot-form input {
  width: 58px;
  min-height: 28px;
  padding: 0 6px;
}

.inline-shot-form button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.inline-shot-check {
  display: flex !important;
  align-items: center;
  gap: 4px;
  min-height: 28px;
}

.shot-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 4px;
}

.inline-shot-check input {
  width: auto;
  min-height: 0;
}

.course-table .identity-col {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 230px;
  min-width: 230px;
  background: #f7faf6;
  box-shadow: 6px 0 10px rgba(24, 32, 28, 0.08);
}

.course-table thead .identity-col {
  top: 0;
  z-index: 8;
}

.course-table tbody .identity-col {
  z-index: 3;
}

.group-identity {
  text-align: left;
}

.group-identity-content {
  display: grid;
  gap: 4px;
}

.group-identity-content strong {
  font-size: 16px;
}

.group-identity-content span {
  display: block;
  font-weight: 500;
}

.group-identity-content small {
  color: var(--muted);
  font-weight: 700;
}

.completion-cell {
  width: 100%;
  min-height: 72px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.tee-sheet-table .completion-cell {
  min-height: 51px;
  padding: 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #12172b;
  box-shadow: none;
}

.tee-sheet-table .completion-cell .scheduled {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.tee-sheet-table .completion-cell .actual {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.tee-sheet-table .completion-cell:hover,
.tee-sheet-table .completion-cell:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  background: rgba(20, 131, 59, 0.12);
}

.tee-sheet-table .completion-cell.has-actual {
  background: var(--green);
  color: #102919;
}

.tee-sheet-table .completion-cell.has-actual.actual-status-yellow {
  background: var(--yellow);
  color: #5c3900;
}

.tee-sheet-table .completion-cell.has-actual.actual-status-yellow .actual {
  color: #8e1d14;
}

.tee-sheet-table .completion-cell.has-actual.actual-status-red {
  background: #ffd5cf;
  color: #4f150f;
}

.tee-sheet-table .completion-cell.has-actual .scheduled {
  font-size: 12px;
  font-weight: 800;
}

.tee-sheet-table .completion-cell.has-actual .actual {
  font-size: 20px;
  line-height: 1;
}

.completion-cell .scheduled {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.completion-cell .actual {
  color: var(--muted);
  font-size: 12px;
}

.completion-cell.has-actual {
  border-color: var(--accent);
  background: var(--green);
}

.completion-cell.has-actual.actual-status-yellow {
  background: var(--yellow);
}

.completion-cell.has-actual.actual-status-yellow .actual {
  color: #8e1d14;
}

.completion-cell.has-actual.actual-status-red {
  background: #ffd5cf;
}

.completion-cell.has-actual .actual {
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.completion-cell.has-actual .scheduled {
  color: var(--muted);
  font-size: 11px;
}

.completion-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(24, 32, 28, 0.42);
}

.completion-dialog[hidden] {
  display: none;
}

.dialog-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(24, 32, 28, 0.28);
}

.dialog-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.completion-stamp-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--green-border);
  border-radius: 10px;
  background: var(--green-soft);
}

.completion-stamp-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.completion-stamp-preview strong {
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}

.completion-header {
  display: flex;
  gap: 14px;
  align-items: center;
}

.completion-group-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  flex-shrink: 0;
  line-height: 1;
}

.completion-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.completion-meta strong {
  font-size: 17px;
  font-weight: 800;
}

.completion-players {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.completion-pace-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
}

.completion-pace-indicator[hidden] {
  display: none;
}

.completion-pace-indicator[data-pace="good"] {
  background: var(--green-soft);
  color: var(--green-strong);
  border: 1px solid var(--green-border);
}

.completion-pace-indicator[data-pace="behind"] {
  background: #fff8e0;
  color: #8a5e00;
  border: 1px solid #d6bd00;
}

.completion-pace-indicator[data-pace="late"] {
  background: var(--red);
  color: #a00;
  border: 1px solid #e0a0a0;
}

.dialog-panel label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dialog-panel textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.group-admin-panel {
  width: min(620px, 100%);
}

.group-admin-panel h2,
.group-admin-panel h3 {
  margin: 0;
}

.group-admin-heading {
  display: grid;
  gap: 4px;
}

.group-admin-start {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.group-admin-players {
  margin: 0;
  color: #12172b;
  font-size: 14px;
  font-weight: 800;
}

.group-admin-meta {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.group-admin-meta p {
  margin: 0;
}

.group-admin-meta label {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.group-admin-panel form {
  display: grid;
  gap: 12px;
}

.group-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.player-status-admin {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.player-status-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}

.player-status-admin-row span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-status-admin-row select {
  min-height: 34px;
}

.checkbox-label {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px;
}

.checkbox-label input {
  min-height: 0;
}

.shot-admin-form {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.shot-admin-form[hidden] {
  display: none;
}

.bad-time-summary {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #edd0cc;
  border-left: 5px solid #8e1d14;
  border-radius: 6px;
  background: #fff8f6;
}

.bad-time-summary[hidden] {
  display: none;
}

.bad-time-summary h3 {
  margin: 0;
  color: #8e1d14;
}

.bad-time-summary-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.bad-time-summary-row > strong {
  font-size: 13px;
}

.bad-time-summary-header {
  margin-bottom: -4px;
}

.bad-time-summary-header .bad-time-checks span {
  min-height: 18px;
  border: 0;
  background: transparent;
  color: #8e1d14;
  font-size: 11px;
  font-weight: 900;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.manual-time-field[hidden],
.dialog-actions [hidden] {
  display: none;
}

.phone-page .completion-dialog {
  align-items: end;
  padding: 10px;
}

.phone-page .completion-panel {
  width: 100%;
  gap: 10px;
  padding: 14px;
  border-radius: 10px 10px 0 0;
}

.phone-page .completion-panel h2 {
  font-size: 24px;
}

.phone-page .completion-panel p {
  font-size: 15px;
  line-height: 1.25;
}

.phone-page .completion-panel .dialog-actions {
  grid-template-columns: 1fr;
}

.phone-page .completion-panel button {
  min-height: 52px;
}

.manual-entry, .note-form, .timing-form {
  margin-top: 10px;
}

.note-form input {
  flex: 1;
}

.summary-table {
  min-width: 540px;
}

.report-group {
  margin-bottom: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.report-group h2 {
  margin-bottom: 10px;
}

.report-group h2 span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.log-line {
  margin: 6px 0;
  color: var(--muted);
}

.phone-workspace {
  min-height: 100vh;
}

.phone-page {
  overflow: hidden;
}

.phone-page .topbar {
  display: none;
}

.phone-shell,
.phone-workspace,
.phone-pane {
  height: 100vh;
  height: 100dvh;
}

.phone-pane {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 172px 4px 6px;
}

.phone-sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 5px;
  height: 172px;
  padding: 6px 8px 4px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(24, 32, 28, 0.12);
}

.phone-brand-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 8px;
  min-height: 82px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 8px rgba(31, 41, 55, 0.08);
}

.phone-brand-header div {
  min-width: 0;
}

.phone-event-info {
  grid-column: 1;
  justify-self: start;
  text-align: left;
}

.phone-brand-mark {
  grid-column: 2;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 5px;
  min-width: 112px;
  text-align: left;
}

.phone-brand-mark img {
  grid-row: 1 / 4;
  display: block;
  width: 32px;
  height: 28px;
  object-fit: contain;
  object-position: left center;
}

.phone-brand-header strong,
.phone-brand-header span,
.phone-brand-header em,
.phone-brand-header b,
.phone-brand-header i,
.phone-brand-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-brand-header strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.05;
}

.phone-brand-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.phone-brand-header em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.phone-brand-header b {
  grid-column: 2;
  display: block;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
}

.phone-brand-header i {
  display: none;
}

.phone-brand-header small {
  grid-column: 2;
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
}

.phone-brand-header .phone-user-pill {
  align-self: stretch;
}

.phone-user-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 160px);
  gap: 3px;
  justify-items: stretch;
}

.phone-user-actions button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.phone-action-row {
  position: relative;
  top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  overflow-x: auto;
}

.phone-action-row a,
.phone-action-row button,
.phone-user-actions button,
.phone-message-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(24, 32, 28, 0.12);
}

.phone-user-actions .phone-user-pill {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.phone-user-actions button {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.phone-action-row .course-search {
  display: block;
}

.ball-timer-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #0c1911;
  color: #fff;
}

.ball-timer-overlay[hidden] {
  display: none;
}

.ball-timer-panel {
  width: min(680px, 100%);
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}

.ball-timer-panel p {
  margin: 0;
  color: #bfe8cc;
  font-size: clamp(22px, 5vw, 42px);
  font-weight: 900;
  text-transform: uppercase;
}

.ball-timer-panel strong {
  display: block;
  color: #fff;
  font-size: clamp(96px, 32vw, 240px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.ball-timer-panel span {
  color: #d7ffd7;
  font-size: clamp(22px, 6vw, 44px);
  font-weight: 900;
}

.ball-timer-adjust {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ball-timer-adjust[hidden] {
  display: none;
}

.ball-timer-adjust label {
  display: grid;
  gap: 6px;
  color: #bfe8cc;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.ball-timer-adjust input {
  min-height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.ball-timer-controls {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.ball-timer-controls button {
  min-height: 62px;
  border-radius: 14px;
  font-size: clamp(18px, 4.5vw, 28px);
  font-weight: 900;
}

.ball-timer-controls button:first-child {
  grid-column: 1 / -1;
}

.ball-timer-overlay.is-finished {
  background: #871a12;
}

.ball-timer-overlay.is-finished .ball-timer-panel span {
  color: #fff36a;
}

.phone-page .search-panel {
  left: 0;
  right: auto;
  top: calc(100% + 6px);
}

.phone-page .phone-head {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  top: auto;
  background: var(--paper);
}

.phone-page .phone-head > div {
  grid-column: 2;
  min-width: 0;
  text-align: center;
}

.phone-head h1 {
  font-size: 24px;
  line-height: 1;
}

.phone-user-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
}

.phone-page .phone-message-button {
  grid-column: 3;
  min-height: 36px;
  min-width: 0;
  padding: 0 10px;
  gap: 8px;
  justify-self: end;
}

.phone-page .phone-message-button .chevron {
  width: 9px;
  height: 9px;
  margin-left: 3px;
}

.phone-page .phone-message-button.is-hidden {
  display: none;
}

.phone-page .thread-toggle {
  display: none;
}

.phone-table-scroll {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  border: 2px solid #23283a;
  background: #fbfdf9;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}

.phone-table {
  min-width: 980px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  color: #12172b;
  background: #fbfdf9;
  font-family: Arial, "Segoe UI", sans-serif;
}

.phone-table thead {
  position: sticky;
  top: 0;
  z-index: 30;
}

.phone-table th,
.phone-table td {
  height: 58px;
  padding: 2px;
  border-right: 2px solid #262a3f;
  border-bottom: 2px solid #262a3f;
  text-align: center;
  vertical-align: middle;
}

.phone-table tbody td {
  background: #ffffff;
}

.phone-table .position-definition-cell {
  font-size: 12px;
}

.phone-table thead th {
  position: sticky;
  top: 0;
  z-index: 45;
  height: 42px;
  background: var(--green-header);
  background-clip: padding-box;
  color: #102919;
  font-size: 20px;
  font-weight: 800;
}

.phone-table .hole-minutes {
  margin-top: 2px;
  font-size: 8px;
}

.phone-table thead th:not(.phone-group-heading):not(.phone-player-heading),
.phone-table tbody td {
  width: 58px;
  min-width: 58px;
}

.phone-table .hole-break {
  border-left: 4px solid var(--green-border);
}

.phone-table .phone-group-heading,
.phone-table .phone-group-cell {
  position: sticky;
  left: 0;
  width: 68px;
  min-width: 68px;
  z-index: 8;
  background: #fbfdf9;
}

.phone-table .phone-group-heading {
  z-index: 60;
  background: var(--green-header);
}

.phone-table .phone-player-heading,
.phone-table .phone-players-cell {
  position: sticky;
  left: 68px;
  width: 180px;
  min-width: 180px;
  z-index: 6;
  background: #fbfdf9;
  box-shadow: 6px 0 10px rgba(18, 23, 43, 0.12);
}

.phone-table .phone-player-heading {
  z-index: 59;
  background: var(--green-header);
}

.phone-group-main {
  position: relative;
  display: block;
  min-height: 36px;
}

.phone-group-stack,
.phone-group-stack strong,
.phone-group-stack span {
  display: block;
}

.phone-group-stack strong {
  font-size: 24px;
  line-height: 1;
}

.phone-group-stack span {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 800;
}

.phone-delta-badge {
  position: absolute;
  top: 1px;
  right: 0;
  font-size: 16px;
}

.phone-players-cell {
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.08;
}

.phone-table .phone-players-cell {
  text-align: left;
}

.phone-player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.phone-player-names {
  min-width: 0;
}

.phone-player-names span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-pace-badge {
  display: grid;
  place-items: center;
  min-width: 42px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(31, 41, 55, 0.1);
  line-height: 1;
  text-align: center;
}

.phone-pace-badge.delta-good {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.phone-pace-badge.delta-bad {
  background: #8e1d14;
  color: #fff;
  box-shadow: none;
}

.phone-pace-badge strong {
  font-size: 17px;
}

.phone-pace-badge span {
  margin-top: 2px;
  font-size: 8px;
  font-weight: 900;
}

.phone-completion {
  width: 100%;
  min-height: 51px;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 3px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #12172b;
}

.phone-completion .scheduled {
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.phone-completion .actual {
  color: #5c6070;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.phone-completion.has-actual {
  background: var(--green);
  color: #102919;
}

.phone-completion.has-actual.actual-status-yellow {
  background: var(--yellow);
  color: #5c3900;
}

.phone-completion.has-actual.actual-status-yellow .actual {
  color: #8e1d14;
}

.phone-completion.has-actual.actual-status-red {
  background: #ffd5cf;
  color: #4f150f;
}

.phone-completion.has-actual .scheduled {
  color: #5c6070;
  font-size: 12px;
  font-weight: 800;
}

.phone-completion.has-actual .actual {
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}

/* Professional polish pass: soften the shell without moving workflows. */
:root {
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #d9dee5;
  --paper: #f3f5f7;
  --panel: #ffffff;
  --shadow-soft: 0 2px 12px rgba(31, 41, 55, 0.07);
  --shadow-panel: 0 10px 28px rgba(31, 41, 55, 0.1);
}

body {
  background: var(--paper);
  font-family: "Inter", "Roboto", "Segoe UI", Arial, sans-serif;
}

button,
nav a,
.nav-button,
.phone-action-row a,
.phone-action-row button,
.phone-message-button {
  border-radius: 10px;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

button:hover,
nav a:hover,
.nav-button:hover,
.phone-action-row a:hover,
.phone-action-row button:hover,
.phone-user-actions button:hover,
.phone-message-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 131, 59, 0.18);
}

nav a.is-active:hover,
.phone-action-row a.is-active:hover {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.14);
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: 10px;
}

.topbar,
.phone-sticky-header {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 10px rgba(31, 41, 55, 0.08);
}

.section-head.sticky {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.dashboard-workspace .main-pane,
.phone-pane {
  background: transparent;
}

.tee-sheet-scroll,
.phone-table-scroll,
.table-wrap,
.report-group,
.admin-menu,
.dialog-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.tee-sheet-scroll,
.phone-table-scroll {
  overflow: auto;
}

.tee-sheet-table,
.phone-table {
  background: var(--panel);
}

.tee-sheet-table th,
.tee-sheet-table td,
.phone-table th,
.phone-table td {
  border-right: 1px solid #cfd6df;
  border-bottom: 1px solid #cfd6df;
}

.tee-sheet-table thead th,
.phone-table thead th,
.tee-sheet-table .tee-heading,
.phone-table .phone-group-heading,
.phone-table .phone-player-heading {
  background: #eaf7ee;
  color: #17251d;
}

.tee-sheet-table .hole-break,
.phone-table .hole-break {
  border-left-color: var(--green-border);
}

.tee-sheet-table tbody tr:nth-child(even):not(.status-green):not(.status-yellow):not(.status-red) {
  background: #fafbfc;
}

.sheet-players,
.phone-table .phone-players-cell {
  box-shadow: 4px 0 12px rgba(31, 41, 55, 0.1);
}

.completion-cell,
.phone-completion {
  transition: background-color 140ms ease, outline-color 140ms ease;
}

.status-segments {
  border-color: #c2cad5;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.status-segments span {
  border-right-color: #c2cad5;
}

.messages {
  gap: 10px;
}

.messages p {
  padding: 12px;
  border-color: var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(31, 41, 55, 0.06);
}

.messages p.late-message,
.messages p.schedule-message,
.messages p.on-clock-message {
  border-width: 1px;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.08);
}

.thread {
  background: #fbfcfd;
}

.thread-head h2 {
  font-size: 24px;
}

.message-form textarea {
  border-radius: 12px;
}

.monitor-button,
.group-status-label {
  letter-spacing: 0;
}

.phone-table th,
.phone-table td {
  height: 62px;
}

@media (min-width: 1280px) {
  .dashboard-workspace {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 0;
  }

  .dashboard-workspace .main-pane {
    min-width: 0;
    padding-right: 16px;
  }

  .dashboard-workspace .thread-toggle {
    display: none;
  }

  .dashboard-workspace .thread {
    position: sticky;
    top: 67px;
    right: auto;
    bottom: auto;
    width: 360px;
    height: calc(100vh - 67px);
    transform: none;
    border: 1px solid var(--line);
    border-radius: 14px 0 0 14px;
    box-shadow: var(--shadow-soft);
  }

  .dashboard-workspace .thread-head button {
    display: none;
  }

  .dashboard-workspace .tee-sheet-scroll {
    max-width: 100%;
    height: calc(100vh - 230px);
  }
}

@media (max-width: 980px) {
  .user-form {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .brand {
    min-width: 0;
  }
  .brand-logo-stack {
    width: 150px;
    flex-basis: 150px;
  }
  .brand-tagline {
    font-size: 8px;
  }
  .brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  nav {
    grid-column: 1 / -1;
    overflow: auto;
  }
  .user-pill {
    grid-column: 2;
    grid-row: 1;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .section-head.sticky {
    top: 112px;
  }
  .thread {
    top: 112px;
    width: min(360px, calc(100vw - 28px));
    border-top: 1px solid var(--line);
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .phone-page .thread {
    top: 150px;
  }
  .thread-toggle {
    top: 172px;
    right: 0;
  }
  .thread-toggle.is-hidden {
    display: none;
  }
  .message-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
  }
  .message-form textarea {
    width: 100%;
  }
  .course-table {
    min-width: 1680px;
  }
  .course-scroll {
    height: calc(100vh - 260px);
  }
  .course-table .identity-col {
    width: 168px;
    min-width: 168px;
  }
  .course-table th,
  .course-table td {
    padding: 5px;
  }
  .completion-cell {
    min-height: 66px;
    padding: 6px;
  }
  .group-identity-content strong {
    font-size: 15px;
  }
  .group-identity-content span {
    font-size: 13px;
  }
  .course-manual {
    display: grid;
    grid-template-columns: 1fr 76px 1fr auto;
    align-items: stretch;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .group-admin-grid {
    grid-template-columns: 1fr;
  }

  .shot-player-row {
    grid-template-columns: 1fr;
  }

  .bad-time-checks {
    grid-template-columns: repeat(3, minmax(40px, 1fr));
  }

  .bad-time-header {
    grid-template-columns: repeat(3, minmax(40px, 1fr));
  }

  .inline-shot-form {
    justify-content: flex-start;
  }

  .course-table {
    min-width: 1560px;
  }
  .course-table .identity-col {
    width: 142px;
    min-width: 142px;
  }
  .course-scroll {
    height: calc(100vh - 300px);
  }
  .course-manual {
    grid-template-columns: 1fr 76px;
  }
  .course-manual button {
    grid-column: span 2;
  }
  .dialog-actions {
    grid-template-columns: 1fr;
  }
}
