/* Line-side tablet - Material Design 3, dark high-contrast scheme.
   Large touch targets, glance-able from across the floor. Self-contained. */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
  --surface: #111418;
  --surface-container: #1d2024;
  --surface-variant: #2a2f36;
  --on-surface: #e3e2e6;
  --on-surface-variant: #c2c7cf;
  --outline: #8c9199;
  --primary: #9ecaff;
  --primary-container: #00497d;
  --on-primary-container: #d1e4ff;
  --danger: #e11d28;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: "Roboto", -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

header.topbar {
  background: var(--surface-container);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header.topbar h1 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: 0.2px; }
header.topbar .who a { color: var(--on-surface-variant); font-size: 16px; text-decoration: none; }

main { max-width: 1000px; margin: 0 auto; padding: 24px; }

.card {
  background: var(--surface-container);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 22px;
}

.label-lg {
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

select {
  width: 100%;
  padding: 20px;
  font-size: 24px;
  font-weight: 500;
  font-family: inherit;
  color: var(--on-surface);
  background: var(--surface-variant);
  border: none;
  border-bottom: 2px solid var(--on-surface-variant);
  border-radius: 8px 8px 0 0;
  appearance: none;
}

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 26px; }
.cat {
  font-size: 22px;
  font-weight: 500;
  font-family: inherit;
  padding: 36px 16px;
  border-radius: 20px;
  background: var(--surface-variant);
  color: var(--on-surface);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.06s, background 0.12s, border-color 0.12s;
}
.cat:active { transform: scale(0.98); }
.cat.selected {
  background: var(--primary-container);
  color: var(--on-primary-container);
  border-color: var(--primary);
}

.raise-btn {
  width: 100%;
  margin-top: 24px;
  font-size: 28px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 1px;
  padding: 48px 20px;
  border: none;
  border-radius: 28px;
  background: var(--danger);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(225, 29, 40, 0.35);
  transition: transform 0.06s, filter 0.12s;
}
.raise-btn:active { transform: translateY(2px); filter: brightness(0.96); }

.section-title { font-size: 20px; font-weight: 500; margin: 0 0 16px; }

.line-name { font-size: 30px; font-weight: 700; color: var(--primary); }

.bd {
  background: var(--surface-variant);
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 12px;
}
.bd .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.bd h3 { margin: 0; font-size: 22px; font-weight: 500; }
.bd .meta { color: var(--on-surface-variant); font-size: 16px; margin-top: 6px; }

.pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.pill.OPEN { background: #93000a; color: #ffdad6; }
.pill.ACCEPTED { background: #3b4858; color: #d7e3f8; }
.pill.IN_PROGRESS { background: #00497d; color: #d1e4ff; }
.pill.AWAITING_CLEARANCE { background: #4a4458; color: #ead9ff; }

.active-head { text-align: center; margin-bottom: 10px; }
.active-title { font-size: 24px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #ff6b62; }
.active-sub { color: var(--on-surface-variant); font-size: 18px; margin-top: 6px; }
.coming { text-align: center; font-size: 30px; font-weight: 700; color: #69f0ae; margin-top: 10px; }
.big-timer { text-align: center; font-size: 60px; margin: 14px 0; }
.state-note { text-align: center; color: var(--on-surface-variant); font-size: 18px; margin-top: 16px; }

/* Big actions, same size as the REPORT button */
.go-btn, .finish-btn, .contacting {
  width: 100%;
  margin-top: 16px;
  font-size: 28px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 1px;
  text-align: center;
  padding: 44px 20px;
  border: none;
  border-radius: 28px;
  cursor: pointer;
}
.go-btn { background: #1e9e4a; color: #fff; }
.finish-btn { background: #3b9eff; color: #04263f; }
.contacting { background: #1e9e4a; color: #fff; cursor: default; animation: pulse 1.4s ease-in-out infinite; }
.go-btn:active, .finish-btn:active { transform: translateY(2px); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.ghost-btn {
  margin-top: 10px;
  background: var(--surface-variant);
  color: var(--on-surface);
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
}

textarea {
  width: 100%;
  background: var(--surface-variant);
  color: var(--on-surface);
  border: none;
  border-radius: 12px;
  padding: 16px;
  font: 400 20px "Roboto", sans-serif;
  resize: vertical;
}

.chk { display: flex; align-items: center; gap: 14px; font-size: 20px; margin: 14px 0; color: var(--on-surface); }
.chk input { width: 28px; height: 28px; accent-color: var(--primary); }

.sig-wrap { margin-top: 8px; }
.sig-pad { width: 100%; height: 200px; background: #fff; border: 2px solid var(--outline); border-radius: 12px; touch-action: none; display: block; }

.empty { color: var(--on-surface-variant); text-align: center; padding: 30px; font-size: 18px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(20px);
  background: #1e6a3a;
  color: #fff;
  font-size: 22px;
  font-weight: 500;
  padding: 22px 40px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
