/* ============ Presse Corepack Dashboard — Design-System ============
   Apple-Widget-Sprache: großzügige Radien, weiche Tiefe, ein Akzent (LGS-Navy),
   Status-Farben nur für Status. Geteilt über alle Modul-Seiten. */

@font-face{
  font-family:"Plex Sans"; font-weight:400 700; font-style:normal;
  src:url("fonts/sans.woff2") format("woff2");
  unicode-range:U+0000-00FF;
}
@font-face{
  font-family:"Plex Mono"; font-weight:400; font-style:normal;
  src:url("fonts/mono400.woff2") format("woff2");
  unicode-range:U+0000-00FF;
}
@font-face{
  font-family:"Plex Mono"; font-weight:500; font-style:normal;
  src:url("fonts/mono500.woff2") format("woff2");
  unicode-range:U+0000-00FF;
}
@font-face{
  font-family:"Plex Mono"; font-weight:600; font-style:normal;
  src:url("fonts/mono600.woff2") format("woff2");
  unicode-range:U+0000-00FF;
}

:root{
  color-scheme:light;
  --page:#F3F5FA; --card:#FFFFFF; --card-raised:#FFFFFF;
  --ink:#0F1626; --ink-2:#46516A; --muted:#7C879C;
  --grid:#E3E7F1; --baseline:#C9D1E2; --border:rgba(16,24,40,.10);
  --accent:#2C4A7C; --accent-ink:#ffffff; --accent-wash:rgba(44,74,124,.08);
  --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --s5:#e87ba4; --s6:#008300;
  --good:#0ca30c; --warn:#fab219; --crit:#d03b3b;
  --good-ink:#0b6b0b; --warn-ink:#8a5a00; --crit-ink:#ffffff;
  --agent:#6a53c9; --agent-wash:rgba(106,83,201,.10);
  --glass-bg: rgba(255,255,255,.6); --glass-border: rgba(255,255,255,.5); --glass-shadow: 0 8px 32px rgba(16,24,40,.10);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow-md: 0 6px 18px rgba(16,24,40,.07);
  --shadow-lg: 0 16px 40px rgba(16,24,40,.12);
  --r-xs:8px; --r-sm:10px; --r-md:16px; --r-lg:20px; --r-xl:22px;

  /* Typo-Skala — 6 Stufen statt vorher 14 Ad-hoc-Werte */
  --text-2xs:11px; --text-xs:12.5px; --text-sm:13.5px;
  --text-md:15.5px; --text-lg:19px; --text-xl:26px; --text-display:32px;
  --lh-tight:1.3; --lh-normal:1.5; --lh-loose:1.65;

  /* Spacing-Skala — 4px-Basis */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:24px; --space-6:32px; --space-7:48px;

  /* Icon-System — 20px/1.6px-Stroke, einheitlich für Nav + Widgets */
  --icon-size:20px; --icon-stroke:1.6px;
}
@media (prefers-color-scheme: dark){
  :root:where(:not([data-theme="light"])){
    color-scheme:dark;
    --page:#0A0E17; --card:#121826; --card-raised:#161D2E;
    --ink:#F2F4F9; --ink-2:#B7C0D6; --muted:#8892A8;
    --grid:#212940; --baseline:#2B3450; --border:rgba(255,255,255,.10);
    --accent:#7CA6E8; --accent-ink:#0A0E17; --accent-wash:rgba(124,166,232,.15);
    --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#2fae2f;
    --good:#0ca30c; --warn:#fab219; --crit:#e66767;
    --good-ink:#5fe25f; --warn-ink:#ffcf6b; --crit-ink:#161d2e;
    --agent:#a495f2; --agent-wash:rgba(164,149,242,.18);
    --glass-bg: rgba(22,29,46,.55); --glass-border: rgba(255,255,255,.08); --glass-shadow: 0 8px 32px rgba(0,0,0,.4);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
    --shadow-md: 0 8px 22px rgba(0,0,0,.35);
    --shadow-lg: 0 20px 48px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --page:#0A0E17; --card:#121826; --card-raised:#161D2E;
  --ink:#F2F4F9; --ink-2:#B7C0D6; --muted:#8892A8;
  --grid:#212940; --baseline:#2B3450; --border:rgba(255,255,255,.10);
  --accent:#7CA6E8; --accent-ink:#0A0E17; --accent-wash:rgba(124,166,232,.15);
  --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#2fae2f;
  --good:#0ca30c; --warn:#fab219; --crit:#e66767;
  --good-ink:#5fe25f; --warn-ink:#ffcf6b; --crit-ink:#161d2e;
  --agent:#a495f2; --agent-wash:rgba(164,149,242,.18);
  --glass-bg: rgba(22,29,46,.55); --glass-border: rgba(255,255,255,.08); --glass-shadow: 0 8px 32px rgba(0,0,0,.4);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --shadow-md: 0 8px 22px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 48px rgba(0,0,0,.45);
}
:root[data-theme="light"]{
  color-scheme:light;
  --page:#F3F5FA; --card:#FFFFFF; --card-raised:#FFFFFF;
  --ink:#0F1626; --ink-2:#46516A; --muted:#7C879C;
  --grid:#E3E7F1; --baseline:#C9D1E2; --border:rgba(16,24,40,.10);
  --accent:#2C4A7C; --accent-ink:#ffffff; --accent-wash:rgba(44,74,124,.08);
  --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --s5:#e87ba4; --s6:#008300;
  --good:#0ca30c; --warn:#fab219; --crit:#d03b3b;
  --good-ink:#0b6b0b; --warn-ink:#8a5a00; --crit-ink:#ffffff;
  --agent:#6a53c9; --agent-wash:rgba(106,83,201,.10);
  --glass-bg: rgba(255,255,255,.6); --glass-border: rgba(255,255,255,.5); --glass-shadow: 0 8px 32px rgba(16,24,40,.10);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow-md: 0 6px 18px rgba(16,24,40,.07);
  --shadow-lg: 0 16px 40px rgba(16,24,40,.12);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:"Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 600px at 90% -10%, var(--accent-wash), transparent 60%),
    var(--page);
  color:var(--ink);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none;}
button{font-family:inherit;}
code, .mono{font-family:"Plex Mono", ui-monospace, monospace;}
::selection{background:var(--accent); color:var(--accent-ink);}

.tabular{font-variant-numeric:tabular-nums;}

/* ============ App shell ============ */
.app-shell{display:flex; min-height:100vh;}

.sidebar{
  width:248px; flex:none;
  background:var(--card);
  border-right:1px solid var(--border);
  display:flex; flex-direction:column;
  padding:26px 16px 20px;
  position:sticky; top:0; height:100vh; overflow-y:auto;
}
.sidebar .wordmark{font-size:var(--text-md); font-weight:600; padding:0 var(--space-2); margin:0 0 2px;}
.sidebar .team{font-size:var(--text-xs); color:var(--muted); padding:0 var(--space-2); margin:0 0 var(--space-5);}
.nav{display:flex; flex-direction:column; gap:var(--space-1);}
.nav-item{
  display:flex; align-items:center; gap:var(--space-2);
  padding:9px var(--space-2); border-radius:var(--r-sm);
  font-size:var(--text-sm); font-weight:500; color:var(--ink-2);
}
.nav-item .nav-icon{
  width:var(--icon-size); height:var(--icon-size); flex:none;
  display:flex; align-items:center; justify-content:center;
}
.nav-item .nav-icon svg{width:100%; height:100%;}
.nav-item[aria-current="page"]{background:var(--accent-wash); color:var(--ink); font-weight:600;}
.nav-item:hover{background:var(--accent-wash);}
.nav-item .badge-dot{
  margin-left:auto; width:8px; height:8px; border-radius:50%; background:var(--crit); display:none;
}
.nav-item.has-badge .badge-dot{display:block;}

.toni-sidebar-btn{
  margin-top:var(--space-3); display:flex; align-items:center; gap:var(--space-2); text-align:left;
  padding:11px var(--space-3); border-radius:var(--r-md); border:1px solid var(--border);
  background:linear-gradient(180deg, var(--accent-wash), transparent); cursor:pointer;
  font:inherit; color:var(--ink);
}
.toni-sidebar-btn:hover{border-color:var(--accent);}
.toni-sidebar-icon{
  width:30px; height:30px; border-radius:var(--r-xs); background:var(--accent); color:var(--accent-ink); flex:none;
  display:flex; align-items:center; justify-content:center;
}
.toni-sidebar-icon svg{width:16px; height:16px;}
.toni-sidebar-text{display:flex; flex-direction:column; line-height:var(--lh-tight);}
.toni-sidebar-text strong{font-size:var(--text-sm);}
.toni-sidebar-text span{font-size:var(--text-2xs); color:var(--muted);}

.sidebar-foot{margin-top:auto; padding:var(--space-2); font-size:var(--text-xs); color:var(--muted); line-height:var(--lh-normal);}
.sidebar-foot a{color:var(--accent); text-decoration:underline;}

.main{flex:1; min-width:0; padding:var(--space-6) var(--space-7) 60px; max-width:1320px;}

/* ============ Topbar ============ */
.topbar{display:flex; align-items:center; gap:var(--space-4); margin-bottom:var(--space-5);}
.topbar h1{font-size:var(--text-xl); font-weight:600; margin:0 0 2px; letter-spacing:-0.01em;}
.topbar .subhead{font-size:var(--text-sm); color:var(--muted); margin:0;}
.avatars{display:flex; margin-left:auto;}
.avatar{
  width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:var(--text-sm); font-weight:600;
  border:2px solid var(--card); margin-left:-10px;
}
.avatar:first-child{margin-left:0;}
.theme-toggle{
  margin-left:var(--space-3); width:36px; height:36px; border-radius:50%;
  border:1px solid var(--border); background:var(--card); cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:var(--text-md);
}

/* ============ Glass utility — chrome only, never data ============ */
.glass{
  background:var(--glass-bg);
  backdrop-filter:blur(20px) saturate(1.4);
  -webkit-backdrop-filter:blur(20px) saturate(1.4);
  border:1px solid var(--glass-border);
  box-shadow:var(--glass-shadow);
}

.briefing{
  border-radius:var(--r-xl);
  padding:var(--space-5) var(--space-6);
  margin-bottom:var(--space-5);
  background:var(--accent);
  color:#fff;
  box-shadow:0 14px 34px -10px rgba(44,74,124,.45);
}
:root[data-theme="dark"] .briefing{ box-shadow:0 14px 34px -10px rgba(0,0,0,.55); }
@media (prefers-color-scheme:dark){
  :root:where(:not([data-theme="light"])) .briefing{ box-shadow:0 14px 34px -10px rgba(0,0,0,.55); }
}
.briefing .eyebrow{font-size:var(--text-xs); font-weight:600; opacity:.75; margin:0 0 6px; text-transform:uppercase; letter-spacing:.04em;}
.briefing h2{font-size:var(--text-xl); font-weight:600; margin:0 0 4px; letter-spacing:-0.01em;}
.briefing p{font-size:var(--text-md); line-height:var(--lh-normal); margin:0;}
.badge-lg{
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(255,255,255,.16); border-radius:999px;
  padding:5px var(--space-3); font-size:var(--text-xs); font-weight:600; margin-right:var(--space-2);
}

/* ============ Widget grid ============ */
.widget-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(190px,1fr)); gap:var(--space-4); margin-bottom:var(--space-6);}
.widget{
  background:var(--card); border-radius:var(--r-lg); border:1px solid var(--border);
  box-shadow:var(--shadow-md); padding:var(--space-4); display:flex; flex-direction:column; gap:var(--space-3);
}
.widget .icon-row{display:flex; align-items:center; gap:var(--space-2);}
.widget .icon{
  width:30px; height:30px; border-radius:var(--r-xs); flex:none;
  display:flex; align-items:center; justify-content:center;
}
.widget .icon svg{width:var(--icon-size); height:var(--icon-size);}
.widget .trend{margin-left:auto; font-size:var(--text-xs); font-weight:600;}
.widget .value{font-size:var(--text-display); font-weight:700; letter-spacing:-0.01em;}
.widget .label{font-size:var(--text-sm); font-weight:600;}
.widget .caption{font-size:var(--text-xs); color:var(--muted);}

/* ============ Generic content cards ============ */
.card{
  background:var(--card); border-radius:var(--r-lg); border:1px solid var(--border);
  box-shadow:var(--shadow-sm); padding:var(--space-5); margin-bottom:var(--space-4);
}
.card > h2{font-size:var(--text-lg); font-weight:600; margin:0 0 var(--space-3);}
.card > h2 .count{color:var(--muted); font-weight:500; font-size:var(--text-sm); margin-left:6px;}

.chart-card{display:grid; grid-template-columns:repeat(2,1fr); gap:var(--space-5);}

/* ============ Item list / accordion (Arbeitspakete, Risiken) ============ */
.toolbar{display:flex; gap:var(--space-2); flex-wrap:wrap; margin-bottom:var(--space-3);}
.toolbar select, .toolbar input{
  font:inherit; font-size:var(--text-sm); padding:7px var(--space-2); border-radius:var(--r-sm);
  border:1px solid var(--border); background:var(--page); color:var(--ink);
}
.item-list{display:flex; flex-direction:column; gap:var(--space-2);}
.item-row{
  border:1px solid var(--border); border-radius:var(--r-md); background:var(--card);
  overflow:hidden;
}
.item-row.neu{border-left:3px solid var(--crit);}
.item-row summary{
  list-style:none; cursor:pointer; padding:13px var(--space-4);
  display:flex; align-items:center; gap:var(--space-3); flex-wrap:wrap;
}
.item-row summary::-webkit-details-marker{display:none;}
.item-row .nr{font-family:"Plex Mono"; font-size:var(--text-xs); color:var(--muted); flex:none; width:34px;}
.item-row .title{font-size:var(--text-sm); font-weight:500; flex:1; min-width:180px;}
.item-row .item-detail{padding:0 var(--space-4) var(--space-4) 62px; font-size:var(--text-sm); color:var(--ink-2); line-height:var(--lh-loose);}
.item-row .item-detail p{margin:0 0 var(--space-2);}
.item-row .item-detail .src{font-size:var(--text-xs); color:var(--muted);}

.pill{
  display:inline-flex; align-items:center; gap:5px; font-size:var(--text-2xs); font-weight:600;
  padding:3px 9px; border-radius:999px; white-space:nowrap;
}
.pill.neu{background:var(--crit); color:var(--crit-ink);}
.status-chip{
  display:inline-flex; align-items:center; gap:6px; font-size:var(--text-xs); font-weight:600;
  padding:4px var(--space-2); border-radius:999px; border:1px solid transparent; cursor:pointer;
}
.status-chip.good{background:color-mix(in srgb, var(--good) 16%, transparent); color:var(--good-ink);}
.status-chip.warn{background:color-mix(in srgb, var(--warn) 20%, transparent); color:var(--warn-ink);}
.status-chip.crit{background:var(--crit); color:var(--crit-ink);}
.status-chip.neutral{background:var(--grid); color:var(--ink-2);}

/* ============ Tables ============ */
table{width:100%; border-collapse:collapse; font-size:var(--text-sm);}
th{text-align:left; font-size:var(--text-2xs); color:var(--muted); text-transform:uppercase; letter-spacing:.03em; padding:var(--space-2) var(--space-2); border-bottom:1px solid var(--border);}
td{padding:9px var(--space-2); border-bottom:1px solid var(--border); vertical-align:top;}
tr:last-child td{border-bottom:none;}

/* ============ Notes ============ */
textarea{
  width:100%; min-height:120px; font:inherit; font-size:var(--text-sm); padding:var(--space-3);
  border-radius:var(--r-md); border:1px solid var(--border); background:var(--page); color:var(--ink); resize:vertical;
}

/* ============ Mobile bottom nav ============ */
.bottom-nav{display:none;}

/* ============ Responsive ============ */
@media (max-width: 1080px){
  .chart-card{grid-template-columns:1fr;}
}
@media (max-width: 900px){
  .sidebar{display:none;}
  .main{padding:20px 18px 84px;}
  .bottom-nav{
    display:flex; position:fixed; bottom:0; left:0; right:0; z-index:20;
    background:var(--card); border-top:1px solid var(--border);
    padding:8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .bottom-nav a{
    flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
    font-size:var(--text-2xs); color:var(--muted); font-weight:600; padding:4px;
  }
  .bottom-nav a .nav-icon{width:18px; height:18px;}
  .bottom-nav a .nav-icon svg{width:100%; height:100%;}
  .bottom-nav a[aria-current="page"]{color:var(--ink);}
}
@media (max-width: 560px){
  .widget-grid{grid-template-columns:1fr;}
  .topbar{flex-wrap:wrap; row-gap:10px;}
  .topbar > div:first-child{flex:1 1 auto; min-width:0;}
  .topbar h1{font-size:var(--text-lg);}
  .topbar .subhead{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .sync-status #syncLabel{display:none;}
  .avatar{width:30px; height:30px; font-size:var(--text-2xs);}
  .card{padding:var(--space-4);}
  .toolbar{flex-direction:column;}
  .toolbar select, .toolbar input{width:100%;}
  .item-row .item-detail{padding-left:var(--space-4);}
  .status-chip{padding:6px var(--space-3);}
  .item-row summary{padding:var(--space-4);}
}

/* ============ Print ============ */
@media print{
  .sidebar, .bottom-nav, .theme-toggle, .no-print{display:none !important;}
  .main{padding:0; max-width:none;}
  body{background:#fff;}
  .card, .widget{box-shadow:none; border:1px solid #ccc;}
}

/* ============ Motion ============ */
@media (prefers-reduced-motion: no-preference){
  .item-row summary{transition:background .15s ease;}
}
.item-row summary:hover{background:var(--accent-wash);}

/* ============ Sync status pill ============ */
.sync-status{
  display:inline-flex; align-items:center; gap:6px; font-size:var(--text-xs); color:var(--muted);
  margin-left:var(--space-2);
}
.sync-status .sync-dot{width:7px; height:7px; border-radius:50%; background:var(--good);}
.sync-status.offline .sync-dot{background:var(--warn);}
.sync-status.saving .sync-dot{background:var(--accent); animation:pulse 1s infinite;}
@keyframes pulse{0%,100%{opacity:1;} 50%{opacity:.3;}}

/* ============ TONI — AI Project Copilot ============ */
.toni-fab{
  position:fixed; right:24px; bottom:24px; z-index:40;
  width:56px; height:56px; border-radius:50%; border:none; cursor:pointer;
  background:var(--accent); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 28px -6px rgba(44,74,124,.5), 0 2px 8px rgba(16,24,40,.15);
}
:root[data-theme="dark"] .toni-fab{ box-shadow:0 10px 28px -6px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.3); }
.toni-fab svg{width:24px; height:24px;}
.toni-fab .toni-dot{
  position:absolute; top:4px; right:4px; width:10px; height:10px; border-radius:50%;
  background:var(--crit); border:2px solid var(--page); display:none;
}
.toni-fab.has-update .toni-dot{display:block;}
@media (prefers-reduced-motion: no-preference){
  .toni-fab{transition:transform .15s ease;}
  .toni-fab:hover{transform:scale(1.06);}
  .toni-fab:active{transform:scale(.96);}
}
.toni-fab.open{display:none;}
@media (max-width:900px){
  .toni-fab{bottom:calc(78px + env(safe-area-inset-bottom)); right:16px;}
}

.toni-panel{
  position:fixed; z-index:41; right:24px; bottom:96px;
  width:400px; height:min(680px, 80vh);
  background:var(--card); border-radius:var(--r-xl); border:1px solid var(--border);
  box-shadow:var(--shadow-lg);
  display:flex; flex-direction:column; overflow:hidden;
  opacity:0; transform:translateY(16px) scale(.98); pointer-events:none;
}
.toni-panel.open{opacity:1; transform:none; pointer-events:auto;}
@media (prefers-reduced-motion: no-preference){
  .toni-panel{transition:opacity .18s ease, transform .18s ease;}
}
.toni-panel.fullscreen{
  right:16px; left:16px; bottom:16px; top:16px; width:auto; height:auto;
  max-width:760px; margin:0 auto;
}
@media (max-width:900px){
  .toni-panel{right:0; left:0; bottom:0; top:0; width:auto; height:auto; border-radius:0; max-width:none;}
}

.toni-header{
  display:flex; align-items:center; gap:10px; padding:14px 16px;
  border-bottom:1px solid var(--border); flex:none;
  background:var(--glass-bg); backdrop-filter:blur(20px) saturate(1.4); -webkit-backdrop-filter:blur(20px) saturate(1.4);
}
.toni-header .toni-avatar{
  width:32px; height:32px; border-radius:10px; background:var(--accent); color:var(--accent-ink); flex:none;
  display:flex; align-items:center; justify-content:center;
}
.toni-header .toni-avatar svg{width:18px; height:18px;}
.toni-header .toni-title{font-size:var(--text-sm); font-weight:600; margin:0;}
.toni-header .toni-subtitle{font-size:var(--text-xs); color:var(--muted); margin:0;}
.toni-header-actions{margin-left:auto; display:flex; align-items:center; gap:4px;}
.toni-icon-btn{
  width:30px; height:30px; border-radius:9px; border:none; background:transparent; color:var(--ink-2);
  cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.toni-icon-btn:hover{background:var(--accent-wash); color:var(--ink);}
.toni-icon-btn svg{width:16px; height:16px;}
.toni-icon-btn.active{background:var(--crit); color:var(--crit-ink);}

.toni-quickactions{
  display:flex; gap:8px; padding:10px 14px; overflow-x:auto; flex:none;
  border-bottom:1px solid var(--border);
}
.toni-qa{
  flex:none; font:inherit; font-size:var(--text-xs); font-weight:500; white-space:nowrap;
  padding:7px var(--space-3); border-radius:999px; border:1px solid var(--border); background:var(--page);
  color:var(--ink-2); cursor:pointer;
}
.toni-qa:hover{background:var(--accent-wash); color:var(--ink); border-color:transparent;}

.toni-messages{flex:1; overflow-y:auto; padding:var(--space-4); display:flex; flex-direction:column; gap:var(--space-3);}
.toni-msg{max-width:86%; font-size:var(--text-sm); line-height:var(--lh-normal);}
.toni-msg.user{align-self:flex-end;}
.toni-msg.assistant{align-self:flex-start;}
.toni-msg .bubble{padding:10px 13px; border-radius:14px;}
.toni-msg.user .bubble{background:var(--accent); color:var(--accent-ink); border-bottom-right-radius:4px;}
.toni-msg.assistant .bubble{background:var(--page); border:1px solid var(--border); border-bottom-left-radius:4px;}
.toni-msg.system .bubble{background:transparent; border:1px dashed var(--border); color:var(--muted); font-size:var(--text-xs);}
.toni-msg .bubble p{margin:0 0 6px;}
.toni-msg .bubble p:last-child{margin-bottom:0;}
.toni-msg .bubble ul{margin:4px 0; padding-left:18px;}

.toni-typing{display:flex; gap:4px; padding:10px 13px; align-self:flex-start;}
.toni-typing span{width:6px; height:6px; border-radius:50%; background:var(--muted); display:inline-block;}
@media (prefers-reduced-motion: no-preference){
  .toni-typing span{animation:toniTyping 1.1s infinite ease-in-out;}
  .toni-typing span:nth-child(2){animation-delay:.15s;}
  .toni-typing span:nth-child(3){animation-delay:.3s;}
}
@keyframes toniTyping{0%,60%,100%{opacity:.3; transform:translateY(0);} 30%{opacity:1; transform:translateY(-2px);}}

.toni-inputrow{
  display:flex; align-items:flex-end; gap:8px; padding:12px 14px; border-top:1px solid var(--border); flex:none;
}
.toni-inputrow textarea{
  flex:1; min-height:40px; max-height:120px; resize:none; font:inherit; font-size:var(--text-sm);
  padding:9px var(--space-3); border-radius:14px; border:1px solid var(--border); background:var(--page); color:var(--ink);
}
.toni-send{
  width:38px; height:38px; border-radius:12px; border:none; background:var(--accent); color:var(--accent-ink);
  cursor:pointer; display:flex; align-items:center; justify-content:center; flex:none;
}
.toni-send:disabled{opacity:.4; cursor:default;}
.toni-send svg{width:17px; height:17px;}
.toni-mic{
  width:38px; height:38px; border-radius:12px; border:1px solid var(--border); background:transparent; color:var(--muted);
  display:flex; align-items:center; justify-content:center; flex:none; cursor:not-allowed;
}
.toni-mic svg{width:16px; height:16px;}

.toni-empty{margin:auto; text-align:center; color:var(--muted); font-size:var(--text-sm); padding:var(--space-5);}
.toni-empty .toni-avatar-lg{
  width:44px; height:44px; border-radius:14px; background:var(--accent); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center; margin:0 auto 12px;
}
.toni-empty .toni-avatar-lg svg{width:24px; height:24px;}
