:root {
  --ink: #102a43;
  --muted: #627d98;
  --line: #d9e2ec;
  --soft: #f5f8fb;
  --brand: #2f80ed;
  --brand-dark: #1558a6;
  --good: #17845b;
  --warm: #fff6e6;
  --shadow: 0 12px 34px rgba(16, 42, 67, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f7f9fc;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f7f9fc; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 250px; padding: 28px 18px 20px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 31px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--ink); font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; }
.brand span { color: var(--muted); font-size: 12px; margin-top: 4px; }
nav { display: grid; gap: 6px; }
.nav-item { border: 0; border-radius: 10px; background: transparent; color: var(--muted); padding: 12px 13px; display: flex; align-items: center; gap: 11px; text-align: left; font-size: 14px; }
.nav-item:hover, .nav-item.active { color: var(--ink); background: #eaf3ff; }
.nav-item b { margin-left: auto; color: var(--brand); font-size: 12px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 10px; padding: 20px 10px 0; }
.text-button { border: 0; padding: 0; background: transparent; text-align: left; color: var(--muted); font-size: 12px; }
.text-button:hover { color: var(--brand-dark); }
.sync-status { color: #7a8da1; font-size: 11px; }
.main-content { width: min(1180px, 100%); padding: 38px 5.5%; margin: 0 auto; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.eyebrow { color: var(--brand); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; margin: 0 0 8px; }
h1 { margin: 0; font-size: clamp(24px, 3.4vw, 38px); letter-spacing: -.03em; }
h2 { margin: 0; font-size: 19px; }
h3 { margin: 0; font-size: 16px; }
.topbar-actions { display: flex; gap: 10px; }
.icon-button, .avatar { border: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.icon-button { background: var(--brand); color: #fff; font-size: 22px; box-shadow: 0 8px 16px rgba(47,128,237,.2); }
.avatar { color: var(--ink); background: #e9eff6; font-size: 13px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-header p, .muted { color: var(--muted); font-size: 13px; margin: 5px 0 0; }
.brief-card { min-height: 145px; }
.brief-card .brief-label { color: var(--brand); font-size: 12px; font-weight: 700; }
.brief-card p { line-height: 1.7; color: var(--muted); font-size: 13px; }
.brief-card a { color: var(--brand-dark); font-size: 12px; text-decoration: none; }
.brief-card .source { margin-top: 12px; color: #8295a9; font-size: 11px; }
.metric { font-size: 28px; font-weight: 750; margin: 7px 0 0; }
.metric-label { color: var(--muted); font-size: 12px; }
.section-space { margin-top: 18px; }
.list { display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid #edf1f5; }
.list-item:last-child { border-bottom: 0; }
.check { width: 18px; height: 18px; border: 1.5px solid #9fb3c8; border-radius: 6px; background: #fff; flex: 0 0 auto; }
.check.done { border-color: var(--good); background: var(--good); position: relative; }
.check.done::after { content: "✓"; color: #fff; font-size: 12px; position: absolute; left: 3px; top: -1px; }
.item-body { min-width: 0; flex: 1; }
.item-title { font-size: 14px; line-height: 1.5; }
.done-text { color: #8aa0b5; text-decoration: line-through; }
.item-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.pill { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px; color: var(--brand-dark); background: #edf5ff; font-size: 11px; white-space: nowrap; }
.pill.warm { color: #9a6400; background: var(--warm); }
.button { border: 0; border-radius: 9px; padding: 9px 13px; color: #fff; background: var(--brand); font-size: 13px; }
.button.secondary { color: var(--ink); background: #eef3f8; }
.button.small { padding: 7px 10px; font-size: 12px; }
.capture-row { display: flex; gap: 9px; }
.capture-row input, .form-field input, .form-field textarea, .form-field select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; outline: 0; color: var(--ink); background: #fff; }
.capture-row input:focus, .form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px #eaf3ff; }
.capture-row input { flex: 1; }
.empty { padding: 24px 0; color: var(--muted); font-size: 13px; text-align: center; }
.page-intro { margin-bottom: 20px; }
.page-intro p { color: var(--muted); margin: 7px 0 0; line-height: 1.7; }
.form-field { display: grid; gap: 7px; margin-bottom: 13px; }
.form-field label { font-size: 12px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(16,42,67,.35); display: grid; place-items: center; padding: 20px; z-index: 10; }
.modal { width: min(550px, 100%); max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 17px; padding: 22px; box-shadow: 0 25px 80px rgba(16,42,67,.25); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.close-button { border: 0; background: transparent; color: var(--muted); font-size: 26px; }
.hidden { display: none; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 66px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid #edf1f5; }
.timeline-time { color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.timeline-content strong { font-size: 14px; }
.timeline-content p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.notice { padding: 13px 15px; border-radius: 11px; color: #6e5a24; background: #fff8df; font-size: 12px; line-height: 1.6; }
.hero-panel { background: #123449; color: #fff; border-radius: 18px; padding: 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.hero-panel .eyebrow { color: #8cdbcb; }
.hero-panel h2 { font-size: 25px; }
.hero-panel p:not(.eyebrow) { color: #b8ccda; font-size: 13px; margin: 12px 0 0; }
.hero-metrics { display: flex; gap: 26px; flex-shrink: 0; }
.hero-metrics span { color: #b8ccda; font-size: 11px; }
.hero-metrics b { display: block; color: white; font-size: 26px; margin-bottom: 4px; }
.today-grid { grid-template-columns: 1.25fr 1fr; }
.item-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.brief-card { border: 1px solid #e8edf2; border-radius: 12px; padding: 16px; min-width: 0; }
.brief-card h3 { margin-top: 10px; line-height: 1.65; }
.weather-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; margin-top: 16px; border-radius: 12px; background: #eff8f7; font-size: 13px; }
.weather-strip a, .file-link, .item-body a { color: var(--brand-dark); font-size: 12px; }
.weather-strip small { color: var(--muted); }
.project-block { padding: 18px 0; border-top: 1px solid var(--line); }
.login-card { max-width: 540px; margin: 35px auto; }
.login-card form { margin-top: 24px; }
.calendar-link { text-decoration: none; display: inline-block; margin-top: 8px; }
.capture-row select, #task-date, #plan-date, #plan-period { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 10px; color: var(--ink); background: white; }
.capture-row input { min-width: 0; }
.item-title, .brief-card, .item-meta, .muted, .notice { overflow-wrap: anywhere; }
.notice.error, .form-error { color: #a32323; background: #fff0ef; }
.form-error:empty { display: none; }
.form-error { padding: 10px; border-radius: 8px; font-size: 13px; }
#app-notice:not(.hidden) { margin-bottom: 16px; }
.card p { line-height: 1.7; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid #7cb7f5; outline-offset: 3px; }
button:disabled { opacity: .55; cursor: wait; }
@media (min-width: 821px) { .sidebar { position: sticky; top: 0; height: 100vh; flex-shrink: 0; } }
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { width: 100%; padding: 14px 14px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 4px 12px; }
  nav { display: flex; overflow-x: auto; gap: 4px; }
  .nav-item { padding: 9px 11px; white-space: nowrap; }
  .sidebar-bottom { display: flex; padding: 10px 4px 2px; gap: 15px; }
  .main-content { padding: 24px 16px 35px; }
  .grid-3, .grid-2, .today-grid { grid-template-columns: 1fr; }
  .topbar { margin-bottom: 22px; }
  .hero-panel { flex-direction: column; align-items: stretch; padding: 22px; }
  .hero-metrics { justify-content: space-between; }
  .card-header { align-items: flex-start; flex-wrap: wrap; }
  .list-item { flex-wrap: wrap; }
  .item-actions { margin-left: auto; }
  .topbar-actions { flex-shrink: 0; }
}
/* LAD assistant, itinerary and content panels. */
.chat-history { max-height: 55vh; overflow-y: auto; margin: 16px 0; }
.chat-message { padding: 14px; margin: 10px 0; background: #f2f5f8; border-radius: 12px; overflow-wrap: anywhere; }
.chat-user { background: #e6f3f2; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-options { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.assistant-options input { width: auto; }
.route-panel { padding: 16px; border: 1px solid #d7e1e9; border-radius: 12px; }
#assistant-form textarea { width: 100%; box-sizing: border-box; }
.sidebar nav { overflow-y: auto; max-height: calc(100vh - 230px); }
