/* EVO TrustGuard — page-create-lead.css
 *
 * Owned by:    create-lead.html
 * Category:    portal feature page
 * Cascade:     tokens → base → utilities → components → portal-chrome → shared → shared-themes → page
 * Edit policy: rules unique to this page only. Anything used by 5+
 *              pages should be promoted to /css/components.css or
 *              /css/portal-chrome.css with a /css/AGENTS.md update.
 *
 * Extracted:   1 <style> block(s), 157 lines.
 * Method:      verbatim move — no token substitution applied yet.
 *              See C56 audit Section 10.A for the deferred token
 *              normalization sprint plan.
 */

  body { font-family: var(--font-sans); background: var(--bg); color: var(--dark); line-height: var(--leading-loose); min-height: 100vh; display: flex; flex-direction: column; padding-bottom: var(--space-20); }

  /* TOP BAR */
  .top-bar { background: var(--white); border-bottom: 1px solid var(--border); padding: calc(14px + env(safe-area-inset-top)) 16px 14px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: var(--z-nav); }
  .top-bar-back { background: none; border: none; padding: var(--space-2); margin: -8px; cursor: pointer; color: var(--dark); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
  .top-bar-back svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }
  .top-bar-title { font-size: var(--text-input); font-weight: var(--weight-semibold); color: var(--dark); flex: 1; text-align: center; }
  .top-bar-spacer { width: 44px; height: 44px; flex-shrink: 0; }

  /* TAB SELECTOR — underline style matching Contact/Manage/Details tabs on
     purchased-lead.html and client-detail.html. No background on inactive,
     active tab has 3px red bottom border + dark text (white in dark mode via
     token swap). */
  .tab-selector { background: var(--white); border-bottom: 1px solid var(--border); display: flex; position: sticky; top: calc(72px + env(safe-area-inset-top)); z-index: 90; }
  .tab-btn { flex: 1; padding: var(--space-3-5) var(--space-3); border: none; border-bottom: 3px solid transparent; background: none; font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--light); cursor: pointer; transition: color 0.15s, border-color 0.15s; text-align: center; }
  .tab-btn.active { color: var(--dark); font-weight: var(--weight-semibold); border-bottom-color: var(--red); }

  /* PAGE CONTENT */
  .page-content { padding: var(--space-4); flex: 1; max-width: 640px; margin: 0 auto; width: 100%; box-sizing: border-box; }
  .tab-panel { display: none; }
  .tab-panel.active { display: block; }

  /* CIS styles — copied from purchased-lead.html */
  .pl-section { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: var(--space-4); margin-bottom: var(--space-3-5); }
  .pl-section-title { font-family: var(--font-serif); font-size: var(--text-input); color: var(--dark); margin-bottom: var(--space-3-5); }
  .cis-field { margin-bottom: var(--space-3-5); }
  .cis-label { display: block; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text-muted); margin-bottom: 5px; }
  .cis-input { width: 100%; padding: var(--space-2-5) var(--space-3); border: 0.5px solid var(--text-disabled); border-radius: var(--radius-md); font-family: var(--font-sans); font-size: var(--text-input); color: var(--dark); background: var(--white); box-sizing: border-box; }
  .cis-input:focus { outline: none; border-color: var(--red); }
  .cis-textarea { width: 100%; min-height: 80px; padding: var(--space-2-5) var(--space-3); border: 0.5px solid var(--text-disabled); border-radius: var(--radius-md); font-family: var(--font-sans); font-size: var(--text-input); color: var(--dark); resize: vertical; line-height: var(--leading-relaxed); box-sizing: border-box; background: var(--white); }
  .cis-textarea:focus { outline: none; border-color: var(--red); }
  .cis-select { width: 100%; padding: var(--space-2-5) var(--space-3); border: 0.5px solid var(--text-disabled); border-radius: var(--radius-md); font-family: var(--font-sans); font-size: var(--text-base); color: var(--dark); background: var(--white); box-sizing: border-box; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: var(--space-8); }
  .cis-select:focus { outline: none; border-color: var(--red); }
  .cis-switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
  .cis-switch input { opacity: 0; width: 0; height: 0; }
  .cis-switch .slider { position: absolute; cursor: pointer; inset: 0; background: var(--border-strong); border-radius: 26px; transition: background 0.2s; }
  .cis-switch .slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; bottom: 3px; background: var(--white); border-radius: 50%; transition: transform 0.2s; }
  .cis-switch input:checked + .slider { background: var(--red); }
  .cis-switch input:checked + .slider::before { transform: translateX(18px); }
  .cis-switch-row { display: flex; align-items: center; gap: var(--space-2-5); }
  .cis-switch-label { font-size: var(--text-md); font-weight: var(--weight-medium); color: var(--dark); }
  .cis-ab-row { display: flex; align-items: center; gap: var(--space-1-5); }
  .cis-ab-btn { padding: 5px 14px; border-radius: 20px; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium); border: 1.5px solid var(--border-strong); background: var(--white); color: var(--text-faint); cursor: pointer; transition: all 0.15s; }
  .cis-ab-btn.active { background: var(--red); border-color: var(--red); color: var(--white); }

  /* Billing-mode A/B — rendered as underline tabs inside an Assignment
     block (Hours per shift / Hits per shift). Scoped via the wrapper class
     so the Situation / POC phone / Fee type pills above keep their existing
     rounded-pill look. JS still queries `.cis-ab-btn` inside #asgnBillingMode
     so only the wrapper class changes — no JS edits required. */
  .asgn-bill-tabs { display: flex; border-bottom: 1px solid var(--border); }
  .asgn-bill-tabs .cis-ab-btn { flex: 1; padding: var(--space-2-5) 0; border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; font-size: var(--text-md); font-weight: var(--weight-medium); color: var(--light); text-align: center; }
  .asgn-bill-tabs .cis-ab-btn.active { background: none; border-color: transparent; border-bottom-color: var(--red); color: var(--dark); font-weight: var(--weight-semibold); }
  .cis-divider { height: 0.5px; background: var(--border); margin: var(--space-5) 0; }
  .cis-section-title { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-muted); text-transform: uppercase; letter-spacing: var(--tracking-loose); margin-bottom: var(--space-4); }
  .cis-save-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: var(--space-3-5); border-radius: var(--radius-md); font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-semibold); cursor: pointer; transition: background 0.15s; border: none; background: var(--red); color: var(--white); }
  .cis-save-btn:hover { background: var(--red-hover); }
  .cis-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }
  .cis-hidden { display: none; }
  .cis-row { display: flex; gap: var(--space-2-5); }
  .cis-row > .cis-field { flex: 1; min-width: 0; }
  .cis-row > .cis-field-sm { flex: 0 0 90px; min-width: 0; }
  .cis-totals-label { display: block; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text-muted); margin-bottom: 5px; }
  .cis-totals-row { display: flex; gap: var(--space-1-5); flex-wrap: wrap; }
  .cis-totals-btn { padding: 5px 14px; border-radius: 20px; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium); border: 1.5px solid var(--border-strong); background: var(--white); color: var(--text-faint); cursor: pointer; transition: all 0.15s; }
  .cis-totals-btn.active { background: var(--red); border-color: var(--red); color: var(--white); }

  /* Assignment blocks */
  .asgn-block { background: var(--surface-light); border: 1px solid var(--border-strong); border-left: 3px solid var(--red); border-radius: 10px; margin-bottom: var(--space-3); overflow: hidden; }
  .asgn-header { background: var(--border); border-bottom: 1px solid var(--border-strong); padding: var(--space-2-5) var(--space-3-5); display: flex; align-items: center; justify-content: space-between; }
  .asgn-title { font-size: var(--text-md); font-weight: var(--weight-semibold); color: var(--dark); }
  .asgn-actions { display: flex; gap: var(--space-2); }
  .asgn-btn-dup { padding: var(--space-1) var(--space-2-5); border: 1px solid var(--text-dim); border-radius: 6px; background: var(--white); font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-medium); color: #333; cursor: pointer; }
  .asgn-btn-rm { padding: var(--space-1) var(--space-2-5); border: 1px solid var(--red); border-radius: 6px; background: var(--white); font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--red); cursor: pointer; }
  .asgn-btn-rm:disabled { opacity: 0.3; cursor: not-allowed; }
  .asgn-body { padding: var(--space-3-5); }
  .asgn-body .cis-input, .asgn-body .cis-select, .asgn-body .cis-textarea { background: var(--white); border: 0.5px solid var(--text-disabled); font-family: var(--font-sans); font-size: var(--text-input); color: var(--dark); }
  .asgn-body input.cis-input { font-family: var(--font-sans); font-size: var(--text-input); }
  .asgn-day-grid { display: flex; flex-wrap: wrap; gap: var(--space-1-5); }
  .asgn-day-btn { padding: 7px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--white); font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--dark); cursor: pointer; min-width: 40px; text-align: center; }
  .asgn-day-btn.active { background: var(--red-faint); border-color: var(--red); color: var(--red); }
  .asgn-vehicle-fields { margin-top: var(--space-2-5); }
  .asgn-vehicle-fields.disabled .cis-input, .asgn-vehicle-fields.disabled .cis-select { opacity: 0.4; pointer-events: none; }
  .asgn-add-btn { display: flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%; padding: var(--space-3); border: 2px dashed var(--text-disabled); border-radius: 10px; background: none; font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--text-faint); cursor: pointer; margin-bottom: var(--space-4); }

  /* Service-address dropdown: inline new-address form + billing-address warn.
     Mirrors the identical rules in purchased-lead.html so the CIS surfaces
     are visually identical wherever they render. */
  .asgn-inline-form { background: var(--white); border: 0.5px solid var(--text-disabled); border-radius: var(--radius-md); padding: var(--space-3); margin-bottom: var(--space-2-5); }
  .asgn-inline-form .cis-row { margin-bottom: var(--space-2); }
  .asgn-inline-cancel { padding: var(--space-2) var(--space-4); border: 1px solid var(--border); border-radius: 6px; background: var(--white); color: var(--dark); font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-medium); cursor: pointer; margin-left: var(--space-2); }
  .asgn-addr-warn { font-size: var(--text-xs); color: var(--red); margin-top: var(--space-1-5); line-height: var(--leading-normal); font-style: italic; }

  /* POC phone type toggle */
  .poc-phone-row { display: flex; gap: var(--space-2-5); align-items: flex-end; }
  .poc-phone-row > .cis-field:first-child { flex: 1; min-width: 0; }
  .poc-phone-type { display: flex; gap: var(--space-1); }
  .poc-phone-type-btn { padding: var(--space-2-5) var(--space-3-5); border: 0.5px solid var(--text-disabled); border-radius: var(--radius-md); background: var(--white); font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-medium); color: var(--text-muted); cursor: pointer; }
  .poc-phone-type-btn.active { background: var(--red); border-color: var(--red); color: var(--white); }
  .poc-text-check { display: flex; align-items: center; gap: var(--space-1-5); font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-2); }
  .poc-text-check.disabled { opacity: 0.4; }

  /* Fees */
  .fee-type-toggle { display: flex; gap: var(--space-1); align-self: stretch; }
  .fee-type-btn { padding: 0 var(--space-3-5); border: 0.5px solid var(--text-disabled); border-radius: var(--radius-md); background: var(--white); font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--text-muted); cursor: pointer; }
  .fee-type-btn.active { background: var(--red); border-color: var(--red); color: var(--white); }
  .asgn-inline-save { padding: var(--space-2) var(--space-4); border: none; border-radius: 6px; background: var(--red); color: var(--white); font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-semibold); cursor: pointer; }
  .fees-item { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-2) var(--space-3); background: var(--surface-light); border: 0.5px solid var(--border); border-radius: 6px; margin-bottom: var(--space-1-5); }
  .fees-item-name { flex: 1; font-size: var(--text-md); color: var(--dark); }
  .fees-item-amt { font-size: var(--text-md); font-weight: var(--weight-semibold); color: var(--dark); }
  .fees-item-rm { background: none; border: none; color: var(--red); font-size: var(--text-xl); cursor: pointer; padding: 0 var(--space-1); }

  /* Freeform / Import */
  .freeform-textarea { width: 100%; min-height: 240px; padding: var(--space-3) var(--space-3-5); border: 0.5px solid var(--text-disabled); border-radius: 10px; font-family: var(--font-sans); font-size: var(--text-input); line-height: var(--leading-loose); resize: vertical; box-sizing: border-box; background: var(--white); }
  .freeform-textarea:focus { outline: none; border-color: var(--red); }
  .ai-hint { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); margin: var(--space-2-5) 0 var(--space-4); }
  .ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); flex-shrink: 0; display: inline-block; }
  .primary-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: var(--space-3-5); border-radius: var(--radius-md); font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-semibold); cursor: pointer; border: none; background: var(--red); color: var(--white); }
  .primary-btn:hover { background: var(--red-hover); }
  .primary-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .inline-error { font-size: var(--text-md); color: var(--red); margin-top: var(--space-2-5); display: none; }
  .inline-error.show { display: block; }

  /* File drop zone — must be display:block. <label> is inline by default,
     and an inline element wrapping a block-level child (dropzoneEmpty)
     makes browsers render the dashed border as two ghost inline
     fragments on the left and pushes surrounding text flow around. */
  .dropzone { display: block; width: 100%; box-sizing: border-box; border: 2px dashed var(--text-disabled); border-radius: var(--radius-lg); background: var(--surface-light); padding: var(--space-10) var(--space-5); text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; margin-bottom: 0; }
  .dropzone:hover { border-color: var(--text-faint); background: var(--border-light); }
  .dropzone-icon { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--text-faint); }
  .dropzone-icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.8; fill: none; }
  .dropzone-label { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--dark); margin-bottom: var(--space-1); }
  .dropzone-subtext { font-size: var(--text-sm); color: var(--text-faint); }
  .dropzone-file { font-size: var(--text-md); color: var(--dark); font-weight: var(--weight-medium); }
  .dropzone-file-size { font-size: var(--text-xs); color: var(--text-faint); margin-top: var(--space-0-5); }

  /* Multi-file list */
  .imp-file-row { display: flex; align-items: center; gap: var(--space-2-5); padding: var(--space-2-5) var(--space-3); background: var(--surface-light); border: 0.5px solid var(--border); border-radius: var(--radius-md); margin-bottom: var(--space-1-5); }
  .imp-file-info { flex: 1; min-width: 0; }
  .imp-file-name { font-size: var(--text-md); font-weight: var(--weight-medium); color: var(--dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .imp-file-meta { font-size: var(--text-xs); color: var(--text-faint); margin-top: var(--space-0-5); }
  .imp-file-rm { background: none; border: none; color: var(--red); font-size: var(--text-2xl); cursor: pointer; padding: 0 var(--space-1); line-height: 1; }

  /* Preview panel */
  .preview-back { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-md); color: var(--light); background: none; border: none; padding: 0; margin-bottom: var(--space-3); cursor: pointer; font-family: var(--font-sans); }
  .preview-back:hover { color: var(--dark); }
  .preview-hint { font-size: var(--text-md); color: var(--text-muted); margin-bottom: var(--space-4); line-height: var(--leading-relaxed); }
  .preview-empty { color: var(--text-dim); font-style: italic; }

  /* Bottom nav */
  .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(56px + env(safe-area-inset-bottom) / 2); padding-bottom: calc(env(safe-area-inset-bottom) / 2); background: var(--white); border-top: 1px solid var(--border); display: flex; z-index: var(--z-nav); }
  .bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-0-5); text-decoration: none; color: var(--light); min-height: 44px; }
  .bottom-nav-item.active { color: var(--red); }
  .bottom-nav-item svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; }
  .bottom-nav-label { font-size: var(--text-xs); font-weight: var(--weight-semibold); }
  .clients-toast { position: fixed; bottom: calc(72px + env(safe-area-inset-bottom) / 2); left: 50%; transform: translateX(-50%); background: var(--dark); color: var(--white); padding: var(--space-2-5) var(--space-5); border-radius: var(--radius-md); font-size: var(--text-base); font-weight: var(--weight-semibold); opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 200; }
  .clients-toast.show { opacity: 1; }
