:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0e1c2f;
  --panel-2: #13253b;
  --line: #263b55;
  --text: #edf5ff;
  --muted: #9eb1c8;
  --cyan: #3ddbd9;
  --blue: #4d8dff;
  --red: #ff6577;
  --amber: #ffbd5c;
  --green: #53d68a;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 80% -10%, #163a5b 0, transparent 35%), var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Noto Sans Thai", sans-serif; }
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 80px; }
header { max-width: 780px; margin-bottom: 30px; }
.eyebrow { color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -.045em; line-height: 1; margin: 10px 0 16px; }
h2 { margin: 6px 0; font-size: 30px; }
h3 { margin: 0 0 14px; }
p { color: var(--muted); line-height: 1.65; }
.scan-card, article, .finding { background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); border-radius: 18px; }
.scan-card { padding: 24px; box-shadow: 0 24px 80px #0005; }
label { display: block; font-weight: 700; margin-bottom: 10px; }
.input-row { display: flex; gap: 12px; }
input { flex: 1; min-width: 0; background: #071321; border: 1px solid #38506b; border-radius: 11px; padding: 15px 16px; color: white; font: inherit; }
input:focus { outline: 2px solid var(--cyan); border-color: transparent; }
button { border: 0; border-radius: 11px; padding: 13px 18px; font: inherit; font-weight: 800; cursor: pointer; color: #04121c; background: linear-gradient(120deg, var(--cyan), #77a8ff); }
button:disabled { opacity: .55; cursor: wait; }
button.secondary, .tab { color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.safe-note { color: var(--muted); margin-top: 12px; font-size: 13px; }
.hidden { display: none !important; }
.error { margin-top: 16px; background: #4a1721; border: 1px solid #9d3547; color: #ffd8de; padding: 13px; border-radius: 10px; }
.progress { margin-top: 20px; color: var(--muted); }
.progress span { display: block; height: 3px; width: 100%; margin-bottom: 12px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); background-size: 50% 100%; animation: load 1.2s linear infinite; }
@keyframes load { to { background-position: 200% 0; } }
#report { margin-top: 42px; }
.report-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.actions { display: flex; gap: 8px; }
.summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 24px 0 14px; }
.metric { padding: 18px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; }
.metric b { display: block; font-size: 30px; }
.metric span { color: var(--muted); font-size: 13px; }
.notice { color: #caddf2; border-left: 3px solid var(--amber); background: #392d1b66; padding: 13px 16px; margin: 14px 0 22px; }
.compliance-section { margin: 22px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h3 { margin: 0; }
.section-title span { color: var(--muted); font-size: 13px; }
.compliance-charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.compliance-card { display: flex; align-items: center; gap: 18px; }
.pie { --pass-end: 0%; --attention-end: 0%; width: 112px; aspect-ratio: 1; flex: 0 0 112px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 var(--pass-end), var(--amber) var(--pass-end) var(--attention-end), var(--blue) var(--attention-end) 100%); position: relative; }
.pie.empty { background: var(--line); }
.pie::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--panel); }
.pie > div { position: relative; z-index: 1; text-align: center; }
.pie b, .pie span { display: block; }
.pie b { font-size: 22px; }
.pie span { color: var(--muted); font-size: 11px; }
.pie-copy h3 { margin-bottom: 7px; }
.pie-copy p { margin: 3px 0; font-size: 12px; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.pass-dot { background: var(--green); }
.attention-dot { background: var(--amber); }
.manual-dot { background: var(--blue); }
.details-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
article { padding: 20px; overflow-wrap: anywhere; }
.kv { color: var(--muted); margin: 7px 0; }
.kv strong { color: var(--text); }
.tabs { display: flex; gap: 8px; margin: 30px 0 14px; }
.tab.active { border-color: var(--cyan); color: var(--cyan); }
.findings { display: grid; gap: 10px; }
.finding { padding: 18px; display: grid; grid-template-columns: 120px 1fr; gap: 18px; }
.badge { display: inline-flex; align-items: center; justify-content: center; width: fit-content; border-radius: 100px; padding: 5px 10px; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.pass { background: #153c2a; color: var(--green); }
.fail { background: #4a1721; color: var(--red); }
.recommendation { background: #42321a; color: var(--amber); }
.manual_review { background: #182f4f; color: #7eb3ff; }
.future_gap { background: #3c204d; color: #db9bff; }
.finding h3 { font-size: 17px; margin: 0 0 8px; }
.finding p { margin: 4px 0; font-size: 14px; }
.mapping { color: var(--cyan) !important; }
@media (max-width: 760px) {
  main { padding-top: 34px; }
  .input-row, .report-head { display: grid; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .details-grid { grid-template-columns: 1fr; }
  .compliance-charts { grid-template-columns: 1fr; }
  .finding { grid-template-columns: 1fr; gap: 9px; }
  .actions, .tabs { overflow-x: auto; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .details-grid { grid-template-columns: repeat(2, 1fr); }
}
