/* Carrier chrome, transcribed from public/app.html so the broker shell
   uses the same type, spacing, and controls.
   TopBar: padding 12px 28px, logo lockup, two-line title, BETA chip,
   account button (app.html TopBar).
   TopNav + NewSubmissionCTA: tab row and primary action.
   DashboardView header, DashboardKpiCard, InboxList column metrics.
   Tokens are the light theme custom properties already set by app.html
   ([data-theme="light"]) and by broker.html :root. */

.eqc-shell {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* One accent colour per view. The bar and the badge both read it.
   Broker is a medium green. Carrier is a medium blue.
   The historical broker stripe was teal (#0E7C86), so it is not reused. */
.eqc-view-broker { --eqc-view-accent: #2E7D32; }
.eqc-view-carrier { --eqc-view-accent: #1D6FBF; }

.eqc-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
}

.eqc-view-bar {
  height: 6px;
  background: var(--eqc-view-accent);
  flex: 0 0 auto;
}

.eqc-view-badge {
  white-space: nowrap;
  flex: 0 0 auto;
  box-sizing: border-box;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 2px;
  color: var(--eqc-view-accent);
  background: color-mix(in srgb, var(--eqc-view-accent) 22%, #ffffff);
  border: 1px solid var(--eqc-view-accent);
}

.eqc-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--outline-dim);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eqc-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
}

.eqc-rule {
  width: 1px;
  height: 28px;
  background: var(--outline-dim);
  flex: 0 0 auto;
}

.eqc-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.eqc-title {
  font-family: 'Instrument Sans', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eqc-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--on-surface-dimmer);
  letter-spacing: 0.4px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eqc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.eqc-toggle {
  display: flex;
  border: 1px solid var(--outline);
  border-radius: 4px;
  overflow: hidden;
}

.eqc-toggle-on,
.eqc-toggle-off {
  padding: 5px 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
}

.eqc-toggle-on {
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent);
}

.eqc-toggle-off {
  color: var(--on-surface-dim);
  background: transparent;
}

.eqc-beta {
  font-family: 'DM Mono', 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid var(--outline-dim);
  line-height: 1;
}

.eqc-account {
  position: relative;
}

.eqc-user {
  background: transparent;
  border: 1px solid var(--outline);
  border-radius: 4px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--on-surface-dim);
  cursor: pointer;
  font-family: 'Instrument Sans', -apple-system, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.eqc-caret {
  font-size: 9px;
  color: var(--on-surface-dimmer);
  line-height: 1;
}

.eqc-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--outline-dim);
  border-radius: 4px;
  min-width: 260px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  z-index: 60;
  overflow: hidden;
}

.eqc-menu-role {
  padding: 10px 14px;
  border-bottom: 1px solid var(--outline-dim);
}

.eqc-menu-k {
  font-size: 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--on-surface-dimmer);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.eqc-menu-v {
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface);
  font-family: 'IBM Plex Mono', monospace;
}

.eqc-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--on-surface);
  cursor: pointer;
  font-family: 'Instrument Sans', -apple-system, sans-serif;
}

.eqc-menu-item:hover {
  background: var(--surface-low);
}

.eqc-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--outline);
}

.eqc-nav-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.eqc-tabs {
  display: flex;
  gap: 0;
  min-width: 0;
  overflow-x: auto;
}

.eqc-tab,
.eqc-cta {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  padding: 14px 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.8px;
  color: var(--on-surface-dimmer);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  white-space: nowrap;
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 0;
}

.eqc-tab:hover {
  color: var(--on-surface-dim);
}

.eqc-tab.active {
  border-bottom-color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
  color: var(--on-surface);
}

.eqc-tab.active:hover {
  color: var(--on-surface);
}

.eqc-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--on-surface-dimmer);
  background: var(--surface-low);
  border: 1px solid var(--outline-dim);
  border-radius: 8px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
  letter-spacing: 0.3px;
  line-height: 1.4;
}

.eqc-tab.active .eqc-count {
  color: var(--accent);
  background: var(--accent-light);
  border-color: rgba(var(--accent-rgb), 0.188);
}

.eqc-cta {
  background: var(--accent);
  border-bottom-color: var(--accent);
  padding: 14px 17px;
  font-weight: 600;
  color: #fff;
}

.eqc-cta:hover {
  background: #142240;
  border-bottom-color: #142240;
  color: #fff;
}

.eqc-main,
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

.eqc-page-head,
.page-head {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.eqc-page-title,
.t-title {
  font-family: 'Instrument Sans', -apple-system, sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--on-surface);
  letter-spacing: -0.2px;
  line-height: 1.1;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.eqc-page-sub,
.t-sub {
  font-size: 16px;
  font-family: 'Instrument Sans', -apple-system, sans-serif;
  font-weight: 500;
  color: var(--on-surface-dim);
  letter-spacing: 0.1px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.eqc-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.eqc-kpi {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 6px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 104px;
  min-width: 0;
  transition: background .12s, border-color .12s;
}

/* KPI tiles that link to a filtered view, same idea as the underwriter
   dashboard's clickable KPI cards: a pointer cursor and a hover tint
   that matches the color already used for that section's stage pill
   elsewhere in the broker app (see broker.html .pill-state rules), so
   the color means the same thing in both places. */
.eqc-kpi.clickable {
  cursor: pointer;
}
.eqc-kpi.tint-broker-accent:hover {
  background: var(--color-broker-accent-container);
  border-color: var(--color-broker-accent);
}
.eqc-kpi.tint-accent:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}
.eqc-kpi.tint-gold:hover {
  background: var(--color-gold-container);
  border-color: var(--color-gold);
}
.eqc-kpi.tint-blue:hover {
  background: var(--color-blue-container);
  border-color: var(--color-blue);
}
.eqc-kpi.tint-positive:hover {
  background: var(--color-positive-container);
  border-color: var(--color-positive);
}

.eqc-kpi-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface-dimmer);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.eqc-kpi-num {
  font-family: 'DM Mono', 'IBM Plex Mono', monospace;
  font-size: 52px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.eqc-kpi-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--on-surface-dim);
  letter-spacing: 0.2px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .eqc-topbar {
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .eqc-kpis {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .eqc-topbar,
  .eqc-main,
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .eqc-nav-in {
    padding-left: 16px;
    padding-right: 16px;
  }
  .eqc-tab {
    padding: 14px 14px;
  }
  .eqc-kpis {
    grid-template-columns: 1fr;
  }
  .eqc-page-title,
  .t-title {
    font-size: 32px;
  }
}
