:root {
  --hc-touch:48px;
  --hc-focus:#58e4ee;
  --hc-border:rgba(183,176,222,.15);
  --hc-subtle:rgba(209,125,255,.055);
  --hc-accent:#de75ff;
  --hc-cyan:#58e4ee;
  --hc-surface:#171827;
  --hc-muted:#b2b4c8;
  --hc-glow:rgba(189,79,246,.13)
}

:root[data-hc-theme=neutral] {
  --hc-focus:#8ab4f8;
  --hc-accent:#8ab4f8;
  --hc-cyan:#bac8da;
  --hc-surface:#1b1e24;
  --hc-subtle:rgba(160,175,198,.04);
  --hc-glow:transparent;
  --hc-border:rgba(170,184,205,.16)
}

html,body {
  background:var(--mud-palette-background,#0d0e1c);
  color:var(--mud-palette-text-primary,#f5f5f7);
  font-family:Inter,"Segoe UI",system-ui,sans-serif;
  line-height:1.55
}
a {
  color:var(--hc-cyan)
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-size:clamp(1.9rem,3.1vw,3.2rem);
  line-height:1.14;
  letter-spacing:-.045em;
  font-weight:750
}
.hc-sync-title {
  overflow-wrap:anywhere
}
h2 {
  font-size:1.35rem;
  letter-spacing:-.025em;
  font-weight:650
}
h3 {
  font-size:1.02rem;
  font-weight:650
}
.hc-brand {
  display:flex;
  gap:.7rem;
  align-items:center;
  letter-spacing:.13em
}
.hc-brand span {
  display:grid;
  flex-shrink:0;
  place-items:center;
  width:38px;
  height:38px;
  border:1px solid var(--hc-accent);
  border-radius:11px;
  font-size:1.15rem;
  font-weight:900;
  color:var(--hc-cyan);
  background:var(--hc-subtle)
}
.hc-brand strong {
  font-size:.78rem
}
.hc-page {
  max-width:1540px;
  margin:auto;
  padding:32px
}
.hc-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:20px
}
.hc-touch {
  min-height:var(--hc-touch)
}
:focus-visible {
  outline:3px solid var(--hc-focus);
  outline-offset:3px
}
.hc-muted {
  color:var(--hc-muted)
}
.hc-preserve {
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.hc-eyebrow {
  display:block;
  font:600 .7rem/1.6 "Segoe UI",sans-serif;
  letter-spacing:.17em;
  color:var(--hc-cyan);
  margin-bottom:12px
}
.hc-hero {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:40px;
  border:1px solid var(--hc-border);
  border-radius:22px;
  background:radial-gradient(ellipse at 90% 10%,var(--hc-glow),transparent 60%),var(--hc-surface)
}
.hc-hero:after {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background-image:linear-gradient(var(--hc-subtle) 1px,transparent 1px),linear-gradient(90deg,var(--hc-subtle) 1px,transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(90deg,transparent,black);
  pointer-events:none
}
.hc-hero p {
  max-width:640px;
  color:var(--hc-muted);
  margin-top:18px;
  line-height:1.7
}
.hc-hero-actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:24px
}
.hc-hero-compact {
  display:block;
  padding:28px
}
.hc-hero-compact h1 {
  font-size:clamp(1.65rem,2.5vw,2.4rem)
}
.hc-orbit {
  flex:0 0 180px;
  width:180px;
  height:180px;
  border:1px solid var(--hc-accent);
  border-radius:50%;
  display:grid;
  place-items:center;
  box-shadow:0 0 70px var(--hc-glow),inset 0 0 70px var(--hc-glow);
  transform:rotate(-18deg)
}
.hc-orbit span {
  font-weight:800;
  font-size:3rem;
  letter-spacing:-.05em;
  transform:rotate(18deg);
  color:var(--hc-cyan)
}
.hc-panel {
  background:var(--hc-surface);
  border:1px solid var(--hc-border);
  border-radius:18px;
  padding:24px
}
.hc-panel>h2 {
  margin-bottom:12px
}
.hc-panel>p {
  margin:10px 0
}
.hc-stat-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px
}
.hc-stat {
  display:flex;
  flex-direction:column;
  gap:12px;
  background:var(--hc-surface);
  border:1px solid var(--hc-border);
  border-radius:18px;
  padding:24px;
  color:inherit!important;
  text-decoration:none
}
.hc-stat>span {
  color:var(--hc-muted);
  font-size:.84rem
}
.hc-stat strong {
  font-size:2.25rem;
  letter-spacing:-.04em;
  color:var(--hc-cyan);
  line-height:1.15
}
.hc-stat strong small {
  font-size:.9rem;
  color:var(--hc-muted);
  letter-spacing:0;
  font-weight:400
}
.hc-stat>small {
  color:var(--hc-muted)
}
.hc-section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px
}
.hc-empty {
  text-align:center;
  color:var(--hc-muted);
  padding:32px 12px
}
.hc-empty h3 {
  color:var(--mud-palette-text-primary);
  margin:16px 0 8px
}
.hc-agenda-row {
  display:flex;
  gap:20px;
  align-items:center;
  padding:20px 0;
  border-top:1px solid var(--hc-border)
}
.hc-agenda-row>div {
  flex:1
}
.hc-agenda-row p,.hc-agenda-row small {
  color:var(--hc-muted);
  font-size:.85rem
}
.hc-agenda-time {
  color:var(--hc-cyan);
  font-variant-numeric:tabular-nums
}
.hc-shortcut {
  color:inherit!important;
  text-decoration:none;
  transition:border-color .16s ease
}
.hc-shortcut:hover {
  border-color:var(--hc-accent)
}
.hc-shortcut>.mud-icon-root {
  color:var(--hc-accent);
  margin-bottom:12px
}
.hc-shortcut p {
  color:var(--hc-muted);
  font-size:.88rem;
  line-height:1.6
}
.hc-week-grid {
  display:grid;
  grid-template-columns:repeat(7,minmax(150px,1fr));
  gap:12px;
  overflow-x:auto;
  padding-bottom:16px
}
.hc-day {
  border:1px solid var(--hc-border);
  border-radius:14px;
  overflow:hidden;
  background:var(--hc-subtle)
}
.hc-day>header {
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:16px;
  border-bottom:1px solid var(--hc-border)
}
.hc-day>header b {
  font-size:1.2rem
}
.hc-day>header small {
  color:var(--hc-muted)
}
.hc-day.is-today {
  border-color:var(--hc-accent)
}
.hc-schedule-card {
  background:var(--hc-surface);
  border:1px solid var(--hc-border);
  border-left:2px solid var(--hc-cyan);
  border-radius:10px;
  margin:10px;
  padding:12px;
  overflow-wrap:anywhere
}
.hc-schedule-card p,.hc-schedule-card small {
  font-size:.78rem;
  color:var(--hc-muted);
  margin:8px 0;
  display:block
}
.hc-capture {
  max-width:800px;
  margin:auto
}
.hc-step-track {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin:24px 0
}
.hc-step-track>div {
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--hc-muted);
  font-size:.82rem
}
.hc-step-track span {
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border:1px solid var(--hc-border);
  border-radius:50%;
  flex-shrink:0
}
.hc-step-track .active {
  color:var(--hc-accent)
}
.hc-step-track .active span {
  border-color:var(--hc-accent);
  background:var(--hc-subtle)
}
.hc-step-track .done {
  color:var(--hc-cyan)
}
.hc-timer {
  display:flex;
  flex-direction:column;
  align-items:center;
  background:var(--hc-subtle);
  border:1px solid var(--hc-border);
  padding:22px;
  border-radius:16px;
  margin-top:20px
}
.hc-timer-digits {
  font-size:clamp(2.5rem,8vw,3.4rem);
  font-weight:650;
  font-variant-numeric:tabular-nums;
  letter-spacing:.04em
}
.hc-timer.is-running {
  border-color:var(--hc-cyan)
}
.hc-timer.is-running .hc-timer-digits {
  color:var(--hc-cyan)
}
.hc-crew-row {
  display:flex;
  align-items:center;
  gap:16px;
  justify-content:space-between;
  border-top:1px solid var(--hc-border);
  padding:8px 0
}
.hc-crew-row>.mud-input-control {
  max-width:120px
}
.hc-catalog-results {
  display:grid;
  gap:8px;
  margin-top:12px
}
.hc-catalog-result {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  text-align:left;
  color:inherit;
  background:var(--hc-subtle);
  border:1px solid var(--hc-border);
  border-radius:12px;
  padding:12px 14px;
  cursor:pointer;
  min-height:58px
}
.hc-catalog-result b {
  font-size:.9rem
}
.hc-catalog-result small {
  display:block;
  color:var(--hc-muted);
  font-size:.75rem;
  margin-top:3px
}
.hc-catalog-result>span:last-child {
  color:var(--hc-accent);
  font-size:1.7rem
}
.hc-material-row {
  padding:12px;
  border:1px solid var(--hc-border);
  border-radius:12px;
  margin:12px 0
}
.hc-material-values {
  display:grid;
  grid-template-columns:1fr 1fr 48px;
  gap:14px;
  align-items:center
}
.hc-review-total {
  display:flex;
  gap:14px;
  align-items:center;
  margin:16px 0 22px
}
.hc-review-total strong {
  font-size:2rem;
  color:var(--hc-cyan)
}
.hc-review-total span {
  color:var(--hc-muted);
  font-size:.9rem
}
.hc-capture-actions {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:16px;
  flex-wrap:wrap
}
.hc-wizard-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:sticky;
  bottom:84px;
  background:var(--hc-surface);
  border:1px solid var(--hc-border);
  border-radius:14px;
  padding:12px;
  margin-top:18px;
  z-index:5
}
.hc-field-nav {
  position:fixed;
  z-index:20;
  bottom:0;
  left:0;
  right:0;
  display:flex;
  justify-content:space-around;
  background:var(--hc-surface);
  border-top:1px solid var(--hc-border);
  padding:8px 4px calc(8px + env(safe-area-inset-bottom));
  min-height:72px
}
.hc-field-nav>a {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-width:60px;
  min-height:48px;
  text-decoration:none;
  color:var(--hc-muted);
  font-size:.68rem;
  gap:3px;
  border-radius:10px
}
.hc-field-nav>a.active {
  color:var(--hc-accent);
  background:var(--hc-subtle)
}
.hc-field-shortcuts { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.hc-clock-totals { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:20px 0; }
.hc-clock-totals>div { padding:16px 10px; border:1px solid var(--hc-border); border-radius:16px; background:var(--hc-subtle); }
.hc-clock-totals span { display:block; color:var(--hc-muted); font-size:.85rem; }
.hc-clock-totals strong { display:block; margin-top:8px; color:var(--hc-accent); font-size:clamp(1.15rem,5vw,2.25rem); font-variant-numeric:tabular-nums; }
.hc-shift-row { display:flex; flex-direction:column; gap:6px; padding:16px 0; border-bottom:1px solid var(--hc-border); }
.hc-input-label { display:block; margin-top:18px; margin-bottom:8px; font-size:.9rem; color:var(--hc-muted); }
.hc-native-input { width:100%; min-height:48px; color:inherit; background:var(--hc-surface); border:1px solid var(--hc-border); border-radius:10px; padding:10px; color-scheme:dark; }
.hc-field-page {
  max-width:860px;
  padding-bottom:110px
}
.hc-visit-card {
  padding:22px;
  margin-bottom:16px;
  border:1px solid var(--hc-border);
  border-radius:18px;
  background:var(--hc-surface)
}
.hc-visit-card h2 {
  margin:8px 0
}
.hc-visit-card p {
  color:var(--hc-muted);
  font-size:.92rem;
  margin:8px 0 18px
}
.signature-wrap {
  height:190px;
  border:2px dashed var(--hc-muted);
  border-radius:12px;
  margin:16px 0;
  background:#10121b
}
.signature-wrap canvas {
  width:100%;
  height:186px;
  touch-action:none
}
.mud-appbar {
  border-bottom:1px solid var(--hc-border)
}
.mud-nav-link.active {
  background:var(--hc-subtle)!important;
  border-right:2px solid var(--hc-accent)
}

@media(max-width:900px) {
  .hc-page {
  padding:22px
}
.hc-orbit {
  display:none
}
.hc-stat-grid {
  gap:12px
}
.hc-stat {
  padding:18px
}
.hc-hero {
  padding:28px
}
.hc-week-grid {
  grid-template-columns:repeat(7,minmax(175px,1fr))
}

}

@media(max-width:600px) {
  .hc-page {
  padding:16px;
  padding-bottom:105px
}
.hc-hero {
  padding:22px;
  border-radius:18px
}
.hc-hero p {
  margin-top:12px;
  font-size:.88rem
}
.hc-panel {
  padding:18px
}
.hc-stat-grid {
  grid-template-columns:1fr
}
.hc-stat {
  gap:8px
}
.hc-stat strong {
  font-size:2rem
}
.hc-step-track>div {
  flex-direction:column;
  gap:5px
}
.hc-crew-row {
  gap:8px
}
.hc-agenda-row {
  gap:12px;
  flex-wrap:wrap
}
.hc-hero-actions>* {
  width:100%
}
.hc-capture-actions small {
  font-size:.7rem
}
.hc-wizard-actions {
  bottom:84px
}
.hc-week-grid {
  display:flex;
  flex-direction:column
}
.hc-schedule-card {
  margin:12px
}

}

/* Preserve touch controls on narrow phones: the full name remains in aria-label. */
@media(max-width:380px) {
  .mud-appbar .hc-brand strong {
    display:none
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
  animation:none!important;
  transition:none!important;
  scroll-behavior:auto!important
}

}

.hc-crew-self {
  display:block;
  padding:12px 0
}
.hc-wrap-id { overflow-wrap:anywhere; }
.hc-time-segments { list-style:none; padding:0; margin-top:12px; }
.hc-time-segments li { display:flex; flex-direction:column; gap:4px; padding:12px 0 12px 14px; margin-bottom:8px; border-left:3px solid var(--mud-palette-secondary); overflow-wrap:anywhere; }
.hc-time-segments li span { color:var(--mud-palette-text-secondary); font-variant-numeric:tabular-nums; }
.hc-time-editor { padding:16px 0; border-bottom:1px solid var(--mud-palette-divider); }
.hc-audit-entry { margin-top:12px; padding:0 12px; border:1px solid var(--hc-border); border-radius:12px; }
.hc-audit-entry summary { cursor:pointer; min-height:var(--hc-touch); padding:14px 0; font-weight:600; }
.hc-audit-entry[open] { padding-bottom:16px; }
.hc-material-row .mud-input.mud-disabled,.hc-material-row .mud-input.mud-disabled input {
  color:var(--mud-palette-text-primary);
  -webkit-text-fill-color:var(--mud-palette-text-primary)
}

.hc-planning-crew { border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; padding: .75rem; margin-top: 1.25rem; }
.hc-planning-crew legend { padding: 0 .5rem; font-weight: 600; }
.hc-planning-crew-list { max-height: 22rem; overflow-y: auto; overscroll-behavior: contain; }
.hc-planning-revision { border-top: 1px solid var(--mud-palette-lines-default); padding: 1rem 0; overflow-wrap: anywhere; }
