/* =========================================================================
 * Master Group — Field Survey components, themed to the admin UI palette
 * (navy --bs-primary / cyan --bs-secondary). Scoped with ds- prefixes.
 * ========================================================================= */
:root {
  --ds-ok: #1e8e5a;
  --ds-review: #b8860b;
  --ds-hazard: #c0392b;
  --ds-amber: #e8a90c;
}

/* ---- progress ---- */
.ds-progress .ds-bar { height: 6px; border-radius: 99px; background: var(--bs-border-color); overflow: hidden; }
.ds-progress .ds-bar i { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary)); transition: width .35s ease; }
.ds-progress .ds-lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--bs-secondary-color); margin-bottom: 6px; }

/* ---- dictation field ---- */
.dictate { position: relative; }
.dictate textarea { width: 100%; min-height: 92px; padding: 13px 52px 13px 14px; resize: vertical;
  border: 1.5px solid var(--bs-border-color); border-radius: 10px; background: var(--bs-body-bg);
  color: var(--bs-body-color); font: inherit; }
.dictate textarea:focus { outline: none; border-color: var(--bs-primary);
  box-shadow: 0 0 0 .18rem rgba(var(--bs-primary-rgb), .15); }
.dictate.formatted textarea { border-color: rgba(var(--bs-primary-rgb), .55); }
.mic { position: absolute; right: 9px; top: 9px; width: 40px; height: 40px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; border: none; cursor: pointer;
  background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary); transition: .2s; }
.mic:hover { background: rgba(var(--bs-primary-rgb), .18); }
.mic i { font-size: 18px; }
.mic.live { background: var(--ds-amber); color: #1a1a1a; animation: ds-pulse 1.3s infinite; }
@keyframes ds-pulse { 0% { box-shadow: 0 0 0 0 rgba(232,169,12,.5); } 70% { box-shadow: 0 0 0 10px rgba(232,169,12,0); } 100% { box-shadow: 0 0 0 0 rgba(232,169,12,0); } }

.dtools { display: flex; align-items: center; gap: 10px; min-height: 20px; margin-top: 7px; font-size: 12.5px; }
.ds-ai { display: inline-flex; align-items: center; gap: 6px; color: var(--bs-primary); font-weight: 600; }
.ds-ai i { font-size: 15px; }
.ds-raw { color: var(--bs-secondary-color); }
.ds-relabel { border: none; background: none; color: var(--bs-secondary); font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; font-size: 12.5px; }
.ds-draft { white-space: nowrap; }
.ds-spin { width: 13px; height: 13px; border: 2px solid rgba(var(--bs-primary-rgb), .25); border-top-color: var(--bs-primary); border-radius: 50%; display: inline-block; animation: ds-rot .7s linear infinite; }
@keyframes ds-rot { to { transform: rotate(360deg); } }

/* ---- IMDG chips ---- */
.ds-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--bs-border-color);
  background: var(--bs-body-bg); color: var(--bs-body-color); font-weight: 600; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; transition: .15s; }
.chip:hover { border-color: var(--bs-primary); }
.chip[aria-pressed="true"] { background: var(--bs-primary); color: #fff; border-color: var(--bs-primary); }
.chip .hz { width: 9px; height: 9px; border-radius: 2px; background: var(--ds-amber); }
.chip[aria-pressed="true"] .hz { background: #fff; }

/* ---- verdict ---- */
.ds-verdict { border-radius: 12px; overflow: hidden; border: 1px solid var(--bs-border-color); margin-top: 8px; }
.ds-vh { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #fff; }
.ds-vh i { font-size: 22px; }
.ds-verdict.pass .ds-vh { background: var(--ds-ok); }
.ds-verdict.review .ds-vh { background: var(--ds-review); }
.ds-verdict.fail .ds-vh { background: var(--ds-hazard); }
.ds-vt { font-weight: 700; font-size: 15px; }
.ds-vs { font-size: 11.5px; opacity: .9; letter-spacing: .06em; }
.ds-verdict ul { list-style: none; padding: 6px 16px 14px; margin: 0; background: var(--bs-card-bg); }
.ds-verdict li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--bs-border-color); font-size: 13px; }
.ds-verdict li:last-child { border-bottom: none; }
.ds-lv { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; height: fit-content; letter-spacing: .04em; }
.ds-lv.fail { background: rgba(192,57,43,.12); color: var(--ds-hazard); }
.ds-lv.review { background: rgba(184,134,11,.16); color: var(--ds-review); }
.ds-lv.pass { background: rgba(30,142,90,.12); color: var(--ds-ok); }

/* ---- compliance tags ---- */
.ds-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 7px; font-size: 12px; font-weight: 700; }
.ds-tag.pass { background: rgba(30,142,90,.12); color: var(--ds-ok); }
.ds-tag.review { background: rgba(184,134,11,.16); color: var(--ds-review); }
.ds-tag.fail { background: rgba(192,57,43,.12); color: var(--ds-hazard); }

/* ---- certificate ---- */
.survey-doc { background: #fff; color: #11202e; border: 1px solid var(--bs-border-color); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(15,37,56,.08); max-width: 800px; margin: 0 auto; }
.survey-doc .dhead { padding: 22px 26px; border-bottom: 3px solid var(--bs-primary); display: flex; align-items: center; gap: 16px; }
.survey-doc .dhead img { height: 60px; width: 60px; object-fit: cover; border-radius: 10px; }
.survey-doc .dhead .co { flex: 1; display: flex; flex-direction: column; }
.survey-doc .dhead .co b { font-weight: 800; font-size: 18px; color: var(--bs-primary); }
.survey-doc .dhead .co span { font-size: 11.5px; color: #566472; margin-top: 2px; }
.survey-doc .dhead .rt { text-align: right; font-size: 12px; color: #566472; font-weight: 600; }
.survey-doc .dbody { padding: 24px 30px 30px; }
.survey-doc .doc-eyebrow { text-align: center; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--bs-secondary); font-weight: 700; }
.survey-doc .doc-title { text-align: center; font-weight: 800; font-size: 19px; color: var(--bs-primary); margin: 2px 0 18px; }
.survey-doc h4 { font-size: 14px; color: var(--bs-primary); margin: 18px 0 6px; font-weight: 700; }
.survey-doc p { font-size: 13.5px; line-height: 1.6; margin: 0 0 8px; }
.survey-doc ul { margin: 0 0 8px; padding-left: 20px; }
.survey-doc li { font-size: 13.5px; line-height: 1.7; }
.survey-doc .sign { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 32px; padding-top: 18px; border-top: 1px dashed #c9d3de; }
.survey-doc .sign .sg b { display: block; font-size: 14px; }
.survey-doc .sign .sg span { display: block; font-size: 12px; color: #566472; }
.survey-doc .stamp { width: 96px; height: 96px; border: 2px solid var(--bs-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 9px; font-weight: 800; letter-spacing: .05em; color: var(--bs-primary); transform: rotate(-8deg); opacity: .8; line-height: 1.5; }

/* ---- show/hide form vs report ---- */
#reportView { display: none; }
body.show-report #reportView { display: block; }

/* ---- print: only the certificate ---- */
@media print {
  .left-sidebar, .app-header, aside, .ds-fab, .no-print, #surveyCard, .ds-progress { display: none !important; }
  body.show-report .body-wrapper, body.show-report .container-fluid { margin: 0 !important; padding: 0 !important; }
  .survey-doc { box-shadow: none; border: none; max-width: 100%; }
  @page { margin: 12mm; }
}

/* ---- sticky action bar ---- */
.ds-fab { position: sticky; bottom: 0; z-index: 5; background: var(--bs-card-bg); border-top: 1px solid var(--bs-border-color); padding: 12px 0; margin-top: 18px; display: flex; gap: 10px; }
.ds-fab .btn { flex: 1; }
.ds-fab .btn.gen { flex: 1.4; }

/* ===== Profile Dropdown Fixes ===== */
.dropdown-menu.content-dd {
  background-color: #ffffff !important;
}

.profile-dropdown {
  background-color: #ffffff !important;
}

/* Fix upgrade panel - replace broken bg image with clean gradient */
.upgrade-plan {
  background: linear-gradient(135deg, #e8f0fe 0%, #d0e4ff 100%) !important;
  border: 1px solid #c2d8ff;
}

.unlimited-img {
  display: flex;
  align-items: center;
  justify-content: center;
}

.unlimited-img img {
  display: none; /* hide broken background image */
}

.unlimited-img::after {
  content: '';
  display: block;
  width: 80px;
  height: 80px;
  background-image: url('./assets/images/logos/mastergroup-logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.35;
}

/* Topbar white background */
.topbar {
  background-color: #ffffff !important;
}
