/* AweSome Trainer — trainer web view mock (static). Tokens mirror pt_center src/styles/tokens.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --color-primary: #FF6B35;
  --color-primary-hover: #E85A20;
  --color-primary-dark: #C44A18;
  --color-on-primary: #FFFFFF;
  --color-primary-soft: rgba(255, 107, 53, 0.16);
  --color-primary-ink: #ffb18c;
  --color-surface: #0D0F14;
  --color-surface-alt: #1A1D26;
  --color-surface-raised: #22263A;
  --color-surface-inset: #0F1219;
  --color-border: #2D3147;
  --color-text: #FFFFFF;
  --color-text-muted: #8892A4;
  --color-error: #FF4757;
  --color-error-bg: #2A1018;
  --color-success: #2ED573;
  --color-success-bg: #0D2A1A;
  --color-warning: #FFA502;
  --color-warning-bg: rgba(255, 165, 2, 0.10);
  --color-info: #2979FF;
  --color-info-bg: rgba(41, 121, 255, 0.1);
  --color-info-pill-ink: #7fb0ff;
  --violet: #8B5CF6;
  --violet-ink: #C8B6F2;
  --teal: #14B8A6;
  --cobalt: #3B82F6;
  --font-family: 'Inter', system-ui, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 8px 48px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-family);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; color: inherit; background: none; border: 0; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Shell ───────────────────────────────────────── */
.screen-bg {
  position: fixed; inset: 0;
  background: url('assets/background_web.jpg') center / cover no-repeat;
}
.screen-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.shell { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100vh; }

.topbar {
  height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 12px;
  padding: 0 20px; background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border);
}
.topbar .spacer { flex: 1; }
.search { white-space: nowrap;
  display: flex; align-items: center; gap: 8px; width: 320px; height: 36px; padding: 0 12px;
  background: var(--color-surface-inset); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  color: var(--color-text-muted); font-size: 13px;
}
.search kbd { margin-left: auto; font: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid var(--color-border); border-radius: 4px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--radius-md); color: var(--color-text-muted); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--color-surface-raised); color: var(--color-text); }
.bell-badge {
  position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--color-primary); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}
.me-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: var(--radius-full); }
.me-chip:hover { background: var(--color-surface-raised); }
.me-chip .who { line-height: 1.2; }
.me-chip .who b { display: block; font-size: 13px; }
.me-chip .who span { font-size: 11px; color: var(--color-text-muted); }

.body { flex: 1; display: flex; min-height: 0; }

.sidebar {
  width: 240px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--color-surface-alt); border-right: 1px solid var(--color-border);
}
.brand { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 18px; border-bottom: 1px solid var(--color-border); }
.brand img { height: 30px; }
.brand .collapse { color: var(--color-text-muted); }
.nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 18px;
  color: var(--color-text-muted); font-weight: 600; font-size: 15px; transition: background .15s, color .15s;
}
.nav a svg { flex-shrink: 0; }
.nav a:hover { color: var(--color-text); background: rgba(255,255,255,0.03); }
.nav a.active { color: var(--color-text); background: var(--color-surface-raised); }
.nav a.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--color-primary); }
.nav .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--color-primary-soft); color: var(--color-primary-ink); font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.nav .count.hot { background: var(--color-primary); color: #fff; }
.nav hr { border: 0; border-top: 1px solid var(--color-border); margin: 10px 16px; }
.side-foot { border-top: 1px solid var(--color-border); padding: 12px 18px 14px; }
.side-foot .ver { font-size: 11px; color: var(--color-text-muted); margin-bottom: 8px; }
.side-foot a { display: flex; align-items: center; gap: 14px; color: var(--color-text-muted); font-weight: 600; font-size: 15px; }
.side-foot a:hover { color: var(--color-text); }

.main { flex: 1; overflow-y: auto; position: relative; }
.main::-webkit-scrollbar, .scroll::-webkit-scrollbar { width: 8px; }
.main::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
.page { padding: 28px 28px 80px; max-width: 1120px; animation: pageIn .28s ease both; }
.page.wide { max-width: none; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Typography / headers ────────────────────────── */
.crumbs { font-size: 13px; color: var(--color-text-muted); margin-bottom: 6px; }
.crumbs a:hover { color: var(--color-text); }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; line-height: 1.2; font-weight: 700; }
.page-head p { color: var(--color-text-muted); margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
h2.section { font-size: 18px; font-weight: 700; margin: 26px 0 12px; }
.muted { color: var(--color-text-muted); }
.small { font-size: 12px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--radius-md); border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:active { transform: scale(.98); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn.primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn.secondary { color: var(--color-primary); border-color: var(--color-primary); }
.btn.secondary:hover { background: rgba(255, 107, 53, 0.1); }
.btn.ghost { color: var(--color-text-muted); }
.btn.ghost:hover { color: var(--color-text); background: var(--color-surface-raised); }
.btn.danger { color: var(--color-error); border-color: rgba(255,71,87,.4); }
.btn.danger:hover { background: var(--color-error-bg); }
.btn.warn-pill { height: 34px; border-radius: var(--radius-full); border-color: var(--color-warning); color: var(--color-text); background: rgba(13,15,20,.6); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--color-warning); }

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 20px 22px;
}
.card.pad-lg { padding: 24px; }
.card h3 { font-size: 17px; font-weight: 700; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .link { margin-left: auto; color: var(--color-primary); font-weight: 600; font-size: 13px; }
.card-head .link:hover { text-decoration: underline; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g-21 { grid-template-columns: 2fr 1fr; }

.stat { padding: 18px 18px 16px; }
.stat .eyebrow { font-size: 12px; }
.stat .num { font-size: 32px; font-weight: 700; margin-top: 6px; line-height: 1.1; }
.stat .delta { font-size: 12px; margin-top: 6px; color: var(--color-success); }
.stat .delta.down { color: var(--color-error); }

/* ── Avatars, badges, pills ──────────────────────── */
.av {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; font-size: 14px; color: #fff;
}
.av.sm { width: 32px; height: 32px; font-size: 12px; }
.av.lg { width: 64px; height: 64px; font-size: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.badge.info { background: var(--color-info-bg); color: var(--color-info-pill-ink); border-color: rgba(41,121,255,.45); }
.badge.err { background: var(--color-error-bg); color: #ff8a94; border-color: rgba(255,71,87,.45); }
.badge.err::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--color-error); }
.badge.ok { background: var(--color-success-bg); color: var(--color-success); border-color: rgba(46,213,115,.35); }
.badge.warn { background: var(--color-warning-bg); color: #f5c87a; border-color: rgba(255,165,2,.35); }
.badge.violet { background: rgba(139,92,246,.18); color: var(--violet-ink); border-color: rgba(139,92,246,.45); }
.badge.ember { background: var(--color-primary-soft); color: var(--color-primary-ink); border-color: rgba(255,107,53,.4); }
.badge.neutral { background: var(--color-surface-raised); color: var(--color-text-muted); }

.bar { height: 6px; border-radius: 3px; background: var(--color-surface-inset); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--color-primary); }

/* ── Lists / rows ────────────────────────────────── */
.row-list > * + * { border-top: 1px solid var(--color-border); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.row .grow { flex: 1; min-width: 0; }
.row b { font-weight: 600; }
.row.click { cursor: pointer; border-radius: 6px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.row.click:hover { background: var(--color-surface-raised); }
.chev { color: var(--color-text-muted); }

/* ── Forms ───────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input, .select, textarea.input {
  height: 44px; padding: 0 14px; border-radius: var(--radius-md); border: 1px solid var(--color-border);
  background: var(--color-surface-inset); font-size: 15px; outline: none; transition: border-color .15s;
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; font-size: 14px; }
.input:focus, .select:focus { border-color: var(--color-primary); }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, #8892A4 50%), linear-gradient(135deg, #8892A4 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.toggle { position: relative; width: 44px; height: 24px; border-radius: 12px; background: var(--color-border); transition: background .2s; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle.on { background: var(--color-primary); }
.toggle.on::after { transform: translateX(20px); }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--color-surface-inset); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.seg button { height: 32px; padding: 0 14px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--color-text-muted); }
.seg button.on { background: var(--color-primary); color: #fff; }

/* ── Tabs ────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin-bottom: 18px; }
.tabs button { position: relative; padding: 10px 14px 12px; font-weight: 600; color: var(--color-text-muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.tabs button:hover { color: var(--color-text); }
.tabs button.on { color: var(--color-text); }
.tabs button.on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--color-primary); border-radius: 2px; }
.tabs .n { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--color-surface-raised); color: var(--color-text-muted); }
.tabs button.on .n { background: var(--color-primary-soft); color: var(--color-primary-ink); }

/* ── Tables ──────────────────────────────────────── */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
table.t td { padding: 12px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: rgba(34,38,58,.6); }
.num-cell { font-variant-numeric: tabular-nums; }

/* ── Dashboard specifics ─────────────────────────── */
.chart { height: 230px; display: flex; align-items: flex-end; gap: 10px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .col i { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #FF8A5C, var(--color-primary)); }
.chart .col i.dim { background: var(--color-surface-raised); }
.chart .col span { font-size: 11px; color: var(--color-text-muted); }
.chart .col em { font-style: normal; font-size: 11px; font-weight: 700; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick button {
  height: 72px; border-radius: var(--radius-md); background: var(--color-surface-inset); border: 1px solid var(--color-border);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 13px;
  transition: border-color .15s, background .15s;
}
.quick button:hover { border-color: var(--color-primary); background: rgba(255,107,53,.06); }
.quick button svg { color: var(--color-primary); }
.notif { display: flex; gap: 12px; padding: 10px 0; }
.notif .ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.notif p { font-size: 13px; }
.notif time { font-size: 11px; color: var(--color-text-muted); }
.notif.unread p { font-weight: 600; }

/* ── Plans ───────────────────────────────────────── */
.plan-card { position: relative; padding: 18px 20px 16px 24px; cursor: pointer; transition: border-color .15s, transform .15s; overflow: hidden; }
.plan-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--color-primary)); }
.plan-card:hover { border-color: var(--c, var(--color-primary)); transform: translateY(-1px); }
.plan-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.plan-card .meta { display: flex; gap: 14px; font-size: 12px; color: var(--color-text-muted); margin-top: 12px; }
.plan-card p { font-size: 13px; color: var(--color-text-muted); }

.editor { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.days button {
  width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid transparent;
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; color: var(--color-text-muted);
}
.days button b { color: var(--color-text); font-size: 14px; }
.days button span { font-size: 12px; }
.days button:hover { background: var(--color-surface-raised); }
.days button.on { background: var(--color-surface-raised); border-color: var(--color-primary); }
.ex { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-inset); margin-bottom: 12px; }
.ex-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--color-border); }
.ex-head .thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--color-surface-raised); display: grid; place-items: center; color: var(--color-text-muted); }
.ex-head b { font-size: 15px; }
.ex-sets { display: grid; grid-template-columns: 50px 1fr 1fr 1fr 1fr 32px; gap: 8px; padding: 10px 14px 12px; align-items: center; }
.ex-sets .h { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-muted); }
.ex-sets .cell { height: 34px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface-alt); display: flex; align-items: center; padding: 0 10px; font-variant-numeric: tabular-nums; font-size: 14px; }
.ex-sets .cell input { width: 100%; background: none; border: 0; outline: none; font-size: 14px; }
.ex-sets .idx { font-weight: 700; color: var(--color-text-muted); text-align: center; }
.swatches { display: flex; gap: 8px; }
.swatches i { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.swatches i.on { border-color: #fff; box-shadow: 0 0 0 2px var(--color-surface-alt) inset; }

/* ── Check-ins ───────────────────────────────────── */
.ci-wrap { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.ci-item { padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface-alt); cursor: pointer; margin-bottom: 10px; transition: border-color .15s, background .15s; }
.ci-item:hover { border-color: #3d4363; }
.ci-item.on { border-color: var(--color-primary); background: linear-gradient(90deg, rgba(255,107,53,.08), var(--color-surface-alt) 60%); }
.ci-item .top { display: flex; gap: 12px; align-items: center; }
.ci-item .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ci-item .comp { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--color-text-muted); }
.ci-item .comp .bar { flex: 1; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer { padding: 12px 14px; border-radius: var(--radius-md); background: var(--color-surface-inset); border: 1px solid var(--color-border); }
.answer .q { font-size: 12px; color: var(--color-text-muted); margin-bottom: 4px; }
.answer .a { font-weight: 600; }
.scale { display: flex; gap: 4px; margin-top: 4px; }
.scale i { width: 22px; height: 6px; border-radius: 3px; background: var(--color-border); }
.scale i.on { background: var(--color-primary); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo {
  aspect-ratio: 3 / 4; border-radius: var(--radius-md); border: 1px solid var(--color-border); overflow: hidden; position: relative;
  background: repeating-linear-gradient(45deg, rgba(136,146,164,.14) 0 6px, transparent 6px 14px), var(--color-surface-raised);
  display: grid; place-items: center; color: var(--color-text-muted); font-size: 12px; cursor: zoom-in;
}
.photo svg { opacity: .6; }
.photo span { position: absolute; bottom: 8px; left: 8px; font-size: 11px; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 10px; color: #fff; }
.trend { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.trend i { flex: 1; background: var(--cobalt); border-radius: 3px 3px 0 0; opacity: .85; }

/* ── Messages ────────────────────────────────────── */
.msg-wrap { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 56px); }
.msg-list { border-right: 1px solid var(--color-border); background: rgba(26,29,38,.92); overflow-y: auto; }
.msg-list .head { padding: 18px 18px 12px; }
.conv { display: flex; gap: 12px; padding: 12px 18px; cursor: pointer; border-left: 3px solid transparent; }
.conv:hover { background: var(--color-surface-raised); }
.conv.on { background: var(--color-surface-raised); border-left-color: var(--color-primary); }
.conv .grow { flex: 1; min-width: 0; }
.conv .l1 { display: flex; justify-content: space-between; gap: 8px; }
.conv .l1 time { font-size: 11px; color: var(--color-text-muted); }
.conv .prev { font-size: 13px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .unread { min-width: 18px; height: 18px; border-radius: 9px; background: var(--color-primary); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.presence { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--color-surface-alt); position: absolute; right: -1px; bottom: -1px; }
.chat { display: flex; flex-direction: column; min-height: 0; background: rgba(13,15,20,.55); }
.chat-head { height: 68px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid var(--color-border); background: rgba(26,29,38,.92); }
.chat-body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 60%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.bubble.them { background: var(--color-surface-raised); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.me { background: var(--color-primary); border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble time { display: block; font-size: 10px; opacity: .7; margin-top: 4px; }
.day-sep { align-self: center; font-size: 11px; color: var(--color-text-muted); padding: 4px 10px; border-radius: 10px; background: var(--color-surface-alt); }
.chat-input { flex-shrink: 0; display: flex; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--color-border); background: rgba(26,29,38,.92); }
.chat-input input { flex: 1; }

/* ── Overlays ────────────────────────────────────── */
.fab {
  position: fixed; right: 24px; bottom: 24px; width: 60px; height: 60px; border-radius: 50%; z-index: 40;
  background: var(--color-primary); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(255,107,53,.35);
  transition: transform .15s, background .15s;
}
.fab:hover { transform: scale(1.05); background: var(--color-primary-hover); }
.ai-panel {
  position: fixed; right: 24px; bottom: 96px; width: 380px; height: 480px; z-index: 41;
  background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal); display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right; transform: scale(.92) translateY(10px); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s;
}
.ai-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.ai-panel .ai-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--color-border); }
.ai-panel .ai-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-panel .bubble { max-width: 86%; font-size: 13px; }
.ai-panel .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-panel .chips button { font-size: 12px; padding: 6px 10px; border-radius: 14px; border: 1px solid var(--color-border); color: var(--color-text-muted); }
.ai-panel .chips button:hover { border-color: var(--color-primary); color: var(--color-text); }
.ai-panel .ai-foot { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--color-border); }
.ai-panel .ai-foot input { flex: 1; height: 40px; font-size: 13px; }

.dropdown {
  position: absolute; top: 52px; right: 64px; width: 360px; z-index: 50;
  background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-modal);
  padding: 8px 16px 12px; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.dropdown.open { opacity: 1; transform: none; pointer-events: auto; }

.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: none; place-items: center; animation: fade .15s; }
.modal-back.open { display: grid; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 520px; max-width: calc(100vw - 40px); background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); padding: 24px; animation: pageIn .2s; }
.modal h3 { font-size: 20px; margin-bottom: 6px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.toast-host { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--color-surface-raised); border: 1px solid var(--color-border); border-left: 3px solid var(--color-success); box-shadow: var(--shadow-card); font-weight: 600; font-size: 14px; animation: toastIn .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }
body.on-messages .fab { bottom: 92px; }
