:root {
  --track-panel: rgba(255, 255, 255, 0.94);
  --track-panel-strong: #ffffff;
  --track-panel-soft: #f7f9ff;
  --track-text: #172033;
  --track-muted: #667085;
  --track-line: rgba(223, 230, 242, 0.98);
  --track-blue: #5f82e6;
  --track-blue-soft: #edf3ff;
  --track-green: #72c6aa;
  --track-green-soft: #edf9f4;
  --track-purple: #9351d6;
  --track-orange: #ee9b5f;
  --track-red: #b84242;
  --track-shadow: 0 26px 70px rgba(12, 18, 32, 0.28);
}

html {
  min-height: 100%;
  color-scheme: light;
  background: #111827;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--track-text);
  background:
    linear-gradient(90deg, rgba(8, 13, 24, 0.78) 0%, rgba(8, 13, 24, 0.5) 42%, rgba(8, 13, 24, 0.22) 100%),
    url("/walker-index/walker-index.jpg") center / cover no-repeat fixed;
  font-family: Aptos, "Segoe UI", Inter, system-ui, sans-serif;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 13, 24, 0.12), rgba(8, 13, 24, 0.34)),
    radial-gradient(circle at 18% 12%, rgba(88, 116, 189, 0.2), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(102, 194, 165, 0.18), transparent 26%);
  pointer-events: none;
  z-index: -1;
}

.walker-shell {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: grid;
  align-items: start;
  padding: clamp(18px, 4vw, 48px);
}

.portal-panel.track-panel {
  width: min(100%, 860px);
  padding: clamp(18px, 4vw, 30px);
  background: var(--track-panel);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 26px;
  box-shadow: var(--track-shadow);
  backdrop-filter: blur(18px);
}

.voice-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.portal-head.track-head,
.brand-row.track-brand,
.track-head-actions,
.mail-card-head,
.thread-head,
.track-modal-head,
.thread-mail-header,
.modal-request-topline,
.comment-actions,
.request-launch-row,
.search-form,
.search-actions,
.step-top {
  display: flex;
  align-items: center;
}

.portal-head.track-head {
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.brand-row.track-brand {
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.track-logo {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 2px solid rgba(88, 116, 189, 0.18);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(88, 116, 189, 0.16);
  overflow: hidden;
  flex: 0 0 auto;
}

.company-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
}

.header-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: #5f82e6;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-copy h1 {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  line-height: 0.98;
  color: var(--track-text);
}

.hero-copy,
.txt-muted,
.section-copy,
.thread-copy,
.request-launch-copy,
.modal-request-meta,
.timeline-note,
.track-note {
  color: var(--track-muted);
}

.hero-copy {
  margin: 10px 0 0;
  max-width: 430px;
  line-height: 1.5;
}

.track-head-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.primary-btn,
.ghost-btn,
.icon-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-weight: 900;
  font-family: inherit;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--track-blue), #6f8dde);
  box-shadow: 0 14px 28px rgba(88, 116, 189, 0.22);
}

.ghost-btn,
.icon-btn {
  color: var(--track-blue);
  background: #ffffff;
  border-color: #dbe5f7;
}

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

.week-card,
.schedule-card,
.notification-panel,
.lookup-panel,
.timeline-panel,
.thread-panel,
.mail-opened-card,
.case-hero {
  margin-top: 14px;
  background: var(--track-panel-strong);
  border: 1px solid var(--track-line);
  border-radius: 18px;
}

.my-cases-panel,
.lookup-panel,
.timeline-panel,
.thread-panel {
  padding: 14px;
}

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

.section-title {
  margin: 0 0 4px;
  font-size: 1.08rem;
  color: var(--track-text);
}

.section-copy {
  margin: 0;
  line-height: 1.45;
}

.request-launch-row {
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--track-panel-soft);
  border: 1px solid var(--track-line);
}

.request-launch-btn {
  flex: 0 0 auto;
}

.request-launch-copy {
  margin: 0;
  text-align: right;
  font-size: 0.88rem;
}

.lookup-panel[hidden] {
  display: none !important;
}

.search-form {
  align-items: end;
  gap: 12px;
}

.search-field {
  flex: 1 1 auto;
  min-width: 0;
}

.search-field label,
.comment-card label {
  display: block;
  margin-bottom: 6px;
  color: #4b5872;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d9e0ef;
  border-radius: 14px;
  background: #f7f9ff;
  color: var(--track-text);
  font-family: inherit;
  font-size: 0.97rem;
}

input:focus,
textarea:focus {
  border-color: rgba(88, 116, 189, 0.72);
  box-shadow: 0 0 0 4px rgba(88, 116, 189, 0.14);
}

.alert {
  margin-top: 14px;
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 66, 66, 0.25);
  background: rgba(248, 113, 113, 0.1);
  color: #8d2424;
  font-weight: 800;
}

.track-result {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.case-hero {
  padding: 18px;
}

.case-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

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

.badge,
.tag,
.modal-request-status,
.case-chip-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge {
  flex: 0 0 auto;
  color: var(--track-blue);
  background: var(--track-blue-soft);
  border: 1px solid #dce6ff;
}

.badge.new {
  color: #587b00;
  background: #f5fbd8;
  border-color: #deec9f;
}

.badge.cat-schedule { color: #3569df; background: #ebf3ff; border-color: #cfddff; }
.badge.cat-field { color: #1c8b63; background: #eaf8f1; border-color: #cbeedd; }
.badge.cat-hr { color: #7b4fb6; background: #f3ebff; border-color: #e1d1ff; }
.badge.cat-dispatch { color: #a86723; background: #fff0e1; border-color: #f7d8bb; }
.badge.cat-other { color: #6b7280; background: #f4f6fb; border-color: #dde3ef; }
.badge.cat-payroll { color: #a03333; background: #ffeded; border-color: #f3c9c9; }
.badge.cat-safety { color: #0f8b82; background: #e7faf7; border-color: #c9ece7; }
.badge.cat-equipment { color: #4b5ad2; background: #edf0ff; border-color: #d3d8ff; }
.badge.cat-it { color: #1073a1; background: #e7f8ff; border-color: #c9e9f7; }
.badge.cat-training { color: #9a7800; background: #fff8d9; border-color: #f3e6a3; }
.badge.cat-benefits { color: #6a41c3; background: #f2edff; border-color: #ddd0ff; }
.badge.cat-facilities { color: #588518; background: #effadc; border-color: #dcedb9; }
.badge.cat-uniforms { color: #a63d68; background: #ffedf4; border-color: #f7d0df; }
.badge.cat-incidents { color: #a23434; background: #fff0f0; border-color: #f3d2d2; }
.badge.cat-infractions { color: #9e2f2f; background: #fff0f0; border-color: #f0cbcb; }
.badge.cat-performance { color: #5a7e00; background: #f4fad9; border-color: #deec9f; }

.tag {
  color: var(--track-blue);
  background: var(--track-blue-soft);
  border: 1px solid #dce6ff;
}

.summary-stack {
  min-width: 0;
}

.summary-stack span {
  display: block;
  color: var(--track-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-stack strong {
  display: block;
  margin-top: 4px;
  color: var(--track-text);
  font-size: 0.96rem;
  line-height: 1.45;
  word-break: break-word;
}

.summary-inline {
  text-align: right;
  flex: 0 0 auto;
}

.case-headline {
  margin-top: 16px;
}

.case-from {
  margin: 10px 0 0;
  color: #44536d;
  font-size: 0.96rem;
  line-height: 1.5;
}

.mail-subject {
  margin: 0;
  color: var(--track-text);
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  line-height: 1.15;
}

.mail-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--track-line);
  color: #24324d;
  font-size: 0.95rem;
  line-height: 1.48;
  word-break: break-word;
}

.mail-copy-text {
  white-space: pre-wrap;
}

.track-request-compact {
  display: grid;
  gap: 12px;
}

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

.track-fact {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 143, 122, 0.18);
  border-radius: 14px;
  background: rgba(239, 250, 247, 0.78);
}

.track-fact span {
  color: #007665;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.track-fact strong {
  min-width: 0;
  color: var(--track-text);
  font-size: 0.9rem;
  line-height: 1.25;
}

.track-next-step {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  color: #244247;
  border: 1px solid rgba(35, 116, 171, 0.18);
  border-radius: 14px;
  background: rgba(235, 246, 253, 0.74);
}

.track-next-step p {
  margin: 0;
}

.track-case-link {
  width: fit-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #ffffff;
  border-radius: 12px;
  background: #008f7a;
  text-decoration: none;
  font-weight: 950;
}

.timeline-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.timeline-panel .section-head {
  margin: 0;
  padding: 0;
}

.timeline-panel .section-title,
.thread-head h2 {
  font-size: 1rem;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  padding: 0;
}

.timeline-grid.is-current-status {
  display: block;
}

.current-status-card {
  display: grid;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(88, 116, 189, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f2fbf8);
}

.current-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.current-status-top span {
  color: #008f7a;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-status-top strong {
  color: var(--track-text);
  font-size: 0.92rem;
}

.current-status-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf7;
}

.current-status-track i {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--track-green), var(--track-blue));
}

.current-status-card p {
  margin: 0;
  color: var(--track-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.timeline-grid::-webkit-scrollbar {
  display: none;
}

.step {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--track-line);
  border-radius: 14px;
  background: #f8fbff;
}

.step-top {
  flex: 0 0 auto;
  gap: 0;
}

.step-line {
  display: none;
}

.step .dot {
  width: 12px;
  height: 12px;
  border: 2px solid #c5cfde;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(237, 243, 255, 0.9);
}

.step-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.step .label {
  color: #4d5d79;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.step .date {
  color: var(--track-muted);
  font-size: 0.68rem;
  line-height: 1.2;
  min-height: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step.active .dot {
  border-color: var(--track-blue);
  background: var(--track-blue);
}

.step.active .label {
  color: var(--track-blue);
}

.step.active .step-line {
  display: none;
}

.step.done .dot {
  border-color: var(--track-green);
  background: var(--track-green);
}

.step.done .label {
  color: #28785c;
}

.step.done .step-line {
  display: none;
}

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

.thread-head {
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.thread-head h2 {
  margin: 0 0 4px;
  font-size: 1.08rem;
}

.thread-copy {
  margin: 0;
  font-size: 0.9rem;
}

.comment-wrap {
  margin: 0;
}

.comment-card {
  padding: 14px;
  border: 1px solid var(--track-line);
  border-radius: 16px;
  background: var(--track-panel-soft);
}

.comment-card-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.comment-card-head strong {
  color: var(--track-text);
}

.comment-actions {
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.thread {
  display: grid;
  gap: 10px;
}

.thread-mail-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 0;
  position: relative;
}

.thread-mail-item.is-user {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.thread-mail-item.is-user .thread-mail-avatar {
  grid-column: 2;
  grid-row: 1;
}

.thread-mail-item.is-user .thread-mail-content {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  background: #eff7ff;
  border-color: #d6e8ff;
}

.thread-mail-item.is-admin .thread-mail-content {
  justify-self: start;
  background: #f5fbf8;
  border-color: #d9efe7;
}

.thread-mail-avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--track-blue), var(--track-green));
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.thread-mail-item:not(:last-child)::before {
  content: none;
}

.thread-mail-content {
  min-width: 0;
  width: fit-content;
  max-width: min(100%, 560px);
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--track-line);
  border-radius: 16px;
}

.thread-mail-item:last-child .thread-mail-content {
  margin-bottom: 0;
}

.thread-mail-header {
  gap: 6px 12px;
  flex-wrap: wrap;
}

.thread-mail-author {
  color: var(--track-text);
  font-size: 0.94rem;
}

.thread-mail-date {
  color: var(--track-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.thread-mail-copy {
  color: #24324d;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.track-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 13, 24, 0.48);
  backdrop-filter: blur(16px);
}

.track-modal-backdrop[hidden] {
  display: none !important;
}

.track-modal {
  width: min(100%, 640px);
  max-height: min(86vh, 720px);
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--track-shadow);
}

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

.track-modal-head h2 {
  margin: 0;
  color: var(--track-text);
  font-size: 1.35rem;
}

.modal-request-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--track-line);
  border-radius: 18px;
  background: #ffffff;
}

.modal-request-empty {
  padding: 14px;
  background: #f8fbff;
}

.modal-request-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--track-line);
  border-radius: 0;
  background: #ffffff;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.modal-request-row:hover {
  background: #f7f9ff;
}

.modal-request-row.is-active {
  background: #edf3ff;
}

.modal-request-row.is-unseen {
  background: #f5fbf8;
}

.modal-request-row:last-child {
  border-bottom: 0;
}

.modal-request-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.modal-request-topline {
  gap: 10px;
  flex-wrap: wrap;
}

.modal-request-topline strong {
  color: var(--track-text);
  font-size: 0.94rem;
}

.modal-request-status {
  color: var(--track-blue);
  background: #eff4ff;
  border: 1px solid #dce6ff;
}

.modal-request-subject {
  color: var(--track-text);
  font-weight: 800;
  line-height: 1.45;
}

.case-chip-indicator {
  color: #28785c;
  background: var(--track-green-soft);
  border: 1px solid #cdecd9;
}

@media (max-width: 760px) {
  .walker-shell {
    padding: 10px;
  }

  .portal-panel.track-panel {
    width: min(100%, 100%);
    padding: 12px;
    border-radius: 18px;
  }

  .portal-head.track-head,
  .brand-row.track-brand,
  .track-head-actions,
  .search-form,
  .request-launch-row,
  .thread-head,
  .comment-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .track-head-actions,
  .thread-head .ghost-btn,
  .request-launch-btn,
  .search-form .primary-btn,
  .comment-actions .primary-btn,
  .comment-actions .ghost-btn {
    width: 100%;
  }

  .hero-copy {
    margin-top: 8px;
    font-size: 0.88rem;
  }

  .track-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .header-copy h1 {
    font-size: 1.55rem;
  }

  .case-hero {
    padding: 12px;
    border-radius: 16px;
  }

  .case-headline {
    margin-top: 10px;
  }

  .mail-subject {
    font-size: 1.18rem;
    line-height: 1.08;
  }

  .case-from {
    margin-top: 6px;
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .mail-body {
    margin-top: 10px;
    padding-top: 10px;
    font-size: 0.88rem;
    line-height: 1.36;
  }

  .track-fact-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .track-fact {
    padding: 8px 10px;
    border-radius: 12px;
  }

  .track-fact strong {
    font-size: 0.86rem;
  }

  .track-next-step {
    padding: 9px 10px;
    border-radius: 12px;
  }

  .section-head {
    align-items: flex-start;
  }

  .request-launch-copy {
    text-align: left;
  }

  .case-hero-top {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-inline {
    text-align: left;
  }

  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .timeline-panel {
    padding: 10px;
    border-radius: 16px;
  }

  .timeline-panel .section-head {
    margin-bottom: 2px;
  }

  .timeline-panel .section-copy,
  .thread-copy {
    font-size: 0.82rem;
  }

  .step {
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 12px;
  }

  .step .dot {
    width: 10px;
    height: 10px;
    box-shadow: 0 0 0 2px rgba(237, 243, 255, 0.9);
  }

  .step .label {
    font-size: 0.68rem;
  }

  .step .date {
    font-size: 0.68rem;
  }

  .thread-mail-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .thread-mail-item.is-user {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .thread-mail-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .thread-mail-content {
    max-width: 100%;
    padding: 10px;
    border-radius: 14px;
  }

  .thread-mail-copy {
    font-size: 0.9rem;
  }
}
