:root {
  --bg: #eef5f5;
  --bg-deep: #e7f0f0;
  --surface: #ffffff;
  --surface-soft: #f7fbfb;
  --ink: #12343c;
  --ink-soft: #2c4b52;
  --muted: #6f888e;
  --muted-2: #93a7ab;
  --line: #e0ebeb;
  --line-strong: #cfdfe0;
  --primary: #0b3b45;
  --primary-2: #11515d;
  --accent: #27ae9e;
  --accent-deep: #188a7f;
  --accent-soft: #e2f5f1;
  --accent-soft-2: #f0faf8;
  --coral: #e98468;
  --coral-soft: #fceee9;
  --amber: #dca84e;
  --amber-soft: #fbf3e1;
  --blue: #4d87c7;
  --blue-soft: #eaf2fb;
  --danger: #cf5b55;
  --danger-soft: #fbeceb;
  --shadow-sm: 0 3px 10px rgba(14, 52, 58, .04);
  --shadow: 0 12px 30px rgba(14, 52, 58, .065);
  --shadow-lg: 0 24px 60px rgba(14, 52, 58, .14);
  --radius: 18px;
  --radius-lg: 24px;
  --sidebar: 246px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body.modal-open { overflow: hidden; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 4%, rgba(39, 174, 158, .08), transparent 30%),
    radial-gradient(circle at 20% 90%, rgba(77, 135, 199, .05), transparent 32%),
    var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(39, 174, 158, .22); }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.svg-sprite symbol { fill: none; stroke: currentColor; }

/* ---------- Shell ---------- */
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--sidebar);
  padding: 24px 15px 18px;
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, .76);
  background:
    radial-gradient(circle at 0% 0%, rgba(55, 193, 177, .22), transparent 34%),
    radial-gradient(circle at 100% 90%, rgba(39, 174, 158, .12), transparent 36%),
    linear-gradient(165deg, #0c3a43 0%, #0a333c 55%, #082b32 100%);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.sidebar::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(92, 204, 190, .12);
  border-radius: 50%;
  top: -120px;
  right: -130px;
  pointer-events: none;
}
.sidebar::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 156px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 28px; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: #082f36;
  background: linear-gradient(145deg, #75dfd1, #2cb6a5);
  box-shadow: 0 7px 18px rgba(39, 174, 158, .3);
}
.brand-mark svg { width: 20px; height: 20px; stroke: none; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { color: #fff; font-size: 20px; letter-spacing: 1px; font-weight: 700; }
.brand-copy span { margin-top: 3px; color: rgba(159, 221, 212, .66); font-size: 8.5px; letter-spacing: 2.2px; }
.sidebar-close { display: none; margin-left: auto; border: 0; background: transparent; color: #fff; }

.side-label {
  padding: 0 12px;
  margin-bottom: 8px;
  color: rgba(177, 217, 212, .48);
  font-size: 9.5px;
  letter-spacing: 2px;
  font-weight: 600;
}
.side-label-spaced { margin-top: 22px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 45px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  color: rgba(225, 241, 239, .68);
  background: transparent;
  font-size: 13.5px;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.065); color: #fff; }
.nav-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(59, 188, 172, .22), rgba(59, 188, 172, .08));
  box-shadow: inset 0 0 0 1px rgba(109, 220, 205, .12);
}
.nav-item.is-active::before {
  content: "";
  position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: #5bd3c3;
}
.nav-count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  display: none; align-items: center; justify-content: center;
  border-radius: 10px; background: rgba(91, 211, 195, .16);
  color: #8ce6da; font-size: 10px; font-weight: 700;
}
.nav-count.has-value { display: inline-flex; }
.side-spacer { flex: 1; min-height: 28px; }

.ai-status-card {
  margin: 0 4px 14px;
  padding: 14px;
  border: 1px solid rgba(129, 217, 205, .12);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}
.ai-status-top { display: flex; align-items: center; gap: 8px; color: #e4f6f3; font-size: 11.5px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #d7a34e; box-shadow: 0 0 0 3px rgba(215,163,78,.13); flex: none; }
.status-dot.online { background: #58d6c4; box-shadow: 0 0 0 3px rgba(88,214,196,.13); }
.status-dot.offline { background: #dd7b6d; box-shadow: 0 0 0 3px rgba(221,123,109,.14); }
.ai-status-card p { margin: 5px 0 10px; color: rgba(192, 222, 218, .48); font-size: 9.5px; }
.text-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0; border: 0; background: transparent;
  color: var(--accent-deep); font-size: 11.5px; font-weight: 600;
}
.text-link svg { width: 13px; height: 13px; transition: transform .16s ease; }
.text-link:hover svg { transform: translateX(3px); }
.ai-status-card .text-link { color: #76d6ca; font-size: 10px; }

.side-footer { padding: 12px 4px 0; border-top: 1px solid rgba(255,255,255,.07); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px; }
.avatar {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  color: #9ce5db; font-size: 13px; font-weight: 700;
}
.user-chip div:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.user-chip strong { color: #e9f7f5; font-size: 11.5px; font-weight: 600; }
.user-chip span { color: rgba(190, 220, 216, .42); font-size: 9px; }

.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
  position: sticky; top: 0; z-index: 35;
  min-height: 88px;
  padding: 16px 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(238, 245, 245, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(207, 224, 224, .7);
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mobile-menu { display: none; width: 39px; height: 39px; border-radius: 11px; border: 1px solid var(--line); background: #fff; align-items: center; justify-content: center; }
.eyebrow { color: var(--accent-deep); font-size: 9px; font-weight: 700; letter-spacing: 1.7px; text-transform: uppercase; }
.page-heading h1 { margin: 2px 0 0; font-size: 24px; line-height: 1.25; letter-spacing: -.4px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.top-clock { display: flex; flex-direction: column; align-items: flex-end; padding-right: 14px; border-right: 1px solid var(--line-strong); line-height: 1.2; }
.top-clock span { color: var(--muted); font-size: 9.5px; }
.top-clock strong { color: var(--ink); font-size: 16px; letter-spacing: .6px; font-variant-numeric: tabular-nums; }
.icon-btn {
  position: relative;
  width: 41px; height: 41px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  transition: border-color .16s, background .16s;
}
.icon-btn:hover { border-color: var(--accent); background: var(--accent-soft-2); }
.icon-btn svg { width: 18px; height: 18px; }
.notify-dot { position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px #fff; }
.notify-dot.is-on { background: var(--accent); }

.content { width: 100%; max-width: 1520px; margin: 0 auto; padding: 30px 34px 56px; }
.view { display: none; animation: viewIn .32s ease both; }
.view.is-active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons & general ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 11px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #1c9287, #14766e);
  box-shadow: 0 7px 16px rgba(24, 138, 127, .18);
}
.btn-primary:hover { box-shadow: 0 9px 22px rgba(24, 138, 127, .26); transform: translateY(-1px); }
.btn-dark { color: #fff; background: var(--primary); }
.btn-dark:hover { background: var(--primary-2); }
.btn-light { color: var(--ink); background: #fff; border-color: var(--line); }
.btn-light:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.btn-ghost { color: var(--ink-soft); background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { background: #fff; border-color: var(--accent); color: var(--accent-deep); }
.btn-danger-ghost { color: var(--danger); background: transparent; border-color: #ecd2cf; }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-ghost-light { color: rgba(255,255,255,.85); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 11.5px; border-radius: 9px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .58; pointer-events: none; }
.btn.is-loading span { opacity: .72; }
.btn.is-loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.card-head h3 { margin: 2px 0 0; font-size: 17px; line-height: 1.3; letter-spacing: -.2px; }
.section-kicker { color: var(--accent-deep); font-size: 8.5px; font-weight: 700; letter-spacing: 1.6px; }
.head-icon { color: var(--muted-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  min-height: 306px;
  padding: 38px 42px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 18%, rgba(78, 206, 191, .28), transparent 33%),
    radial-gradient(circle at 55% 120%, rgba(39, 174, 158, .2), transparent 46%),
    linear-gradient(115deg, #0a343d 0%, #0e4650 55%, #11616a 100%);
  box-shadow: 0 20px 42px rgba(10, 52, 61, .17);
}
.hero::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, #72dbce, rgba(39, 174, 158, .1));
}
.hero-copy { position: relative; z-index: 2; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: #9ae7dc; font-size: 10px; letter-spacing: 1.4px; font-weight: 600; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #63d8c8; box-shadow: 0 0 0 4px rgba(99,216,200,.13); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(99,216,200,.13); } 50% { box-shadow: 0 0 0 8px rgba(99,216,200,.03); } }
.hero h2 { margin: 14px 0 7px; font-size: 39px; line-height: 1.16; letter-spacing: -1px; font-weight: 700; }
.hero-date { margin: 0; color: rgba(206, 236, 232, .72); font-size: 13px; letter-spacing: .3px; }
.hero-quote { margin: 22px 0 24px; color: rgba(226, 245, 242, .78); font-size: 13px; }
.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.hero-visual { position: relative; z-index: 1; min-height: 226px; }
.hero-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(123, 226, 212, .22); }
.hero-ring-1 { width: 300px; height: 300px; right: -70px; top: -90px; }
.hero-ring-2 { width: 210px; height: 210px; right: -25px; top: -45px; border-color: rgba(123, 226, 212, .13); }
.hero-pulse { position: absolute; right: 0; bottom: 40px; width: 100%; height: 120px; opacity: .65; }
.next-event-card {
  position: absolute; right: 0; bottom: 0;
  width: min(285px, 100%);
  padding: 16px 18px;
  border: 1px solid rgba(161, 232, 221, .18);
  border-radius: 16px;
  background: rgba(255,255,255,.075);
  backdrop-filter: blur(9px);
}
.next-label { display: flex; align-items: center; gap: 7px; color: #8fe1d5; font-size: 9.5px; letter-spacing: .8px; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: #75ddce; }
.next-event-card strong { display: block; margin: 7px 0 3px; color: #fff; font-size: 15px; line-height: 1.35; font-weight: 600; }
.next-event-card > span { display: block; color: rgba(213,239,235,.6); font-size: 10.5px; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-sm);
}
.stat-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 13px; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.mint { color: var(--accent-deep); background: var(--accent-soft); }
.stat-icon.coral { color: var(--coral); background: var(--coral-soft); }
.stat-icon.amber { color: var(--amber); background: var(--amber-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-card > div:last-child { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 5px; }
.stat-card span { grid-column: 1 / -1; color: var(--muted); font-size: 10.5px; }
.stat-card strong { font-size: 27px; line-height: 1.25; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-card small { color: var(--muted-2); font-size: 9.5px; }

/* ---------- Home panels ---------- */
.home-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 20px; margin-top: 20px; }
.home-panel { padding: 23px 24px; min-height: 302px; }
.home-panel .card-head { margin-bottom: 14px; }
.mini-timeline { display: flex; flex-direction: column; }
.mini-event { display: grid; grid-template-columns: 56px 18px 1fr; gap: 0 10px; min-height: 54px; }
.mini-time { padding-top: 2px; color: var(--ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-time small { display: block; color: var(--muted-2); font-size: 8.5px; font-weight: 400; }
.mini-rail { position: relative; display: flex; justify-content: center; }
.mini-rail::before { content: ""; position: absolute; top: 16px; bottom: -4px; width: 1px; background: var(--line); }
.mini-event:last-child .mini-rail::before { display: none; }
.mini-dot { position: relative; z-index: 1; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mini-event.is-past .mini-dot { background: var(--muted-2); box-shadow: 0 0 0 3px #f0f4f4; }
.mini-body { padding-bottom: 15px; }
.mini-body strong { display: block; font-size: 13px; line-height: 1.45; font-weight: 600; }
.mini-body span { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.mini-event.is-past .mini-body strong { color: var(--muted); }

.focus-list { display: flex; flex-direction: column; gap: 8px; }
.focus-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 10px; transition: background .15s; }
.focus-item:hover { background: var(--surface-soft); }
.focus-check {
  width: 18px; height: 18px; margin-top: 2px; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: 5px; background: #fff;
  display: grid; place-items: center; color: transparent;
}
.focus-check svg { width: 11px; height: 11px; stroke-width: 2.4; }
.focus-item.done .focus-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.focus-item.done strong { color: var(--muted-2); text-decoration: line-through; }
.focus-copy { min-width: 0; }
.focus-copy strong { display: block; font-size: 12.5px; line-height: 1.4; font-weight: 500; }
.focus-meta { display: flex; align-items: center; gap: 7px; margin-top: 2px; color: var(--muted); font-size: 9px; }
.focus-meta .late { color: var(--danger); }

.quick-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.tool-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 19px 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.tool-card::after { content: ""; position: absolute; width: 100px; height: 100px; right: -40px; bottom: -55px; border-radius: 50%; background: var(--accent-soft); opacity: .7; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cde4e1; }
.tool-icon { width: 45px; height: 45px; flex: none; display: grid; place-items: center; border-radius: 13px; color: var(--accent-deep); background: var(--accent-soft); }
.tool-icon svg { width: 21px; height: 21px; }
.tool-case .tool-icon { color: var(--coral); background: var(--coral-soft); }
.tool-todo .tool-icon { color: var(--blue); background: var(--blue-soft); }
.tool-copy { display: flex; flex-direction: column; min-width: 0; }
.tool-copy span { color: var(--muted); font-size: 8.5px; letter-spacing: 1.1px; }
.tool-copy strong { margin: 2px 0; font-size: 13.5px; }
.tool-copy small { color: var(--muted-2); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-arrow { margin-left: auto; color: var(--muted-2); position: relative; z-index: 1; }
.tool-arrow svg { width: 16px; height: 16px; }

/* ---------- Page intro / metrics ---------- */
.page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-intro p { margin: 0; max-width: 720px; color: var(--muted); font-size: 13px; }
.metric-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  margin-bottom: 20px; padding: 18px 4px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.72);
}
.metric-item { display: flex; flex-direction: column; gap: 3px; padding: 0 22px; border-right: 1px solid var(--line); }
.metric-item:last-child { border-right: 0; }
.metric-item span { color: var(--muted); font-size: 9.5px; }
.metric-item strong { font-size: 15px; line-height: 1.4; font-weight: 600; }
.metric-notify { position: relative; }
.metric-notify .text-link { align-self: flex-start; margin-top: 1px; font-size: 9.5px; }

/* ---------- Toolbar / segmented ---------- */
.schedule-panel { padding: 22px 24px 16px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toolbar-hint { color: var(--muted); font-size: 10.5px; }
.segmented { display: inline-flex; gap: 3px; padding: 3px; border-radius: 11px; background: #f0f6f6; }
.segmented button {
  min-height: 31px; padding: 0 13px;
  border: 0; border-radius: 8px;
  color: var(--muted); background: transparent;
  font-size: 11.5px; font-weight: 500;
  transition: background .16s, color .16s, box-shadow .16s;
}
.segmented button:hover { color: var(--ink); }
.segmented button.is-active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(16,60,68,.08); font-weight: 600; }

/* ---------- Schedule list ---------- */
.schedule-list { margin-top: 14px; }
.schedule-row {
  display: grid;
  grid-template-columns: 76px 22px minmax(0, 1fr) auto;
  gap: 0 12px;
  padding: 16px 4px;
  border-top: 1px solid var(--line);
  align-items: start;
}
.schedule-row:first-child { border-top: 0; }
.schedule-time { padding-top: 1px; }
.schedule-time strong { display: block; font-size: 15px; line-height: 1.35; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.schedule-time span { display: block; color: var(--muted); font-size: 9.5px; }
.schedule-rail { position: relative; display: flex; justify-content: center; padding-top: 10px; }
.schedule-rail::before { content: ""; position: absolute; top: 25px; bottom: -27px; width: 1px; background: var(--line); }
.schedule-row:last-child .schedule-rail::before { display: none; }
.schedule-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.schedule-row.is-past .schedule-dot { background: #b7c6c8; box-shadow: 0 0 0 4px #f1f5f5; }
.schedule-row.is-past .schedule-time strong, .schedule-row.is-past .schedule-title { color: var(--muted-2); }
.schedule-main { min-width: 0; padding-bottom: 2px; }
.schedule-title-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.schedule-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.45; }
.tag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px; font-size: 8.5px; font-weight: 600; letter-spacing: .2px; background: var(--accent-soft); color: var(--accent-deep); }
.tag-coral { background: var(--coral-soft); color: var(--coral); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-amber { background: var(--amber-soft); color: #b5852d; }
.tag-muted { background: #f0f4f4; color: var(--muted); }
.schedule-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; color: var(--muted); font-size: 10px; }
.schedule-meta span { display: inline-flex; align-items: center; gap: 4px; }
.schedule-meta svg { width: 12px; height: 12px; }
.schedule-notes { margin: 6px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.schedule-actions { display: flex; align-items: center; gap: 4px; opacity: .45; transition: opacity .16s; }
.schedule-row:hover .schedule-actions { opacity: 1; }
.mini-icon-btn { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.mini-icon-btn:hover { background: var(--accent-soft); color: var(--accent-deep); }
.mini-icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.mini-icon-btn svg { width: 14px; height: 14px; }

/* ---------- Empty states ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 20px; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 16px; color: var(--accent-deep); background: var(--accent-soft); }
.empty-icon svg { width: 24px; height: 24px; }
.empty-state strong { font-size: 14px; }
.empty-state p { margin: 4px 0 14px; max-width: 360px; color: var(--muted); font-size: 11.5px; }

/* ---------- To-do ---------- */
.todo-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .55fr); gap: 20px; align-items: start; }
.todo-main { padding: 22px 24px; }
.quick-add { display: flex; gap: 9px; }
.quick-input-wrap { position: relative; flex: 1; min-width: 0; }
.quick-input-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--accent); }
.quick-input-wrap input { width: 100%; height: 43px; padding: 0 14px 0 38px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); outline: none; font-size: 12.5px; }
.quick-input-wrap input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(39,174,158,.09); }
.quick-add select { width: 80px; height: 43px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 0 8px; font-size: 11px; color: var(--ink-soft); outline: none; }
.quick-add .btn { height: 43px; min-height: 43px; }

.progress-block { margin: 20px 0 17px; }
.progress-copy { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.progress-copy strong { color: var(--ink); font-size: 11px; font-weight: 600; }
.progress-track { height: 6px; border-radius: 6px; background: #edf4f3; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #4cc8b8, #1e9488); transition: width .4s ease; }
.toolbar-todo { padding-bottom: 5px; }
.muted-link { color: var(--muted); font-weight: 500; }
.muted-link:hover { color: var(--danger); }

.todo-list { margin-top: 4px; }
.todo-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 11px; align-items: start; padding: 14px 2px; border-top: 1px solid var(--line); }
.todo-item:first-child { border-top: 0; }
.todo-check { width: 21px; height: 21px; margin-top: 1px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 6px; background: #fff; color: transparent; transition: background .16s, border-color .16s; }
.todo-check svg { width: 12px; height: 12px; stroke-width: 2.5; }
.todo-check:hover { border-color: var(--accent); }
.todo-item.done .todo-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.todo-item.done .todo-title { color: var(--muted-2); text-decoration: line-through; }
.todo-main-copy { min-width: 0; }
.todo-title { margin: 0; font-size: 13px; line-height: 1.5; font-weight: 500; word-break: break-word; }
.todo-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; color: var(--muted); font-size: 9.5px; }
.todo-meta .prio { display: inline-flex; align-items: center; gap: 4px; }
.prio-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.prio-dot.high { background: var(--coral); }
.prio-dot.medium { background: var(--amber); }
.prio-dot.low { background: var(--blue); }
.todo-meta .overdue { color: var(--danger); font-weight: 600; }
.todo-note { margin-top: 4px; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.todo-actions { display: flex; gap: 2px; opacity: .35; transition: opacity .16s; }
.todo-item:hover .todo-actions { opacity: 1; }
.todo-side { display: flex; flex-direction: column; gap: 15px; position: sticky; top: 108px; }
.side-stat-card { padding: 22px; }
.ring { width: 132px; height: 132px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) var(--p, 0%), #edf4f3 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.ring > div { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.ring strong { font-size: 26px; letter-spacing: -.5px; }
.ring span { color: var(--muted); font-size: 9px; }
.side-stat-rows { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.side-stat-rows > div { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10.5px; }
.side-stat-rows span { display: flex; align-items: center; gap: 7px; }
.side-stat-rows strong { color: var(--ink); font-size: 12px; }
.tip-card { padding: 20px; background: linear-gradient(145deg, #fff, #f7fbfa); }
.tip-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--amber-soft); color: var(--amber); }
.tip-icon svg { width: 17px; height: 17px; }
.tip-card h4 { margin: 10px 0 4px; font-size: 12.5px; }
.tip-card p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.side-link-card { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px; cursor: pointer; transition: border-color .16s, transform .16s; }
.side-link-card:hover { border-color: #cbe3df; transform: translateY(-1px); }
.side-link-card div { display: flex; flex-direction: column; }
.side-link-card span { color: var(--muted); font-size: 9px; }
.side-link-card strong { margin-top: 2px; font-size: 12px; }
.side-link-card svg { color: var(--accent-deep); width: 17px; height: 17px; }

/* ---------- Forms ---------- */
.workspace-grid { display: grid; grid-template-columns: 376px minmax(0, 1fr); gap: 20px; align-items: start; }
.composer { padding: 24px; position: sticky; top: 108px; }
.composer-head { margin-bottom: 18px; }
.step-chip { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-deep); font-size: 10px; font-weight: 700; }
.form-stack { display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { color: var(--ink-soft); font-size: 10.5px; font-weight: 600; }
.field label em { color: var(--coral); font-style: normal; }
.label-hint { color: var(--muted-2); font-size: 9px; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 10px 12px;
  outline: none;
  font-size: 12px;
  line-height: 1.55;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.field input { height: 41px; }
.field select { height: 41px; padding-right: 30px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 11px) 17px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
.field textarea { resize: vertical; min-height: 70px; }
.field input::placeholder, .field textarea::placeholder { color: #a7b7ba; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(39,174,158,.08); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { grid-template-columns: .72fr .8fr 1.2fr; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.topic-chips button { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 9px; }
.topic-chips button:hover { border-color: var(--accent); color: var(--accent-deep); }

.theme-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.theme-option { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: border-color .16s, box-shadow .16s; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option:hover { border-color: var(--line-strong); }
.theme-option.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(39,174,158,.1); }
.theme-option > span:last-child { padding-left: 3px; color: var(--muted); font-size: 8.5px; text-align: center; }
.theme-swatch { display: flex; height: 34px; overflow: hidden; border-radius: 5px; }
.theme-swatch i { display: block; height: 100%; }
.theme-swatch i:nth-child(1) { width: 58%; }
.theme-swatch i:nth-child(2) { width: 26%; }
.theme-swatch i:nth-child(3) { width: 16%; }
.swatch-teal { background: #0b3b45; }
.swatch-teal i:nth-child(1) { background: #0b3b45; }
.swatch-teal i:nth-child(2) { background: #31b5a5; }
.swatch-teal i:nth-child(3) { background: #dff4f0; }
.swatch-blue { background: #102a4c; }
.swatch-blue i:nth-child(1) { background: #102a4c; }
.swatch-blue i:nth-child(2) { background: #3c8dde; }
.swatch-blue i:nth-child(3) { background: #e4effc; }
.swatch-warm { background: #40332d; }
.swatch-warm i:nth-child(1) { background: #40332d; }
.swatch-warm i:nth-child(2) { background: #d97b58; }
.swatch-warm i:nth-child(3) { background: #f7e9e0; }
.btn-generate { margin-top: 2px; min-height: 45px; font-size: 13px; }
.form-note { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--muted-2); font-size: 9px; line-height: 1.5; }
.form-note svg { width: 12px; height: 12px; flex: none; margin-top: 1px; color: var(--accent); }
.form-note code { padding: 1px 4px; border-radius: 4px; background: #f0f5f4; color: var(--ink-soft); font-size: 9px; }

/* ---------- Deck panel ---------- */
.deck-panel { padding: 25px 26px 26px; min-height: 690px; }
.deck-empty { min-height: 620px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.empty-visual { position: relative; width: 230px; height: 168px; margin-bottom: 30px; }
.stack-sheet { position: absolute; width: 190px; height: 118px; border-radius: 11px; border: 1px solid #d9e9e7; background: #fff; box-shadow: 0 10px 25px rgba(12,60,68,.07); }
.sheet-1 { left: 20px; top: 26px; padding: 17px; transform: rotate(-1deg); z-index: 3; }
.sheet-2 { left: 31px; top: 13px; transform: rotate(4deg); z-index: 2; background: #f0f9f7; }
.sheet-3 { left: 43px; top: 2px; transform: rotate(8deg); z-index: 1; background: #e5f4f1; }
.sheet-top { width: 34px; height: 5px; border-radius: 3px; background: var(--accent); margin-bottom: 11px; }
.sheet-line { height: 6px; border-radius: 3px; background: #d9e9e7; margin-bottom: 7px; }
.sheet-line.w70 { width: 70%; }
.sheet-line.w46 { width: 46%; }
.sheet-bars { display: flex; gap: 6px; align-items: flex-end; height: 38px; margin-top: 13px; }
.sheet-bars i { display: block; width: 28%; border-radius: 3px 3px 0 0; background: #c7eae4; }
.sheet-bars i:nth-child(1) { height: 55%; }
.sheet-bars i:nth-child(2) { height: 92%; background: #6fd5c7; }
.sheet-bars i:nth-child(3) { height: 72%; background: #a9e1d9; }
.spark { position: absolute; color: var(--accent); font-size: 20px; }
.spark-1 { top: 6px; left: 0; }
.spark-2 { right: 4px; bottom: 18px; color: var(--coral); font-size: 14px; }
.deck-empty h3 { margin: 9px 0 8px; max-width: 450px; font-size: 22px; letter-spacing: -.4px; }
.deck-empty > p { margin: 0; max-width: 480px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.empty-steps { display: flex; gap: 22px; margin-top: 26px; color: var(--muted); font-size: 10px; }
.empty-steps div { display: flex; align-items: center; gap: 6px; }
.empty-steps span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-size: 9px; font-weight: 700; }

.deck-loading { min-height: 620px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ai-orbit { position: relative; width: 98px; height: 98px; display: grid; place-items: center; margin-bottom: 24px; }
.ai-orbit > div { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #34b9a8, #14766e); box-shadow: 0 10px 24px rgba(24,138,127,.25); z-index: 2; }
.ai-orbit > div svg { width: 22px; height: 22px; }
.ai-orbit > span { position: absolute; inset: 0; border: 1px solid rgba(39,174,158,.2); border-radius: 50%; animation: orbit 3.2s linear infinite; }
.ai-orbit > span:nth-child(1)::before, .ai-orbit > span:nth-child(2)::before, .ai-orbit > span:nth-child(3)::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); top: -3px; left: 45px; }
.ai-orbit > span:nth-child(2) { inset: 12px; animation-duration: 2.4s; animation-direction: reverse; border-color: rgba(39,174,158,.14); }
.ai-orbit > span:nth-child(2)::before { background: var(--coral); }
.ai-orbit > span:nth-child(3) { inset: 24px; animation-duration: 1.9s; border-color: rgba(39,174,158,.1); }
.ai-orbit > span:nth-child(3)::before { background: var(--amber); width: 5px; height: 5px; }
@keyframes orbit { to { transform: rotate(360deg); } }
.deck-loading h3 { margin: 0 0 7px; font-size: 20px; }
.deck-loading p { margin: 0; color: var(--muted); font-size: 12px; }
.loading-track { width: 220px; height: 4px; margin-top: 24px; overflow: hidden; border-radius: 4px; background: #ecf4f2; }
.loading-track span { display: block; width: 36%; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #44c8b7, #14766e); animation: loadSlide 1.7s ease-in-out infinite; }
@keyframes loadSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(310%); } }
.deck-loading small { margin-top: 10px; color: var(--muted-2); font-size: 9.5px; }

.deck-error { min-height: 620px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 16px; background: var(--coral-soft); color: var(--coral); }
.error-icon svg { width: 25px; height: 25px; }
.deck-error h3 { margin: 0 0 6px; font-size: 19px; }
.deck-error p { margin: 0 0 18px; max-width: 400px; color: var(--muted); font-size: 12px; }

.deck-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.deck-title-wrap { min-width: 0; flex: 1; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 8.5px; font-weight: 600; letter-spacing: .3px; }
.badge svg { width: 11px; height: 11px; }
.badge-mint { color: var(--accent-deep); background: var(--accent-soft); }
.deck-title-input {
  display: block; width: 100%; margin: 7px 0 2px; padding: 1px 4px 2px 0;
  border: 0; border-bottom: 1px solid transparent;
  background: transparent; outline: none;
  color: var(--ink); font-size: 23px; font-weight: 700; line-height: 1.35; letter-spacing: -.4px;
}
.deck-title-input:hover { border-bottom-color: var(--line); }
.deck-title-input:focus { border-bottom-color: var(--accent); }
.deck-title-wrap p { margin: 2px 0 0; color: var(--muted); font-size: 10.5px; }
.deck-actions { display: flex; gap: 7px; flex: none; padding-top: 19px; }
.deck-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 0 12px; }
.deck-count { color: var(--muted); font-size: 10.5px; }
.deck-toolbar > div { display: flex; align-items: center; gap: 12px; }
.toolbar-tip { color: var(--muted-2); font-size: 9.5px; }

/* ---------- Slide grid ---------- */
.slide-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.slide-grid.theme-teal { --deck-primary: #0b3b45; --deck-primary-2: #11515d; --deck-accent: #27ae9e; --deck-accent-2: #8ce0d4; --deck-soft: #e8f5f3; --deck-bg: #f5f9f9; }
.slide-grid.theme-blue { --deck-primary: #102a4c; --deck-primary-2: #193b66; --deck-accent: #3c8dde; --deck-accent-2: #9ac7f5; --deck-soft: #eaf3fd; --deck-bg: #f5f8fc; }
.slide-grid.theme-warm { --deck-primary: #40332d; --deck-primary-2: #5a473d; --deck-accent: #d97b58; --deck-accent-2: #f0b49c; --deck-soft: #f8ede6; --deck-bg: #faf7f3; }
.slide-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #dfeaea;
  border-radius: 12px;
  background: var(--deck-bg, #f5f9f9);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s;
}
.slide-card:hover { transform: translateY(-2px); border-color: #b9dcd7; box-shadow: 0 13px 25px rgba(14,52,58,.1); }
.slide-card .slide-mini { position: absolute; inset: 0; padding: 7.5% 8%; display: flex; flex-direction: column; }
.slide-card.is-cover .slide-mini, .slide-card.is-section .slide-mini, .slide-card.is-summary .slide-mini, .slide-card.is-end .slide-mini { background: var(--deck-primary); color: #fff; }
.slide-card.is-cover .slide-mini::before, .slide-card.is-section .slide-mini::before, .slide-card.is-summary .slide-mini::before { content: ""; position: absolute; width: 45%; height: 85%; right: -13%; top: -34%; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.mini-kicker { display: flex; align-items: center; gap: 5px; color: var(--deck-accent); font-size: 6.5px; letter-spacing: 1.2px; font-weight: 700; }
.slide-card.is-cover .mini-kicker, .slide-card.is-section .mini-kicker, .slide-card.is-summary .mini-kicker { color: var(--deck-accent-2); }
.mini-title { position: relative; z-index: 1; margin: 5% 0 0; font-size: clamp(10px, 1.2vw, 15px); line-height: 1.35; font-weight: 700; letter-spacing: -.2px; }
.is-cover .mini-title { margin-top: 11%; font-size: clamp(14px, 1.75vw, 21px); max-width: 78%; }
.is-section .mini-title { margin-top: 7%; font-size: clamp(13px, 1.5vw, 18px); }
.mini-sub { margin-top: 3%; color: var(--muted); font-size: 6.5px; line-height: 1.45; max-width: 88%; }
.is-cover .mini-sub, .is-section .mini-sub, .is-summary .mini-sub { color: var(--deck-accent-2); }
.mini-bullets { display: flex; flex-direction: column; gap: 3.5%; margin-top: 6%; }
.mini-bullet { display: flex; gap: 5px; color: var(--ink-soft); font-size: clamp(6px, .58vw, 7.5px); line-height: 1.4; }
.mini-bullet i { width: 3px; height: 3px; margin-top: 4px; flex: none; border-radius: 50%; background: var(--deck-accent); }
.mini-cover-rule { width: 16%; height: 2px; margin-top: 7%; background: var(--deck-accent); }
.mini-footer { position: absolute; left: 8%; right: 8%; bottom: 6%; display: flex; justify-content: space-between; color: var(--muted-2); font-size: 5.5px; }
.is-cover .mini-footer, .is-section .mini-footer, .is-summary .mini-footer, .is-end .mini-footer { color: rgba(255,255,255,.45); }
.mini-number { position: absolute; right: 7%; top: 7%; color: rgba(255,255,255,.24); font-size: 22px; font-weight: 700; line-height: 1; }
.slide-card:not(.is-cover):not(.is-section):not(.is-summary):not(.is-end) .mini-number { color: var(--deck-soft); font-size: 25px; }
.slide-index { position: absolute; left: 7%; bottom: 7%; z-index: 2; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; background: rgba(255,255,255,.9); color: var(--ink-soft); font-size: 8px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.slide-actions { position: absolute; right: 6px; top: 6px; z-index: 5; display: flex; gap: 2px; padding: 3px; border-radius: 7px; background: rgba(255,255,255,.93); box-shadow: 0 3px 10px rgba(0,0,0,.1); opacity: 0; transform: translateY(-3px); transition: opacity .15s, transform .15s; }
.slide-card:hover .slide-actions { opacity: 1; transform: none; }
.slide-action { width: 23px; height: 23px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); }
.slide-action:hover { background: var(--accent-soft); color: var(--accent-deep); }
.slide-action.danger:hover { background: var(--danger-soft); color: var(--danger); }
.slide-action:disabled { opacity: .3; pointer-events: none; }
.slide-action svg { width: 12px; height: 12px; }
.add-slide-card { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed #c9dfdc; border-radius: 12px; background: rgba(255,255,255,.45); color: var(--muted); font-size: 10px; transition: background .16s, border-color .16s, color .16s; }
.add-slide-card:hover { background: var(--accent-soft-2); border-color: var(--accent); color: var(--accent-deep); }
.add-slide-card svg { width: 20px; height: 20px; }

/* ---------- Case ---------- */
.case-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(265px, .58fr); gap: 20px; align-items: start; }
.case-form-card { padding: 26px 28px; }
.privacy-banner { display: flex; gap: 11px; margin: 4px 0 19px; padding: 12px 14px; border: 1px solid #f1ddd4; border-radius: 11px; background: #fdf7f3; }
.privacy-banner > svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--coral); }
.privacy-banner div { display: flex; flex-direction: column; }
.privacy-banner strong { color: #8e513c; font-size: 10.5px; }
.privacy-banner span { margin-top: 2px; color: #967a6d; font-size: 9.5px; line-height: 1.55; }
.case-form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 3px; }
.case-side { display: flex; flex-direction: column; gap: 15px; position: sticky; top: 108px; }
.case-outline-card { padding: 22px; }
.case-outline-card h3 { margin: 3px 0 17px; font-size: 16px; }
.outline-steps { display: flex; flex-direction: column; gap: 0; }
.outline-steps > div { position: relative; display: flex; gap: 10px; padding-bottom: 17px; }
.outline-steps > div:last-child { padding-bottom: 0; }
.outline-steps > div::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 1px; background: var(--line); }
.outline-steps > div:last-child::before { display: none; }
.outline-steps > div > span { position: relative; z-index: 1; width: 21px; height: 21px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-size: 7.5px; font-weight: 700; }
.outline-steps strong { display: block; font-size: 11px; line-height: 1.45; }
.outline-steps small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; }
.outline-footer { display: flex; align-items: center; gap: 6px; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 8.5px; }
.outline-footer svg { width: 13px; height: 13px; color: var(--accent); }
.privacy-side-card { padding: 20px; background: linear-gradient(145deg,#fff,#f8fbfa); }
.privacy-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); }
.privacy-icon svg { width: 17px; height: 17px; }
.privacy-side-card h4 { margin: 10px 0 4px; font-size: 12.5px; }
.privacy-side-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.case-tip-card { padding: 18px 20px; border-left: 3px solid var(--amber); }
.case-tip-card span { color: var(--amber); font-size: 8.5px; font-weight: 700; letter-spacing: 1px; }
.case-tip-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.case-deck-panel { margin-top: 20px; padding: 25px 26px 26px; }
.case-loading-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(6,32,37,.45); backdrop-filter: blur(5px); }
.case-loading-card { width: min(410px, 100%); padding: 38px 30px; border-radius: 22px; background: #fff; text-align: center; box-shadow: var(--shadow-lg); }
.case-loading-card .ai-orbit { margin-left: auto; margin-right: auto; }
.case-loading-card h3 { margin: 0 0 6px; font-size: 19px; }
.case-loading-card p { margin: 0; color: var(--muted); font-size: 11.5px; }
.case-loading-card .loading-track { margin-left: auto; margin-right: auto; }
.case-loading-card small { display: block; margin-top: 9px; color: var(--muted-2); font-size: 9px; }

/* ---------- Settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.settings-card { padding: 24px; }
.settings-card .card-head { margin-bottom: 15px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 7px; background: #f3f7f7; color: var(--muted); font-size: 9px; font-weight: 600; }
.status-badge.is-online { background: var(--accent-soft); color: var(--accent-deep); }
.status-badge.is-offline { background: var(--danger-soft); color: var(--danger); }
.kv-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 17px; }
.kv-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 11px; }
.kv-list > div:first-child { border-top: 0; }
.kv-list span { color: var(--muted); }
.kv-list strong { color: var(--ink-soft); font-weight: 500; text-align: right; word-break: break-all; }
.settings-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.settings-actions-wrap { gap: 8px; }
.settings-copy { margin: 0 0 16px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.inline-result { margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: var(--accent-soft-2); color: var(--accent-deep); font-size: 10px; line-height: 1.55; }
.inline-result.error { background: var(--danger-soft); color: var(--danger); }
.version-chip { padding: 4px 8px; border-radius: 6px; background: #f2f6f6; color: var(--muted); font-size: 9px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 15px; }
.about-grid > div { display: grid; grid-template-columns: 18px 1fr; grid-template-rows: auto auto; column-gap: 8px; padding: 10px 11px; border-radius: 9px; background: var(--surface-soft); }
.about-grid svg { grid-row: 1 / 3; width: 16px; height: 16px; margin-top: 1px; color: var(--accent-deep); }
.about-grid strong { font-size: 10px; font-weight: 600; }
.about-grid span { color: var(--muted); font-size: 8.5px; }
.about-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 9px; }
.about-foot code { padding: 2px 5px; border-radius: 4px; background: #f1f6f5; color: var(--ink-soft); font-size: 9px; }
.dot-sep { color: var(--line-strong); }
.disclaimer-card { display: flex; gap: 12px; margin-top: 18px; padding: 16px 19px; border: 1px solid #f0e2d7; border-radius: 13px; background: #fdfaf6; }
.disclaimer-card svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--amber); }
.disclaimer-card p { margin: 0; color: #8a7869; font-size: 10.5px; line-height: 1.7; }
.disclaimer-card strong { color: #7c614e; }

/* ---------- Modal ---------- */
.modal-root:empty { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(5,30,35,.48); backdrop-filter: blur(5px); animation: fadeIn .18s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: min(610px, 100%); max-height: min(90vh, 820px); overflow: auto; border-radius: 20px; background: #fff; box-shadow: var(--shadow-lg); animation: modalIn .22s ease both; }
.modal-card.modal-wide { width: min(720px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 25px 0; }
.modal-head h3 { margin: 3px 0 0; font-size: 19px; }
.modal-head p { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; }
.modal-close { width: 31px; height: 31px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: #f4f8f8; color: var(--muted); }
.modal-close:hover { background: var(--danger-soft); color: var(--danger); }
.modal-close svg { width: 15px; height: 15px; }
.modal-body { padding: 19px 25px 4px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 17px 25px 23px; }
.modal-foot .btn-danger { margin-right: auto; }
.form-error { min-height: 17px; margin: 5px 0 0; color: var(--danger); font-size: 10px; }
.modal-section-label { margin: 4px 0 9px; color: var(--muted-2); font-size: 9px; font-weight: 600; letter-spacing: 1px; }
.bullet-editor { min-height: 145px !important; }
.layout-help { margin: 4px 0 0; color: var(--muted-2); font-size: 9px; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: flex; flex-direction: column; gap: 9px; width: min(370px, calc(100vw - 30px)); pointer-events: none; }
.toast { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; padding: 13px 13px 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.97); box-shadow: 0 16px 38px rgba(9,42,49,.16); pointer-events: auto; animation: toastIn .24s ease both; }
.toast.is-leaving { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
.toast-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-deep); }
.toast-icon svg { width: 15px; height: 15px; }
.toast.is-error .toast-icon { background: var(--danger-soft); color: var(--danger); }
.toast.is-warning .toast-icon { background: var(--amber-soft); color: var(--amber); }
.toast-content strong { display: block; font-size: 11.5px; line-height: 1.4; }
.toast-content p { margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.toast-close { border: 0; background: transparent; color: var(--muted-2); padding: 2px; }
.toast-close svg { width: 13px; height: 13px; }

/* ---------- Misc ---------- */
.section-hint { color: var(--muted); font-size: 10px; }
.mobile-backdrop { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .content { padding-left: 26px; padding-right: 26px; }
  .topbar { padding-left: 26px; padding-right: 26px; }
  .hero { padding: 32px 34px; }
  .hero h2 { font-size: 34px; }
  .workspace-grid { grid-template-columns: 340px minmax(0,1fr); }
  .case-layout { grid-template-columns: minmax(0,1.45fr) minmax(245px,.55fr); }
  .tool-copy small { white-space: normal; }
}

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .home-grid { grid-template-columns: 1fr; }
  .quick-tools { grid-template-columns: 1fr 1fr; }
  .tool-todo { grid-column: 1 / -1; }
  .workspace-grid { grid-template-columns: 1fr; }
  .composer { position: static; }
  .deck-panel { min-height: 560px; }
  .deck-empty, .deck-loading, .deck-error { min-height: 480px; }
  .case-layout { grid-template-columns: 1fr; }
  .case-side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .case-tip-card { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar: 246px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(3,26,31,.2); }
  body.nav-open .sidebar { transform: none; }
  .sidebar-close { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.06); }
  .sidebar-close svg { width: 16px; height: 16px; }
  .mobile-backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(4,26,31,.4); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.nav-open .mobile-backdrop { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .mobile-menu { display: flex; }
  .topbar { min-height: 78px; padding: 13px 20px; }
  .content { padding: 22px 20px 46px; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { min-height: 150px; margin-top: 8px; }
  .hero-pulse { bottom: 0; opacity: .45; }
  .next-event-card { position: relative; right: auto; bottom: auto; margin-top: 22px; width: min(300px, 100%); }
  .hero-ring-1 { right: -110px; }
  .hero-ring-2 { right: -55px; }
  .todo-layout { grid-template-columns: 1fr; }
  .todo-side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .side-link-card { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .top-clock { display: none; }
  .btn-quick span { display: none; }
  .btn-quick { width: 41px; padding: 0; }
  .page-heading h1 { font-size: 20px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .hero { padding: 27px 24px; border-radius: 20px; }
  .hero h2 { font-size: 29px; }
  .hero-quote { margin: 16px 0 19px; font-size: 11.5px; }
  .hero-actions .btn { min-height: 37px; padding: 0 13px; font-size: 11.5px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 13px; gap: 10px; }
  .stat-icon { width: 37px; height: 37px; border-radius: 10px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat-card strong { font-size: 22px; }
  .home-panel { padding: 19px 17px; }
  .quick-tools { grid-template-columns: 1fr; }
  .tool-todo { grid-column: auto; }
  .page-intro { flex-direction: column; gap: 12px; }
  .page-intro .btn { width: 100%; }
  .metric-strip { grid-template-columns: 1fr 1fr; gap: 0; padding: 4px 0; }
  .metric-item { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .metric-item:nth-child(2n) { border-right: 0; }
  .metric-item:nth-last-child(-n+2) { border-bottom: 0; }
  .schedule-panel { padding: 16px 14px 12px; }
  .toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding: 0 8px; }
  .schedule-row { grid-template-columns: 62px 18px minmax(0, 1fr); gap: 0 7px; padding: 14px 0; }
  .schedule-actions { grid-column: 3; opacity: 1; margin-top: 3px; justify-content: flex-end; }
  .schedule-actions .mini-icon-btn { width: 27px; height: 27px; }
  .schedule-time strong { font-size: 13px; }
  .todo-main { padding: 17px 14px; }
  .quick-add { flex-wrap: wrap; }
  .quick-input-wrap { flex-basis: 100%; }
  .quick-add select { flex: 1; }
  .quick-add .btn { flex: 0 0 auto; }
  .todo-side { grid-template-columns: 1fr; }
  .side-link-card { grid-column: auto; }
  .composer { padding: 19px 16px; }
  .deck-panel, .case-deck-panel { padding: 18px 14px; }
  .deck-head { flex-direction: column; }
  .deck-actions { width: 100%; padding-top: 0; }
  .deck-actions .btn { flex: 1; }
  .deck-title-input { font-size: 19px; }
  .slide-grid { grid-template-columns: 1fr; gap: 11px; }
  .slide-card { border-radius: 10px; }
  .mini-title { font-size: 14px; }
  .is-cover .mini-title { font-size: 20px; }
  .deck-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .deck-toolbar > div { width: 100%; justify-content: space-between; }
  .empty-visual { transform: scale(.88); margin-bottom: 18px; }
  .deck-empty h3 { font-size: 19px; }
  .empty-steps { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .case-form-card { padding: 20px 16px; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .case-side { grid-template-columns: 1fr; }
  .case-tip-card { grid-column: auto; }
  .case-form-actions { flex-direction: column-reverse; }
  .case-form-actions .btn { width: 100%; }
  .settings-card { padding: 19px 16px; }
  .about-grid { grid-template-columns: 1fr; }
  .toast-stack { right: 12px; bottom: 12px; }
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal-card { max-height: 92vh; border-radius: 18px; }
  .modal-head { padding: 19px 18px 0; }
  .modal-body { padding: 16px 18px 4px; }
  .modal-foot { padding: 14px 18px 18px; }
  .modal-foot .btn { flex: 1; }
  .modal-foot .btn-danger { flex: none; margin-right: auto; }
}

@media (max-width: 420px) {
  .content { padding-left: 13px; padding-right: 13px; }
  .topbar { padding-left: 13px; padding-right: 13px; }
  .hero h2 { font-size: 25px; }
  .stat-card small { display: none; }
  .metric-item { padding: 11px 12px; }
  .settings-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
