/* ============================================================
   QR Quality Landing — public page (/l/{publicId})
   Ported from the Claude Design handoff (landing.css).
   All design tokens are scoped to .ql so this file is self-contained
   and cannot leak into the rest of the app. Fonts (Inter + Plus
   Jakarta Sans) are already loaded globally by index.html.
   ============================================================ */

.ql, .ql * { box-sizing: border-box; }
.ql {
  /* tenant accent (emerald "fresh/clean") */
  --brand:       #059669;
  --brand-dark:  #047857;
  --brand-deep:  #065F46;
  --brand-tint:  #ECFDF5;
  --brand-line:  #A7F3D0;

  /* SaberTask tokens (scoped) */
  --st-white: #FFFFFF;
  --st-bg: #F8FAFC;
  --st-bg-alt: #F1F5F9;
  --st-border: #E8EDF5;
  --st-subtle: #94A3B8;
  --st-muted: #64748B;
  --st-text: #1E293B;
  --st-primary-product: #4A76F9;
  --st-primary-light: #EEF3FE;
  --st-primary-border: #C7D8FD;
  --st-primary-600: #0D32F2;
  --st-success: #10B981;
  --st-success-light: #F0FDF4;
  --st-error-dark: #DC2626;
  --st-radius: 8px;
  --st-radius-md: 12px;
  --st-radius-lg: 14px;
  --st-radius-2xl: 1.25rem;
  --st-radius-full: 9999px;
  --st-font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --st-font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --st-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --st-shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.15);
  --st-shadow-ring-primary: 0 0 0 2px rgba(68, 98, 248, 0.25);
  --st-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --st-duration: 200ms;
  --st-duration-fast: 150ms;

  font-family: var(--st-font-body);
  color: var(--st-text);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ---- page shell (full-height, centered 460px column) ---- */
.ql-page { min-height: 100vh; background: var(--st-bg); display: flex; justify-content: center; padding: 24px 16px 56px; }
.ql-col { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 20px; }
.ql-center { display: flex; justify-content: center; }

/* ---- generic type helpers ---- */
.ql h1, .ql h2, .ql h3, .ql h4 { margin: 0; font-family: var(--st-font-heading); }
.ql p { margin: 0; }
.ql-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--st-subtle); margin-bottom: 10px; }
.ql-muted { color: var(--st-muted); }
.ql-subtle { color: var(--st-subtle); }

/* ---- tenant logo (uploaded image when present, else a plain text wordmark) ---- */
.ql-logo-img { max-height: 42px; max-width: 220px; object-fit: contain; }
.ql-logo-text { font-family: var(--st-font-heading); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: var(--st-text); text-align: center; }

/* ---- address block ---- */
.ql-addr { display: flex; gap: 12px; align-items: flex-start; }
.ql-addr-ico { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; background: var(--st-primary-light); color: var(--st-primary-product); display: grid; place-items: center; }
.ql-addr-ico svg { width: 20px; height: 20px; }
.ql-addr-name { font-family: var(--st-font-heading); font-weight: 700; font-size: 16px; color: var(--st-text); }
.ql-addr-line { font-size: 13px; color: var(--st-muted); line-height: 1.45; margin-top: 2px; }

/* ---- reassurance hero ---- */
.ql-hero { background: var(--st-primary-light); border: 1px solid var(--st-primary-border); border-radius: var(--st-radius-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; }
.ql-hero-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ql-hero-k { font-size: 13px; color: var(--st-muted); }
.ql-hero-v { font-family: var(--st-font-heading); font-weight: 700; font-size: 14.5px; color: var(--st-text); }
.ql-hero-v.accent { color: var(--st-primary-product); }
.ql-hero-sep { height: 1px; background: var(--st-primary-border); }

/* ---- timeline ---- */
.ql-timeline { position: relative; padding-left: 4px; }
.ql-tl-item { position: relative; display: flex; gap: 14px; padding-bottom: 16px; }
.ql-tl-item:last-child { padding-bottom: 0; }
.ql-tl-rail { position: relative; display: flex; flex-direction: column; align-items: center; }
.ql-tl-node { width: 20px; height: 20px; border-radius: 50%; background: var(--st-white); border: 1.5px solid var(--brand-line); color: var(--brand); display: grid; place-items: center; margin-top: 2px; z-index: 1; flex-shrink: 0; }
.ql-tl-node svg { width: 11px; height: 11px; }
.ql-tl-item.cur .ql-tl-node { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-tint); }
.ql-tl-line { width: 2px; flex: 1; background: var(--st-border); margin-top: 2px; }
.ql-tl-item:last-child .ql-tl-line { display: none; }
.ql-tl-date { font-size: 14px; font-weight: 600; color: var(--st-text); white-space: nowrap; }
.ql-tl-item.cur .ql-tl-date { color: var(--brand-dark); }
.ql-tl-meta { font-size: 12.5px; color: var(--st-muted); margin-top: 1px; white-space: nowrap; }

/* ---- report card ---- */
.ql-report { display: flex; align-items: center; gap: 14px; background: var(--st-white); border: 1px solid var(--st-border); border-radius: var(--st-radius-md); padding: 13px 14px; cursor: pointer; transition: border-color var(--st-duration) var(--st-ease), box-shadow var(--st-duration) var(--st-ease); }
.ql-report:hover { border-color: var(--st-primary-border); box-shadow: var(--st-shadow-sm); }
.ql-report-score { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--st-font-heading); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.ql-report-body { flex: 1; min-width: 0; }
.ql-report-grade { font-size: 14px; font-weight: 700; color: var(--st-text); font-family: var(--st-font-heading); }
.ql-report-meta { font-size: 12.5px; color: var(--st-muted); margin-top: 2px; }
.ql-report .chev { color: var(--st-subtle); flex-shrink: 0; display: inline-flex; }
.score-hi  { background: var(--st-success-light); color: var(--brand-dark); }
.score-mid { background: #FFF7ED; color: #B45309; }

/* ---- buttons ---- */
.ql-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--st-font-body); font-weight: 600; font-size: 15px; border-radius: var(--st-radius); border: none; cursor: pointer; padding: 14px 18px; width: 100%; transition: all var(--st-duration) var(--st-ease); }
.ql-btn-primary { background: var(--st-primary-product); color: #fff; }
.ql-btn-primary:hover { background: var(--st-primary-600); }
.ql-btn-ghost { background: var(--st-white); color: var(--st-text); border: 1px solid var(--st-border); }
.ql-btn-ghost:hover { background: var(--st-bg); }
.ql-btn svg { width: 18px; height: 18px; }

/* ---- feedback form ---- */
.ql-fb-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--st-bg-alt); border-radius: var(--st-radius); padding: 4px; }
.ql-fb-seg button { border: none; background: transparent; padding: 9px 8px; border-radius: 6px; font-family: var(--st-font-body); font-size: 13px; font-weight: 600; color: var(--st-muted); cursor: pointer; transition: all var(--st-duration) var(--st-ease); }
.ql-fb-seg button.on { background: var(--st-white); color: var(--st-text); box-shadow: var(--st-shadow-sm); }
.ql-stars { display: flex; gap: 6px; }
.ql-star { background: none; border: none; padding: 2px; cursor: pointer; color: var(--st-border); line-height: 0; transition: transform var(--st-duration-fast) var(--st-ease); }
.ql-star svg { width: 30px; height: 30px; }
.ql-star.on { color: #F59E0B; }
.ql-star:hover { transform: scale(1.12); }
.ql-field { width: 100%; font-family: var(--st-font-body); font-size: 14px; color: var(--st-text); border: 1px solid var(--st-border); border-radius: var(--st-radius); padding: 11px 13px; background: var(--st-white); }
.ql-field::placeholder { color: var(--st-subtle); }
.ql-field:focus { outline: none; border-color: var(--st-primary-product); box-shadow: var(--st-shadow-ring-primary); }
textarea.ql-field { resize: none; line-height: 1.45; }
.ql-field-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ql-err { font-size: 12px; color: var(--st-error-dark); display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.ql-fb-success { text-align: center; padding: 8px 0 4px; }
.ql-fb-success .ico { width: 56px; height: 56px; border-radius: 50%; background: var(--st-success-light); color: var(--st-success); display: grid; place-items: center; margin: 0 auto 12px; }
.ql-fb-success .ico svg { width: 30px; height: 30px; }
.ql-fb-success h3 { font-family: var(--st-font-heading); font-size: 18px; color: var(--st-text); }

/* ---- collapsed feedback box ---- */
.ql-fb-open { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; background: var(--st-white); border: 1px solid var(--st-border); border-radius: var(--st-radius-md); padding: 15px 16px; cursor: pointer; font-family: var(--st-font-body); transition: border-color var(--st-duration) var(--st-ease), box-shadow var(--st-duration) var(--st-ease); }
.ql-fb-open:hover { border-color: var(--st-primary-border); box-shadow: var(--st-shadow-sm); }
.ql-fb-open .ico { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; background: var(--st-primary-light); color: var(--st-primary-product); display: grid; place-items: center; }
.ql-fb-open .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ql-fb-open .txt .t { font-family: var(--st-font-heading); font-weight: 700; font-size: 14.5px; color: var(--st-text); }
.ql-fb-open .txt .s { font-size: 12.5px; color: var(--st-muted); line-height: 1.4; }
.ql-fb-open .chev { color: var(--st-subtle); flex-shrink: 0; display: inline-flex; }

/* ---- footer ---- */
.ql-foot { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--st-subtle); font-size: 12px; }
.ql-foot img { height: 15px; opacity: 0.85; }
.ql-foot .by { font-weight: 500; }

/* ---- card shell ---- */
.ql-card { background: var(--st-white); border: 1px solid var(--st-border); border-radius: var(--st-radius-md); }
.ql-divider { height: 1px; background: var(--st-border); border: none; margin: 0; }

/* ---- contact bar ---- */
.ql-contact { display: flex; gap: 14px; align-items: center; padding: 16px; }
.ql-contact-av { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, #738BF7, #4462F8); color: #fff; display: grid; place-items: center; font-family: var(--st-font-heading); font-weight: 700; font-size: 17px; overflow: hidden; }
.ql-contact-av img { width: 100%; height: 100%; object-fit: cover; }
.ql-contact-info { flex: 1; min-width: 0; }
.ql-contact-name { font-family: var(--st-font-heading); font-weight: 700; font-size: 15px; color: var(--st-text); }
.ql-contact-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ql-contact-link { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--st-primary-product); text-decoration: none; font-weight: 500; word-break: break-word; }
.ql-contact-link svg { flex-shrink: 0; color: var(--st-subtle); }
.ql-contact-link:hover { text-decoration: underline; }

/* ============================================================
   Read-only quality report modal — fixed (full page, not a frame)
   ============================================================ */
.ql-modal-overlay { position: fixed; inset: 0; z-index: 1300; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ql-modal { background: var(--st-white); border-radius: var(--st-radius-2xl); width: 100%; max-width: 640px; margin: auto; max-height: calc(100% - 36px); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--st-shadow-lg); }
.ql-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--st-border); }
.ql-modal-titlerow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ql-modal-titlerow h3 { font-family: var(--st-font-heading); font-size: 19px; font-weight: 700; color: var(--st-text); }
.ql-modal-sub { font-size: 13px; color: var(--st-muted); margin-top: 5px; }
.ql-modal-x { flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; color: var(--st-muted); cursor: pointer; display: grid; place-items: center; transition: background var(--st-duration) var(--st-ease); }
.ql-modal-x:hover { background: var(--st-bg-alt); color: var(--st-text); }
.ql-modal-body { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; scrollbar-width: thin; }
.ql-modal-foot { padding: 14px 22px; border-top: 1px solid var(--st-border); display: flex; justify-content: flex-end; }
.ql-tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--st-radius-full); font-size: 11.5px; font-weight: 600; background: var(--st-bg-alt); color: var(--st-muted); }
.ql-tag-success { background: var(--st-success-light); color: var(--brand-dark); }

.ql-overall { display: flex; align-items: center; gap: 18px; border: 1px solid var(--st-border); border-radius: 14px; padding: 16px; }
.ql-blob { width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--st-font-heading); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; white-space: nowrap; }
.ql-blob.hi { background: var(--st-success-light); color: var(--brand-dark); }
.ql-blob.mid { background: #FFF7ED; color: #B45309; }
.ql-overall-title { font-family: var(--st-font-heading); font-weight: 700; font-size: 16px; color: var(--st-text); }
.ql-overall-line { font-size: 13px; color: var(--st-muted); margin-top: 4px; }

.ql-flabel { font-size: 12px; font-weight: 600; color: var(--st-subtle); margin-bottom: 6px; }
.ql-ro { background: var(--st-bg); border: 1px solid var(--st-border); border-radius: 8px; padding: 11px 13px; font-size: 14px; color: var(--st-text); line-height: 1.4; }

.ql-sec { border: 1px solid var(--st-border); border-radius: 14px; padding: 16px; }
.ql-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ql-sec-head h4 { font-family: var(--st-font-heading); font-size: 15px; font-weight: 700; color: var(--st-text); }
.ql-sec-badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.ql-item { display: flex; align-items: center; gap: 11px; padding: 5px 0; font-size: 14px; color: var(--st-text); }
.ql-item svg { flex-shrink: 0; }

.ql-cust h4 { font-family: var(--st-font-heading); font-size: 15px; font-weight: 700; color: var(--st-text); margin-bottom: 12px; }
.ql-cust-row { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--st-text); margin-bottom: 8px; }

.ql-btn-dl { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 10px 15px; border: 1px solid var(--st-border); border-radius: 8px; background: var(--st-white); font-family: var(--st-font-body); font-size: 13px; font-weight: 600; color: var(--st-text); cursor: pointer; text-decoration: none; transition: background var(--st-duration) var(--st-ease); }
.ql-btn-dl:hover { background: var(--st-bg-alt); }

/* ---- loading / not-found states ---- */
.ql-state { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--st-bg); color: var(--st-muted); text-align: center; padding: 32px; }
.ql-state h2 { font-family: var(--st-font-heading); font-size: 18px; color: var(--st-text); margin: 0; }
.ql-state p { font-size: 14px; color: var(--st-muted); max-width: 320px; line-height: 1.5; }
.ql-spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--st-border); border-top-color: var(--st-primary-product); animation: ql-spin 0.7s linear infinite; }
@keyframes ql-spin { to { transform: rotate(360deg); } }

/* ---- feedback photo picker ---- */
.ql-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.ql-photo { position: relative; width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--st-radius); overflow: hidden; border: 1px solid var(--st-border); }
.ql-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ql-photo-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; background: rgba(15, 23, 42, 0.66); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ql-photo-x:hover { background: rgba(15, 23, 42, 0.85); }
.ql-photo-add { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--st-radius); border: 1px dashed var(--st-border); background: var(--st-bg-alt); color: var(--st-subtle); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; cursor: pointer; transition: border-color var(--st-duration) var(--st-ease), color var(--st-duration) var(--st-ease); }
.ql-photo-add:hover { border-color: var(--st-primary-border); color: var(--st-primary-product); }

/* ---- work description accordions ---- */
.ql-wd-title { font-family: var(--st-font-heading); font-size: 14px; font-weight: 700; color: var(--st-text); margin-bottom: 10px; }
.ql-wd-areas { display: flex; flex-direction: column; gap: 8px; }
.ql-acc { border: 1px solid var(--st-border); border-radius: var(--st-radius); background: var(--st-white); overflow: hidden; }
.ql-acc-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: none; background: transparent; font-family: var(--st-font-body); text-align: left; cursor: pointer; transition: background var(--st-duration) var(--st-ease); }
.ql-acc-head:hover { background: var(--st-bg-alt); }
.ql-acc-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--st-text); }
.ql-acc-type { font-size: 11.5px; font-weight: 600; color: var(--st-muted); background: var(--st-bg-alt); border-radius: 6px; padding: 2px 8px; flex-shrink: 0; }
.ql-acc-chev { color: var(--st-subtle); flex-shrink: 0; display: inline-flex; transition: transform var(--st-duration) var(--st-ease); }
.ql-acc.open .ql-acc-chev { transform: rotate(90deg); }
.ql-acc-body { padding: 2px 14px 12px; border-top: 1px solid var(--st-border-light); }
.ql-acc-notes { font-size: 13px; color: var(--st-muted); line-height: 1.5; margin-top: 8px; white-space: pre-wrap; }
.ql-acc-freq { margin-top: 10px; }
.ql-acc-sched { font-size: 13px; font-weight: 600; color: var(--st-text); }
.ql-acc-sched::first-letter { text-transform: uppercase; }
.ql-acc-tasks { margin: 6px 0 0; padding-left: 20px; font-size: 13px; color: var(--st-text); line-height: 1.7; }
