/* Tendy — identidad clara: blanco, gris claro y azul solo en avatar y botones */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --border: #E3E6EB;
  --border-soft: #ECEEF2;
  --text: #1B2430;
  --muted: #6B7686;
  --blue: #2563EB;
  --blue-2: #1D4ED8;
  --blue-soft: #EAF1FF;
  --ok: #16A34A;
  --warn: #D97706;
  --err: #DC2626;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", sans-serif;
  --ease: cubic-bezier(.22,1,.36,1);
}
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; overflow: hidden; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(37,99,235,.2); }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #D5D9E0; border-radius: 8px; }
button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.aurora { display: none; }
.app { position: relative; z-index: 1; height: 100dvh; display: flex; flex-direction: column; }

/* ── avatar (único elemento azul junto a los botones) ── */
.avatar { display: inline-flex; align-items: center; justify-content: center; position: relative; flex: none; }
.avatar-svg { overflow: visible; animation: floaty 4.2s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.av-eye { transform-origin: center; animation: blink 5.6s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95%, 97% { transform: scaleY(.12); } }
.av-ring { opacity: .3; transition: opacity .4s; }
.av-ant { animation: antpulse 2.6s ease-in-out infinite; }
@keyframes antpulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.is-thinking .av-ring { opacity: .95; animation: ringspin 1.6s linear infinite; }
@keyframes ringspin { 0% { stroke-dasharray: 4 10; transform: rotate(0); transform-origin: 60px 60px; } 100% { stroke-dasharray: 4 10; transform: rotate(360deg); transform-origin: 60px 60px; } }
.is-thinking .av-eye { animation: thinkblink .9s ease-in-out infinite; }
@keyframes thinkblink { 0%,100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.is-thinking .avatar-svg { animation: floaty 1.8s ease-in-out infinite; }
.av-wave { opacity: 0; }
.is-speaking .av-wave { opacity: 1; animation: wave .32s ease-in-out infinite alternate; transform-origin: 60px 81px; }
@keyframes wave { from { transform: scaleY(.5); } to { transform: scaleY(1.5); } }
.is-speaking .av-smile { opacity: 0; }
.avatar-bounce .avatar-svg { animation: bounce .55s cubic-bezier(.34,1.56,.64,1); }
@keyframes bounce { 0% { transform: scale(1); } 40% { transform: scale(1.14) rotate(-4deg); } 70% { transform: scale(.96); } 100% { transform: scale(1); } }

/* ── botones (azul) ───────────────────────────── */
.btn-primary, .login-btn, .btn.primary { background: var(--blue); color: #fff; font-weight: 600; border-radius: 12px; transition: background .2s, transform .15s, box-shadow .2s; box-shadow: 0 1px 2px rgba(37,99,235,.3); }
.btn-primary:hover, .login-btn:hover, .btn.primary:hover { background: var(--blue-2); }
.btn-primary:active, .login-btn:active, .btn.primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn-ghost, .btn.ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 12px; font-weight: 500; transition: background .2s, border-color .2s; }
.btn-ghost:hover, .btn.ghost:hover { background: var(--surface-2); }

/* ── bienvenida ───────────────────────────────── */
.login-wrap { height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(400px, 100%); text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 40px 32px 30px; box-shadow: var(--shadow); animation: fadeUp .5s var(--ease) both; }
.login-card .avatar { margin-bottom: 14px; }
.brand-name { font-family: var(--display); font-size: 32px; font-weight: 700; letter-spacing: -.5px; color: var(--text); }
.login-tag { color: var(--muted); font-size: 14px; margin: 8px 0 26px; }
.login-btn { width: 100%; padding: 13px; font-size: 15px; }
.login-hint { color: #98A2B3; font-size: 12px; margin-top: 18px; }

/* ── cabecera ─────────────────────────────────── */
.chat { display: flex; flex-direction: column; height: 100dvh; width: 100%; position: relative; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); flex: none; z-index: 5; }
.chat-head .avatar { cursor: pointer; }
.chat-title { flex: 1; min-width: 0; }
.chat-title h1 { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; }
.chat-title h1 .grad { color: var(--blue); }
.status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); transition: background .3s; }
.status.thinking .dot { background: var(--warn); animation: blinkdot 1s infinite; }
@keyframes blinkdot { 50% { opacity: .35; } }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--muted); transition: background .2s, color .2s; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.project-btn { display: flex; align-items: center; gap: 7px; border: 1px solid var(--border); color: #fff; background: var(--blue); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; transition: background .2s; }
.project-btn:hover { background: var(--blue-2); }

/* ── tarjeta de instalación PWA ──────────────── */
.install-card { margin: 12px 16px 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); animation: dropIn .5s var(--ease) both; flex: none; }
.install-card .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.install-card .tx { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }
.install-card .tx strong { display: block; font-size: 14px; }
.install-card .tx span { color: var(--muted); }
.install-card .btn-primary { padding: 9px 14px; font-size: 13px; }
.install-card .x { width: 30px; height: 30px; border-radius: 9px; color: var(--muted); display: grid; place-items: center; }
.install-card .x:hover { background: var(--surface-2); }
.install-card.out { animation: dropOut .3s var(--ease) both; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
@keyframes dropOut { to { opacity: 0; transform: translateY(-14px) scale(.98); } }

/* ── mensajes ─────────────────────────────────── */
.msgs { flex: 1; overflow-y: auto; padding: 18px 16px 8px; scroll-behavior: smooth; display: flex; flex-direction: column; }
.msg { width: 100%; margin: 0 auto 16px; display: flex; flex-direction: column; animation: fadeUp .35s var(--ease) both; }
.msg.user { align-items: stretch; }
.msg.tendy { align-items: stretch; }
.bubble { width: 100%; padding: 13px 16px; border-radius: 16px; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--blue-soft); border: 1px solid #D6E4FF; color: var(--text); }
.msg.tendy .bubble { background: var(--surface); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.msg-meta { font-size: 11px; color: #98A2B3; margin-top: 5px; padding: 0 4px; }
.msg.user .msg-meta { text-align: right; }
.day-sep { align-self: center; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; margin: 10px 0 14px; background: var(--surface); border: 1px solid var(--border); padding: 4px 14px; border-radius: 999px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; }
.empty h2 { font-family: var(--display); font-size: 24px; margin-top: 16px; }
.empty p { color: var(--muted); max-width: 420px; font-size: 14px; }

.typing { display: inline-flex; gap: 5px; padding: 14px 16px; width: auto; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #B8C0CC; animation: typdots 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typdots { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ── bloques enriquecidos ────────────────────── */
.rich { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.rich .txt { white-space: pre-wrap; line-height: 1.6; }
.rich h4 { font-family: var(--display); font-size: 16px; }
.rich .sub { color: var(--muted); font-size: 13px; margin-top: -6px; }
.blk { border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); padding: 14px; }
.blk-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.blk-title small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }

.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; transition: border-color .2s, background .2s, transform .15s; }
.opt:hover { border-color: #BFD3FB; }
.opt:active { transform: scale(.99); }
.opt .mark { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #C5CCD6; display: grid; place-items: center; flex: none; transition: all .2s; color: transparent; }
.opt.multi .mark { border-radius: 6px; }
.opt .mark svg { width: 13px; height: 13px; stroke-width: 3; }
.opt .ot { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; }
.opt .ot small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 1px; }
.opt.sel { border-color: var(--blue); background: var(--blue-soft); }
.opt.sel .mark { background: var(--blue); border-color: var(--blue); color: #fff; }
.opt:disabled { cursor: default; opacity: .8; }
.send-sel { margin-top: 12px; width: 100%; padding: 12px; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }

.checklist { display: grid; gap: 4px; }
.chk { display: flex; align-items: flex-start; gap: 11px; padding: 9px 4px; font-size: 14px; border-bottom: 1px solid var(--border-soft); text-align: left; width: 100%; }
.chk:last-child { border-bottom: none; }
.chk .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #C5CCD6; display: grid; place-items: center; flex: none; margin-top: 1px; color: transparent; transition: all .2s; background: var(--surface); }
.chk .box svg { width: 13px; height: 13px; stroke-width: 3; }
.chk.on .box { background: var(--blue); border-color: var(--blue); color: #fff; }
.chk.on .lbl { color: var(--muted); text-decoration: line-through; }

.progress { height: 9px; border-radius: 999px; background: #E3E7EE; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .6s var(--ease); }
.pg-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; }
.pg-row span:last-child { color: var(--muted); }

.chart { display: grid; gap: 9px; }
.chart-row { display: grid; grid-template-columns: minmax(70px, 28%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.chart-row .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.chart-row .bar { height: 14px; background: #E3E7EE; border-radius: 7px; overflow: hidden; }
.chart-row .bar i { display: block; height: 100%; background: #94A3B8; border-radius: 7px; transform-origin: left; animation: grow .7s var(--ease) both; }
.chart-row .vl { font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes grow { from { transform: scaleX(0); } }
.chart-unit { color: var(--muted); font-size: 12px; margin-top: 8px; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tbl th { text-align: left; background: var(--surface-2); font-weight: 600; padding: 9px 12px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); }
.tbl tr:last-child td { border-bottom: none; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.link-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; transition: background .2s, transform .15s; box-shadow: 0 1px 2px rgba(37,99,235,.3); }
.link-btn:hover { background: var(--blue-2); }
.link-btn:active { transform: scale(.98); }
.link-btn.secondary { background: var(--surface); color: var(--blue); border: 1px solid #BFD3FB; box-shadow: none; }
.link-btn.secondary:hover { background: var(--blue-soft); }

.card-app { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 16px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.card-app .hd { display: flex; align-items: center; gap: 10px; }
.card-app .hd .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.card-app h4 { font-size: 16px; }
.card-app .meta { color: var(--muted); font-size: 12.5px; }
.card-app .feat { font-size: 13.5px; color: var(--text); padding-left: 18px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: #E8F6EE; color: var(--ok); }
.badge.warn { background: #FEF3E2; color: var(--warn); }
.badge.err { background: #FDECEC; color: var(--err); }

.form-short { display: grid; gap: 10px; }
.form-short label { font-size: 13px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 5px; }
.form-short input, .form-short textarea { width: 100%; background: var(--surface); border: 1.5px solid var(--border); border-radius: 11px; padding: 11px 13px; outline: none; transition: border-color .2s; }
.form-short input:focus, .form-short textarea:focus { border-color: var(--blue); }

/* ── onboarding de proyecto ───────────────────── */
.onb-bar { display: flex; gap: 5px; margin-bottom: 14px; }
.onb-bar i { flex: 1; height: 4px; border-radius: 4px; background: #E3E7EE; transition: background .3s; }
.onb-bar i.on { background: var(--blue); }

/* ── sugerencias ──────────────────────────────── */
.chips { display: flex; gap: 9px; overflow-x: auto; padding: 10px 16px 4px; scrollbar-width: none; flex: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 500; transition: background .2s, border-color .2s, transform .15s; }
.chip svg.i { width: 16px; height: 16px; color: var(--muted); transition: color .2s; }
.chip:hover { background: var(--surface-2); border-color: #BFD3FB; }
.chip:hover svg.i { color: var(--blue); }
.chip:active { transform: scale(.97); }

/* ── compositor ───────────────────────────────── */
.composer { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); flex: none; }
.composer-box { display: flex; align-items: flex-end; gap: 10px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 22px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow); transition: border-color .25s, box-shadow .25s; }
.composer-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.composer textarea { flex: 1; background: none; border: none; outline: none; resize: none; max-height: 140px; padding: 9px 0; line-height: 1.5; color: var(--text); }
.composer textarea::placeholder { color: #98A2B3; }
.send-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; color: #fff; flex: none; transition: transform .18s, background .18s, opacity .2s; }
.send-btn:hover { background: var(--blue-2); }
.send-btn:active { transform: scale(.92); }
.send-btn:disabled { opacity: .35; cursor: default; }

/* ── toast ────────────────────────────────────── */
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1B2430; color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); z-index: 90; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── ventana modal animada (configuración y proyectos) ── */
.overlay { position: fixed; inset: 0; background: rgba(16,24,40,0); z-index: 60; display: flex; align-items: flex-end; justify-content: center; transition: background .38s var(--ease), backdrop-filter .38s var(--ease); pointer-events: auto; }
.overlay.open { background: rgba(16,24,40,.38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { width: min(560px, 100%); max-height: 88dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-bottom: none; border-radius: 24px 24px 0 0; padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); transform: translateY(40px) scale(.98); opacity: 0; transition: transform .42s var(--ease), opacity .3s ease; will-change: transform, opacity; box-shadow: 0 -12px 50px rgba(16,24,40,.14); }
.overlay.open .sheet { transform: translateY(0) scale(1); opacity: 1; }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: #D5D9E0; margin: -8px auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sheet-head h3 { font-family: var(--display); font-size: 20px; }
.eyebrow { font-size: 10.5px; letter-spacing: .12em; color: var(--muted); font-weight: 700; display: block; margin-bottom: 2px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field input[type="text"], .field textarea { width: 100%; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .2s; }
.field input:focus, .field textarea:focus { border-color: var(--blue); }
.field textarea { min-height: 90px; resize: vertical; }
.tone-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tone { padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); font-size: 13.5px; font-weight: 500; transition: all .2s; }
.tone:hover { border-color: #BFD3FB; }
.tone.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet-actions .btn { flex: 1; padding: 13px; font-size: 14.5px; text-align: center; }
.sheet-note { color: #98A2B3; font-size: 12px; margin-top: 16px; text-align: center; }

/* proyectos */
.proj-list { display: grid; gap: 8px; margin-bottom: 14px; }
.proj-item { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; transition: border-color .2s, background .2s; }
.proj-item:hover { border-color: #BFD3FB; background: #FAFCFF; }
.proj-item .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.proj-item .mn { flex: 1; min-width: 0; }
.proj-item strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-item small { color: var(--muted); font-size: 12px; }
.drawer-empty { color: var(--muted); text-align: center; padding: 26px 8px; line-height: 1.6; font-size: 13.5px; }
.drawer-empty small { display: block; margin-top: 4px; font-size: 12.5px; }

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

/* ── móvil vertical: mensajes a todo el ancho ──────── */
@media (max-width: 767px) {
  .msgs { padding: 14px 12px 6px; }
  .msg, .bubble, .rich { max-width: 100%; }
  .project-label { display: none; }
  .project-btn { padding: 0; width: 40px; height: 40px; justify-content: center; }
  .project-btn .lbl { display: none; }
  .install-card { margin: 10px 12px 0; }
  .chips { padding-left: 12px; padding-right: 12px; }
  .composer { padding-left: 12px; padding-right: 12px; }
}
/* ── PC / tablet horizontal: columna centrada ──────── */
@media (min-width: 768px) {
  .chat { max-width: 960px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--bg); }
  .msgs { padding: 26px 40px 10px; }
  .msg { max-width: 760px; }
  .chips, .composer { padding-left: 40px; padding-right: 40px; }
  .chips { justify-content: center; }
  .install-card { margin: 14px auto 0; width: min(560px, calc(100% - 80px)); }
  .overlay { align-items: center; }
  .sheet { border-bottom: 1px solid var(--border); border-radius: 24px; margin: 20px; transform: translateY(24px) scale(.96); }
  .sheet-grab { display: none; }
}
body { background: #E9ECF1; }
@media (max-width: 767px) { body { background: var(--bg); } }

#install-slot { flex: none; position: relative; z-index: 4; }
#install-slot:empty { display: none; }
.msgs { min-height: 0; }

/* Ejecución observable, sin puntos ficticios */
.activity-card { margin: 10px 16px 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); animation: activity-in .3s var(--ease); }
.activity-card[hidden] { display: none; }
.activity-top { display:flex; align-items:center; gap:8px; font-size:13px; }
.activity-top strong { flex:1; color:var(--text); }
.activity-top span:last-child { color:var(--blue); font-weight:700; font-size:12px; }
.activity-dot { width:8px; height:8px; border-radius:50%; background:var(--blue); animation:pulse-dot 1.3s infinite; }
.progress-track { height:6px; margin-top:9px; background:#E8EBF0; border-radius:8px; overflow:hidden; }
#progress-fill { display:block; height:100%; width:0; background:var(--blue); border-radius:8px; transition:width .5s ease; }
.activity-card small { display:block; margin-top:6px; color:var(--muted); font-size:11px; }
@keyframes activity-in { from{opacity:0;transform:translateY(-5px)} to{opacity:1;transform:none} }
@keyframes pulse-dot { 50%{opacity:.35;transform:scale(.75)} }
.attach-btn { width:36px; height:36px; border-radius:50%; color:var(--muted); display:grid; place-items:center; flex:none; transition:color .2s,background .2s; }
.attach-btn:hover { color:var(--blue); background:var(--blue-soft); }
.attach-btn .i { width:19px;height:19px; }
.send-btn.cancel { background:#B42318; }
.attachment-tray { display:flex; gap:7px; overflow-x:auto; padding:5px 4px 8px; }
.attachment-tray span { display:inline-flex;align-items:center;gap:5px;white-space:nowrap;padding:6px 9px;border:1px solid var(--border);border-radius:9px;background:var(--surface);font-size:12px;color:var(--muted); }
.attachment-tray .i { width:14px;height:14px;color:var(--blue); }
.attachment-tray button { color:var(--muted);font-size:16px;line-height:1; }
.nav-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
.nav-grid button { display:flex;align-items:center;gap:10px;text-align:left;padding:14px 12px;border:1px solid var(--border);border-radius:13px;background:var(--surface);color:var(--text);font-size:13px;min-height:62px;transition:.2s; }
.nav-grid button:hover { border-color:#BFD3FB;background:var(--blue-soft); }
.nav-grid .i { color:var(--blue);width:20px;height:20px;flex:none; }
@media (max-width:767px) { .activity-card{margin-left:12px;margin-right:12px}.nav-grid{grid-template-columns:1fr}.activity-top{font-size:12.5px} }
@media (min-width:768px) { .activity-card{width:min(760px,calc(100% - 80px));margin-left:auto;margin-right:auto}.chat{position:relative} }
