@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0b1727;
  --panel: rgba(13, 28, 45, 0.84);
  --panel-solid: #0d1c2d;
  --surface: #10233a;
  --surface-hover: #142c47;
  --line: rgba(163, 193, 220, 0.14);
  --line-strong: rgba(163, 193, 220, 0.25);
  --text: #f3f8fc;
  --muted: #91a4b8;
  --cyan: #67e8f9;
  --cyan-deep: #22d3ee;
  --rose: #fb7185;
  --amber: #fbbf24;
  --green: #34d399;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  --radius: 22px;
}

body.light {
  color-scheme: light;
  --bg: #edf5f8;
  --bg-soft: #f8fbfc;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --surface: #f2f7f9;
  --surface-hover: #e6f1f4;
  --line: rgba(22, 63, 83, 0.12);
  --line-strong: rgba(22, 63, 83, 0.23);
  --text: #0c2030;
  --muted: #607888;
  --cyan: #0891b2;
  --cyan-deep: #0891b2;
  --shadow: 0 24px 70px rgba(36, 77, 94, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
  transition: background .25s ease, color .25s ease;
}
button, input { font: inherit; }
button { color: inherit; }
.ambient { position: fixed; z-index: -1; width: 420px; height: 420px; border-radius: 50%; filter: blur(110px); opacity: .14; pointer-events: none; }
.ambient-a { top: -190px; right: 7%; background: var(--cyan); }
.ambient-b { bottom: 10%; left: -210px; background: #6366f1; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; max-width: 1440px; margin: auto; padding: 0 4vw; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; }
.brand-mark { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); }
.brand-mark svg { width: 26px; fill: none; stroke: var(--cyan); stroke-width: 2; }
.brand-mark circle { fill: var(--rose); stroke: none; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.prototype-badge { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.prototype-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px color-mix(in srgb, var(--amber) 65%, transparent); }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--surface); }
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
main { max-width: 1440px; margin: auto; padding: 56px 4vw 80px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 34px; }
.eyebrow, .section-kicker { margin: 0 0 9px; color: var(--cyan); font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.intro h1 { max-width: 760px; margin: 0; font-size: clamp(2.05rem, 4vw, 4.1rem); line-height: 1.03; letter-spacing: -.055em; }
.intro h1 span { color: var(--cyan); }
.intro-copy { max-width: 650px; margin: 17px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.primary-button { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 14px; padding: 14px 20px; background: var(--cyan); color: #05202a; font-weight: 700; box-shadow: 0 12px 30px color-mix(in srgb, var(--cyan) 20%, transparent); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 36px color-mix(in srgb, var(--cyan) 28%, transparent); }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.workspace { display: grid; grid-template-columns: minmax(320px, .73fr) minmax(540px, 1.6fr); min-height: 660px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(24px); }
.mail-panel { display: flex; flex-direction: column; padding: 26px 20px 20px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 80%, transparent); }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 18px; }
.section-heading h2, .report-header h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.035em; }
.count-badge, .pill { padding: 4px 9px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 700; }
.mail-list { display: flex; flex-direction: column; gap: 8px; }
.mail-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px; text-align: left; border: 1px solid transparent; border-radius: 14px; background: transparent; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.mail-item:hover, .mail-item.active { background: var(--surface); border-color: var(--line); transform: translateX(2px); }
.sender-avatar { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; color: white; font-size: .73rem; font-weight: 700; }
.mail-copy { min-width: 0; }
.mail-meta { display: flex; align-items: baseline; gap: 8px; }
.mail-meta strong { max-width: 78%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .86rem; }
.mail-meta span { color: var(--muted); font-size: .69rem; white-space: nowrap; }
.mail-item h3 { margin: 5px 0 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .86rem; font-weight: 600; }
.mail-item p { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: .73rem; }
.mail-priority { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: transparent; }
.mail-priority.high { background: var(--rose); }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; margin-top: auto; padding: 16px 12px 2px; border-top: 1px solid var(--line); color: var(--muted); }
.privacy-note svg { flex: 0 0 auto; width: 18px; fill: none; stroke: var(--green); stroke-width: 1.7; }
.privacy-note p { margin: 0; font-size: .72rem; line-height: 1.55; }
.privacy-note strong { color: var(--text); font-weight: 600; }
.report-panel { min-width: 0; position: relative; padding: 28px 32px; }
.report-empty, .analysis-state { min-height: 600px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.report-empty h2, .analysis-state h2 { margin: 8px 0 10px; font-size: 1.7rem; letter-spacing: -.04em; }
.report-empty > p:not(.section-kicker) { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.7; }
.orb { position: relative; width: 80px; height: 80px; margin-bottom: 22px; border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); border-radius: 50%; box-shadow: inset 0 0 30px color-mix(in srgb, var(--cyan) 10%, transparent), 0 0 50px color-mix(in srgb, var(--cyan) 10%, transparent); }
.orb:before { content: ''; position: absolute; inset: 21px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 24px var(--cyan); opacity: .9; }
.orb span { position: absolute; inset: 9px; border: 1px solid var(--line-strong); border-radius: 50%; animation: orbit 4s linear infinite; }
.orb span:after { content: ''; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }
.orb span:nth-child(2) { inset: 3px; animation-duration: 7s; animation-direction: reverse; transform: rotate(110deg); }
.orb span:nth-child(3) { inset: 15px; animation-duration: 5s; transform: rotate(230deg); }
@keyframes orbit { to { transform: rotate(360deg); } }
.pipeline { display: flex; align-items: center; gap: 14px; margin-top: 30px; color: var(--muted); font-size: .76rem; }
.pipeline i { width: 34px; height: 1px; background: var(--line-strong); }
.hidden { display: none !important; }
.agent-loader { display: flex; gap: 7px; margin-bottom: 28px; }
.agent-loader span { width: 13px; height: 13px; border-radius: 4px; background: var(--cyan); animation: pulse 1.05s infinite ease-in-out; }
.agent-loader span:nth-child(2) { animation-delay: .14s; }
.agent-loader span:nth-child(3) { animation-delay: .28s; }
@keyframes pulse { 0%, 100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(-9px); opacity: 1; } }
.progress-track { width: min(390px, 80%); height: 4px; margin: 28px 0 12px; overflow: hidden; border-radius: 4px; background: var(--surface); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--cyan); transition: width .45s ease; }
.analysis-steps { width: min(390px, 80%); display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.analysis-steps span.active { color: var(--cyan); }
.daily-report { animation: reportIn .55s cubic-bezier(.22,.8,.22,1); }
@keyframes reportIn { from { opacity: 0; transform: translateY(12px); } }
.report-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.report-actions { display: flex; gap: 8px; }
.secondary-button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: .73rem; font-weight: 600; cursor: pointer; }
.secondary-button:hover { border-color: var(--cyan); }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 26px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.summary-strip div { display: flex; flex-direction: column; gap: 2px; padding: 13px 15px; border-right: 1px solid var(--line); }
.summary-strip div:last-child { border: 0; }
.summary-strip strong { font-size: 1.12rem; }
.summary-strip span { color: var(--muted); font-size: .68rem; }
.report-section { margin-bottom: 25px; }
.report-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.report-section-title h3 { margin: 0; font-size: .96rem; }
.report-section-title .pill { margin-left: auto; }
.status-icon { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 7px; font-size: .7rem; font-weight: 700; }
.status-icon.urgent { color: var(--rose); background: color-mix(in srgb, var(--rose) 13%, transparent); }
.status-icon.info { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 13%, transparent); }
.status-icon.low { color: var(--green); background: color-mix(in srgb, var(--green) 13%, transparent); }
.action-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin-bottom: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.action-date { width: 46px; padding: 7px 5px; text-align: center; border-radius: 9px; background: color-mix(in srgb, var(--rose) 11%, transparent); color: var(--rose); }
.action-date strong { display: block; font-size: 1rem; line-height: 1; }
.action-date span { font-size: .58rem; font-weight: 700; letter-spacing: .1em; }
.action-content h4, .info-card h4 { margin: 0 0 4px; font-size: .85rem; }
.action-content p, .info-card p, .muted-section > p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.source-label { display: block; margin-top: 6px; color: var(--muted); font-size: .64rem; }
.check-action { cursor: pointer; }
.check-action input { position: absolute; opacity: 0; }
.check-action span { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid var(--line-strong); border-radius: 7px; }
.check-action input:checked + span { background: var(--green); border-color: var(--green); }
.check-action input:checked + span:after { content: '✓'; color: #05251b; font-size: .72rem; font-weight: 800; }
.action-card:has(input:checked) .action-content { opacity: .55; text-decoration: line-through; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info-card { padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
.tag { display: inline-block; margin-bottom: 8px; padding: 3px 7px; border-radius: 5px; font-size: .61rem; font-weight: 700; }
.tag.event { color: var(--amber); background: color-mix(in srgb, var(--amber) 13%, transparent); }
.tag.service { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 13%, transparent); }
.muted-section { padding: 13px; border: 1px dashed var(--line-strong); border-radius: 13px; }
.muted-section .report-section-title { margin-bottom: 6px; }
.report-footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--cyan); font-size: .7rem; cursor: pointer; }
.roadmap { display: grid; grid-template-columns: .7fr 2fr; gap: 40px; align-items: center; margin-top: 70px; padding: 0 10px; }
.roadmap-intro h2 { max-width: 330px; margin: 0; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.04em; }
.roadmap-steps { display: flex; align-items: center; }
.roadmap-item { display: flex; align-items: center; gap: 10px; opacity: .48; }
.roadmap-item.current { opacity: 1; }
.roadmap-item > span { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); font-size: .69rem; font-weight: 700; }
.roadmap-item.current > span { border-color: var(--cyan); color: var(--cyan); }
.roadmap-item strong { display: block; white-space: nowrap; font-size: .76rem; }
.roadmap-item p { margin: 3px 0 0; white-space: nowrap; color: var(--muted); font-size: .64rem; }
.roadmap-line { flex: 1; min-width: 20px; height: 1px; margin: 0 12px; background: var(--line-strong); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; transform: translate(-50%, 18px); padding: 10px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel-solid); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s ease; font-size: .78rem; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1040px) {
  .workspace { grid-template-columns: 310px 1fr; }
  .report-panel { padding: 26px 22px; }
  .roadmap { grid-template-columns: 1fr; }
  .roadmap-intro h2 { max-width: none; }
  .roadmap-item p { display: none; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 20px; }
  main { padding: 38px 16px 60px; }
  .intro { display: block; }
  .intro h1 { font-size: 2.35rem; }
  .primary-button { width: 100%; justify-content: center; margin-top: 24px; }
  .workspace { display: block; }
  .mail-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-list { display: grid; grid-auto-flow: column; grid-auto-columns: 85%; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
  .mail-item { scroll-snap-align: start; background: var(--surface); }
  .privacy-note { display: none; }
  .report-panel { padding: 24px 16px; }
  .report-empty, .analysis-state { min-height: 460px; }
  .pipeline { gap: 8px; font-size: .66rem; }
  .pipeline i { width: 18px; }
  .report-header { align-items: flex-start; }
  .report-actions { flex-direction: column; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-strip div:nth-child(2) { border-right: 0; }
  .summary-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .info-grid { grid-template-columns: 1fr; }
  .roadmap { margin-top: 48px; }
  .roadmap-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .roadmap-line { display: none; }
  .prototype-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
