/* Modern dashboard layer for MyOPR. Kept separate so the legacy form remains portable. */
:root {
  --ink: #17132f;
  --purple: #5b21b6;
  --purple2: #7c3aed;
  --gold: #fbbf24;
  --muted: #6f6b82;
  --line: #e9e6f1;
  --surface: #ffffff;
  --surface-soft: #f8f7fc;
  --cyan: #22d3ee;
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, #8b5cf655 0, transparent 28%),
    radial-gradient(circle at 92% 18%, #22d3ee2e 0, transparent 24%),
    linear-gradient(145deg, #170a38 0%, #2d1064 48%, #4c1d95 100%);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .12;
  background-image:
    linear-gradient(#fff 1px, transparent 1px),
    linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
.shell { width: min(1460px, calc(100% - 34px)); margin: 0 auto 32px; }
.hero {
  min-height: 286px;
  display: grid;
  grid-template-columns: minmax(390px, .95fr) minmax(350px, .9fr) 260px;
  align-items: center;
  gap: 26px;
  padding: 36px 52px 30px;
  text-align: left;
  position: relative;
}
.hero-copy { position: relative; z-index: 2; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #ffffff12;
  border: 1px solid #ffffff2b;
  box-shadow: inset 0 1px #ffffff21;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .03em;
  backdrop-filter: blur(12px);
}
.badge i, .opr-preview-step i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 0 5px #22d3ee24, 0 0 18px #22d3ee;
}
.hero h1 {
  margin: 18px 0 7px;
  font-size: clamp(48px, 7vw, 82px);
  letter-spacing: -.06em;
  text-shadow: 0 12px 38px #13052c70;
}
.hero p { color: #ddd6fe; font-size: 16px; }
.hero-features { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.hero-features span {
  color: #f5f3ff;
  background: #0f082b4d;
  border: 1px solid #ffffff1f;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}
.usage-pulse {
  min-width: 0;
  padding: 16px 18px 13px;
  border: 1px solid #ffffff2e;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff14, #ffffff08);
  box-shadow: inset 0 1px #ffffff20, 0 18px 45px #14052f2b;
  color: #fff;
  backdrop-filter: blur(12px);
}
.pulse-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pulse-head > div { display: flex; flex-direction: column; }
.pulse-head span { color: #c4b5fd; font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.pulse-head strong { margin-top: 2px; font-size: 14px; }
.pulse-head > b { padding: 5px 8px; border: 1px solid #ffffff20; border-radius: 999px; background: #ffffff12; color: #fff; font-size: 10px; white-space: nowrap; }
.pulse-chart { display: block; width: 100%; height: 92px; margin-top: 3px; overflow: visible; }
.pulse-chart > line { stroke: #ffffff1c; stroke-width: 1; stroke-dasharray: 4 5; }
.pulse-area { fill: url(#pulse-area); }
.pulse-line { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: url(#pulse-glow); }
.pulse-chart circle { fill: #fff; stroke: #7c3aed; stroke-width: 3; filter: url(#pulse-glow); }
.pulse-labels { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: -4px; }
.pulse-labels span { display: flex; flex-direction: column; align-items: center; color: #ddd6fe; font-size: 9px; }
.pulse-labels b { font-size: 9px; }
.pulse-labels small { min-width: 20px; margin-top: 3px; padding: 2px 5px; border-radius: 999px; background: #ffffff11; color: #fff; text-align: center; font-size: 9px; }
.hero-visual { position: relative; height: 220px; display: grid; place-items: center; }
.tech-ring { position: absolute; border: 1px solid #a78bfa5c; border-radius: 50%; }
.ring-one { width: 216px; height: 216px; animation: techSpin 18s linear infinite; }
.ring-two { width: 160px; height: 160px; border-style: dashed; animation: techSpin 13s linear infinite reverse; }
.tech-ring::before, .tech-ring::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.tech-ring::before { left: 20px; top: 29px; }
.tech-ring::after { right: 4px; bottom: 72px; background: var(--gold); box-shadow: 0 0 16px var(--gold); }
.tech-document {
  width: 128px;
  height: 164px;
  position: relative;
  z-index: 2;
  padding: 48px 19px 18px;
  border: 1px solid #ffffff42;
  border-radius: 18px;
  background: linear-gradient(160deg, #ffffffef, #ede9feee);
  box-shadow: 0 24px 65px #0f062d99, inset 0 1px #fff;
  transform: rotate(4deg);
}
.tech-document > span:not(.tech-spark) { display: block; height: 7px; margin: 10px 0; border-radius: 10px; background: #c4b5fd; }
.tech-document > span:nth-of-type(3) { width: 70%; }
.tech-spark { position: absolute; top: 13px; left: 17px; color: var(--purple2); font-size: 25px; }
.tech-document strong { position: absolute; right: 11px; bottom: 12px; color: var(--purple); font-size: 9px; letter-spacing: .12em; }
.tech-chip { position: absolute; z-index: 3; min-width: 48px; padding: 8px 10px; border-radius: 12px; text-align: center; font-size: 11px; font-weight: 900; letter-spacing: .08em; box-shadow: 0 12px 30px #13052c66; }
.chip-ai { top: 18px; right: 58px; background: var(--gold); color: #3c1b05; transform: rotate(7deg); }
.chip-pdf { left: 44px; bottom: 19px; background: #312e81; border: 1px solid #ffffff32; color: #fff; transform: rotate(-8deg); }
@keyframes techSpin { to { transform: rotate(360deg); } }

.card { border: 1px solid #ffffff2b; border-radius: 28px; box-shadow: 0 32px 90px #0e062b80; background: #f8f7fc; }
.module-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  gap: 7px;
  padding: 12px 20px;
  background: #fbbf24f2;
  border-bottom-color: #e4a90d;
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}
.module-nav::-webkit-scrollbar { display: none; }
.module-nav a { color: #66511a; border: 1px solid transparent; padding: 10px 14px; }
.module-nav a:hover { background: #ffffff85; color: #3b1974; }
.module-nav a.active { background: #fff; color: var(--purple); border-color: #ffffff; box-shadow: 0 8px 20px #7c3a171f; }
.module-nav .account-link { max-width: 180px; overflow: hidden; margin-left: auto; border-color: #6b4b081f; background: #2e1065; color: #fff; text-overflow: ellipsis; }
.module-nav .account-link:hover { background: #42168c; color: #fff; }
.module-nav .account-link.signed-in { background: #166534; }
.module-nav .account-link { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 5px; }
.module-nav .account-link:not(.signed-in) { padding-left: 10px; }
.nav-avatar { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border: 3px solid #fff; border-radius: 50%; background: #fff; color: var(--purple); font-size: 11px; font-weight: 900; box-shadow: 0 2px 8px #1d0a3b30; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.account-name { min-width: 0; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.overview-grid { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.6fr); gap: 16px; padding: 20px; background: #f3f1f8; }
.summary, .history { border: 1px solid var(--line); border-radius: 20px; }
.summary {
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 12px 14px;
  padding: 22px;
  color: white;
  border-color: #ffffff1c;
  background:
    radial-gradient(circle at 90% 8%, #22d3ee42, transparent 32%),
    linear-gradient(145deg, #3b1680, #5b21b6);
  box-shadow: 0 15px 40px #4c1d9528;
}
.summary-icon { width: 42px; height: 42px; display: grid; place-items: center; grid-row: 1; border: 1px solid #ffffff2e; border-radius: 13px; background: #ffffff14; color: #67e8f9; font-size: 22px; }
.summary-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.summary-copy strong { font-size: 16px; }
.summary-copy > span:last-child { color: #ddd6fe; font-size: 12px; }
.summary-kicker, .section-kicker { color: #c4b5fd; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.count { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; color: white; }
.count strong { color: var(--gold); font-size: clamp(36px, 4vw, 52px); line-height: 1; letter-spacing: -.04em; }
.count span { color: #ddd6fe; font-size: 13px; font-weight: 800; letter-spacing: .1em; }
.summary { grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; align-content: space-between; }
.summary-icon { grid-column: 2; grid-row: 1; }
.summary-copy { grid-column: 1; grid-row: 1; align-self: center; }
.count { grid-row: 2; justify-content: center; padding: 5px 0; }
.summary-foot { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 13px; border-top: 1px solid #ffffff24; color: #ddd6fe; font-size: 11px; }
.summary-foot span { display: inline-flex; align-items: center; gap: 6px; }
.summary-foot i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px #4ade8020; }
.summary-foot strong { color: #fff; font-size: 11px; white-space: nowrap; }
.history { padding: 18px; background: #fff; }
.history-head { align-items: flex-start; margin-bottom: 12px; }
.history-head h2 { margin: 3px 0 0; color: var(--ink); font-size: 20px; }
.history-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-kicker { color: var(--purple2); }
.privacy-pill { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #bbf7d0; border-radius: 999px; background: #f0fdf4; color: #15803d; font-size: 10px; font-weight: 800; }
.recent-grid { gap: 10px; }
.recent-card { padding: 9px; border-color: #ece9f3; border-radius: 15px; background: #faf9fd; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.recent-card:hover { transform: translateY(-2px); border-color: #d8cff2; box-shadow: 0 10px 25px #38117312; }
.recent-images { min-height: 62px; }
.recent-images img, .recent-placeholder { height: 62px; border-radius: 9px; }
.recent-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 3px; }
.recent-meta > span { color: #a49eb3; font-weight: 900; letter-spacing: .08em; }
.recent-title-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.recent-card h3 { margin-top: 8px; color: var(--ink); }
.recent-title-line h3 { min-width: 0; }
.demo-tag { flex: 0 0 auto; margin-top: 8px; padding: 2px 6px; border: 1px solid #fde68a; border-radius: 999px; background: #fffbeb; color: #a16207; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.recent-card time { font-size: 11px; }

.report-workspace { background: #e8e5f0; }
.report-workspace form.report { padding: 30px 32px 40px; background: white; }
.opr-preview-panel { padding: 30px; background: linear-gradient(160deg, #f0edfa, #e9e6f3); }
.opr-preview-head h2 { color: var(--ink); font-size: 20px; }
.opr-preview-step { display: flex; align-items: center; gap: 9px; }
.opr-preview-step i { width: 6px; height: 6px; background: #22c55e; box-shadow: 0 0 0 4px #22c55e20, 0 0 14px #22c55e; }
.preview-status { padding: 6px 9px; border: 1px solid #d8d1e8; border-radius: 999px; color: var(--muted); background: #ffffff8f; font-size: 10px; font-weight: 750; }
.opr-live-paper { border: 1px solid #ddd6ea; border-radius: 4px; box-shadow: 0 24px 55px #24113f24; }

.section-title { margin-top: 34px; color: var(--ink); font-size: 19px; }
.section-title::before { content: attr(data-step); flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(135deg, var(--purple), var(--purple2)); font-size: 11px; letter-spacing: .05em; box-shadow: 0 8px 18px #6d28d930; }
.section-title::after { background: linear-gradient(90deg, #ddd6fe, transparent); }
.section-title small { padding: 4px 8px; border-radius: 999px; background: #f3f0fb; color: var(--purple); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.section-description { margin: -3px 0 16px; color: var(--muted); font-size: 13px; }
.section-description strong { color: #7c3aed; }
.images { gap: 10px; }
.image-pick, .add-image-card { min-height: 118px; border-radius: 16px; }
.image-pick { border-color: #c4b5fd; background: linear-gradient(145deg, #fdfcff, #f7f4ff); }
.image-pick input { border: 0; background: transparent; font-size: 12px; }
.add-image-card { border-color: #a78bfa; background: linear-gradient(145deg, #f8f5ff, #eee8ff); }
.add-image-card .plus { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px; background: #fff; box-shadow: 0 7px 18px #6d28d921; }
.logo-box { border: 1px solid #ece8f4; border-radius: 16px; background: #faf9fd; }
.logo-box small { display: block; margin-top: 7px; color: var(--muted); }
.field label, .field-label { color: #312b47; }
input, textarea { border-color: #ded9e8; border-radius: 12px; background: #fdfcff; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input:hover, textarea:hover { border-color: #c4b5fd; }
input:focus, textarea:focus { background: #fff; box-shadow: 0 0 0 4px #7c3aed16; }
.voice-button { border-color: #ded7ed; background: #faf9fd; }
.ai-button { box-shadow: 0 7px 16px #6d28d926; }
.field-ai-status { color: #8a8498; }
.submit { position: sticky; bottom: 12px; z-index: 7; padding-top: 16px; }
.submit button { min-width: 220px; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 15px 20px; border-radius: 14px; box-shadow: 0 15px 30px #5b21b63b; transition: transform .15s ease, box-shadow .15s ease; }
.submit button:hover { transform: translateY(-2px); box-shadow: 0 18px 35px #5b21b64f; }
.submit button b { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: #ffffff1c; font-size: 18px; }
.submit button:disabled { opacity: .72; cursor: wait; transform: none; }
.submit-feedback { margin: 9px 0 0; text-align: right; color: var(--muted); font-size: 12px; }
.submit-feedback.is-error { color: var(--danger); font-weight: 750; }
.footer { color: #cfc7e6; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 1050px) {
  .hero { grid-template-columns: minmax(360px, 1fr) minmax(350px, .9fr); }
  .hero-visual { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .summary { grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; }
  .summary-icon { grid-column: 1; grid-row: 1; }
  .summary-copy { grid-column: 2; grid-row: 1; }
  .count { grid-column: 3; grid-row: 1; }
  .summary-foot { grid-column: 1 / -1; grid-row: 2; }
  .report-workspace form.report { border-right: 0; }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 18px, 1460px); }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 28px 20px 24px; text-align: center; }
  .hero h1 { font-size: clamp(46px, 16vw, 68px); }
  .hero-features { justify-content: center; }
  .hero-visual { display: none; }
  .usage-pulse { width: min(100%, 540px); margin: 12px auto 0; text-align: left; }
  .overview-grid { padding: 12px; gap: 12px; }
  .summary { grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; }
  .summary-icon { grid-column: 1; grid-row: 1; }
  .summary-copy { grid-column: 2; grid-row: 1; }
  .count { grid-column: 1 / -1; grid-row: 2; }
  .summary-foot { grid-column: 1 / -1; grid-row: 3; }
  .history { padding: 15px; }
  .report-workspace form.report, .opr-preview-panel { padding: 22px 18px 30px; }
  .submit { position: static; }
}
@media (max-width: 520px) {
  .shell { width: 100%; margin-bottom: 0; }
  .card { border-radius: 24px 24px 0 0; }
  .module-nav { padding-inline: 11px; }
  .module-nav a { padding: 9px 11px; font-size: 12px; }
  .module-nav .account-link { position: sticky; right: 0; z-index: 3; margin-left: 10px; box-shadow: -10px 0 16px #fbbf24; }
  .hero { padding-inline: 14px; }
  .hero-features span { font-size: 11px; }
  .hero-features { gap: 6px; }
  .history-head { gap: 8px; }
  .privacy-pill { white-space: nowrap; }
  .recent-grid { grid-template-columns: 1fr; }
  .recent-images img, .recent-placeholder { height: 72px; }
  .preview-status { display: none; }
  .section-title { align-items: center; }
}
