:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #5f6e73;
  --line: #d5e1eb;
  --panel: #ffffff;
  --page: #f2f7fb;
  --page-deep: #d8e8f4;
  --brand: #1e63c7;
  --brand-dark: #124894;
  --brand-ink: #082957;
  --accent: #c4442e;
  --ok: #157347;
  --warn: #b45309;
  --low: #b42318;
  --build: #1f78d1;
  --shave: #d92d20;
  --ice: #eaf5ff;
  --ice-2: #cde7fb;
  --focus: 0 0 0 3px rgba(30, 99, 199, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 19%, rgba(30, 99, 199, 0.08) 19.1% 19.35%, transparent 19.45% 80.6%, rgba(30, 99, 199, 0.08) 80.75% 81%, transparent 81.1%),
    linear-gradient(90deg, transparent 0 49.8%, rgba(18, 72, 148, 0.12) 49.9% 50.1%, transparent 50.2%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.36) 0 1px, transparent 1px 74px),
    radial-gradient(circle at 22% 0%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(180deg, #edf7ff 0%, var(--page) 42%, var(--page-deep) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  padding: 12px clamp(16px, 4vw, 44px);
  padding-right: clamp(220px, 23vw, 260px);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 23, 49, 0.9), rgba(8, 41, 87, 0.76) 45%, rgba(13, 78, 151, 0.55)),
    linear-gradient(180deg, rgba(5, 23, 49, 0.18), rgba(5, 23, 49, 0.62)),
    url("assets/rink-header.png") center 48% / cover no-repeat;
  box-shadow: 0 14px 40px rgba(6, 32, 67, 0.24);
  backdrop-filter: blur(14px);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #0b3470;
  background: linear-gradient(145deg, #ffffff, #e6f3ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 12px 28px rgba(2, 22, 27, 0.28);
  font-weight: 800;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.brand-mark-preview {
  width: 116px;
  height: 76px;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.brand p,
.user-chip p {
  margin: 3px 0 0;
  color: rgba(234, 251, 253, 0.78);
  font-size: 0.9rem;
}

.topbar-right {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.product-logo {
  position: absolute;
  top: 10px;
  right: clamp(12px, 2vw, 22px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(142px, 15vw, 190px);
  height: 44px;
  padding: 0;
  overflow: hidden;
  opacity: 0.78;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.24)) drop-shadow(0 6px 14px rgba(3, 26, 31, 0.2));
}

.product-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.user-chip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(4, 38, 45, 0.32);
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(30, 99, 199, 0.22);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #4f9ce6);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  object-fit: cover;
}

.avatar-large {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 20px rgba(3, 26, 31, 0.22);
}

.avatar-xl {
  width: 84px;
  height: 84px;
  font-size: 1.25rem;
}

.person-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.person-line > div {
  min-width: 0;
}

.profile-settings-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #314247;
  font-size: 0.92rem;
  font-weight: 700;
}

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

.topbar .btn {
  color: #08343b;
  background: rgba(255, 255, 255, 0.9);
}

.topbar .btn:hover {
  background: #fff;
}

.main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 36px);
}

.login-wrap {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 460px);
}

.login-visual {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 540px;
  padding: clamp(24px, 7vw, 72px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 23, 49, 0.78), rgba(8, 41, 87, 0.48)),
    linear-gradient(180deg, rgba(5, 23, 49, 0.1), rgba(5, 23, 49, 0.86)),
    url("assets/rink-header.png") center / cover no-repeat;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 19%, rgba(255, 255, 255, 0.2) 19.1% 19.25%, transparent 19.35%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 132px);
  opacity: 0.6;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 23, 49, 0.82));
}

.login-visual > * {
  position: relative;
  z-index: 1;
}

.login-visual h2 {
  max-width: 620px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
}

.login-visual p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(20px, 5vw, 54px);
  background: #fff;
}

.panel,
.card,
.form-panel {
  border: 1px solid rgba(188, 207, 211, 0.88);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(25, 44, 49, 0.1);
}

.panel,
.card,
.form-panel,
.btn,
.notification-row {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.form-panel {
  padding: 22px;
}

.stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.label {
  color: #314247;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #b8c7cb;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
  padding: 9px 10px;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--ink);
  background: #e9f0f1;
  font-weight: 800;
  line-height: 1;
}

.btn.primary {
  color: #fff;
  background: var(--brand);
}

.btn.primary:hover {
  background: var(--brand-dark);
}

.btn.danger {
  color: #fff;
  background: var(--accent);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 6px;
}

.credentials {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #dce5e7;
  border-radius: 8px;
  background: #f7faf9;
  color: var(--muted);
  font-size: 0.92rem;
}

.credentials strong {
  color: var(--ink);
}

.notice {
  padding: 12px 14px;
  border-left: 4px solid var(--brand);
  background: #edf6ff;
  color: #173c70;
}

.notice.success,
.success {
  padding: 12px 14px;
  border-left: 4px solid var(--good);
  background: #ecfdf3;
  color: #135b33;
  font-weight: 700;
}

.error {
  padding: 11px 13px;
  border-radius: 6px;
  color: #8d1d14;
  background: #fff1f0;
  font-weight: 700;
}

.section-head {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid rgba(188, 207, 211, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    linear-gradient(135deg, rgba(201, 236, 245, 0.86), rgba(255, 255, 255, 0.72));
  box-shadow: 0 14px 38px rgba(25, 44, 49, 0.08);
}

.section-head::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.section-head > * {
  position: relative;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.metric {
  position: relative;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 252, 0.98));
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), #7bb9f0);
}

.metric-button {
  display: block;
  width: 100%;
  color: var(--ink);
  text-align: left;
}

.metric-button:hover {
  border-color: rgba(30, 99, 199, 0.5);
  box-shadow: 0 20px 48px rgba(25, 44, 49, 0.16);
  transform: translateY(-1px);
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1.05;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

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

.readiness-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.readiness-card .summary-row {
  padding: 0;
  border: 0;
}

.document-tabs {
  align-items: stretch;
}

.readiness-document {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.readiness-document h3,
.readiness-document h4,
.readiness-document p {
  margin: 0;
}

.readiness-document section {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.history-mode-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.link-button {
  padding: 0;
  color: var(--brand);
  background: transparent;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pricing-line {
  display: grid;
  gap: 3px;
  margin-top: 8px;
}

.client-overview-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.client-overview-row:hover {
  border-color: rgba(30, 99, 199, 0.45);
  box-shadow: 0 14px 30px rgba(25, 44, 49, 0.12);
}

.admin-client-detail {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 16px;
  margin: 18px 0;
  align-items: start;
}

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

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.facility-nest {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.facility-nest div {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 247, 251, 0.82);
}

.facility-nest span {
  font-weight: 850;
}

.facility-nest small {
  color: var(--muted);
  font-weight: 700;
}

.notifications-panel {
  margin-top: 18px;
}

.notifications-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.notifications-head p {
  margin: 4px 0 0;
}

.notifications-list {
  display: grid;
  gap: 8px;
}

.notification-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.notification-row.unread {
  border-color: rgba(196, 68, 46, 0.38);
  background: #fff8f6;
}

.notification-row:hover {
  border-color: rgba(30, 99, 199, 0.5);
  box-shadow: 0 10px 24px rgba(25, 44, 49, 0.08);
}

.notification-row p {
  margin: 4px 0 0;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.notification-meta p {
  margin: 0;
}

.notification-state {
  border-radius: 999px;
  padding: 4px 8px;
  color: #fff;
  background: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
}

.notification-row.read .notification-state {
  color: var(--muted);
  background: #e9f0f1;
}

.action-tile {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 22px;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(235, 246, 255, 0.96));
  text-align: left;
}

.action-tile::after {
  content: "";
  position: absolute;
  inset: auto -34px -44px auto;
  width: 132px;
  height: 132px;
  border: 18px solid rgba(30, 99, 199, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.action-tile:hover {
  border-color: rgba(30, 99, 199, 0.46);
  box-shadow: 0 20px 48px rgba(25, 44, 49, 0.14);
  transform: translateY(-1px);
}

.action-tile h3 {
  position: relative;
  margin: 0;
}

.action-tile p {
  position: relative;
  margin: 0;
  color: var(--muted);
}

.inspection-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.rink-panel {
  min-width: 0;
  padding: 18px;
}

.rink-board {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 4px 190px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.rink-map {
  position: relative;
  width: max(100%, 980px);
  min-width: 980px;
  aspect-ratio: 2.95 / 1;
  min-height: 0;
  border: 3px solid #273033;
  border-radius: 10% / 30%;
  overflow: visible;
  background: linear-gradient(180deg, #f7fbfb 0%, #e8f0f1 52%, #f7fbfb 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.9),
    inset 0 0 34px rgba(70, 90, 96, 0.12);
}

.rink-lines span {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.ice-line {
  top: 0;
  bottom: 0;
  width: 3px;
  background: #31383a;
}

.goal-line.left {
  left: 7.5%;
}

.goal-line.right {
  right: 7.5%;
}

.blue-line.left {
  left: 35%;
}

.blue-line.right {
  right: 32.8%;
}

.center-line {
  left: 50%;
  width: 4px;
  background: #233d42;
}

.goal {
  top: 35%;
  width: 5%;
  height: 30%;
  border: 2px solid #31383a;
}

.goal.left {
  left: 0.6%;
  border-left: 0;
  border-radius: 0 70% 70% 0;
}

.goal.right {
  right: 0.6%;
  border-right: 0;
  border-radius: 70% 0 0 70%;
}

.circle {
  width: 15%;
  aspect-ratio: 1 / 0.78;
  border: 2px solid rgba(49, 56, 58, 0.62);
  border-radius: 50%;
}

.circle.left {
  left: 15%;
}

.circle.right {
  right: 15%;
}

.circle.top {
  top: 14%;
}

.circle.bottom {
  bottom: 14%;
}

.center-circle {
  left: 45%;
  top: 35%;
  width: 12%;
  aspect-ratio: 1;
  border: 2px solid rgba(49, 56, 58, 0.58);
  border-radius: 50%;
}

.slot {
  bottom: -1px;
  width: 10%;
  height: 17%;
  border: 2px solid rgba(49, 56, 58, 0.55);
  border-bottom: 0;
  border-radius: 70% 70% 0 0;
}

.slot.left {
  left: 44%;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #31383a;
}

.dot.left.upper {
  left: 23%;
  top: 27%;
}

.dot.left.lower {
  left: 23%;
  top: 72%;
}

.dot.right.upper {
  right: 23%;
  top: 27%;
}

.dot.right.lower {
  right: 23%;
  top: 72%;
}

.rink-point {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 112px;
}

.rink-point.active {
  z-index: 8;
}

.star-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #0f1213;
  background: transparent;
  font-size: 1.9rem;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.9));
}

.rink-point.active .star-button {
  color: var(--accent);
  transform: scale(1.1);
}

.point-values {
  display: flex;
  gap: 3px;
  justify-content: center;
  width: max-content;
  max-width: 104px;
}

.point-values span {
  min-width: 36px;
  padding: 2px 5px;
  border: 1px solid rgba(23, 33, 38, 0.14);
  border-radius: 999px;
  color: #53646a;
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 3px 8px rgba(20, 32, 36, 0.1);
}

.point-values span.filled {
  color: #102b31;
  border-color: rgba(30, 99, 199, 0.32);
  background: #eff8ff;
}

.work-map-panel {
  display: grid;
  gap: 14px;
}

.work-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.work-map-head p {
  margin: 4px 0 0;
}

.markup-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 247, 255, 0.92));
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(30, 99, 199, 0.18);
  border-radius: 8px;
  background: #fff;
}

.segmented button {
  min-width: 58px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--brand-ink);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 850;
}

.segmented button.selected {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 5px 14px rgba(30, 99, 199, 0.22);
}

.settings-shell {
  display: grid;
  gap: 16px;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
}

.settings-tabs button {
  min-width: auto;
  white-space: nowrap;
}

.security-tabs button {
  gap: 6px;
}

.security-tabs span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--brand-ink);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
  line-height: 1.2;
}

.security-tabs button.selected span {
  color: var(--brand);
}

.color-swatches {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.color-swatches button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(23, 33, 38, 0.18), 0 5px 12px rgba(20, 32, 36, 0.12);
}

.color-swatches button.selected {
  box-shadow: 0 0 0 3px rgba(30, 99, 199, 0.26), 0 7px 14px rgba(20, 32, 36, 0.18);
  transform: translateY(-1px);
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 800;
}

.check-pill input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.range-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 800;
}

.range-field input {
  width: 96px;
  accent-color: var(--brand);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 800;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.legend-dot.low,
.legend-dot.shave {
  background: var(--shave);
}

.legend-dot.high,
.legend-dot.build {
  background: var(--build);
}

.legend-dot.good {
  background: var(--ok);
}

.work-map-point {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 62px;
  min-height: 52px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 32, 36, 0.22);
  text-align: center;
}

.work-map-point span {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.work-map-point small {
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.58rem;
  font-weight: 800;
}

.work-map-point.low,
.work-map-point.shave {
  background: var(--shave);
}

.work-map-point.high,
.work-map-point.build {
  background: var(--build);
}

.work-map-point.good {
  background: var(--ok);
}

.markup-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.work-map-panel.markup-tool-pan .markup-canvas {
  touch-action: pan-x pan-y;
  cursor: grab;
}

.markup-help {
  margin: 0;
}

.work-map-reference-btn {
  width: fit-content;
}

.work-map-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #071114;
  color: #fff;
}

.work-map-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: rgba(7, 17, 20, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.work-map-viewer-head strong,
.work-map-viewer-head span {
  display: block;
}

.work-map-viewer-head span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}

.work-map-viewer-scroll {
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}

.work-map-viewer-rink {
  width: min(1120px, calc(100vw - 24px), calc((100vh - 92px) * 2.95));
  min-width: 0;
  margin: 0 auto;
  background: linear-gradient(180deg, #f7fbfb 0%, #e8f0f1 52%, #f7fbfb 100%);
}

.work-map-viewer-image {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.point-actions {
  display: none;
  gap: 3px;
  padding: 2px;
  border: 1px solid rgba(23, 33, 38, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 12px rgba(20, 32, 36, 0.14);
}

.rink-point.active .point-actions {
  display: flex;
}

.inline-measurement-editor {
  display: grid;
  gap: 7px;
  width: 172px;
  padding: 10px;
  border: 1px solid rgba(30, 99, 199, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(20, 32, 36, 0.22);
}

.inline-measurement-editor strong {
  color: #132428;
  font-size: 0.78rem;
  line-height: 1.15;
}

.inline-measurement-editor label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.inline-measurement-editor input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.voice-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
}

.mic-btn {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(30, 99, 199, 0.35);
  border-radius: 6px;
  color: var(--brand);
  background: #eef6ff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.mic-btn.listening {
  color: #fff;
  background: #b02020;
  border-color: #b02020;
}

.voice-note {
  padding: 6px 7px;
  border-radius: 6px;
  color: #174070;
  background: #eaf4ff;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.25;
}

.inline-note {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.mini-btn {
  min-height: 26px;
  padding: 4px 7px;
  border-radius: 4px;
  color: #203034;
  background: #eef3f2;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.mini-btn.selected {
  color: #fff;
  background: var(--brand);
}

.mini-btn.done::after {
  content: " ✓";
}

.measurement-editor {
  border-color: rgba(30, 99, 199, 0.35);
}

.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editor-head p {
  margin: 4px 0 0;
}

.measurement-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-empty {
  padding: 10px;
  border: 1px dashed #c6d3d6;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbfa;
  font-size: 0.9rem;
}

.photo-help {
  margin: -8px 0 0;
  font-size: 0.86rem;
}

.photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-thumb {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f2;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-link {
  display: block;
  width: 100%;
  height: 100%;
}

.photo-thumb.unsupported {
  width: 142px;
  background: #f8fbfa;
}

.photo-file-tile {
  display: grid;
  align-content: center;
  gap: 3px;
  width: 100%;
  height: 100%;
  padding: 10px;
  color: #314247;
  text-align: center;
  text-decoration: none;
}

.photo-file-tile strong {
  color: var(--brand);
  font-size: 0.9rem;
}

.photo-file-tile span,
.photo-file-tile small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-file-tile small {
  color: var(--muted);
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(23, 33, 38, 0.76);
  font-weight: 900;
  line-height: 1;
}

.form-side {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.form-side .measurement-editor {
  grid-row: span 2;
}

.summary-list {
  display: grid;
  gap: 8px;
}

.summary-row,
.history-row,
.audit-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.staff-row {
  align-items: center;
}

.staff-actions {
  justify-content: flex-end;
}

.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--ok);
  font-size: 0.78rem;
  font-weight: 800;
}

.status.low {
  background: var(--low);
}

.status.high {
  background: var(--warn);
}

.status.warn {
  background: var(--warn);
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-row {
  grid-template-columns: 1.2fr 1fr auto;
  align-items: start;
}

.history-meta {
  display: grid;
  gap: 5px;
}

.history-meta strong {
  font-size: 1.05rem;
}

.muted {
  color: var(--muted);
}

.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;
}

.measure-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  color: #314247;
  font-size: 0.84rem;
}

.detail-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 28, 32, 0.48);
}

.modal-panel {
  width: min(1080px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 26px 80px rgba(12, 24, 28, 0.28);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal-head h2 {
  margin: 0;
}

.modal-head p {
  margin: 5px 0 0;
}

.override-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.override-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbfa;
}

.override-table input {
  min-width: 96px;
}

.modal-actions {
  justify-content: flex-end;
}

.audit-log {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.audit-panel {
  margin-top: 18px;
}

.focus-panel {
  border-color: rgba(30, 99, 199, 0.55);
  box-shadow: 0 0 0 4px rgba(30, 99, 199, 0.12), 0 16px 44px rgba(25, 44, 49, 0.08);
}

.empty {
  padding: 28px;
  border: 1px dashed #b7c8cc;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.report-page {
  display: none;
}

.report-page h1,
.report-page h2,
.report-page h3 {
  margin: 0;
}

.report-block {
  break-inside: avoid;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #bfcdd1;
}

.report-operator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.report-operator p {
  margin: 0;
}

@media (max-width: 980px) {
  .login-wrap,
  .inspection-layout,
  .form-side,
  .dashboard-grid,
  .actions-grid,
  .admin-grid,
  .admin-client-detail,
  .form-grid.two,
  .history-row,
  .filters {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 360px;
  }

  .inspection-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    position: relative;
    padding-right: 16px;
    overflow: visible;
  }

  .topbar .brand {
    max-width: calc(100% - 168px);
  }

  .topbar,
  .section-head,
  .user-chip,
  .notifications-head,
  .work-map-head {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }

  .topbar-right {
    width: 100%;
    align-items: flex-start;
    padding-top: 0;
  }

  .product-logo {
    top: 8px;
    right: 10px;
    width: 150px;
    height: 38px;
  }

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

  .history-mode-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .rink-map {
    width: 920px;
    min-width: 920px;
  }

  .form-panel {
    padding: 16px;
  }

  .readiness-grid {
    grid-template-columns: 1fr;
  }

  .measurement-pair {
    grid-template-columns: 1fr;
  }

  .rink-point {
    width: 68px;
  }

  .star-button {
    width: 26px;
    height: 26px;
    font-size: 1.52rem;
  }

  .mini-btn {
    min-height: 22px;
    padding: 3px 5px;
    font-size: 0.64rem;
  }

  .modal-backdrop {
    align-items: start;
    padding: 10px;
  }

  .modal-panel {
    padding: 14px;
  }

  .modal-head {
    flex-direction: column;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .profile-settings-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-shell,
  .login-wrap {
    display: none !important;
  }

  .report-page {
    display: block;
    padding: 0.5in;
    color: #111;
    font-family: Arial, sans-serif;
  }

  .report-page table {
    page-break-inside: avoid;
  }

  .report-page .status {
    color: #111;
    border: 1px solid #999;
    background: #fff;
  }
}
