:root {
  --bg: #f5f7fa;
  --text: #2c3e50;
  --muted: #5c6b7a;
  --card: #ffffff;
  --line: #e8edf3;
  --brand-a: #ea9666;
  --brand-b: #ca8434;
  --accent: #3498db;
  --success: #27ae60;
  --error: #e74c3c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.page {
  min-height: 100vh;
}

.topbar {
  background: linear-gradient(135deg, var(--brand-a) 0%, var(--brand-b) 100%);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.topbar-inner {
  width: min(1900px, 97vw);
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.topbar-logo {
  width: 160px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.topbar-copy {
  min-width: 0;
  flex: 1;
}

#company-topbar-menu .Select-control,
#company-topbar-menu .Select__control {
  min-height: 40px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: #fff7ed;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}

#company-topbar-menu {
  min-width: 248px;
}

#company-topbar-menu .Select-control,
#company-topbar-menu .Select__control {
  width: 100%;
}

#company-topbar-menu .Select-placeholder,
#company-topbar-menu .Select-value-label,
#company-topbar-menu .Select__placeholder,
#company-topbar-menu .Select__single-value {
  color: #9a3412;
  font-weight: 600;
}

#company-topbar-menu .Select-arrow-zone,
#company-topbar-menu .Select-clear-zone,
#company-topbar-menu .Select__indicators {
  color: #c2410c;
}

#company-topbar-menu .Select-control:hover,
#company-topbar-menu .Select__control:hover {
  border-color: #ea580c;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
  transform: translateY(-1px);
}

#company-topbar-menu .is-focused:not(.is-open) > .Select-control,
#company-topbar-menu .Select__control--is-focused {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.topbar h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 700;
}

.topbar p {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .topbar-inner {
    align-items: flex-start;
  }

  .topbar-logo {
    width: 58px;
    height: 58px;
  }
}

.container {
  width: min(1120px, 92vw);
  margin: 1.4rem auto 1rem;
}

.card {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 1.2rem;
}

.card h2 {
  margin: 0 0 0.6rem;
}

.link-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.58rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.secondary-link {
  background: #95a5a6;
}

.auth-shell {
  width: min(1900px, 97vw);
  margin: 1.4rem auto 1rem;
  min-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-card {
  width: min(640px, 100%);
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  padding: 1.2rem;
}

.auth-register-card {
  width: 100%;
}

.staff-applications-card {
  width: 100%;
}

.wizard-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-card-head h2 {
  margin: 0;
}

.auth-card-head p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.auth-form,
.auth-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
}

.auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.pile-range-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.product-meta-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.product-detail-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  padding: 0.9rem;
}

.product-detail-card + .product-detail-card {
  margin-top: 0.9rem;
}

.product-detail-card-head h4 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.product-detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.product-detail-remove-btn {
  padding: 0.45rem 0.8rem;
}

.product-details-actions {
  margin-top: 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.auth-grid-half-row {
  grid-column: 1 / -1;
  max-width: calc((100% - 0.8rem) / 2);
}

.choice-checklist {
  display: grid;
  gap: 0.45rem;
  padding: 0.2rem 0;
}

.choice-checklist label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}

.choice-checklist input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.scope-groups {
  display: grid;
  gap: 0.8rem;
}

.scope-group {
  border: 1px solid #d9dde3;
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  background: #f5f5f5;
  overflow-x: hidden;
}

.scope-group-title {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.scope-checklist-columns {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, minmax(20px, auto));
  grid-auto-columns: minmax(0, 1fr);
  column-gap: 0;
  row-gap: 0.22rem;
  width: 100%;
  min-width: 0;
}

.scope-checklist-columns label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.32rem;
  break-inside: avoid;
}

.scope-checklist-columns input[value^="__category__"] {
  display: none;
}

.scope-checklist-columns label:has(.scope-category-heading) {
  margin-top: 0.2rem;
  margin-bottom: 0.4rem;
}

.scope-checklist-columns label:has(.scope-category-heading) input {
  display: none;
}

.scope-checklist-columns label:has(.scope-placeholder) input {
  display: none;
}

.scope-category-heading {
  display: block;
  margin: 0 0 0.35rem;
  font-weight: 700;
  text-decoration: underline;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #1f2937;
}

.scope-option-label {
  display: inline-block;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #1f2937;
  white-space: normal;
  overflow-wrap: anywhere;
}

.scope-placeholder {
  visibility: hidden;
}

.auth-input {
  width: 100%;
  padding: 0.6rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  height: 40px;
}

.staff-timeslot-picker {
  width: 100%;
}

.staff-timeslot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 0.55rem;
  align-items: center;
}

.staff-timeslot-time .Select-control,
.staff-timeslot-time .Select__control {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.staff-timeslot-time .Select-placeholder,
.staff-timeslot-time .Select-value-label,
.staff-timeslot-time .Select__placeholder,
.staff-timeslot-time .Select__single-value {
  line-height: 38px;
  font-size: 0.95rem;
}

.staff-timeslot-picker input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
}

.staff-filter-dropdown .Select-control,
.staff-filter-dropdown .Select__control {
  min-height: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.staff-filter-dropdown .Select-placeholder,
.staff-filter-dropdown .Select-value-label,
.staff-filter-dropdown .Select__placeholder,
.staff-filter-dropdown .Select__single-value {
  line-height: 38px;
  font-size: 0.95rem;
}

.staff-filter-dropdown .Select-input,
.staff-filter-dropdown .Select__input-container {
  margin: 0;
  padding: 0;
}

.staff-filter-dropdown .Select-input > input,
.staff-filter-dropdown .Select__input-container input {
  line-height: 38px;
}

.staff-filter-dropdown .Select-arrow-zone,
.staff-filter-dropdown .Select-clear-zone,
.staff-filter-dropdown .Select__indicators {
  height: 38px;
}

.auth-textarea {
  width: 100%;
  min-height: 110px;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  resize: vertical;
  font-family: inherit;
}

.auth-textarea-large {
  min-height: 320px;
}

.quill-editor-mount {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.quill-editor-mount .ql-toolbar.ql-snow {
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-family: inherit;
}

.quill-editor-mount .ql-container.ql-snow {
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.quill-editor-mount .ql-editor {
  min-height: 280px;
}

.quill-editor-mount .ql-editor.ql-blank::before {
  color: var(--muted);
  font-style: normal;
}

.phone-field {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}

.phone-number-input {
  min-width: 0;
}

button {
  border: 1px solid #d97706;
  border-radius: 8px;
  padding: 0.58rem 1rem;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button.secondary {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #f59e0b;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.2);
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

button:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

button:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.35);
  outline-offset: 2px;
}

.findings-summary-date-wrapper button {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
  color: inherit !important;
  font-weight: normal !important;
}

.findings-summary-date-wrapper button:hover {
  transform: none !important;
  filter: none !important;
  background: #f3f4f6 !important;
}

.findings-summary-date-wrapper button:focus-visible {
  outline: 2px solid #9ca3af !important;
  outline-offset: 1px;
}

.auth-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.auth-links {
  margin-top: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.auth-links a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.file-view-btn {
  white-space: normal;
  text-align: left;
  line-height: 1.35;
}

.row-action-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.row-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #d97706;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #fff;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.25);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.row-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}

.row-action-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.row-action-btn.danger,
button.danger {
  border-color: #b91c1c;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 1px 4px rgba(185, 28, 28, 0.25);
}

.row-action-btn.danger:hover,
button.danger:hover {
  box-shadow: 0 3px 8px rgba(185, 28, 28, 0.3);
}

.job-reference-editor {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.job-reference-editor .auth-input {
  flex: 1 1 260px;
}

.file-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.file-viewer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.file-viewer-modal-content {
  width: min(640px, 94vw);
  max-height: min(84vh, 760px);
  height: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  overflow: auto;
}

.file-viewer-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.file-viewer-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.file-viewer-modal-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.staff-request-note {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.85rem;
  border-left: 4px solid #92400e;
  border-radius: 0.35rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 1rem;
  font-weight: 700;
}

.file-viewer-frame {
  width: 100%;
  height: min(70vh, 680px);
  min-height: 360px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

/*
 * PDF viewer modal (staff-file-viewer-modal / company-file-viewer-modal).
 * Deliberately independent from .file-viewer-modal* (used by the smaller
 * confirm/create/edit dialogs) so resizing this one never affects those.
 */
.pdf-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.pdf-viewer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.pdf-viewer-modal-content {
  width: min(1100px, 96vw);
  max-height: min(94vh, 1000px);
  height: min(94vh, 1000px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  overflow: auto;
}

.pdf-viewer-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pdf-viewer-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.pdf-viewer-modal-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.pdf-viewer-frame {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.application-submit-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.application-submit-loading-card {
  width: min(420px, 92vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
  padding: 1.1rem;
  text-align: center;
}

.application-submit-loading-card h3 {
  margin: 0.4rem 0 0.35rem;
}

.application-submit-loading-card p {
  margin: 0;
  color: var(--muted);
}

.application-submit-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 4px solid #dbe3ef;
  border-top-color: var(--brand-b);
  margin: 0 auto;
  animation: application-submit-spin 0.9s linear infinite;
}

@keyframes application-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.chatbot-card {
  width: 100%;
  margin: 0 auto 2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  padding: 1rem;
}

.chatbot-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.chatbot-header p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.25rem;
  margin-bottom: 0.85rem;
}

.chatbot-messages-shell {
  position: relative;
  min-height: 120px;
}

.chatbot-typing-indicator {
  display: none;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  padding: 0.55rem 0.75rem;
  margin: 0 0.25rem 0.85rem;
  border-radius: 999px;
  background: #edf2f7;
  border: 1px solid #d6dee8;
}

.chatbot-typing-indicator span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #6b7280;
  opacity: 0.35;
  animation: chatbotTypingPulse 1.1s infinite ease-in-out;
}

.chatbot-typing-indicator span:nth-child(2) {
  animation-delay: 0.15s;
}

.chatbot-typing-indicator span:nth-child(3) {
  animation-delay: 0.3s;
}

.chatbot-messages[data-dash-is-loading="true"] + .chatbot-typing-indicator {
  display: inline-flex;
}

@keyframes chatbotTypingPulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-0.2rem);
    opacity: 0.95;
  }
}

.chatbot-message {
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.chatbot-message.user {
  align-self: flex-end;
  background: #1f6feb;
  color: #fff;
  max-width: min(82%, 720px);
}

.chatbot-message.assistant {
  align-self: flex-start;
  background: #edf2f7;
  color: #1e293b;
  max-width: min(82%, 820px);
}

.chatbot-message-text {
  white-space: pre-wrap;
}

.chatbot-sql-block {
  margin: 0.65rem 0 0;
  padding: 0.7rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.85rem;
}

.chatbot-sql-params {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: #475569;
}

.chatbot-input-row {
  display: flex;
  gap: 0.65rem;
}

.chatbot-input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0.9rem 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
}

.chatbot-send-btn {
  white-space: nowrap;
}

.auth-status {
  margin-top: 0.8rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.93rem;
  display: none;
}

.auth-status.success,
.auth-status.error {
  display: block;
}

.auth-status.success {
  background: rgba(39, 174, 96, 0.12);
  color: #1f7a45;
  border: 1px solid rgba(39, 174, 96, 0.24);
}

.auth-status.error {
  background: rgba(231, 76, 60, 0.12);
  color: #a62d21;
  border: 1px solid rgba(231, 76, 60, 0.24);
}

.application-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.application-status-icon {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: currentColor;
}

.application-status-badge.status-progress {
  color: #0369a1;
  background: rgba(3, 105, 161, 0.12);
  border-color: rgba(3, 105, 161, 0.24);
}

.application-status-badge.status-submitted {
  color: #6d28d9;
  background: rgba(109, 40, 217, 0.12);
  border-color: rgba(109, 40, 217, 0.24);
}

.application-status-badge.status-warning {
  color: #b45309;
  background: rgba(180, 83, 9, 0.12);
  border-color: rgba(180, 83, 9, 0.24);
}

.application-status-badge.status-success {
  color: #166534;
  background: rgba(22, 101, 52, 0.12);
  border-color: rgba(22, 101, 52, 0.24);
}

.application-status-badge.status-danger {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.12);
  border-color: rgba(185, 28, 28, 0.24);
}

.application-status-badge.status-neutral {
  color: #334155;
  background: rgba(51, 65, 85, 0.1);
  border-color: rgba(51, 65, 85, 0.24);
}

.terms-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  padding: 0.8rem 0.9rem;
  color: #3f4f60;
}

.terms-box p {
  margin: 0;
}

.terms-box p + p {
  margin-top: 0.6rem;
}

.app-footer {
  margin-top: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.6rem 0 1rem;
}

.staff-review-top-nav {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.2rem;
}

.step-nav-btn.staff-review-top-nav-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
}

.company-review-top-nav {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.2rem;
}

.step-nav-btn.company-review-top-nav-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
}

.app-wizard {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.wizard-sidebar,
.wizard-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.wizard-sidebar {
  padding: 1.1rem;
  position: sticky;
  top: 1rem;
}

.wizard-main {
  padding: 1.2rem;
}

.wizard-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-b);
  font-weight: 700;
}

.wizard-company,
.wizard-step-indicator,
.wizard-step-copy p {
  color: var(--muted);
}

.step-nav-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.step-nav-btn {
  width: 100%;
  background: #f8fafc;
  color: var(--text);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.75rem;
  align-items: center;
  text-align: left;
  padding: 0.7rem 0.8rem;
}

.step-nav-btn span:first-child {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8edf3;
  font-weight: 700;
}

.step-nav-btn.active {
  background: linear-gradient(135deg, rgba(234, 150, 102, 0.14), rgba(202, 132, 52, 0.16));
  border-color: rgba(202, 132, 52, 0.35);
}

.step-nav-btn.active span:first-child {
  background: var(--brand-b);
  color: #fff;
}

.step-nav-btn.complete {
  background: rgba(39, 174, 96, 0.08);
  border-color: rgba(39, 174, 96, 0.2);
}

.step-nav-btn.complete span:first-child {
  background: var(--success);
  color: #fff;
}

.wizard-main-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.wizard-main-head h2 {
  margin: 0;
}

.wizard-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  min-width: 200px;
}

.wizard-meta span {
  color: var(--muted);
  font-size: 0.85rem;
}

.wizard-step-pane h3 {
  margin-bottom: 0.25rem;
}

.wizard-step-copy {
  margin-bottom: 1rem;
}

.wizard-step-copy p {
  margin-top: 0;
}

.wizard-actions {
  margin-top: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wizard-actions-right {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.wizard-link {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 860px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-grid-half-row {
    max-width: 100%;
  }

  .wizard-list-head,
  .wizard-main-head,
  .wizard-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .app-wizard {
    grid-template-columns: 1fr;
  }

  .wizard-sidebar {
    position: static;
  }

  .step-nav-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .step-nav-btn {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
  }

  .step-nav-btn span:last-child {
    display: none;
  }

  .step-nav-btn span:first-child {
    width: 28px;
    height: 28px;
    font-size: 0.82rem;
  }

  .phone-field {
    grid-template-columns: 1fr;
  }

  .pile-range-grid {
    grid-template-columns: 1fr;
  }

  .product-meta-grid {
    grid-template-columns: 1fr;
  }

  .scope-checklist-columns {
    grid-auto-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .scope-checklist-columns {
    grid-auto-columns: minmax(0, 1fr);
  }
}
