/* CGS Infotech — cgs/css/audit-workspace.css
   Readable stylesheet. Existing selectors, values and cascade order are preserved. */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #f7f3f5;
  color: #37262d;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button,
summary {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #be326c;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: Manrope, Arial, sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.25;
}
h2 {
  font-size: 27px;
  font-weight: 800;
}
h3 {
  font-size: 21px;
}
button {
  border: 0;
}
input,
textarea,
select {
  min-width: 0;
  max-width: 100%;
}
.topbar {
  max-width: 1480px;
  margin: auto;
  padding: 32px 32px 26px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.brand {
  text-decoration: none;
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -2px;
}
.brand > span {
  color: #ca247f;
}
.brand small {
  display: block;
  letter-spacing: 2px;
  font:
    700 9px Manrope,
    sans-serif;
  margin-top: 6px;
}
.page-title {
  flex: 1;
}
.page-title h1 {
  font-size: 24px;
  margin-top: 6px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: #926a7b;
}
.connection {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 24px;
  border: 1px solid #e4d5db;
  background: #fff;
}
.connection.ready {
  color: #176549;
  background: #eaf7f1;
  border-color: #c7e6d7;
}
.workspace {
  max-width: 1480px;
  padding: 0 32px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}
.workspace-card {
  min-width: 0;
  border: 1px solid #e9dfe3;
  border-radius: 22px;
  background: #fff;
  padding: 30px;
  box-shadow: 0 9px 30px #42243104;
  scroll-margin-top: 20px;
}
.scan-card {
  border-top: 3px solid #c52b7d;
}
.chat-card {
  border-top: 3px solid #a7617e;
  background: linear-gradient(150deg, #fff, #fffafc);
}
.contact-card {
  background: linear-gradient(145deg, #fff, #fff7fb);
}
.audit-card {
  border-top: 3px solid #36876e;
}
.card-heading {
  display: flex;
  gap: 14px;
  align-items: center;
}
.card-heading > div {
  flex: 1;
  min-width: 0;
}
.card-heading h2 {
  margin-top: 5px;
}
.step {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #efcfe0;
  border-radius: 13px;
  background: #fff0f7;
  color: #b0206e;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
}
.purple {
  color: #995471;
  background: #fce9f1;
  border-color: #efd3df;
}
.teal {
  color: #286e57;
  background: #e8f5ef;
  border-color: #cce5da;
}
.card-symbol {
  font-size: 35px;
  font-weight: 400;
  color: #a47689;
}
.intro {
  color: #7e6771;
  margin: 17px 0 23px;
  font-size: 16px;
}
.fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 16px;
}
.fields label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  position: relative;
}
.fields label.wide {
  grid-column: 1/-1;
}
.fields small {
  position: absolute;
  right: 0;
  top: 0;
  color: #967e88;
  font-weight: 400;
  font-size: 12px;
}
.fields input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #dfd0d6;
  border-radius: 9px;
  background: white;
  color: #422b35;
  font-size: 16px;
  line-height: 1.5;
}
.fields input {
  height: 51px;
}
input::placeholder,
textarea::placeholder {
  color: #a8929b;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 12px;
  font-size: 13px;
  color: #816c75;
  line-height: 1.7;
}
.consent input {
  accent-color: #bc2676;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 3px;
}
.micro {
  font-size: 12px;
  color: #8a737d;
  line-height: 1.65;
  margin: 9px 0;
}
.quiet {
  color: #9d858f;
  font-size: 11px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  min-height: 45px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.primary {
  background: #bc2377;
  color: #fff;
  box-shadow: 0 6px 16px #bc237717;
}
.primary:hover {
  background: #a61966;
}
.secondary {
  background: white;
  color: #825568;
  border-color: #dfcfd6;
}
.full {
  width: 100%;
  justify-content: space-between;
  margin-top: 12px;
  min-height: 51px;
}
.full > span {
  font-size: 23px;
}
.text-button {
  background: none;
  padding: 5px;
  color: #8e3c5e;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #f2e9ed;
  margin-top: 21px;
  padding-top: 16px;
  color: #987885;
  font-size: 12px;
}
.notice {
  font-size: 14px;
  color: #855066;
  line-height: 1.6;
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.notice:empty {
  display: none;
}
.progress-caption {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  gap: 15px;
  margin-top: 20px;
}
.progress-track {
  height: 7px;
  border-radius: 8px;
  background: #f0e7eb;
  margin-top: 12px;
  overflow: hidden;
}
.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: #bc2377;
  transition: width 0.25s;
}
.chat-log {
  height: 258px;
  overflow: auto;
  padding: 16px 2px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid #f2e7ec;
  border-bottom: 1px solid #f2e7ec;
  overscroll-behavior: contain;
}
.chat-welcome {
  margin: auto;
  text-align: center;
  max-width: 340px;
}
.chat-welcome > span {
  font-size: 32px;
  color: #b0758e;
}
.chat-welcome h3 {
  font-size: 23px;
  margin: 5px 0 10px;
}
.chat-welcome p {
  font-size: 15px;
  color: #99808a;
}
.bubble {
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  padding: 14px 16px;
  border-radius: 13px;
  max-width: 94%;
  background: #f7edf1;
  border: 1px solid #ebdce2;
  overflow-wrap: anywhere;
  align-self: flex-start;
}
.bubble.user {
  align-self: flex-end;
  background: #bf267a;
  color: white;
  border-color: #bf267a;
}
.bubble.system {
  color: #886574;
  font-size: 13px;
  border-style: dashed;
  background: transparent;
}
.bubble .text-button {
  display: block;
  margin-top: 7px;
  padding: 0;
}
.prompts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 13px 0;
}
.prompts button {
  background: white;
  border: 1px solid #e8d4dc;
  border-radius: 20px;
  padding: 6px 12px;
  color: #8f546d;
  font-size: 12px;
}
.chat-form {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfc3cf;
  border-radius: 12px;
  background: #fff;
  padding: 8px 8px 8px 13px;
}
.chat-form textarea {
  border: 0;
  resize: vertical;
  min-height: 52px;
  padding: 5px 0;
  font-size: 15px;
}
.chat-form button {
  background: #965470;
  font-size: 25px;
  width: 48px;
  flex-shrink: 0;
  padding: 0;
}
.voice-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.voice-toolbar .button {
  font-size: 13px;
  min-height: 37px;
  padding: 8px 12px;
}
.voice-options {
  font-size: 12px;
  color: #846371;
  position: relative;
  margin-left: auto;
}
.voice-options[open] {
  flex-basis: 100%;
  margin-left: 0;
  padding: 14px;
  background: #fbf4f7;
  border-radius: 10px;
}
.voice-options label:not(.consent) {
  display: block;
  margin: 10px 0;
  font-size: 12px;
}
.voice-options select {
  padding: 9px;
  margin-top: 5px;
  font-size: 14px;
}
.voice-options summary {
  font-weight: 600;
}
.contact-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #eddfe5;
  padding-top: 20px;
  margin-top: 24px;
  font-size: 14px;
  color: #8e727e;
}
.contact-foot a {
  font-weight: 700;
  text-decoration: none;
  color: #aa2971;
}
.report-empty {
  padding: 54px 15px 28px;
  text-align: center;
  color: #947c86;
}
.empty-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 240px;
  gap: 10px;
  margin: 0 auto 24px;
}
.empty-map span {
  padding: 16px;
  border: 1px solid #eedfe5;
  background: #fcf8fa;
  border-radius: 14px;
  color: #a88091;
  font-size: 26px;
}
.report-empty h3 {
  color: #785362;
}
.report-empty p {
  max-width: 300px;
  margin: 12px auto 30px;
  font-size: 15px;
}
.legend {
  font-size: 11px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 6px;
  height: 6px;
  background: #b8abb0;
  border-radius: 50%;
  margin-left: 7px;
}
.legend .found {
  background: #389775;
}
.legend .gap {
  background: #d88152;
}
#report-title {
  font-size: 24px;
  margin-top: 23px;
}
.audit-summary {
  font-size: 16px;
  line-height: 1.65;
  color: #875b74;
  margin-top: 10px;
}
.audit-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.stat {
  border-radius: 11px;
  padding: 15px 8px;
  text-align: center;
  background: #f8f2f4;
  color: #8c727d;
}
.stat strong {
  font-size: 28px;
  display: block;
  line-height: 1.2;
}
.stat span {
  font-size: 11px;
  font-weight: 600;
  display: block;
  margin-top: 7px;
}
.stat.gaps {
  background: #fff2e9;
  color: #b5693c;
}
.stat.found {
  background: #edf8f3;
  color: #39876d;
}
.audit-signals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.signal {
  border: 1px solid #ede1e6;
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}
.signal-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.signal-icon {
  font-size: 23px;
  color: #a3818f;
  line-height: 1;
}
.signal h4 {
  font-size: 14px;
  margin: 10px 0 7px;
  font-weight: 700;
  color: #593c48;
}
.signal p {
  font-size: 12px;
  line-height: 1.7;
  color: #907681;
  overflow-wrap: anywhere;
}
.badge {
  font-size: 9px;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  background: #f4edf0;
  color: #937e87;
}
.observed .badge {
  background: #e7f6ef;
  color: #29795b;
}
.gap .badge {
  background: #fff0e5;
  color: #af6235;
}
.review .badge {
  background: #fff5dc;
  color: #9c7b27;
}
.signal.opportunity {
  grid-column: 1/-1;
  background: linear-gradient(120deg, #fbedf3, #fff4fa);
  border-color: #e9ccd8;
}
.opportunity .badge {
  background: #f5dde7;
  color: #a25072;
}
.opportunity p {
  font-size: 13px;
}
.report-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  margin: 23px 0 12px;
}
.report-actions .button {
  font-size: 14px;
}
.email-status {
  font-size: 13px;
  line-height: 1.7;
  background: #f9f3f5;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 15px;
  color: #8c727d;
}
.sources {
  font-size: 13px;
  color: #886775;
  margin-top: 19px;
  border-top: 1px solid #efe5e9;
  padding-top: 16px;
}
.sources summary {
  font-weight: 600;
}
.sources ul {
  list-style: none;
  padding: 0;
}
.sources li {
  padding: 9px 0;
  border-bottom: 1px solid #f3e7ec;
  overflow-wrap: anywhere;
}
.sources li small {
  display: block;
  font-size: 11px;
  color: #b099a3;
}
.sources a {
  color: #946076;
  text-decoration: none;
}
.sources a:hover {
  text-decoration: underline;
}
.page-foot {
  max-width: 1480px;
  padding: 25px 34px 35px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #9d8790;
  font-size: 12px;
}
.page-foot a {
  text-decoration: none;
}
.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  background: white;
  padding: 12px;
  z-index: 20;
}
.form-highlight {
  animation: pulse 2s ease-out;
}

/* SECTION: @keyframes pulse */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 5px #d890b866;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* SECTION: @media (min-width: 1200px) */
@media (min-width: 1200px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .workspace-card {
    padding: 34px;
  }
  .chat-log {
    height: 283px;
  }
}

/* SECTION: @media (max-width: 900px) */
@media (max-width: 900px) {
  .topbar {
    padding: 24px 20px;
    gap: 20px;
  }
  .page-title h1 {
    font-size: 20px;
  }
  .connection {
    font-size: 11px;
  }
  .workspace {
    padding: 0 20px;
    gap: 18px;
  }
  .workspace-card {
    padding: 23px;
  }
  h2 {
    font-size: 23px;
  }
  .card-heading {
    gap: 10px;
  }
  .step {
    width: 40px;
    height: 40px;
  }
  .fields {
    gap: 16px 12px;
  }
  .audit-signals {
    grid-template-columns: 1fr;
  }
  .signal.opportunity {
    grid-column: auto;
  }
}

/* SECTION: @media (max-width: 760px) */
@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-wrap: wrap;
  }
  .page-title {
    flex-basis: calc(100% - 100px);
  }
  .topbar .connection {
    margin-left: auto;
  }
  .workspace-card {
    padding: 25px;
    border-radius: 18px;
  }
  .chat-log {
    height: 260px;
  }
  .audit-signals {
    grid-template-columns: 1fr 1fr;
  }
  .signal.opportunity {
    grid-column: 1/-1;
  }
  .page-foot {
    flex-direction: column;
    gap: 7px;
  }
  .card-symbol {
    display: none;
  }
}

/* SECTION: @media (max-width: 430px) */
@media (max-width: 430px) {
  .workspace {
    padding: 0 12px;
  }
  .topbar {
    padding: 20px 16px;
    gap: 18px;
  }
  .page-title h1 {
    font-size: 19px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .workspace-card {
    padding: 23px 18px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .fields label.wide {
    grid-column: auto;
  }
  h2 {
    font-size: 23px;
  }
  .card-heading {
    gap: 10px;
  }
  .audit-signals {
    gap: 8px;
  }
  .signal {
    padding: 12px;
  }
  .signal h4 {
    font-size: 14px;
  }
  .signal p {
    font-size: 12px;
  }
  .badge {
    font-size: 8px;
    padding: 4px;
  }
  .signal-icon {
    font-size: 20px;
  }
  .stat strong {
    font-size: 26px;
  }
  .stat span {
    font-size: 10px;
  }
  .contact-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .card-foot {
    font-size: 10px;
  }
  .report-actions .button {
    width: 100%;
  }
  .card-heading > .text-button {
    font-size: 11px;
  }
  .page-foot {
    padding: 22px 18px;
  }
}

/* SECTION: @media (prefers-reduced-motion: reduce) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* SECTION: @media print */
@media print {
  body {
    background: #fff;
  }
  .topbar,
  .page-foot,
  #panel-scan,
  #panel-chat,
  #cgs-consultation,
  .report-actions,
  .card-heading > button {
    display: none !important;
  }
  .workspace {
    display: block;
    padding: 0;
  }
  .workspace-card {
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .signal {
    break-inside: avoid;
  }
  .audit-signals {
    grid-template-columns: 1fr 1fr;
  }
  .sources {
    display: block;
  }
  .email-status {
    background: white;
  }
}

.signal p {
  font-size: 14px;
}
.signal h4 {
  font-size: 16px;
}
.badge {
  font-size: 10px;
}
.micro {
  font-size: 13px;
}

/* SECTION: @media (max-width: 430px) */
@media (max-width: 430px) {
  .audit-signals {
    grid-template-columns: 1fr;
  }
  .signal.opportunity {
    grid-column: auto;
  }
  .signal p {
    font-size: 14px;
  }
  .signal h4 {
    font-size: 16px;
  }
  .badge {
    font-size: 10px;
  }
}
