:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060b1a; --bg2: #0a1226; --card: #0d1730; --card2: #101c3a; --ink: #e8eefc; --muted: #8fa0c4; --line: rgba(120,150,255,.16);
  --brand: #3b82f6; --brand2: #6366f1; --brand-ink: #ffffff; --glow: rgba(59,130,246,.35);
  --ok: #34d399; --ok-bg: rgba(52,211,153,.14); --warn: #fbbf24; --warn-bg: rgba(251,191,36,.14);
  --bad: #fb7185; --bad-bg: rgba(251,113,133,.14); --radius: 14px;
  --side: #070e22; --shadow: 0 8px 30px rgba(0,0,0,.35);
  --c1: #34d399; --c2: #60a5fa;
  --c-gray: #b6c0cb; --c-blue: #8ab4ff; --c-green: #6ee7a0; --c-yellow: #fcd34d; --c-orange: #fdba74; --c-red: #fca5a5; --c-purple: #c4b5fd;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f4fb; --bg2: #e9eefa; --card: #ffffff; --card2: #f7f9fe; --ink: #121c33; --muted: #5f6f8f; --line: rgba(40,70,140,.14);
  --brand: #2563eb; --brand2: #4f46e5; --brand-ink: #ffffff; --glow: rgba(37,99,235,.25);
  --ok: #12805c; --ok-bg: #e3f6ee; --warn: #b45309; --warn-bg: #fef3c7; --bad: #b42318; --bad-bg: #fde8e6; --radius: 14px;
  --side: #0b1533; --shadow: 0 6px 20px rgba(30,50,110,.10);
  --c1: #059669; --c2: #2563eb;
  --c-gray: #4b5563; --c-blue: #1d4ed8; --c-green: #15803d; --c-yellow: #a16207; --c-orange: #c2410c; --c-red: #b91c1c; --c-purple: #6d28d9;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
h2 { margin: 0 0 4px; font-size: 22px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.btn { border: 1px solid var(--line); background: var(--card); padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.link { border: none; background: none; color: var(--brand); padding: 4px 0; }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=number], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.inactive td { opacity: .55; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--bg); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.off { background: var(--line); color: var(--muted); }
.badge.star { background: var(--warn-bg); color: var(--warn); }
.pos { color: var(--ok); font-weight: 600; } .neg { color: var(--bad); font-weight: 600; }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
.error { background: var(--bad-bg); color: var(--bad); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }
.preview { background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin: 4px 0 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; font-size: 14px; }
.preview .full { grid-column: 1 / -1; }
.preview b { font-variant-numeric: tabular-nums; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 20px; width: min(560px, 94vw); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog h3 { margin: 0 0 14px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.center { max-width: 420px; margin: 8vh auto; }
.empty { text-align: center; color: var(--muted); padding: 28px 8px; }
.stat { display: flex; gap: 24px; flex-wrap: wrap; }
.stat div span { display: block; font-size: 12px; color: var(--muted); }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 9px 16px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
#toast.show { opacity: 1; }

/* multimedia */
.media-sec { margin-top: 16px; } .media-sec h3 { margin: 0; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.tile { border: 1px solid var(--line, #d8dde6); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.tile.inactive { opacity: .6; }
.thumb { aspect-ratio: 4 / 3; background: rgba(127,127,127,.12); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 13px; text-align: center; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: contain; }
.thumb-fail, .thumb-page { padding: 10px; color: var(--bad); }
.thumb-page { color: inherit; }
.badge.warn { background: var(--bad-bg); color: var(--bad); }
.tile .row { flex-wrap: wrap; gap: 6px; }
.preview-box { margin-bottom: 12px; min-height: 120px; aspect-ratio: auto; max-height: 220px; }
img.mini { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; margin-right: 10px; }

/* clientes */
.btn.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.h3 { margin: 0 0 6px; font-size: 15px; }
.statbox { min-width: 150px; } .statbox span { display: block; font-size: 12px; color: var(--muted); } .statbox b { font-size: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }
.notice.neutral { background: var(--bg); color: var(--ink); margin-top: 10px; }
.timeline { list-style: none; margin: 0; padding: 0; } .timeline li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); margin-left: 4px; }
textarea { resize: vertical; }
.minw { min-width: 260px; } td.wrap { white-space: normal; }

/* pedidos */
.pick { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pickitem { text-align: left; }
.statbox b span { display: inline; font-size: inherit; }
/* fechas (filtros): mismo estilo que los demás campos, texto en color de marca */
input[type=date] { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--brand); font-weight: 600; color-scheme: light dark; }
input[type=date]:focus { outline: 2px solid var(--brand); outline-offset: 0; }
input[type=date]::-webkit-datetime-edit, input[type=date]::-webkit-datetime-edit-fields-wrapper { color: var(--brand); }
input[type=date]::-webkit-datetime-edit-text { color: var(--muted); padding: 0 2px; }
input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .85; }

/* estados de pedido (colores elegidos por ti) */
.badge.c-gray { background: rgba(107,114,128,.18); color: var(--c-gray); }
.badge.c-blue { background: rgba(37,99,235,.16); color: var(--c-blue); }
.badge.c-green { background: rgba(22,163,74,.16); color: var(--c-green); }
.badge.c-yellow { background: rgba(202,138,4,.18); color: var(--c-yellow); }
.badge.c-orange { background: rgba(234,88,12,.16); color: var(--c-orange); }
.badge.c-red { background: rgba(220,38,38,.16); color: var(--c-red); }
.badge.c-purple { background: rgba(124,58,237,.16); color: var(--c-purple); }
.arrows { display: flex; flex-direction: column; gap: 2px; }
.arrows .btn { padding: 0 8px; line-height: 18px; font-size: 12px; }

/* ---- Inicio / Ventas / Rentabilidad / Reportes ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 4px; }
.kpi { margin-bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi b { font-size: 24px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12px; }
.periodbar { gap: 6px; }
.chart { width: 100%; height: auto; max-height: 240px; display: block; }
.chart .bar-sold { fill: var(--brand); opacity: .35; }
.chart .bar-del { fill: var(--brand); }
.chart .ax { stroke: var(--line); stroke-width: 1; }
.chart .axt { fill: var(--muted); font-size: 10px; }
table.narrow { min-width: 0; max-width: 460px; }
.tile.clickable { cursor: pointer; }
.tile.inactive { opacity: .55; }
.grid2 > .card { min-width: 0; } .grid2 table { min-width: 0; } .grid2 th, .grid2 td { white-space: normal; }

.keybox { font-family: ui-monospace, monospace; width: 100%; }

/* Conversaciones */
.card.nopad { padding: 0; overflow: hidden; margin-top: 12px; }
.chatrow { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--card); cursor: pointer; }
.chatrow:hover { background: var(--bg); }
.chatrow.unread .chatprev { color: var(--ink); font-weight: 600; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; }
.chatmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chattop { display: flex; justify-content: space-between; gap: 8px; }
.chattime { font-size: 12px; color: var(--muted); flex: none; }
.chatprev { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chatside { flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.chatwrap { display: flex; flex-direction: column; gap: 10px; }
.chathead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chatcust { font-size: 13px; }
.msgs { height: min(60vh, 560px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--bg); border-radius: 8px; }
.bubble { max-width: min(80%, 460px); padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); align-self: flex-start; word-wrap: break-word; overflow-wrap: anywhere; }
.bubble.out { align-self: flex-end; background: var(--ok-bg); border-color: transparent; }
.bubble.bot { background: var(--card); border: 1px dashed var(--line); }
.btext { white-space: pre-wrap; }
.bmeta { font-size: 11px; color: var(--muted); margin-top: 3px; text-align: right; }
.who2 { font-size: 11px; font-weight: 700; color: var(--muted); }
.chatimg { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; }
@media (max-width: 600px) { .msgs { height: 55vh; } .chatwrap { padding: 12px; } }

.check { display: inline-flex; align-items: center; gap: 6px; font-weight: normal; cursor: pointer; }
input[type=file] { max-width: 100%; }

/* =========================================================
   Diseño futurista (oscuro por defecto, claro opcional)
   ========================================================= */
body { background: radial-gradient(1200px 600px at 85% -10%, rgba(59,130,246,.16), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(99,102,241,.14), transparent 60%), var(--bg); background-attachment: fixed;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .005em; }
:root[data-theme="light"] body { background: var(--bg); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* estructura: menú lateral + contenido */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, var(--side), #060c1c); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; color: #dbe6ff; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px; text-decoration: none; color: inherit; }
.logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #22d3ee, #3b82f6 55%, #7c3aed); box-shadow: 0 0 22px var(--glow); }
.logo .ico { width: 22px; height: 22px; } .logo.sm { width: 30px; height: 30px; border-radius: 9px; } .logo.sm .ico { width: 16px; height: 16px; }
.brandtxt b { display: block; font-size: 19px; letter-spacing: .01em; } .brandtxt small { color: #8fa6d8; font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: #a9bbe3; text-decoration: none; font-weight: 500; border: 0; background: none; cursor: pointer; font-size: 15px; text-align: left; }
.navlink:hover { background: rgba(120,150,255,.10); color: #fff; }
.navlink.on { color: #fff; background: linear-gradient(135deg, #2563eb, #4f46e5); box-shadow: 0 6px 18px rgba(37,99,235,.38); }
.navlink.more { display: none; }
.content { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 24px; position: sticky; top: 0; z-index: 8; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.toptitle { display: none; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.online { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ok); background: var(--ok-bg); padding: 6px 12px; border-radius: 99px; }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.iconbtn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.iconbtn:hover { color: var(--ink); border-color: var(--brand); }
.who { display: flex; align-items: center; gap: 10px; }
.whotxt b { display: block; font-size: 14px; line-height: 1.2; } .whotxt small { color: var(--muted); font-size: 12px; }
.avatar.sm { width: 34px; height: 34px; font-size: 14px; }
main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 22px 24px 70px; }
.scrim { display: none; }

/* texto y tarjetas */
h2 { font-size: 26px; letter-spacing: -.01em; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.card { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
:root[data-theme="light"] .card { background: var(--card); }
.h3 { font-size: 16px; margin: 0 0 10px; }
.pagehead { margin-bottom: 4px; }
.periodcard { padding: 12px 14px; }

/* botones y campos */
.btn { border: 1px solid var(--line); background: var(--card2); color: var(--ink); padding: 9px 15px; border-radius: 11px; transition: border-color .15s, box-shadow .15s, transform .05s; }
.btn:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--glow); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px var(--glow); }
.btn.on { background: linear-gradient(135deg, var(--brand), var(--brand2)); border-color: transparent; color: #fff; }
input[type=text], input[type=number], input[type=email], input[type=password], select, textarea, input[type=date] { background: var(--bg2); border-radius: 11px; border-color: var(--line); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--glow); }
input[type=date] { color: var(--ink); } input[type=date]::-webkit-datetime-edit, input[type=date]::-webkit-datetime-edit-fields-wrapper { color: var(--ink); }
.btn.link { color: var(--brand); background: none; box-shadow: none; }
dialog { border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: var(--card); }
dialog::backdrop { background: rgba(3,8,22,.7); backdrop-filter: blur(3px); }

/* tablas */
th { font-size: 11.5px; }
tr.clickable:hover td { background: rgba(120,150,255,.07); }
td, th { border-bottom-color: var(--line); }
.badge { padding: 3px 10px; }
.preview, .msgs, .notice.neutral { background: var(--bg2); }

/* tarjetas de números */
.kpis { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 8px; }
.kpi { flex-direction: row; align-items: center; gap: 14px; margin-bottom: 0; padding: 16px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--tone, transparent), transparent 70%); opacity: .35; pointer-events: none; }
.kbody { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kbody > span { font-size: 13px; color: var(--muted); } .kbody b { font-size: 27px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; } .kbody small { color: var(--muted); font-size: 12px; }
.kico { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--tone, linear-gradient(135deg, var(--brand), var(--brand2))); box-shadow: 0 6px 18px color-mix(in srgb, var(--tone) 40%, transparent); }
.kico .ico { width: 23px; height: 23px; }
.t-teal { --tone: linear-gradient(135deg, #14b8a6, #10b981); } .t-blue { --tone: linear-gradient(135deg, #3b82f6, #2563eb); } .t-green { --tone: linear-gradient(135deg, #22c55e, #059669); }
.t-red { --tone: linear-gradient(135deg, #f43f5e, #e11d48); } .t-purple { --tone: linear-gradient(135deg, #8b5cf6, #6d28d9); } .t-amber { --tone: linear-gradient(135deg, #f59e0b, #ea580c); }
.kpi.t-teal::after { --tone: #10b981; } .kpi.t-blue::after { --tone: #3b82f6; } .kpi.t-green::after { --tone: #22c55e; } .kpi.t-red::after { --tone: #f43f5e; } .kpi.t-purple::after { --tone: #8b5cf6; } .kpi.t-amber::after { --tone: #f59e0b; }
.kico { background: var(--tone); }

/* Inicio */
.home2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 8px; }
.home2 .card { margin-bottom: 0; } .stack { display: flex; flex-direction: column; gap: 16px; }
.chart.area { max-height: 280px; width: 100%; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; } .chart .axt { fill: var(--muted); font-size: 11px; }
.chart .ln { stroke-width: 2.6; stroke-linecap: round; } .chart .ln.c1, .chart .dot.c1 { stroke: var(--c1); } .chart .ln.c2, .chart .dot.c2 { stroke: var(--c2); }
.chart .dot { fill: var(--card); stroke-width: 2; } .stop-c1 { stop-color: var(--c1); } .stop-c2 { stop-color: var(--c2); }
.legend { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); } .legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.legend i.c1 { background: var(--c1); } .legend i.c2 { background: var(--c2); }
.quicks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 16px 0; }
.quick { display: flex; align-items: center; gap: 14px; padding: 15px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--card2) 85%, transparent), var(--card)); text-decoration: none; color: var(--ink); transition: transform .12s, border-color .15s, box-shadow .15s; }
.quick:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 8px 26px var(--glow); }
.qtxt { flex: 1; display: flex; flex-direction: column; min-width: 0; } .qtxt small { color: var(--muted); } .qarrow { color: var(--muted); }

/* conversaciones: lista + chat */
.chatsplit { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 0; height: calc(100vh - 150px); min-height: 460px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.chatpane { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.chatpane-head { padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.chatpane-head h2 { font-size: 21px; margin: 0; } .chatinfo { margin: 0; }
.chatlist { overflow-y: auto; flex: 1; }
.chatrow { background: transparent; border-bottom-color: var(--line); color: var(--ink); }
.chatrow:hover { background: rgba(120,150,255,.08); } .chatrow.active { background: linear-gradient(90deg, rgba(59,130,246,.22), transparent); box-shadow: inset 3px 0 0 var(--brand); }
.avatar { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; }
.chatempty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; padding: 20px; }
.chatempty .kico { background: linear-gradient(135deg, #22c55e, #059669); width: 62px; height: 62px; border-radius: 18px; } .chatempty .kico .ico { width: 30px; height: 30px; } .chatempty b { color: var(--ink); font-size: 17px; }
.chatsplit .chatwrap { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; margin: 0; display: flex; flex-direction: column; min-height: 0; min-width: 0; gap: 0; }
.chatsplit .chathead { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chatsplit .chatcust, .chatsplit .chatwrap > .error, .chatsplit .chatwrap > .hint { padding: 8px 16px; }
.chatsplit .chatwrap > .hint { font-size: 11.5px; border-top: 1px solid var(--line); }
.chatsplit .msgs { height: auto; flex: 1; min-height: 0; border-radius: 0; padding: 16px; background: radial-gradient(600px 300px at 80% 0%, rgba(59,130,246,.08), transparent), var(--bg2); }
.chatsplit .composer { padding: 12px 16px; border-top: 1px solid var(--line); }
.bubble { background: var(--card2); border-radius: 16px 16px 16px 4px; }
.bubble.out { background: linear-gradient(135deg, #1d4ed8, #4f46e5); color: #fff; border-color: transparent; border-radius: 16px 16px 4px 16px; }
.bubble.out .bmeta, .bubble.out .who2 { color: rgba(255,255,255,.75); }
.bubble.bot { border: 1px dashed var(--line); }
.backbtn { display: none; }

/* celular: barra de abajo + una pantalla a la vez */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; top: auto; height: auto; overflow: visible; padding: 0; border: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--side) 94%, transparent); backdrop-filter: blur(16px); gap: 0; padding-bottom: env(safe-area-inset-bottom); }
  .brand { display: none; }
  .nav { flex-direction: row; justify-content: space-around; gap: 0; padding: 6px 4px; }
  .navlink { flex-direction: column; gap: 3px; padding: 7px 4px; font-size: 11px; flex: 1; justify-content: center; align-items: center; border-radius: 12px; min-width: 0; }
  .navlink:not(.pin):not(.more) { display: none; }
  .navlink.more { display: flex; }
  .navlink .ico { width: 23px; height: 23px; }
  body.menu-open .nav { position: fixed; left: 0; right: 0; bottom: 0; flex-wrap: wrap; background: var(--side); padding: 18px 12px calc(86px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; z-index: 40; max-height: 80vh; overflow-y: auto; box-shadow: 0 -20px 60px rgba(0,0,0,.6); justify-content: flex-start; }
  body.menu-open .navlink:not(.more) { display: flex; flex: 0 0 25%; padding: 12px 2px; }
  body.menu-open .navlink.more { position: fixed; z-index: 50; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); flex: none; width: 66px; background: rgba(120,150,255,.14); }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(2,6,18,.6); backdrop-filter: blur(2px); }
  .top { padding: 10px 14px; gap: 8px; } .toptitle { display: inline-flex; } .whotxt, .online { display: none; }
  main { padding: 14px 12px 96px; }
  h2 { font-size: 22px; }
  .home2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; } .kbody b { font-size: 22px; } .kico { width: 40px; height: 40px; border-radius: 11px; }
  .quicks { grid-template-columns: 1fr 1fr; gap: 10px; } .quick { flex-direction: column; align-items: flex-start; gap: 8px; } .qarrow { display: none; }
  .btn { min-height: 40px; }
  .chatsplit { display: block; height: calc(100vh - 150px); height: calc(100dvh - 150px); }
  .chatsplit .chatpane { height: 100%; border-right: 0; }
  .chatsplit.open .chatpane { display: none; }
  .chatsplit .chatempty { display: none; }
  .chatsplit.open .chatwrap { height: 100%; }
  .backbtn { display: inline-flex; }
  .chatsplit .composer textarea { font-size: 16px; }
  input, select, textarea { font-size: 16px; }
  .periodbar .grow { display: none; }
}
@media (max-width: 420px) { .kpis { gap: 8px; } .kbody b { font-size: 20px; } }

.kpi .kico { color: #fff; font-size: inherit; }
.kpis.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.navlink .short { display: none; }
.periodbar label { flex: 0 1 auto; }
@media (max-width: 900px) {
  .kpis.k6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side { transition: none; } body.menu-open .side { z-index: 40; }
  .navlink .full { display: none; } .navlink .short { display: inline; }
  body.menu-open .navlink .full { display: inline; } body.menu-open .navlink .short { display: none; }
  .periodbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .periodbar label { grid-column: span 3; display: grid; grid-template-columns: 70px 1fr; align-items: center; }
  .periodbar label input { min-width: 0; }
}

/* ---- Conversación: teléfono en el centro + detalles a la derecha ---- */
.chatsplit.open { grid-template-columns: 320px minmax(0, 1fr) 320px; }
@media (max-width: 1280px) { .chatsplit.open { grid-template-columns: 290px minmax(0, 1fr) 280px; } }
.phonestage { display: flex; align-items: center; justify-content: center; padding: 14px; min-height: 0; background: radial-gradient(500px 360px at 50% 40%, rgba(59,130,246,.16), transparent 70%), var(--bg2); }
.phone { width: 100%; max-width: 380px; height: 100%; max-height: 760px; display: flex; flex-direction: column; overflow: hidden; position: relative;
  border-radius: 38px; border: 9px solid #05080f; background: var(--bg); box-shadow: 0 0 0 2px rgba(120,150,255,.28), 0 24px 70px rgba(0,0,0,.55), 0 0 60px rgba(59,130,246,.18); }
:root[data-theme="light"] .phone { border-color: #131a2e; }
.notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 110px; height: 22px; background: #05080f; border-radius: 0 0 16px 16px; z-index: 3; }
.pstatus { display: flex; justify-content: space-between; padding: 7px 22px 4px; font-size: 11px; color: var(--muted); }
.pstatus span:first-child { font-weight: 700; color: var(--ink); }
.phead { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; background: linear-gradient(135deg, #0f2a55, #1e2f7a); color: #fff; }
.phead .avatar.sm { background: rgba(255,255,255,.2); }
.pname { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; } .pname b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pname small { font-size: 11.5px; opacity: .8; }
.pback, .pinfo { width: 32px; height: 32px; border-radius: 10px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.pback .ico { transform: rotate(180deg); } .pback, .pinfo { }
.pback { display: none; }
.phonewarn { margin: 0; padding: 6px 12px; font-size: 11.5px; background: var(--warn-bg); color: var(--warn); text-align: center; }
.phone .msgs { flex: 1; height: auto; min-height: 0; border-radius: 0; padding: 12px 10px; gap: 5px; background: radial-gradient(400px 240px at 80% 0%, rgba(59,130,246,.10), transparent), var(--bg2); }
.phone .bubble { max-width: 82%; font-size: 14px; padding: 7px 10px; }
.phone .composer { padding: 8px 10px 14px; gap: 8px; align-items: center; background: var(--card); border-top: 1px solid var(--line); }
.phone .composer textarea { border-radius: 20px; padding: 9px 14px; min-height: 40px; max-height: 96px; }
.sendround { width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; flex: none; }
.infopane { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--line); min-height: 0; }
.infopane .card { margin: 0; box-shadow: none; padding: 14px; } .infoclose { display: none; align-self: flex-end; }
.custline { display: flex; flex-direction: column; margin-bottom: 8px; } .custline small { color: var(--muted); }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.minis div { background: var(--bg2); border-radius: 10px; padding: 8px; text-align: center; } .minis b { display: block; font-size: 18px; } .minis small { color: var(--muted); font-size: 11px; }
.infocard .btn { margin: 4px 6px 0 0; text-decoration: none; display: inline-block; }
.ctrlbtns { margin-top: 10px; gap: 6px; }
.qlist { display: flex; flex-direction: column; gap: 6px; }
.qreply { text-align: left; font-size: 13px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); cursor: pointer; }
.qreply:hover { border-color: var(--brand); }
@media (max-width: 900px) {
  .chatsplit.open { display: block; position: fixed; inset: 0 0 0 0; z-index: 25; height: auto; border-radius: 0; border: 0; padding-bottom: 0; background: var(--bg); }
  .chatsplit.open .phonestage { padding: 0; height: 100%; background: var(--bg); }
  .chatsplit.open .phone { max-width: none; max-height: none; border: 0; border-radius: 0; box-shadow: none; padding-bottom: env(safe-area-inset-bottom); }
  .notch, .pstatus { display: none; }
  .phead { padding: 12px; } .pback { display: grid; }
  .chatsplit.open .infopane { display: none; }
  .chatsplit.open.showinfo .infopane { display: flex; position: absolute; inset: 0; z-index: 30; background: var(--bg); border: 0; padding-top: 16px; }
  .infoclose { display: inline-flex; }
}
@media (max-width: 900px) { body:has(.chatsplit.open) .side { display: none; } }

.chataudio { width: 100%; min-width: 200px; max-width: 100%; height: 38px; display: block; }

/* ---- Inicio estilo panel futurista ---- */
:root, :root[data-theme="dark"] { --radius: 20px; --c3: #f59e0b; }
:root[data-theme="light"] { --radius: 20px; --c3: #d97706; }
.card { box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05); }
.statgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { margin: 0; padding: 16px 16px 12px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat::before { content: ""; position: absolute; inset: auto -40px -60px auto; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--tc), transparent 68%); opacity: .22; pointer-events: none; }
.stat.t-teal { --tc: #10b981; color-scheme: dark; } .stat.t-blue { --tc: #3b82f6; } .stat.t-green { --tc: #22c55e; } .stat.t-red { --tc: #f43f5e; } .stat.t-purple { --tc: #8b5cf6; } .stat.t-amber { --tc: #f59e0b; }
.stat-top { display: flex; align-items: center; gap: 10px; } .stat-label { font-size: 13px; color: var(--muted); line-height: 1.2; }
.stat .kico { width: 38px; height: 38px; border-radius: 12px; } .stat .kico .ico { width: 20px; height: 20px; }
.stat-val { font-size: 27px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; min-height: 42px; }
.delta { font-size: 12.5px; font-weight: 700; display: flex; flex-direction: column; line-height: 1.25; } .delta small { font-weight: 400; color: var(--muted); font-size: 11px; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); } .stat-note { color: var(--muted); font-size: 12px; align-self: flex-end; }
.spark { width: 46%; height: 42px; color: var(--tc); flex: none; overflow: visible; } .spark .sline { stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--tc)); }
.home3 { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.home3 .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; } .home3 .card, .home3 .quicks { margin: 0; }
.chartcard .row { margin-bottom: 4px; } .chartcard .kico { width: 38px; height: 38px; border-radius: 12px; }
.chart.area { max-height: 300px; overflow: visible; }
.chart .ln.glow { stroke-width: 8; opacity: .35; filter: blur(5px); }
.chart .ln.c3, .chart .dot.c3 { stroke: var(--c3); } .stop-c3 { stop-color: var(--c3); }
.chart .dot { fill: var(--bg); }
.more-link { font-size: 13px; color: var(--brand); text-decoration: none; } .more-link:hover { text-decoration: underline; }
.quicks { margin: 0; }
.quick { border-radius: 18px; padding: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--qc) 28%, var(--card)), color-mix(in srgb, var(--qc) 6%, var(--card))); border-color: color-mix(in srgb, var(--qc) 45%, transparent); }
.quick.t-green { --qc: #22c55e; } .quick.t-blue { --qc: #3b82f6; } .quick.t-purple { --qc: #8b5cf6; } .quick.t-amber { --qc: #f59e0b; }
.banner { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; border: 1px solid rgba(96,165,250,.35); position: relative; overflow: hidden;
  background: radial-gradient(260px 120px at 90% 0%, rgba(124,58,237,.45), transparent 70%), linear-gradient(135deg, #0e2a6b, #17348f 60%, #2b2a9c); color: #fff; box-shadow: 0 10px 34px rgba(37,99,235,.35); }
.bico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #22d3ee, #3b82f6 55%, #7c3aed); box-shadow: 0 0 26px rgba(59,130,246,.7); flex: none; } .bico .ico { width: 26px; height: 26px; }
.btxt { flex: 1; display: flex; flex-direction: column; min-width: 0; } .btxt b { font-size: 17px; } .btxt small { opacity: .85; font-size: 13px; }
.banner .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; text-decoration: none; flex: none; }
.feed { display: flex; flex-direction: column; } .feeditem { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); } .feeditem:last-child { border-bottom: 0; }
.feeditem .kico { width: 40px; height: 40px; border-radius: 50%; } .ftxt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ftxt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fwhen { color: var(--muted); font-size: 12px; white-space: nowrap; }
.t-teal.kico { --tone: linear-gradient(135deg, #14b8a6, #10b981); } .kico.t-blue { --tone: linear-gradient(135deg, #3b82f6, #2563eb); }
.minis4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 6px; }
.minis4 div { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; min-width: 0; } .minis4 b { display: block; font-size: 16px; } .minis4 small { color: var(--muted); font-size: 11px; }
.home3 .chart.area { max-height: 200px; }
@media (max-width: 1400px) { .statgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .home3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat-val { font-size: 22px; } .stat { padding: 14px 14px 10px; }
  .delta small { display: none; } .spark { width: 50%; height: 36px; }
  .banner { flex-wrap: wrap; } .minis4 { grid-template-columns: repeat(2, 1fr); }
}

.kico .ico { color: #fff; stroke: #fff; }
.home3 .quicks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.home3 .quick { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; } .home3 .quick .qarrow { display: none; }
.home3 .quick .kico { width: 40px; height: 40px; border-radius: 12px; }
@media (max-width: 900px) { .home3 .quicks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.home3 table { min-width: 0; } .home3 th, .home3 td { white-space: normal; }

.storechip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.storechip .ico { width: 18px; height: 18px; color: var(--brand); } .storechip span { display: flex; flex-direction: column; line-height: 1.15; } .storechip b { font-size: 13.5px; } .storechip small { color: var(--muted); font-size: 11px; }
@media (max-width: 900px) { .storechip { display: none; } }

/* Login */
.loginpage { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.loginpage .center { width: min(420px, 100%); margin: 0; padding: 28px; box-shadow: 0 20px 70px rgba(0,0,0,.5), 0 0 80px rgba(59,130,246,.18); }
.loginbrand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; } .loginbrand b { font-size: 22px; display: block; } .loginbrand small { color: var(--muted); }
.loginpage .btn.primary { width: 100%; padding: 12px; font-size: 16px; margin-top: 6px; }
/* Resumen en listas */
.minirow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
.mini { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg2); }
.mini .kico { width: 40px; height: 40px; border-radius: 12px; background: var(--tone); } .mini small { display: block; color: var(--muted); font-size: 12px; } .mini b { font-size: 21px; font-variant-numeric: tabular-nums; }
.who3 { display: flex; align-items: center; gap: 10px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); font-size: 12.5px; }
.rtable tbody tr { transition: background .12s; }
/* tablas como tarjetas en el celular */
@media (max-width: 700px) {
  .minirow { grid-template-columns: 1fr; gap: 8px; }
  table.rtable { min-width: 0; display: block; } .rtable thead { display: none; } .rtable tbody { display: flex; flex-direction: column; gap: 10px; }
  .rtable tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg2); }
  .rtable td { display: block; border: 0; padding: 0; white-space: normal; text-align: left; } .rtable td.num { text-align: left; }
  .rtable td[data-l]::before { content: attr(data-l); display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
  .rtable td[data-l="Cliente"], .rtable td[data-l="Productos"] { grid-column: 1 / -1; } .rtable td.empty { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .minirow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .mini { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; } .mini .kico { width: 30px; height: 30px; border-radius: 9px; } .mini .kico .ico { width: 16px; height: 16px; } .mini b { font-size: 16px; }
  .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > .field:first-child { grid-column: 1 / -1; }
  .pagehead .btn.primary, .row > .btn.primary { white-space: nowrap; }
}
.grid2 > *, .grid3 > * { min-width: 0; } select, input { max-width: 100%; }
@media (max-width: 700px) { .rtable td[data-l="Pedido"]::before, .rtable td[data-l="Cliente"]::before, .rtable td[data-l="Producto"]::before { display: none; } }

/* Meta Ads */
.statgrid.sg4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.minirow.m3 { margin-bottom: 16px; } .minirow.m3 .mini b { font-size: 18px; } .minirow.m3 .mini div { min-width: 0; } .minirow.m3 .mini b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; } .two .card { margin: 0; }
.camphead { margin: 6px 0 10px; }
.camps { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.camp { text-align: left; color: var(--ink); cursor: pointer; border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, var(--card2), var(--card)); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05); transition: transform .12s, border-color .15s, box-shadow .15s; }
.camp:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 10px 30px var(--glow); }
.camp-top { display: flex; align-items: center; gap: 12px; } .camp-top .kico { width: 42px; height: 42px; border-radius: 13px; background: var(--tone); }
.camp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; } .camp-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15.5px; } .camp-name small { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dotst { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; } .dotst.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.eff { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; flex: none; } .eff.good { background: var(--ok-bg); color: var(--ok); } .eff.bad { background: var(--bad-bg); color: var(--bad); } .eff.mid { background: var(--warn-bg); color: var(--warn); } .eff.off { background: var(--bg2); color: var(--muted); }
.camp-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; } .camp-metrics div { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.camp-metrics small { display: block; color: var(--muted); font-size: 11px; } .camp-metrics b { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.share { display: flex; align-items: center; gap: 10px; } .share { position: relative; } .share span { display: block; height: 7px; border-radius: 99px; background: linear-gradient(90deg, #3b82f6, #8b5cf6); box-shadow: 0 0 10px rgba(99,102,241,.6); }
.share small { color: var(--muted); font-size: 11.5px; white-space: nowrap; margin-left: auto; }
.accs { display: flex; flex-direction: column; gap: 10px; } .acc { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg2); flex-wrap: wrap; }
.acc .kico { width: 42px; height: 42px; border-radius: 13px; background: var(--tone); } .accmain { flex: 1; min-width: 200px; display: flex; flex-direction: column; } .accmain small { color: var(--muted); }
@media (max-width: 1100px) { .statgrid.sg4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .two { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .camps { grid-template-columns: 1fr; } .minirow.m3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .rtable td:first-child { grid-column: 1 / -1; font-size: 15.5px; } .rtable td:first-child::before { display: none !important; }
  .rtable tr.clickable:active { background: rgba(120,150,255,.12); }
  .rtable td .row { flex-wrap: wrap; }
  .rtable tr.inactive { opacity: .6; }
}
@media (max-width: 700px) {
  .rtable td:has(.arrows) { grid-column: 1 / -1; } .rtable .arrows { flex-direction: row; gap: 8px; } .rtable .arrows .btn { padding: 4px 16px; line-height: 20px; }
}
