/* Private app cleanup */
.app-private-footer{display:none!important}

/*
 * Private application typography.
 *
 * Geist is the preferred face. The CSP for /app only permits self-hosted fonts,
 * so the stack deliberately falls back to modern native UI fonts when Geist is
 * not installed locally instead of loading a third-party font at runtime.
 */
html,
body,
button,
input,
textarea,
select{
  font-family:
    "Geist",
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif!important;
}

body{
  font-size:15px;
  font-weight:400;
  letter-spacing:-.006em;
}

#partner-app h1,
#partner-app h2,
#partner-app h3,
#partner-app h4,
#partner-app strong,
#partner-app b{
  font-family:inherit!important;
}

#partner-app h1{
  font-weight:650!important;
  letter-spacing:-.045em!important;
}

#partner-app h2{
  font-weight:650!important;
  letter-spacing:-.025em!important;
}

#partner-app h3,
#partner-app h4{
  font-weight:600!important;
}

.app-nav-link,
.app-button,
.app-scan-tab,
.app-field > span,
.app-field-label > span,
.app-filter-field > span{
  font-weight:600!important;
}

.app-kicker,
.app-metric-label,
.app-cell-label,
.app-signal-type,
.app-priority,
.app-stage,
.app-job-status{
  font-weight:650!important;
}

.app-lead,
.app-section-copy,
.app-metric-detail{
  font-weight:400!important;
}

/* Technical values keep a compact monospace treatment where it is useful. */
.app-bulk-field textarea,
.app-evidence-row code,
code,
pre{
  font-family:
    "Geist Mono",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace!important;
}

/* Workspace top bar */
.topbar{
  box-sizing:border-box;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:24px!important;
  min-height:64px!important;
  height:64px!important;
  padding:0 24px!important;
}

.app-workspace-brand{
  display:inline-flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0;
  color:var(--app-text)!important;
  text-decoration:none!important;
  font-family:inherit!important;
  font-size:14px!important;
  font-weight:600!important;
  line-height:1!important;
  letter-spacing:-.01em!important;
}

.app-workspace-brand::before{
  display:none!important;
  content:none!important;
}

.app-workspace-brand .brand-mark{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
}

.app-workspace-brand-label{
  display:inline-block;
}

.topbar-actions{
  margin-left:auto;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  min-width:0;
}

#workspace-email{
  display:block;
  max-width:320px;
  margin-right:4px;
  overflow:hidden;
  color:var(--app-muted)!important;
  font-size:13px!important;
  font-weight:450!important;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.topbar .button-ghost{
  box-sizing:border-box;
  min-height:36px!important;
  height:36px;
  margin:0!important;
  padding:0 12px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px;
  border:1px solid var(--app-line)!important;
  border-radius:9px!important;
  background:var(--app-surface)!important;
  color:var(--app-text)!important;
  box-shadow:none!important;
  font-family:inherit!important;
  font-size:13px!important;
  font-weight:550!important;
  line-height:1!important;
  letter-spacing:-.005em!important;
  cursor:pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.topbar .button-ghost:hover:not(:disabled){
  border-color:var(--app-line-strong)!important;
  background:var(--app-surface-2)!important;
  transform:translateY(-1px);
}

.app-theme-toggle::before{
  content:"☼";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;
  height:16px;
  font-size:16px;
  font-weight:400;
  line-height:1;
}

html[data-theme="light"] .app-theme-toggle::before{
  content:"☾";
}

.app-signout-button::before{
  content:"↪";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:14px;
  height:14px;
  font-size:15px;
  line-height:1;
  transform:rotate(180deg);
}

/* Keep scanner fields inside their grid tracks at every desktop width. */
.app-scan-form{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) max-content!important;
  gap:16px!important;
  align-items:end;
}
.app-scan-form>*{min-width:0}
.app-scan-form .app-field{min-width:0;width:100%}
.app-scan-form .app-field input{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

/* Account lifecycle controls */
.app-account-lifecycle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-top:26px;
  padding:18px;
  border:1px solid var(--app-line);
  border-radius:14px;
  background:var(--app-surface);
}
.app-account-lifecycle-copy{min-width:0}
.app-account-lifecycle h3{
  margin:0;
  color:var(--app-text);
  font-size:1rem;
}
.app-account-lifecycle-copy p{
  max-width:680px;
  margin:6px 0 0;
  color:var(--app-muted);
  font-size:.78rem;
  line-height:1.5;
}
.app-account-lifecycle-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex-wrap:wrap;
  flex-shrink:0;
}
.app-account-lifecycle-message{
  margin:0;
  color:var(--app-muted);
  font-size:.78rem;
}
.app-account-lifecycle-message.success{color:var(--app-success)}
.app-account-lifecycle-message.error{color:var(--app-danger)}
.app-danger-button,
.app-secondary-danger-button{
  min-height:40px;
  border-color:rgba(255,127,135,.36)!important;
  color:#ffb0b5!important;
  background:rgba(255,127,135,.08)!important;
}
.app-danger-button:hover:not(:disabled),
.app-secondary-danger-button:hover:not(:disabled){
  border-color:rgba(255,127,135,.64)!important;
  background:rgba(255,127,135,.14)!important;
}
.app-cancellation-state{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 12px;
  border:1px solid rgba(244,200,106,.28);
  border-radius:10px;
  color:var(--app-warning);
  background:rgba(244,200,106,.07);
  font-size:.76rem;
  font-weight:800;
}

@media(max-width:1180px){
  .app-scan-form{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  }
  .app-scan-submit{
    grid-column:1/-1!important;
    width:100%;
  }
}

@media(max-width:760px){
  .topbar{
    gap:12px!important;
    padding:0 14px!important;
  }
  .app-workspace-brand{
    gap:8px!important;
  }
  .app-workspace-brand-label{
    display:none;
  }
  #workspace-email{
    max-width:180px;
  }
  .topbar .button-ghost{
    padding:0 10px!important;
  }
  .app-theme-toggle{
    width:36px;
    padding:0!important;
    overflow:hidden;
    white-space:nowrap;
    text-indent:-9999px;
  }
  .app-theme-toggle::before{
    text-indent:0;
  }
  .app-scan-form{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .app-scan-submit{grid-column:auto!important}
  .app-account-lifecycle{
    align-items:flex-start;
    flex-direction:column;
  }
  .app-account-lifecycle-actions{
    width:100%;
    justify-content:flex-start;
  }
}

@media(max-width:520px){
  #workspace-email{
    max-width:120px;
  }
  .app-signout-button{
    width:36px;
    padding:0!important;
    overflow:hidden;
    white-space:nowrap;
    text-indent:-9999px;
  }
  .app-signout-button::before{
    text-indent:0;
  }
}
