/* Additions on top of app.css for the approval flow and account tools. */

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 3px 6px;
  border-radius: 10px;
  background: var(--error);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.record-actions .icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.record-actions button.labelled {
  padding: 0 14px;
  font-size: 12px;
  white-space: nowrap;
}

.record-actions button.approve {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #fff;
  font-weight: 600;
}

.pending-list h2 .nav-badge {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}

.status-approved { color: #5a7d4f !important; }
.status-pending { color: var(--error) !important; }

.notice .text-button {
  display: inline;
  margin-left: 6px;
  font-size: inherit;
}

@media (max-width: 640px) {
  .record-row { flex-wrap: wrap; }
}

/* Keeps Sign out reachable when the window is shorter than the sidebar. */
.sidebar { overflow-y: auto; }

/* Onboarding questionnaire */
.onboarding form { max-width: none; }
.onboarding > .eyebrow { display: block; margin: 28px 0 8px; color: var(--yellow); }
.onboarding > p { margin-top: 6px; }

.steps { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.step-pill {
  flex: 1 1 150px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--soft);
  font-size: 12px;
  text-align: left;
}
.step-pill:hover:not(.active) { background: var(--sage); }
.step-pill.active { border-color: var(--yellow); background: #eef2ff; color: var(--yellow); font-weight: 600; }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}
.step-pill.active .step-number { background: var(--yellow); color: #fff; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.field-grid .wide { grid-column: 1 / -1; }
.field { align-content: start; }
fieldset.field { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 11px; font-weight: 500; }
fieldset.field legend { padding: 0; margin-bottom: 8px; }
.required { color: var(--error); }
.hint { font-size: 11px; font-weight: 400; color: var(--soft); }
.choice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; font-weight: 400; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--yellow); background: #eef2ff; color: var(--yellow); font-weight: 600; }
.choice input { width: auto; min-height: 0; padding: 0; }

.wizard-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.wizard-actions .previous { margin-right: auto; }

.answer-group { margin-top: 20px; }
.answer-group dl { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 8px 20px; margin: 10px 0 0; font-size: 12px; }
.answer-group dt { color: var(--soft); }
.answer-group dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 800px) {
  .field-grid { grid-template-columns: 1fr; }
  .answer-group dl { grid-template-columns: 1fr; gap: 2px; }
  .answer-group dd { margin-bottom: 10px; }
}

.field-section { margin-top: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.field-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.field-section p { font-size: 12px; margin-top: 4px; }
.field-grid .notice { margin: 0; }

.wizard-progress { display: grid; gap: 8px; margin-bottom: 18px; font-size: 11px; font-weight: 600; }
.wizard-progress progress { width: 100%; height: 5px; border: 0; border-radius: 3px; overflow: hidden; background: var(--sage); accent-color: var(--yellow); }
.wizard-progress progress::-webkit-progress-bar { background: var(--sage); }
.wizard-progress progress::-webkit-progress-value { background: var(--yellow); }
.wizard-progress progress::-moz-progress-bar { background: var(--yellow); }

.setup-pill.connected { background: #e6f0e1; color: #3f6b33; }
.drive-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; }
.record-actions { flex-wrap: wrap; justify-content: flex-end; }

.calendar-form { display: grid; gap: 10px; max-width: 620px; margin: 14px 0 22px; }
.calendar-form .primary-button { justify-self: start; }

a.primary-button { justify-self: start; }
.calendar-form .outline-button { justify-self: start; }
.calendar-form .calendar-form { margin: 0; }

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

.drive-panel { display: grid; gap: 10px; justify-items: start; }
.drive-panel .drive-link { margin-top: 4px; background: var(--yellow); border-color: var(--yellow); color: #fff; font-weight: 600; padding: 12px 18px; border-radius: 999px; }

h2.spaced { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }

.google-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 12px; min-height: 46px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 12px; }
.google-button:hover { background: var(--sage); }

/* Layout brought over from the Wix client portal */
.nav-group-label { font-size: 9px; font-weight: 700; letter-spacing: 1.4px; color: var(--soft); padding: 14px 15px 8px; }
.nav-group-label:first-child { padding-top: 0; }
.topbar-action { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.topbar-action:hover { background: var(--sage); }
.topbar-action.primary { background: var(--yellow); border-color: var(--yellow); color: #fff; }
.topbar-action.primary:hover { background: var(--yellow); opacity: .9; }
.topbar-right { gap: 8px; }

.start-steps > p { margin: 4px 0 16px; font-size: 12px; }
.start-step { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.start-step:last-child { margin-bottom: 0; }
.start-step.current { border-color: var(--yellow); background: #eef2ff; }
.start-step > div { flex: 1; min-width: 0; }
.start-step p { font-size: 12px; margin-top: 3px; }
.start-step .step-number { width: 30px; height: 30px; font-size: 12px; }
.start-step.current .step-number { background: var(--yellow); color: #fff; }
.start-step.done .step-number { background: #e6f0e1; color: #3f6b33; }
.start-step .drive-link { margin-top: 0; }
.start-step .primary-button, .start-step .outline-button { white-space: nowrap; }

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.quick-action { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; text-align: left; }
.quick-action:hover { border-color: var(--yellow); }
.quick-action strong { display: block; font-size: 13px; }
.quick-action small { display: block; margin-top: 3px; font-size: 9px; letter-spacing: 1.2px; color: var(--soft); }

.status-chip { display: inline-block; margin-bottom: 8px; padding: 3px 8px; border-radius: 4px; background: var(--sage); font-size: 9px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--soft); }
.status-chip.todo { background: #fdf3d7; color: #8a5a00; }
.status-chip.done { background: #e6f0e1; color: #3f6b33; }
.form-card .record-actions { align-items: center; }
.field[hidden] { display: none; }

@media (max-width: 900px) {
  .quick-actions { grid-template-columns: 1fr; }
  .start-step { flex-wrap: wrap; }
  .topbar-action span { display: none; }
  .topbar-action { padding: 0 10px; }
}
@media (max-width: 800px) {
  .nav-group-label { display: none; }
}

.topbar-action { color: var(--ink); }

/* Projects, tasks and approvals */
.work-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.work-summary .records-list > p { font-size: 12px; margin-top: 6px; }
.work-summary .activity-row { width: 100%; }
.project-facts { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 8px 20px; margin: 16px 0 0; font-size: 12px; }
.project-facts dt { color: var(--soft); }
.project-facts dd { margin: 0; }
.project-card > p { margin-top: 8px; font-size: 12px; }
.record-row.is-done h3 { text-decoration: line-through; color: var(--soft); }
.approval-form { max-width: none; margin-bottom: 0; }
.records-list > small { display: block; margin-top: 6px; color: var(--soft); font-size: 11px; }
.records-list > .record-details { margin-top: 10px; font-size: 12px; white-space: pre-wrap; }

.record-row.is-past h3, .record-row.is-past p { color: var(--soft); }
.records-list > .hint { display: block; margin-top: 14px; }
