
:root{
  --paper:#F7F9FF; --surface:#FFFFFF; --surface-2:#EEF3FF; --surface-3:#DFE8FF;
  --ink:#0B1739; --ink-2:#405173; --muted:#6B7894; --line:#DCE3F2;
  --accent:#215CFF; --accent-strong:#1746CC; --accent-soft:#E7EDFF; --on-accent:#FFFFFF;
  --good:#18A058; --good-soft:#DCFCE7;
  --bad:#E5484D; --bad-soft:#FFE4E6;
  --warn:#D97706; --warn-soft:#FEF3C7;
  --s1:#215CFF; --s2:#64D8FF; --s3:#FFB45C; --s4:#FF7A66;
  --shadow-1:0 1px 2px rgba(23,33,38,.07);
  --shadow-2:0 2px 4px rgba(23,33,38,.07), 0 14px 30px -16px rgba(64,144,240,.32);
  --r:8px;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
  --paper:#081126; --surface:#101C3A; --surface-2:#17264A; --surface-3:#20335C;
  --ink:#EEF3FF; --ink-2:#D5DDF0; --muted:#94A3C1; --line:#2C3D68;
  --accent:#6D8FFF; --accent-strong:#A8C7FF; --accent-soft:#172B63; --on-accent:#F7F9FF;
  --good:#4ADE80; --good-soft:#143724;
  --bad:#FF7A66; --bad-soft:#3E1820;
  --warn:#FFB45C; --warn-soft:#392A0C;
  --s1:#6D8FFF; --s2:#64D8FF; --s3:#FFB45C; --s4:#FF7A66;
  --shadow-1:0 1px 2px rgba(0,0,0,.4);
  --shadow-2:0 2px 4px rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.8);
  
  }
}
:root[data-theme="dark"]{
  --paper:#081126; --surface:#101C3A; --surface-2:#17264A; --surface-3:#20335C;
  --ink:#EEF3FF; --ink-2:#D5DDF0; --muted:#94A3C1; --line:#2C3D68;
  --accent:#6D8FFF; --accent-strong:#A8C7FF; --accent-soft:#172B63; --on-accent:#F7F9FF;
  --good:#4ADE80; --good-soft:#143724;
  --bad:#FF7A66; --bad-soft:#3E1820;
  --warn:#FFB45C; --warn-soft:#392A0C;
  --s1:#6D8FFF; --s2:#64D8FF; --s3:#FFB45C; --s4:#FF7A66;
  --shadow-1:0 1px 2px rgba(0,0,0,.4);
  --shadow-2:0 2px 4px rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.8);
}

*{box-sizing:border-box}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:"IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased;
}
h1,h2,h3{font-family:Archivo, "IBM Plex Sans", sans-serif; font-weight:700; letter-spacing:-.015em; text-wrap:balance; margin:0}
button,input,select,textarea{font:inherit; color:inherit}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:3px}
.num{font-family:"IBM Plex Mono", ui-monospace, monospace; font-variant-numeric:tabular-nums}
.eyebrow{font-family:"IBM Plex Mono", monospace; font-size:10.5px; letter-spacing:.13em; text-transform:uppercase; color:var(--muted)}

/* ---------- shell ---------- */
.app{display:grid; grid-template-columns:212px 1fr; min-height:100vh}
.rail{
  background:linear-gradient(180deg, var(--surface) 0%, var(--accent-soft) 160%); border-right:1px solid var(--line);
  display:flex; flex-direction:column; gap:4px; padding:18px 12px; position:sticky; top:0; height:100vh;
}
.brand{display:flex; align-items:center; padding:0 8px 18px}
.brand-logo{display:block; width:150px; max-width:100%; height:auto; object-fit:contain}
.navbtn{
  display:flex; align-items:center; gap:9px; width:100%; text-align:left;
  background:none; border:0; padding:8px 10px; border-radius:6px; cursor:pointer; color:var(--ink-2);
  font-weight:500;
}
.navbtn:hover{background:var(--surface-2); color:var(--ink)}
.navbtn[aria-current="true"]{background:var(--accent-soft); color:var(--accent-strong); font-weight:600}
.navbtn svg{width:16px; height:16px; flex:none; stroke:currentColor; fill:none; stroke-width:1.7}
.rail-foot{margin-top:auto; display:flex; flex-direction:column; gap:10px; padding:0 8px}
.rail-note{font-size:11.5px; color:var(--muted); line-height:1.45}
.linkbtn{background:none; border:0; padding:0; color:var(--accent); cursor:pointer; font-size:11.5px; text-align:left; text-decoration:underline; text-underline-offset:2px}

.main{min-width:0; display:flex; flex-direction:column}
.topbar{
  display:flex; align-items:center; gap:12px; padding:16px 24px;
  border-bottom:1px solid var(--line); background:linear-gradient(90deg, var(--surface) 0%, var(--accent-soft) 135%); position:sticky; top:0; z-index:20;
}
.topbar h1{font-size:19px}
.search{position:relative}
.topbar .selv{margin-left:auto}
.search svg{position:absolute; left:9px; top:50%; transform:translateY(-50%); width:14px; height:14px; stroke:var(--muted); fill:none; stroke-width:1.8}
.search input{
  width:230px; padding:7px 10px 7px 29px; border:1px solid var(--line); border-radius:6px;
  background:var(--paper);
}
.search input::placeholder{color:var(--muted)}
.btn{
  border:1px solid var(--line); background:var(--surface); padding:7px 12px; border-radius:6px;
  cursor:pointer; font-weight:500; display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
}
.btn:hover{background:var(--surface-2)}
.btn-primary{background:var(--accent); border-color:var(--accent); color:var(--on-accent); font-weight:600}
.btn-primary:hover{background:var(--accent-strong); border-color:var(--accent-strong)}
.btn-danger{color:var(--bad); border-color:var(--line)}
.btn-danger:hover{background:var(--bad-soft)}
.btn-sm{padding:5px 9px; font-size:12.5px}
.view{padding:22px 24px 40px; flex:1; min-width:0}
.demobar{
  display:flex; align-items:center; gap:8px; padding:7px 24px; font-size:12px; color:var(--ink-2);
  background:var(--warn-soft); border-bottom:1px solid var(--line);
}
.demobar .dot{width:6px; height:6px; border-radius:50%; background:var(--warn); flex:none}

/* ---------- panel ---------- */
.kpis{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--r); overflow:hidden}
.kpi{background:var(--surface); padding:15px 16px 16px; display:flex; flex-direction:column; gap:5px; border-top:3px solid var(--accent)}
.kpi:nth-child(2){border-top-color:var(--s2)}
.kpi:nth-child(3){border-top-color:var(--s3)}
.kpi:nth-child(4){border-top-color:var(--s4)}
.kpi .v{font-family:Archivo,sans-serif; font-weight:700; font-size:26px; letter-spacing:-.025em; font-variant-numeric:tabular-nums; line-height:1.1}
.kpi .sub{font-size:12px; color:var(--muted)}
.panel-grid{display:grid; grid-template-columns:1.35fr 1fr; gap:18px; margin-top:18px; align-items:start}
.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow-1)}
.card-h{display:flex; align-items:baseline; gap:10px; padding:14px 16px 0}
.card-h h2{font-size:14.5px}
.card-h .meta{margin-left:auto; font-size:12px; color:var(--muted)}
.card-b{padding:14px 16px 16px}

/* bar chart */
.chart{display:grid; grid-template-columns:auto 1fr auto; gap:7px 12px; align-items:center}
.chart .lbl{font-size:12.5px; color:var(--ink-2); white-space:nowrap}
.chart .track{height:16px; background:var(--surface-2); border-radius:3px; position:relative}
.chart .bar{display:block; height:100%; border-radius:0 4px 4px 0; min-width:3px; transition:width .35s ease}
.chart .val{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-size:12.5px; color:var(--ink); white-space:nowrap}
.chart-foot{display:flex; justify-content:space-between; font-size:11px; color:var(--muted); margin-top:9px; padding-top:7px; border-top:1px solid var(--line)}
.chart-row{display:contents; cursor:pointer}
.chart-row:hover .track{background:var(--surface-3)}

/* attention list */
.list{display:flex; flex-direction:column}
.row{
  display:flex; align-items:center; gap:10px; padding:9px 16px; border-top:1px solid var(--line);
  cursor:pointer; background:none; border-left:0; border-right:0; border-bottom:0; width:100%; text-align:left;
}
.row:first-child{border-top:0}
.row:hover{background:var(--surface-2)}
.row .who, .task .who{min-width:0; flex:1}
.row .who b, .task .who b{display:block; font-weight:600; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.row .who span, .task .who span{display:block; font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.row .amt{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-size:12.5px}
.empty{padding:22px 16px; color:var(--muted); font-size:13px; text-align:center}

.chip{
  display:inline-flex; align-items:center; gap:4px; padding:2px 7px; border-radius:999px;
  font-size:11px; font-weight:500; white-space:nowrap; background:var(--surface-2); color:var(--ink-2);
}
.chip.warn{background:var(--warn-soft); color:var(--warn)}
.chip.bad{background:var(--bad-soft); color:var(--bad)}
.chip.good{background:var(--good-soft); color:var(--good)}
.dot{width:7px; height:7px; border-radius:50%; flex:none}

/* ---------- board ---------- */
.board{display:flex; gap:12px; overflow-x:auto; padding-bottom:10px; align-items:start}
.col{flex:0 0 244px; background:var(--surface-2); border-radius:var(--r); display:flex; flex-direction:column; min-height:120px}
.col.over{outline:2px dashed var(--accent); outline-offset:-2px; background:var(--accent-soft)}
.col-h{display:flex; align-items:center; gap:7px; padding:11px 12px 8px}
.col-h .name{font-weight:600; font-size:12.5px}
.col-h .n{margin-left:auto; font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums}
.col-sum{padding:0 12px 9px; font-family:"IBM Plex Mono",monospace; font-size:11.5px; color:var(--muted); font-variant-numeric:tabular-nums}
.col-b{display:flex; flex-direction:column; gap:8px; padding:0 8px 10px; min-height:40px}
.deal{
  background:var(--surface); border:1px solid var(--line); border-radius:7px; padding:10px 11px;
  box-shadow:var(--shadow-1); cursor:grab; display:flex; flex-direction:column; gap:7px; text-align:left; width:100%;
}
.deal:hover{border-color:var(--accent)}
.deal.dragging{opacity:.4}
.deal .co{font-weight:600; font-size:13px; line-height:1.3}
.deal .ti{font-size:11.5px; color:var(--muted); line-height:1.35}
.deal .bot{display:flex; align-items:center; gap:8px; margin-top:1px}
.deal .m{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-size:12.5px; font-weight:500}
.deal .bot .chip{margin-left:auto}
.col-add{margin:0 8px 10px; padding:6px; border:1px dashed var(--line); border-radius:6px; background:none; color:var(--muted); cursor:pointer; font-size:12px}
.col-add:hover{color:var(--accent); border-color:var(--accent)}

/* ---------- table ---------- */
.tablewrap{overflow-x:auto; background:var(--surface); border:1px solid var(--line); border-radius:var(--r)}
table{border-collapse:collapse; width:100%; min-width:640px}
th{
  text-align:left; font-family:"IBM Plex Mono",monospace; font-size:10.5px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--muted); font-weight:400; padding:10px 14px; border-bottom:1px solid var(--line); white-space:nowrap;
}
td{padding:10px 14px; border-bottom:1px solid var(--line); vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:var(--surface-2)}
td .nm{font-weight:600}
td .sm{font-size:12px; color:var(--muted)}
.right{text-align:right}
.avatar{
  width:26px; height:26px; border-radius:50%; background:var(--accent-soft); color:var(--accent-strong);
  display:grid; place-items:center; font-size:10.5px; font-weight:600; flex:none; letter-spacing:.02em;
}

/* ---------- drawer & modal ---------- */
.scrim{position:fixed; inset:0; background:rgba(10,18,20,.42); z-index:40; opacity:0; pointer-events:none; transition:opacity .2s}
.scrim.on{opacity:1; pointer-events:auto}
.drawer{
  position:fixed; top:0; right:0; bottom:0; width:min(420px,100%); background:var(--surface);
  border-left:1px solid var(--line); z-index:50; transform:translateX(100%); transition:transform .24s ease;
  display:flex; flex-direction:column; box-shadow:var(--shadow-2);
}
.drawer.on{transform:none}
.drawer-h{padding:16px 18px 13px; border-bottom:1px solid var(--line); display:flex; gap:10px; align-items:flex-start}
.drawer-h h2{font-size:17px; line-height:1.25}
.drawer-b{overflow-y:auto; padding:16px 18px 26px; display:flex; flex-direction:column; gap:18px}
.iconbtn{background:none; border:0; cursor:pointer; color:var(--muted); padding:2px; line-height:0; margin-left:auto}
.iconbtn:hover{color:var(--ink)}
.iconbtn svg{width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8}
.fields{display:grid; grid-template-columns:repeat(2,1fr); gap:11px}
.f{display:flex; flex-direction:column; gap:4px}
.f.wide{grid-column:1 / -1}
.f label{font-family:"IBM Plex Mono",monospace; font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted)}
.f input,.f select,.f textarea{
  padding:7px 9px; border:1px solid var(--line); border-radius:6px; background:var(--paper); width:100%;
}
.f textarea{resize:vertical; min-height:64px}
.sec-t{display:flex; align-items:center; gap:8px; margin-bottom:9px}
.sec-t h3{font-size:12.5px}
.acts{display:flex; flex-direction:column; gap:0; border-left:2px solid var(--line); margin-left:5px; padding-left:0}
.act{position:relative; padding:0 0 14px 16px}
.act:last-child{padding-bottom:0}
.act::before{content:""; position:absolute; left:-5px; top:5px; width:8px; height:8px; border-radius:50%; background:var(--surface); border:2px solid var(--accent)}
.act .t{font-size:12.8px; line-height:1.45}
.act .w{font-size:11px; color:var(--muted); margin-top:1px}
.actform{display:flex; gap:7px; margin-bottom:13px}
.actform select{flex:none; width:108px; padding:6px 7px; border:1px solid var(--line); border-radius:6px; background:var(--paper); font-size:12.5px}
.actform input{flex:1; min-width:0; padding:6px 9px; border:1px solid var(--line); border-radius:6px; background:var(--paper); font-size:12.5px}
.drawer-foot{margin-top:4px; display:flex; gap:8px; flex-wrap:wrap}

.modal{
  position:fixed; z-index:60; top:50%; left:50%; transform:translate(-50%,-48%) scale(.98);
  width:min(520px, calc(100% - 32px)); background:var(--surface); border:1px solid var(--line);
  border-radius:10px; box-shadow:var(--shadow-2); opacity:0; pointer-events:none; transition:opacity .18s, transform .18s;
  max-height:calc(100vh - 48px); display:flex; flex-direction:column;
}
.modal.on{opacity:1; pointer-events:auto; transform:translate(-50%,-50%) scale(1)}
.modal-h{padding:16px 18px 0}
.modal-h h2{font-size:16px}
.modal-b{padding:14px 18px; overflow-y:auto}
.modal-f{padding:12px 18px 16px; display:flex; gap:8px; justify-content:flex-end; border-top:1px solid var(--line)}

.toast{
  position:fixed; left:50%; bottom:22px; transform:translate(-50%,14px); z-index:70;
  background:var(--ink); color:var(--paper); padding:9px 15px; border-radius:7px; font-size:13px;
  box-shadow:var(--shadow-2); opacity:0; pointer-events:none; transition:opacity .2s, transform .2s;
}
.toast.on{opacity:1; transform:translate(-50%,0)}

/* ---------- hoy ---------- */
.navbtn .badge{
  margin-left:auto; background:var(--bad); color:var(--surface); font-size:10.5px; font-weight:600;
  border-radius:999px; padding:0 6px; line-height:17px; font-variant-numeric:tabular-nums;
}
.selv{padding:7px 9px; border:1px solid var(--line); border-radius:6px; background:var(--paper); max-width:190px}
.hoy-head{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:16px}
.hoy-head h2{font-size:17px; margin-right:6px}
.hoy-grid{display:flex; flex-direction:column; gap:16px}
.task{display:flex; align-items:center; gap:10px; padding:10px 16px; border-top:1px solid var(--line)}
.task:first-child{border-top:0}
.task:hover{background:var(--surface-2)}
.task .who{background:none; border:0; padding:0; text-align:left; cursor:pointer}
.task .who:hover b{color:var(--accent)}
.task .when{font-family:"IBM Plex Mono",monospace; font-size:12px; color:var(--ink-2); white-space:nowrap; font-variant-numeric:tabular-nums}
.task .acts-r{display:flex; gap:6px; flex:none}
.btn-wa{color:var(--good)}
.btn-wa:hover{background:var(--good-soft)}
.btn svg{width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:1.9; flex:none}
.avatar.v{background:var(--ink-2); color:var(--surface)}
.next{display:flex; gap:5px; font-size:11.5px; color:var(--ink-2); line-height:1.35; padding-top:7px; border-top:1px dashed var(--line)}
.next.late{color:var(--bad)}
.next.today{color:var(--warn)}
.next.none{color:var(--muted); font-style:italic}
.nextbox{background:var(--accent-soft); border-radius:8px; padding:12px; display:flex; flex-direction:column; gap:8px}
.nextbox .rowf{display:flex; gap:7px; flex-wrap:wrap}
.nextbox input{padding:6px 9px; border:1px solid var(--line); border-radius:6px; background:var(--surface); font-size:12.5px; min-width:0}
.nextbox input[type=date]{flex:1}
.wa-note{font-size:12px; color:var(--muted); margin:8px 0 0}

/* ---------- equipo ---------- */
.teambar{padding:16px 18px; display:flex; flex-direction:column; gap:10px}
.teambar-top{display:flex; align-items:flex-start; gap:12px; flex-wrap:wrap}
.big{font-family:Archivo,sans-serif; font-weight:700; font-size:26px; letter-spacing:-.025em; font-variant-numeric:tabular-nums; line-height:1.15}
.big small{font-family:"IBM Plex Sans",sans-serif; font-size:13px; font-weight:400; color:var(--muted); letter-spacing:0}
.meter{position:relative; height:10px; background:var(--surface-2); border-radius:999px}
.meter .fill{position:absolute; left:0; top:0; bottom:0; border-radius:999px; background:var(--accent); min-width:4px}
.meter .pace{position:absolute; top:-4px; bottom:-4px; width:2px; background:var(--ink); border-radius:1px; box-shadow:0 0 0 2px var(--surface)}
.meter-l{display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; font-size:12px; color:var(--muted)}
.team{display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:14px; margin-top:16px}
.seller{padding:16px; display:flex; flex-direction:column; gap:11px}
.seller-h{display:flex; align-items:center; gap:10px}
.seller-h b{font-size:14px}
.seller-h .rank{font-family:"IBM Plex Mono",monospace; font-size:11px; color:var(--muted); margin-left:auto}
.stats{display:grid; grid-template-columns:repeat(3,1fr); gap:8px; border-top:1px solid var(--line); padding-top:11px}
.stats .k{display:block; font-size:11px; color:var(--muted)}
.stats .v{display:block; font-family:"IBM Plex Mono",monospace; font-size:13px; font-weight:500; font-variant-numeric:tabular-nums}
.vrow{display:grid; grid-template-columns:1fr 150px; gap:8px; margin-bottom:8px}

@media (max-width: 860px){
  .task{flex-wrap:wrap}
  .task .acts-r{width:100%; justify-content:flex-end}
  .selv{max-width:none; flex:1}
  .app{grid-template-columns:1fr}
  .rail{position:static; height:auto; flex-direction:row; align-items:center; flex-wrap:wrap; border-right:0; border-bottom:1px solid var(--line); padding:12px}
  .brand{padding:0 10px 0 4px}
  .brand-logo{width:112px}
  .navbtn{width:auto}
  .rail-foot{margin:0 0 0 auto; flex-direction:row; align-items:center; gap:12px}
  .rail-note{display:none}
  .panel-grid{grid-template-columns:1fr}
  .topbar{flex-wrap:wrap; padding:12px 16px}
  .search{margin-left:0; flex:1}
  .search input{width:100%}
  .view{padding:16px}
  .demobar{padding:7px 16px}
}
@media (prefers-reduced-motion: reduce){
  *{transition:none !important; animation:none !important}
}

/* Persistent CRM and assistant */
[hidden]{display:none!important}
button:disabled{opacity:.5;cursor:not-allowed}
.savebar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:8px 24px;border-bottom:1px solid var(--line);color:var(--muted);font-size:12px;background:var(--surface)}
.auth{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at top,var(--accent-soft),var(--paper) 70%)}
.auth-card{width:min(100%,440px);padding:32px;display:flex;flex-direction:column;gap:16px}
.auth-card h1{font-size:25px}.auth-card p{margin:0}.auth-card>img{object-fit:contain}.auth-card .btn{justify-content:center}
.form-error{color:var(--bad);font-size:13px;overflow-wrap:anywhere}
.busy{position:fixed;inset:0;z-index:200;background:rgba(20,40,60,.15);display:grid;place-items:center;font-weight:600;cursor:wait}
.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:18px;align-items:start}
.settings-grid p{color:var(--ink-2)}.actions{display:flex;flex-wrap:wrap;gap:8px}
.chat-shell{max-width:940px;margin:auto;display:flex;flex-direction:column;height:calc(100dvh - 155px);min-height:480px}
.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.chat-heading h2{font-size:22px;margin:4px 0}.chat-heading p{margin:0}
.chat-messages{flex:1;min-height:140px;overflow-y:auto;padding:24px 8px;display:flex;flex-direction:column;gap:18px}
.chat-welcome{text-align:center;margin:auto;max-width:580px;padding:20px 0}.chat-welcome p{color:var(--muted)}
.chat-orb{display:grid;place-items:center;width:56px;height:56px;margin:0 auto 16px;border-radius:18px;background:var(--accent-soft);color:var(--accent);font-size:32px}
.suggestions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:24px}.suggestion{white-space:normal;text-align:left;font-size:12px}
.message{max-width:90%;padding:14px 18px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.message b{font-size:11px;color:var(--muted);display:block;margin-bottom:6px}.message>div{white-space:pre-wrap;overflow-wrap:anywhere}
.message.user{align-self:flex-end;background:var(--accent-soft);border-color:transparent}.message.assistant{align-self:flex-start}
.chat-compose{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:var(--shadow-1)}
.context-choice{font-size:12px;display:flex;align-items:center;gap:6px}.compose-row{display:flex;gap:10px;align-items:flex-end}
.compose-row textarea{flex:1;min-width:0;resize:vertical;max-height:180px;border:1px solid var(--line);border-radius:6px;background:var(--paper);padding:10px}
.chat-compose p{margin:8px 0 0}.chat-compose .compose-row{margin-top:12px}
@media(max-width:700px){.chat-shell{height:calc(100dvh - 170px);min-height:520px}.chat-heading h2{font-size:18px}.message{max-width:96%}.compose-row{align-items:stretch}.chat-compose{padding:12px}.auth-card{padding:24px}.savebar{padding:8px 16px}.rail-foot{gap:4px}.chat-heading{align-items:flex-start}}

@media(max-width:900px){.chat-compose .rail-note,.chat-heading .rail-note,.settings-grid .rail-note{display:block}}
