/* QuantumQounsel - interface styles. No external fonts or assets. */
:root {
  --ink: #f4f6fb; --dim: #b9bfd0; --faint: #7d8499; --bar: rgba(58, 58, 62, 0.92); --pill: #0b0b0d;
  --glass: rgba(150, 150, 165, 0.34); --card: rgba(18, 16, 34, 0.78); --line: rgba(255, 255, 255, 0.14);
  --accent: #9a6bff; --cyan: #58c8ff; --ok: #3fbf6a; --warn: #ffb84d; --bad: #ff6b7d;
  --font: "Inter", "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: #000; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; }
#scene, #avatar { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
#avatar { pointer-events: none; inset: 0 auto auto 0; width: auto; height: auto; filter: drop-shadow(0 0 18px rgba(80, 180, 255, 0.5)); }
#app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- Top bar ---- */
.topbar { height: 74px; background: var(--bar); display: flex; align-items: center; gap: 22px; padding: 0 42px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 54px; height: 54px; filter: drop-shadow(0 0 8px rgba(80, 180, 255, 0.55)); }
.brand .with { font-size: 11.5px; color: #e6e8ef; white-space: nowrap; }
.fm { display: flex; flex-direction: column; align-items: center; font-family: var(--serif); letter-spacing: 0.04em; line-height: 1; }
.fm b { font-weight: 400; font-size: 15px; color: #6fa8dc; padding-bottom: 5px; border-bottom: 1px solid #6fa8dc; }
.fm i { font-style: normal; font-size: 12px; color: #9aa0ac; padding-top: 5px; letter-spacing: 0.08em; }
.navpill { flex: 1; max-width: 640px; margin: 0 auto; height: 46px; background: var(--pill); border-radius: 24px; display: flex; align-items: center; justify-content: center; gap: 38px; padding: 0 16px 0 64px; position: relative; }
.navpill a { color: #f1f2f6; font-size: 14.5px; white-space: nowrap; }
.navpill a:hover, .navpill a.on { color: #a488ff; text-decoration: none; }
.acct { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 6px; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: #3f9a35; color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.chev { width: 9px; height: 9px; border-right: 1.6px solid #ddd; border-bottom: 1.6px solid #ddd; transform: rotate(45deg) translateY(-3px); }
.menu { position: absolute; top: 52px; inset-inline-end: 0; min-width: 190px; background: #101012; border-radius: 12px; padding: 10px 0; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6); z-index: 30; }
.menu a, .menu button { display: block; width: 100%; text-align: start; padding: 8px 18px; background: none; border: 0; color: #f1f2f6; font-size: 13.5px; }
.menu a:hover, .menu button:hover { background: #1d1d22; text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid #3a3a40; margin: 8px 14px; }
.dash { flex: none; height: 46px; padding: 0 24px; border-radius: 24px; background: #0b0b0d; border: 2px solid #fff; color: #fff; font-weight: 700; font-size: 13px; letter-spacing: 0.03em; display: grid; place-items: center; }
.dash:hover { background: #fff; color: #000; text-decoration: none; }

/* ---- Hero ---- */
.hero { flex: 1; position: relative; min-height: calc(100vh - 74px); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 20px 26px; }
.console { width: min(1010px, 92vw); display: flex; align-items: stretch; gap: 0; position: relative; }
.upload { background: #050506; border: 0; color: #fff; padding: 0 16px; height: 42px; display: flex; align-items: center; gap: 9px; font-size: 14.5px; white-space: nowrap; border-radius: 3px; }
.upload:hover { background: #2a5bd7; }
.upload b { font-size: 19px; font-weight: 500; line-height: 1; }
.console .talk { flex: 1; height: 42px; border: 0; border-radius: 6px; background: #d9dadf; color: #111; padding: 0 14px; margin: 0 6px 0 4px; min-width: 0; }
.console .talk::placeholder { color: #9a9ca6; }
.send { width: 42px; height: 34px; align-self: center; background: #2b2b2f; border: 1px solid #55555c; border-radius: 3px; display: grid; place-items: center; }
.send:hover { background: #46464d; }
.send i { width: 9px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(-1px, -1px); }
[dir="rtl"] .send i { transform: rotate(135deg) translate(-1px, -1px); }
.send:disabled, .upload:disabled { opacity: 0.5; cursor: default; }
.subrow { width: min(1010px, 92vw); display: flex; align-items: center; gap: 10px; margin-top: 8px; min-height: 26px; flex-wrap: wrap; }
.subrow .caseinput { background: transparent; border: 0; border-radius: 0; border-bottom: 1px solid transparent; color: #cfd2de; font-size: 12.5px; width: 220px; padding: 3px 4px; }
.subrow .caseinput::placeholder { color: #6f7387; }
.subrow .caseinput:focus { border-bottom-color: #6f7387; outline: 0; }
.chip { background: rgba(255, 255, 255, 0.12); border: 1px solid var(--line); border-radius: 14px; padding: 2px 6px 2px 11px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.chip button { background: none; border: 0; color: #fff; font-size: 15px; line-height: 1; padding: 0 3px; }
.tagline { margin: 6px 0 0; font-size: 22px; font-weight: 400; letter-spacing: 0.01em; text-align: center; text-shadow: 0 2px 14px #000; }
.corner { position: absolute; inset-inline-end: 58px; bottom: 22px; display: flex; gap: 8px; align-items: flex-end; }
.lang { position: relative; }
.langbtn, .voicebtn { background: #f3f3f5; border: 0; border-radius: 6px; height: 36px; padding: 0 10px; display: flex; align-items: center; gap: 8px; color: #222; font-size: 12.5px; }
.langbtn .chev { border-color: #333; }
.voicebtn.on { background: #cfe9ff; }
.langlist { position: absolute; bottom: 42px; inset-inline-end: 0; background: #f3f3f5; border-radius: 6px; padding: 4px; display: grid; gap: 2px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); max-height: 250px; overflow: auto; }
.langlist button { background: none; border: 0; padding: 7px 10px; border-radius: 4px; display: flex; align-items: center; gap: 10px; color: #222; font-size: 13px; white-space: nowrap; }
.langlist button:hover, .langlist button.on { background: #dcdce2; }
.banner { position: absolute; bottom: 26px; inset-inline-start: 58px; background: rgba(255, 184, 77, 0.16); border: 1px solid rgba(255, 184, 77, 0.5); color: #ffd79a; font-size: 12px; padding: 4px 12px; border-radius: 12px; white-space: nowrap; }

/* ---- Q response panel ---- */
.statuspill { margin-bottom: 12px; background: rgba(8, 10, 24, 0.78); border: 1px solid rgba(120, 200, 255, 0.45); border-radius: 22px; padding: 9px 20px; font-size: 14.5px; backdrop-filter: blur(6px); }
.panel { width: min(1010px, 92vw); margin-bottom: -6px; background: var(--glass); backdrop-filter: blur(10px); border-radius: 46px 46px 10px 10px; padding: 34px 9% 30px; max-height: calc(100vh - 230px); overflow: auto; font-size: 17px; color: #f1f1f5; position: relative; animation: rise 0.35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.panel .x { position: absolute; top: 18px; inset-inline-end: 26px; background: none; border: 0; color: #e8e8ee; font-size: 24px; line-height: 1; }
.panel .actions { display: flex; gap: 10px; margin-top: 18px; }
.panel .status { display: flex; align-items: center; gap: 12px; color: #e9e9f1; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; } .dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.sources { margin-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.25); padding-top: 14px; font-size: 13px; }
.sources h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #e3e3ec; }
.sources li { margin-bottom: 6px; }
.note { font-size: 12.5px; color: #ffe0ad; margin-top: 14px; }

/* ---- Buttons, forms, cards ---- */
.btn { background: #0b0b0d; border: 1.5px solid #fff; color: #fff; border-radius: 22px; padding: 8px 20px; font-size: 13.5px; font-weight: 600; }
.btn:hover { background: #fff; color: #000; }
.btn.ghost { border-color: rgba(255, 255, 255, 0.4); font-weight: 500; }
.btn.small { padding: 4px 13px; font-size: 12.5px; }
.btn.danger { border-color: var(--bad); color: #ffc2ca; }
.btn:disabled { opacity: 0.5; cursor: default; }
.view { width: min(1180px, 94vw); margin: 0 auto; padding: 34px 0 60px; flex: 1; }
.view h1 { font-size: 26px; font-weight: 500; margin: 0 0 6px; }
.view h2 { font-size: 16px; font-weight: 600; margin: 0 0 14px; }
.lead { color: var(--dim); margin: 0 0 24px; max-width: 760px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; backdrop-filter: blur(10px); margin-bottom: 20px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.g6 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; backdrop-filter: blur(10px); }
.stat b { display: block; font-size: 30px; font-weight: 500; line-height: 1.1; }
.stat span { color: var(--dim); font-size: 12.5px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: start; color: var(--faint); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; padding: 0 10px 8px 0; }
td { padding: 10px 10px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.empty { color: var(--faint); padding: 8px 0; }
.tag { display: inline-block; font-size: 11px; padding: 1px 9px; border-radius: 10px; border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.tag.ok { color: #9be7b3; border-color: rgba(63, 191, 106, 0.5); } .tag.warn { color: #ffd79a; border-color: rgba(255, 184, 77, 0.5); }
form.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1; min-width: 180px; }
label { display: grid; gap: 5px; font-size: 12px; color: var(--dim); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="url"], select, textarea {
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; color: var(--ink); width: 100%; font-size: 14px; }
select option { background: #15131f; }
textarea { min-height: 110px; resize: vertical; }
.msg { font-size: 13px; min-height: 18px; } .msg.err { color: #ffb0ba; } .msg.ok { color: #9be7b3; }
.login { width: min(400px, 92vw); margin: auto; }
.login .card { padding: 30px; background: rgba(12, 10, 26, 0.86); }
.login h1 { font-size: 21px; margin: 0 0 18px; font-weight: 500; }
.login .mark { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 22px; }
.login .mark img { width: 60px; height: 60px; }
.linkbtn { background: none; border: 0; color: var(--cyan); padding: 0; font-size: 13px; }

/* ---- Report ---- */
.report { background: #fbfbfd; color: #1a1d29; border-radius: 12px; padding: 44px 56px; font-family: var(--serif); font-size: 15.5px; line-height: 1.6; }
.report h1, .report h2, .report h3 { font-family: var(--font); color: #1b2a4a; font-weight: 600; }
.report h1 { font-size: 21px; } .report h2 { font-size: 17px; margin: 26px 0 8px; border-bottom: 1px solid #d9dce6; padding-bottom: 4px; } .report h3 { font-size: 15px; margin: 18px 0 6px; }
.report blockquote { margin: 0 0 16px; padding: 10px 16px; background: #fff5e0; border-inline-start: 4px solid #e0a030; font-family: var(--font); font-size: 13.5px; }
.report code { background: #eceef4; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.report .meta { font-family: var(--font); font-size: 12.5px; color: #5a6072; border-bottom: 2px solid #1b2a4a; padding-bottom: 12px; margin-bottom: 20px; }
.report .srcs { font-family: var(--font); font-size: 13px; margin-top: 30px; border-top: 2px solid #1b2a4a; padding-top: 12px; }
.report .srcs p { margin: 0 0 9px; }
.src { font-family: var(--font); font-size: 0.82em; font-weight: 600; color: #2a5bd7; background: #e7eefc; border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.panel .src { background: rgba(255, 255, 255, 0.22); color: #fff; }
.md p { margin: 0 0 12px; } .md ul, .md ol { margin: 0 0 12px; padding-inline-start: 22px; }

/* ---- Charts ---- */
.bars { display: grid; gap: 9px; }
.bar { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.bar div { height: 10px; background: rgba(255, 255, 255, 0.08); border-radius: 5px; overflow: hidden; }
.bar div i { display: block; height: 100%; background: linear-gradient(90deg, #6a4cff, #c84bff); border-radius: 5px; }
.bar span:last-child { text-align: end; color: var(--dim); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.spark i { flex: 1; background: linear-gradient(180deg, #c84bff, #5a3cff); border-radius: 2px 2px 0 0; min-height: 2px; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 6px; }

.foot { display: flex; justify-content: space-between; gap: 20px; padding: 16px 42px; font-size: 12px; color: #c9ccd8; font-weight: 600; letter-spacing: 0.02em; background: rgba(0, 0, 0, 0.55); flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tabs button { background: none; border: 1px solid var(--line); border-radius: 18px; padding: 6px 16px; color: var(--dim); font-size: 13px; }
.tabs button.on { background: #fff; color: #000; border-color: #fff; }

@media (max-width: 900px) {
  .topbar { padding: 0 14px; gap: 10px; height: auto; flex-wrap: wrap; padding-block: 10px; }
  .brand .with, .fm { display: none; }
  .navpill { order: 3; flex-basis: 100%; max-width: none; gap: 18px; padding: 0 12px; }
  .navpill a { font-size: 13px; }
  .dash { margin-inline-start: auto; height: 40px; }
  .corner { inset-inline-end: 14px; bottom: 190px; }
  .banner { inset-inline-start: 14px; bottom: auto; top: 10px; }
  .panel { padding: 30px 22px; border-radius: 26px 26px 10px 10px; font-size: 15.5px; }
  .report { padding: 24px 20px; }
  .tagline { font-size: 18px; }
}
@media print {
  #scene, #avatar, .topbar, .foot, .noprint { display: none !important; }
  body, html { background: #fff; }
  .view { width: 100%; padding: 0; } .report { padding: 0; }
}
