:root {
  font:
    16px/1.5 system-ui,
    -apple-system,
    sans-serif;
  color: #202642;
  background: #f5f6fb;
  --primary: #2d2c80;
  --line: #dce0ec;
  --muted: #60677e;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 32px;
  background: #ffffff;
  color: white;
}
.brand {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand span {
  display: block;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0;
}
#staff {
  margin-left: auto;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  padding: 11px 17px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  background: var(--primary);
  color: white;
  cursor: pointer;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.secondary,
.quiet {
  background: white;
  color: var(--primary);
}
.danger {
  background: #883c32;
  border-color: #883c32;
}
a {
  color: #2d2c80;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #4945c5;
  outline-offset: 3px;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 8px 0 14px;
}
h2 {
  font-size: 22px;
  margin: 0 0 16px;
}
h3 {
  font-size: 17px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  color: #60677e;
  margin: 0 0 6px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.notice {
  background: #fff4d9;
  border-left: 4px solid #b58a39;
  padding: 14px 20px;
}
.error {
  color: #a02e24;
  font-size: 14px;
}
#status {
  min-height: 28px;
  padding: 6px 32px;
  font-size: 14px;
}
#status.error {
  background: #fff0eb;
}
label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin: 15px 0 6px;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid #b9bfd4;
  border-radius: 6px;
  background: white;
  color: #202642;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
select[multiple] {
  min-height: 150px;
}
.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1600px;
  margin: 12px auto;
}
.workspace aside {
  padding: 22px;
  position: sticky;
  top: 10px;
  align-self: start;
}
.workspace main {
  padding: 10px 28px 50px;
  min-width: 0;
}
nav {
  display: grid;
  gap: 9px;
  margin: 18px 0;
}
nav button {
  text-align: left;
  background: transparent;
  color: #2d2c80;
  border-color: var(--line);
}
nav button[aria-current="page"] {
  background: var(--primary);
  color: white;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.card,
#queue {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
}
.case-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 22px;
}
.field.wide {
  grid-column: 1/-1;
}
.field {
  min-width: 0;
}
.field p {
  margin: 7px 0;
}
.rows {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
}
.field button {
  margin: 6px 8px 6px 0;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
summary {
  font-weight: 650;
  cursor: pointer;
  padding: 4px 0;
}
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.case-row {
  display: grid;
  grid-template-columns: 1.7fr 1.2fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.case-row p {
  margin: 3px 0;
}
.case-row:last-child {
  border: 0;
}
.file-row,
.history-row {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dedupe-summary,
.dedupe-source,
.recovery-overdue {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
}
.dedupe-grid,
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.dedupe-source table,
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
td,
th {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 20px;
  background: #eeeef9;
  font-size: 12px;
}
.readonly-record {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  background: #f6f7fc;
  padding: 14px;
  border-radius: 6px;
}
#dedupe-actions {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
#dedupe-actions textarea {
  max-width: 850px;
}
.hint {
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 800px) {
  header {
    padding: 16px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .workspace aside {
    position: static;
    padding: 12px 18px;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    margin: 8px 0;
  }
  .workspace main {
    padding: 8px 15px 30px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .case-row {
    grid-template-columns: 1fr auto;
  }
  .case-row .muted {
    grid-column: 1;
  }
  .section-head {
    flex-wrap: wrap;
  }
  h1 {
    font-size: 28px;
  }
  .card,
  #queue {
    padding: 18px;
  }
}
dialog {
  max-width: min(520px, calc(100vw - 40px));
  border: 1px solid #dce0ec;
  border-radius: 12px;
  padding: 28px;
  color: #202642;
}
dialog::backdrop {
  background: #141735aa;
}

.survey-capture {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.interview-progress {
  padding: 1rem 1.2rem;
  border: 1px solid #bed1d3;
  border-left: 5px solid #17746e;
  border-radius: 10px;
  background: #f0f8f6;
  color: #154e49;
  font-weight: 600;
  line-height: 1.5;
}
.interview-progress.progress-attention,
.interview-progress.progress-offline,
.interview-progress.progress-access {
  background: #fff8ed;
  border-color: #e0c391;
  color: #734715;
}
#video-meetings details {
  margin: 0.75rem 0;
}
#video-meetings summary {
  cursor: pointer;
  padding: 0.65rem 0;
  font-weight: 600;
}
#video-meetings summary:focus-visible {
  outline: 3px solid #17746e;
  outline-offset: 3px;
}
.survey-capture video,
.survey-capture audio {
  display: block;
  width: 100%;
  max-height: 300px;
  margin: 8px 0;
}
.survey-capture button {
  margin: 4px 4px 4px 0;
}

.external-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
}
#external-requests label {
  display: block;
  margin-block: 0.75rem 0.3rem;
}
#external-requests input[type="checkbox"] {
  width: auto;
  margin-right: 0.4rem;
}

/* Shared Perfect Finmart identity: original logo, navy, red and white. */
header {
  color: #2d2c80;
  border-top: 3px solid #e8202a;
  border-bottom: 1px solid var(--line);
  padding: 12px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 22px;
  letter-spacing: 0;
}
.brand img {
  display: block;
  width: 150px;
  height: auto;
}
.brand .brand-product {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.1em;
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.brand-product small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
body:has(.signin:not([hidden])) > header {
  display: none;
}
body:has(.signin:not([hidden])) {
  background: #f3f4fa;
}
body:has(.signin:not([hidden])) > #status {
  max-width: 1040px;
  margin: 0 auto;
}
.signin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(1040px, calc(100% - 48px));
  margin: clamp(24px, 6vh, 64px) auto;
  border: 1px solid #daddee;
  border-radius: 24px;
  overflow: hidden;
  background: white;
  box-shadow: 0 22px 72px #21205f12;
}
.signin > * {
  min-width: 0;
}
.login-intro {
  padding: 36px 42px;
  color: white;
  background: linear-gradient(145deg, #232264, #343184);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-top: 5px solid #d9232a;
}
.login-intro::after {
  content: "";
  position: absolute;
  bottom: -220px;
  right: -180px;
  width: 450px;
  height: 450px;
  border: 1px solid #ffffff13;
  border-radius: 50%;
  box-shadow:
    0 0 0 48px #ffffff03,
    0 0 0 96px #ffffff02;
  pointer-events: none;
}
.login-intro > * {
  position: relative;
  z-index: 1;
}
.login-company-mark {
  width: 166px;
  background: white;
  border-radius: 10px;
  padding: 8px 11px;
  margin-bottom: 32px;
}
.login-company-mark img {
  display: block;
  width: 100%;
  height: auto;
}
.login-eyebrow {
  font-size: 10px;
  letter-spacing: 0.17em;
  color: #dbdaf3;
  font-weight: 650;
  margin: 0 0 13px;
}
.login-intro h1 {
  color: white;
  font-size: clamp(32px, 4vw, 45px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
}
.login-description {
  color: #dfdef2;
  font-size: 15px;
  line-height: 1.7;
  max-width: 340px;
  margin: 0 0 30px;
}
.login-benefits {
  display: grid;
  gap: 16px;
  padding: 25px 0 0;
  list-style: none;
  margin: auto 0 0;
  border-top: 1px solid #ffffff29;
}
.login-benefits li {
  display: flex;
  align-items: center;
  gap: 17px;
  color: #e2e1f4;
  font-size: 12px;
}
.login-benefits strong {
  color: white;
  font-size: 13px;
  min-width: 68px;
  border-left: 3px solid #ee6971;
  padding-left: 12px;
}
.login-products {
  font-size: 11px;
  color: #d3d2eb;
  margin: 28px 0 0;
}
.login-panel {
  padding: 38px 42px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-form-eyebrow {
  color: #b51e29;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
  margin: 0 0 10px;
}
.login-panel h2 {
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 0 9px;
}
.login-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}
.login-role-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border: 1px solid #c6cade;
  border-radius: 11px;
  padding: 4px;
  background: #f4f5fa;
}
.login-role-choices a {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #555c75;
  font-size: 14px;
  font-weight: 650;
  padding: 9px 10px;
  text-align: center;
  text-decoration: none;
}
.login-role-choices a[aria-current="page"] {
  background: white;
  color: #292776;
  border-color: #8687b5;
  box-shadow: 0 2px 5px #21205f0c;
}
.login-role-choices a:hover {
  background: white;
  color: #292776;
}
.login-progress {
  display: flex;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 22px 0 7px;
  color: #626780;
  font-size: 12px;
}
.login-progress li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-progress li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid #757991;
}
.login-progress li[aria-current="step"] {
  color: #292776;
  font-weight: 700;
}
.login-progress li[aria-current="step"]::before {
  background: #292776;
  border-color: #292776;
  box-shadow: 0 0 0 4px #eeedf8;
}
.login-panel input {
  height: 49px;
  font-size: 16px;
  border-color: #868ba6;
  border-radius: 9px;
  padding: 11px 13px;
}
.login-access-help,
.login-code-help {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 12px 0 18px;
}
.login-panel form button {
  min-height: 49px;
  width: 100%;
  margin: 0;
  border-radius: 9px;
  background: #c51f2a;
  border-color: #c51f2a;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 4px 10px #bb1f2720;
}
.login-panel form button:hover {
  background: #aa1822;
  filter: none;
}
.login-footnote {
  font-size: 11px;
  line-height: 1.65;
  color: #626780;
  border-top: 1px solid #e0e2ed;
  padding-top: 17px;
  margin: 24px 0 0;
}
.login-panel .login-otp {
  height: 56px;
  font-size: 26px;
  letter-spacing: 0.32em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.login-change-account {
  display: block;
  font-size: 12px;
  margin: 18px 0 0;
  line-height: 1.6;
  text-align: center;
  text-underline-offset: 4px;
}
nav button[aria-current="page"] {
  border-left: 4px solid #e8202a;
}
@media (max-width: 760px) {
  .signin {
    grid-template-columns: 1fr;
    max-width: 460px;
    width: calc(100% - 32px);
    margin: 18px auto;
    border-radius: 18px;
  }
  .login-intro {
    padding: 23px 25px;
  }
  .login-company-mark {
    width: 130px;
    margin-bottom: 20px;
  }
  .login-intro h1 {
    font-size: 32px;
    margin-bottom: 0;
  }
  .login-intro h1 br {
    display: none;
  }
  .login-description,
  .login-benefits,
  .login-products {
    display: none;
  }
  .login-panel {
    padding: 27px 25px 23px;
  }
  .login-form-eyebrow {
    display: none;
  }
  .login-panel h2 {
    font-size: 27px;
  }
  .login-subtitle {
    margin-bottom: 20px;
  }
  .brand {
    gap: 12px;
  }
  .brand img {
    width: 117px;
  }
  .brand .brand-product {
    font-size: 11px;
    padding-left: 12px;
  }
  header {
    padding: 10px 16px;
    gap: 12px;
  }
  #staff {
    font-size: 12px;
    overflow-wrap: anywhere;
  }
}

.file-folder-summary {
  padding: 12px 15px;
  border-left: 4px solid var(--primary);
  background: #eeeef9;
  border-radius: 5px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.file-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.file-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.file-actions button {
  white-space: normal;
}
.transcript-speech {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
}
.transcript-reader:not(:empty) {
  max-height: 34rem;
  overflow-y: auto;
  border: 1px solid #d6e0eb;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
}
.p1-checklist {
  background: #f4f4fc;
  border: 1px solid #d4d3eb;
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 18px;
  margin: 12px 0 24px;
}
.p1-checklist h3 {
  margin: 0 0 5px;
  color: var(--primary);
}
.checklist-intro {
  margin: 0 0 12px;
}
.checklist-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.checklist-counts span {
  background: white;
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 14px;
}
.checklist-details {
  margin-top: 15px;
}
.checklist-details summary {
  cursor: pointer;
}
.checklist-details summary:focus-visible,
.field:focus-visible {
  outline: 3px solid #4945c5;
  outline-offset: 3px;
}
.checklist-group {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.checklist-group h4 {
  margin: 0 0 10px;
}
.checklist-group ul {
  margin: 0;
  padding-left: 22px;
}
.checklist-group li {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.checklist-link {
  padding: 0;
  background: transparent;
  color: var(--primary);
  border: 0;
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
}
.checklist-group .hint {
  margin: 3px 0 0;
}

#customer-uploads {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f4fc;
}
#customer-uploads h3 {
  margin-top: 0;
}
.upload-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.upload-row progress {
  width: 100%;
  height: 14px;
  accent-color: var(--primary);
}
.upload-control input[type="file"] {
  width: 100%;
  max-width: 100%;
}
#customer-uploads button {
  margin: 6px 10px 0 0;
}

.selected-file {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.selected-file button {
  padding: 6px 10px;
  font-size: 13px;
}

.queue-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}
.queue-metric {
  min-width: 0;
  padding: 16px;
  text-align: left;
  border-color: var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.queue-metric[aria-pressed="true"] {
  background: #efefff;
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.queue-metric-title {
  font-size: 14px;
  font-weight: 650;
}
.queue-metric-value {
  font-size: 32px;
  line-height: 1.15;
}
.queue-metric-caption {
  font-size: 12px;
  color: var(--muted);
}
.queue-age {
  max-width: 48rem;
}
.queue-age-alert {
  color: #873b20;
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 1100px) {
  .queue-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .queue-metric {
    padding: 12px;
  }
  .queue-metric-value {
    font-size: 28px;
  }
}
