[hidden] { display: none !important; }
.auth-view {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 45%, #1b1d3b 0, #14162c 46%, #101225 100%);
}
.auth-view .topbar { display: none; }
.login-panel {
  width: min(450px, calc(100% - 32px));
  margin: clamp(44px, 12vh, 120px) auto;
  padding: 48px 45px;
  color: #f8f8ff;
  background: rgba(28, 29, 48, .96);
  border: 1px solid rgba(139, 92, 246, .18);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(7, 8, 25, .28);
}
.login-mark {
  width: 50px;
  height: 50px;
  margin-bottom: 26px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  border-radius: 13px;
  background: linear-gradient(145deg, #9258ff, #6d35e8);
  box-shadow: 0 10px 28px rgba(126, 65, 238, .28);
}
.login-mark i { border: 2px solid white; border-radius: 2px; }
.login-panel h1 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.025em; }
.login-panel > p:first-of-type { margin: 0; color: #aeb2d8; font-size: 15px; line-height: 1.45; }
#googleSignIn { width: 100%; min-height: 50px; margin: 30px 0 14px; display: flex; justify-content: center; }
#loginStatus { margin: 12px 0 0; color: #c6c8df; font-size: 13px; line-height: 1.45; }
.login-panel #retryLogin { margin-top: 14px; background: #7541eb; }
@media (max-width: 640px) {
  .login-panel { margin: 28px auto; padding: 34px 26px; }
  #googleSignIn { justify-content: flex-start; }
}
:root {
  --ink: #17202a;
  --muted: #667085;
  --line: #e4e7ec;
  --soft: #f7f8fa;
  --paper: #ffffff;
  --navy: #172b4d;
  --orange: #ff6b35;
  --orange-soft: #fff1eb;
  --green: #079455;
  --green-soft: #ecfdf3;
  --red: #d92d20;
  --shadow: 0 18px 48px rgba(23, 32, 42, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #f4f5f7;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 76px;
  padding: 0 max(24px, calc((100vw - 1280px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.93);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.brand { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: white; background: var(--navy); font-size: 13px; font-weight: 800; letter-spacing: -.02em;
  box-shadow: 0 8px 20px rgba(23,43,77,.2);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { color: var(--muted); margin-top: 2px; font-size: 12px; }
.credential-state {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 999px;
  color: var(--muted); background: var(--soft); border: 1px solid var(--line); font-size: 12px; font-weight: 650;
}
.credential-state i { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; }
.credential-state.ready { color: #067647; background: var(--green-soft); border-color: #abefc6; }
.credential-state.ready i { background: var(--green); box-shadow: 0 0 0 4px rgba(7,148,85,.12); }
.credential-state.error { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.credential-state.error i { background: var(--red); }

main { max-width: 1280px; margin: 0 auto; padding: 52px 24px 80px; }
.hero { display: grid; grid-template-columns: 1.4fr .6fr; gap: 40px; align-items: end; margin-bottom: 34px; }
.eyebrow { display: block; color: var(--orange); font-size: 11px; text-transform: uppercase; font-weight: 800; letter-spacing: .15em; margin-bottom: 12px; }
.hero h1 { margin: 0; font-size: clamp(38px, 5vw, 66px); line-height: .99; letter-spacing: -.055em; font-weight: 750; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero > div > p { max-width: 700px; color: var(--muted); font-size: 16px; line-height: 1.65; margin: 22px 0 0; }
.trust-card { background: var(--navy); color: white; border-radius: 22px; padding: 24px; display: flex; align-items: flex-start; gap: 15px; box-shadow: var(--shadow); }
.trust-icon { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; color: #ff9a73; font-weight: 800; }
.trust-card strong { font-size: 14px; }
.trust-card p { margin: 7px 0 0; color: #c7d1e0; font-size: 12px; line-height: 1.55; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.import-panel { position: relative; padding: 26px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: center; overflow: hidden; }
.panel-copy { display: flex; gap: 15px; align-items: flex-start; }
.step-number { width: 38px; height: 38px; border-radius: 50%; background: var(--orange-soft); color: var(--orange); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.panel-copy h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.panel-copy p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.import-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
label span { display: block; margin: 0 0 7px 2px; color: #475467; font-size: 11px; font-weight: 750; }
input {
  width: 100%; height: 46px; border: 1px solid #d0d5dd; border-radius: 11px; padding: 0 13px;
  color: var(--ink); background: white; outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: #ff8c61; box-shadow: 0 0 0 4px rgba(255,107,53,.11); }
.primary-button, .secondary-button, .text-button, .icon-button { border: 0; font-weight: 750; }
.primary-button { height: 46px; min-width: 168px; padding: 0 16px; border-radius: 11px; background: var(--orange); color: white; display: flex; align-items: center; justify-content: space-between; gap: 20px; box-shadow: 0 9px 20px rgba(255,107,53,.24); }
.primary-button:hover { background: #f35d27; transform: translateY(-1px); }
.primary-button:disabled { background: #f7a98c; cursor: wait; transform: none; }
.progress-line { height: 3px; position: absolute; bottom: 0; left: 0; right: 0; display: none; overflow: hidden; background: #ffe1d5; }
.progress-line.show { display: block; }
.progress-line i { display: block; width: 35%; height: 100%; background: var(--orange); animation: loading 1.25s infinite ease-in-out; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(330%); } }
.status-message { grid-column: 1 / -1; display: none; margin-top: -12px; border-radius: 10px; padding: 11px 13px; font-size: 12px; }
.status-message.show { display: block; }
.status-message.info { background: #eff8ff; color: #175cd3; }
.status-message.success { background: var(--green-soft); color: #067647; }
.status-message.error { background: #fef3f2; color: #b42318; }

.results { margin-top: 56px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2 { margin: 0; font-size: 31px; letter-spacing: -.04em; }
.section-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.section-actions { display: flex; align-items: center; gap: 8px; }
.secondary-button { height: 40px; padding: 0 15px; border-radius: 10px; background: var(--navy); color: white; }
.secondary-button:disabled, .text-button:disabled { opacity: .42; cursor: not-allowed; }
.text-button { height: 40px; background: transparent; color: #667085; padding: 0 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.metric-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 19px; }
.metric-card span, .metric-card small { display: block; color: var(--muted); font-size: 11px; font-weight: 650; }
.metric-card strong { display: block; margin: 10px 0 8px; font-size: 31px; letter-spacing: -.04em; }
.metric-card.accent { background: var(--navy); border-color: var(--navy); color: white; }
.metric-card.accent span, .metric-card.accent small { color: #c7d1e0; }
.metric-card.accent strong { color: #ff9168; }

.report-panel { overflow: hidden; }
.report-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.report-toolbar h3 { margin: 0; font-size: 16px; }
.report-toolbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.search-field { position: relative; width: min(360px, 40vw); }
.search-field span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #98a2b3; font-size: 18px; margin: 0; }
.search-field input { height: 40px; padding-left: 39px; background: var(--soft); }
.quality-note { display: flex; gap: 10px; align-items: center; margin: 16px 24px; padding: 11px 13px; border-radius: 11px; background: var(--green-soft); color: #067647; font-size: 12px; }
.quality-note > span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #6ce9a6; }
.quality-note p { margin: 0; }
.table-wrap { overflow: auto; border-top: 1px solid var(--line); }
table { width: 100%; min-width: 980px; border-collapse: collapse; }
th { position: sticky; top: 0; z-index: 1; padding: 12px 14px; background: #f2f3f5; color: #475467; border-bottom: 1px solid #d0d5dd; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
td { padding: 15px 14px; border-bottom: 1px solid #eaecf0; font-size: 12px; vertical-align: top; }
tbody tr:hover { background: #fafbfc; }
td.number { text-align: center; font-variant-numeric: tabular-nums; font-weight: 750; }
.voc-pill { display: inline-block; padding: 5px 8px; border-radius: 7px; background: #eef2f6; color: #344054; font-size: 10px; font-weight: 750; white-space: nowrap; }
.tag-name { color: var(--navy); font-weight: 750; white-space: nowrap; }
.issue-copy { min-width: 320px; max-width: 520px; color: #344054; line-height: 1.5; }
.confidence { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 10px; color: var(--muted); }
.confidence i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.confidence.medium i { background: #f79009; }
.confidence.low i { background: var(--red); }
.evidence-button { border: 1px solid #d0d5dd; color: #344054; background: white; border-radius: 8px; padding: 7px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.evidence-button:hover { border-color: var(--orange); color: var(--orange); }
.empty-state { padding: 58px 20px; text-align: center; color: var(--muted); }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { color: var(--ink); margin-bottom: 6px; }
.table-foot { display: flex; justify-content: space-between; gap: 20px; padding: 13px 24px; color: var(--muted); font-size: 10px; background: #fafafa; }

.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; visibility: hidden; }
.drawer.open { pointer-events: auto; visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; border: 0; background: rgba(16,24,40,.38); opacity: 0; transition: opacity .25s; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; width: min(620px, 94vw); height: 100%; overflow: auto; background: white; transform: translateX(100%); transition: transform .28s ease; box-shadow: -20px 0 60px rgba(16,24,40,.16); }
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; padding: 24px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.drawer-head .eyebrow { margin-bottom: 6px; }
.drawer-head h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.icon-button { width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: #667085; font-size: 24px; line-height: 1; }
#drawerContent { padding: 24px; }
.drawer-summary { padding: 18px; border-radius: 14px; background: var(--navy); color: white; }
.drawer-summary small { color: #c7d1e0; }
.drawer-summary p { margin: 8px 0 0; line-height: 1.6; font-size: 14px; }
.sample-card { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sample-head { padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; background: var(--soft); border-bottom: 1px solid var(--line); }
.sample-head strong { font-size: 12px; }
.sample-head span { color: var(--muted); font-size: 10px; }
.sample-body { padding: 14px; }
.sample-body h4 { margin: 0 0 8px; color: var(--orange); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.sample-body ul { margin: 0; padding-left: 19px; color: #344054; font-size: 12px; line-height: 1.55; }
.sample-body li + li { margin-top: 6px; }
.sample-transcript { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.sample-transcript p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 999px; color: white; background: #101828; box-shadow: var(--shadow); font-size: 12px; transition: .24s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .trust-card { max-width: 520px; }
  .import-panel { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .credential-state span { display: none; }
  main { padding: 34px 14px 60px; }
  .hero h1 { font-size: 40px; }
  .import-form { grid-template-columns: 1fr; }
  .primary-button { width: 100%; }
  .section-heading, .report-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .table-foot { flex-direction: column; }
}
