/* =========================================================
   ALTOKI · Panel de administración
   Mismos colores y tipografías que la app.
   ========================================================= */
:root {
  --green: #42E842;
  --green-ink: #0C8A19;
  --green-50: #EEFDEB;
  --green-100: #D7FAD1;
  --black: #0A0A0A;
  --black-2: #151515;
  --black-3: #222222;
  --black-line: #2C2C2C;
  --ink: #0A0A0A;
  --ink-2: #3B3B3B;
  --muted: #6E706E;
  --line: #E6E6E3;
  --bg: #F5F5F3;
  --surface: #FFFFFF;
  --danger: #D93036;
  --danger-50: #FDECEC;
  --warn: #B86E00;
  --warn-50: #FFF4E0;
  --info: #2459D6;
  --info-50: #EAF0FF;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow: 0 6px 20px rgba(0, 0, 0, .06);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .22);
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
  --display: 'Fredoka', 'Manrope', system-ui, sans-serif;
  --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-ink); }
h1, h2, h3 { margin: 0; line-height: 1.15; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- Arranque e ingreso ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); }
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: var(--black); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: -.5px; color: #fff; line-height: 1; }
.wordmark b { color: var(--green); font-weight: 700; }
.login-art .logo { font-size: 44px; }
.login-art h1 { font-family: var(--display); font-size: 44px; font-weight: 600; letter-spacing: -.5px; }
.login-art h1 em { color: var(--green); font-style: normal; }
.login-art p { color: #B9BBB9; max-width: 380px; }
.login-art .mascot { position: absolute; right: -30px; bottom: -20px; width: 260px; opacity: .95; transform: rotate(-8deg); }
.login-box { display: grid; place-content: center; padding: 32px; }
.login-card { width: min(380px, 90vw); }
.login-card h2 { font-family: var(--display); font-size: 28px; font-weight: 600; margin-bottom: 6px; }
.login-card .muted { margin: 0 0 22px; }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--black); color: #E9E9E7; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.side .brand .wordmark { font-size: 30px; }
.side .brand .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--green); border: 1px solid #2F5A2F; padding: 2px 7px; border-radius: 99px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #CFCFCC; text-decoration: none; font-weight: 600; border: 0; background: none; text-align: left; width: 100%; }
.nav-item svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav-item:hover { background: var(--black-3); color: #fff; }
.nav-item.on { background: var(--green); color: var(--black); }
.nav-item.on svg { opacity: 1; }
.nav-item .count { margin-left: auto; background: var(--green); color: var(--black); font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; min-width: 20px; text-align: center; }
.nav-item.on .count { background: var(--black); color: var(--green); }
.nav-sep { height: 1px; background: var(--black-line); margin: 10px 8px; }
.side .me { margin-top: auto; padding: 12px; border-radius: 12px; background: var(--black-2); display: flex; align-items: center; gap: 10px; }
.side .me b { display: block; font-size: 13px; color: #fff; }
.side .me small { color: #9A9C9A; font-size: 12px; }
.side .me button { margin-left: auto; background: none; border: 0; color: #9A9C9A; padding: 6px; border-radius: 8px; }
.side .me button:hover { color: #fff; background: var(--black-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; background: rgba(245, 245, 243, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 14px 28px; display: flex; align-items: center; gap: 14px; min-height: 64px; }
.top h1 { font-family: var(--display); font-size: 24px; font-weight: 600; }
.top .menu-btn { display: none; }
.online { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.online .faces { display: flex; }
.face { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--black); background: var(--green-100); border: 2px solid var(--bg); margin-left: -8px; position: relative; }
.face:first-child { margin-left: 0; }
.face::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); }
.content { padding: 24px 28px 48px; display: grid; gap: 20px; align-content: start; }

/* ---------- Piezas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; font-weight: 800; }
.card-head .spacer, .spacer { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: #CFCFCB; }
.kpi small { color: var(--muted); font-weight: 600; display: block; }
.kpi strong { display: block; font-family: var(--display); font-size: 30px; font-weight: 600; margin-top: 4px; letter-spacing: -.3px; }
.kpi.alert strong { color: var(--danger); }
.kpi.dark { background: var(--black); color: #fff; border-color: var(--black); }
.kpi.dark small { color: #A9ABA9; }
.kpi.dark strong { color: var(--green); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 99px; border: 1px solid transparent; padding: 9px 16px; font-weight: 700; font-size: 13px; background: var(--black); color: #fff; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--black-3); }
.btn.green { background: var(--green); color: var(--black); }
.btn.green:hover { background: #36DA36; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: #CFCFCB; }
.btn.danger { background: var(--danger-50); color: var(--danger); }
.btn.danger:hover { background: #FBD9DA; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.block { width: 100%; padding: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 13px; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 13px; outline: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--black); box-shadow: 0 0 0 3px rgba(66, 232, 66, .35); }
.textarea { min-height: 84px; resize: vertical; }
.input.code { font-size: 24px; letter-spacing: 8px; text-align: center; font-weight: 700; }
.err { color: var(--danger); font-weight: 600; margin: 0 0 12px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 99px; font-weight: 700; font-size: 13px; }
.tab.on { background: var(--black); color: #fff; border-color: var(--black); }
.tab .n { opacity: .6; margin-left: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input { max-width: 340px; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 0 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #FAFAF8; }
table.list tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; padding: 34px 10px; color: var(--muted); }
.empty img { width: 64px; opacity: .9; }
.empty b { display: block; color: var(--ink); margin: 6px 0 2px; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #F0F0EE; color: var(--ink-2); white-space: nowrap; }
.chip.green { background: var(--green-100); color: #07651A; }
.chip.warn { background: var(--warn-50); color: var(--warn); }
.chip.red { background: var(--danger-50); color: var(--danger); }
.chip.blue { background: var(--info-50); color: var(--info); }
.chip.dark { background: var(--black); color: var(--green); }

.row { display: flex; align-items: center; gap: 12px; }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--green-100); color: var(--black); display: grid; place-items: center; font-weight: 800; flex: none; }
.av.store { border-radius: 12px; background: #F0F0EE; font-size: 20px; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.who b { display: block; }
.who small { color: var(--muted); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* Solicitudes */
.req { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.req:last-child { border-bottom: 0; }
.docs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.doc { width: 132px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #FAFAF8; text-decoration: none; color: inherit; font-size: 12px; font-weight: 700; }
.doc .ph { height: 86px; display: grid; place-items: center; background: #EFEFEC; color: var(--muted); }
.doc .ph img { width: 100%; height: 100%; object-fit: cover; }
.doc span { display: block; padding: 7px 9px; }
.req-actions { display: grid; gap: 8px; align-content: start; min-width: 170px; }

/* Mensajes */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 64px - 48px); min-height: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.threads { border-right: 1px solid var(--line); overflow-y: auto; }
.threads .toolbar { padding: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.thread { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.thread:hover { background: #FAFAF8; }
.thread.on { background: var(--green-50); }
.thread b { display: block; font-size: 13px; }
.thread p { margin: 2px 0 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.thread .meta { text-align: right; font-size: 11px; color: var(--muted); display: grid; gap: 4px; justify-items: end; }
.unread { background: var(--green); color: var(--black); font-weight: 800; font-size: 11px; border-radius: 99px; padding: 0 6px; }
.conv { display: flex; flex-direction: column; min-width: 0; }
.conv-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.conv-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: #FBFBFA; }
.msg { max-width: 72%; padding: 10px 13px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.msg small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.msg.team { align-self: flex-end; background: var(--black); color: #fff; border-color: var(--black); }
.msg.team small { color: #A9ABA9; }
.conv-form { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.conv-form .textarea { min-height: 46px; height: 46px; }
.viewing { font-size: 12px; color: var(--warn); font-weight: 700; }

/* Detalle y paneles laterales */
.drawer-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 20; animation: fade .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg); z-index: 21; overflow-y: auto; box-shadow: var(--shadow-lg); animation: slide .28s cubic-bezier(.2, .8, .2, 1); }
.drawer-head { position: sticky; top: 0; background: var(--bg); padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; z-index: 1; }
.drawer-head h2 { font-family: var(--display); font-size: 22px; font-weight: 600; }
.drawer-body { padding: 20px 22px 40px; display: grid; gap: 16px; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }
.items { margin: 0; padding: 0; list-style: none; }
.items li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.items li:last-child { border-bottom: 0; }
.items li span:last-child { margin-left: auto; font-weight: 700; }
.totals { display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; }
.totals .total { font-weight: 800; font-size: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.timeline li { display: flex; gap: 10px; align-items: center; }
.timeline li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }

/* Modal y avisos */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 40; display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { background: var(--surface); border-radius: var(--r-lg); width: min(460px, 100%); padding: 24px; box-shadow: var(--shadow-lg); animation: pop .25s cubic-bezier(.34, 1.56, .64, 1); }
.modal h2 { font-family: var(--display); font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.modal p { color: var(--ink-2); margin: 0 0 16px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; background: var(--black); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; z-index: 60; transition: .3s cubic-bezier(.34, 1.56, .64, 1); pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
.notice { background: var(--warn-50); color: #6B4200; border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.notice.info { background: var(--info-50); color: #1A3E99; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }

/* ---------- Pantallas chicas ---------- */
@media (max-width: 1100px) {
  .grid-side, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 240px; padding: 28px; }
  .login-art h1 { font-size: 32px; }
  .login-art .mascot { width: 160px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 30; width: 270px; transform: translateX(-100%); transition: transform .25s; }
  .shell.menu-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .top { padding: 12px 16px; }
  .top .menu-btn { display: grid; }
  .content { padding: 16px 16px 40px; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox.has-conv .threads { display: none; }
  .inbox:not(.has-conv) .conv { display: none; }
  .conv-body { min-height: 50vh; }
  .req { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .online span { display: none; }
}

/* Ajustes */
a.tab { text-decoration: none; color: var(--ink); }
a.tab.on { color: #fff; }
.doc .ph svg { width: 34px; height: 34px; }
.empty > svg { width: 40px; height: 40px; color: var(--muted); }

/* =========================================================
   Versión 2: ingreso con contraseña, elegir panel, equipo
   ========================================================= */
.wordmark.dark { color: var(--black); }
.login-alt { margin-top: 16px; text-align: center; }
.link { background: none; border: 0; padding: 4px; color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link b { color: var(--green-ink); }
.check { display: flex; align-items: flex-start; gap: 9px; margin: 2px 0 14px; font-weight: 600; font-size: 13px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: #18A818; margin: 1px 0 0; flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check.pill { margin: 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; align-items: center; }
.check.pill:has(input:checked) { border-color: #18A818; background: var(--green-50); }
.fields { display: flex; flex-wrap: wrap; column-gap: 14px; }
.fields > * { flex: 1 1 100%; }
.fields > .field.half { flex: 1 1 calc(50% - 7px); min-width: 160px; }
.field small { font-size: 12px; }
.modal.wide { width: min(600px, 100%); max-height: 92vh; overflow-y: auto; }
.modal .actions { align-items: center; }
.btn.ghost.danger-text { color: var(--danger); }
.small { font-size: 12px; margin: 12px 0 0; }

/* Elegir panel */
.chooser { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 32px 20px; gap: 6px; }
.chooser .wordmark { font-size: 40px; margin-bottom: 18px; }
.chooser h1 { font-family: var(--display); font-weight: 600; font-size: 34px; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 18px; margin: 26px 0 18px; }
.choice { text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 8px; transition: transform .15s, border-color .15s, box-shadow .15s; }
.choice:hover:not(:disabled) { border-color: var(--black); transform: translateY(-2px); box-shadow: var(--shadow); }
.choice b { font-family: var(--display); font-size: 22px; font-weight: 600; }
.choice span { color: var(--ink-2); }
.choice small { margin-top: 6px; font-weight: 800; color: var(--green-ink); display: flex; align-items: center; gap: 6px; }
.choice small svg { width: 14px; height: 14px; }
.choice-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--green); display: grid; place-items: center; color: var(--black); }
.choice-ic svg { width: 24px; height: 24px; }
.choice.locked { opacity: .55; cursor: not-allowed; }
.choice.locked small { color: var(--muted); }
.choice.locked .choice-ic { background: #EDEDEA; }

/* Barra lateral v2 */
.nav-title { margin: 14px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6F716F; }
.nav-item.switch { margin-top: 8px; border: 1px dashed var(--black-line); color: #CFCFCC; font-size: 13px; }
.side .me { flex-wrap: nowrap; }
.side .me button + button { margin-left: 0; }
.mode-chip { margin-left: 4px; }

/* Inicio */
.hello h2 { font-family: var(--display); font-weight: 600; font-size: 28px; }
.hello p { margin: 4px 0 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head h2 svg { width: 18px; height: 18px; }
.card-head.wrap { flex-wrap: wrap; }
.more { display: inline-block; margin-top: 12px; font-weight: 700; text-decoration: none; }
.mini-list { display: grid; gap: 6px; }
.mini { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: #FAFAF8; border: 1px solid transparent; cursor: pointer; text-decoration: none; color: inherit; }
.mini:hover { border-color: var(--line); background: #fff; }
.mini b { display: block; font-size: 13px; }
.mini small, .mini span > small { display: block; color: var(--muted); font-size: 12px; }
.mini > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mini .when { text-align: center; min-width: 54px; }
.mini .when b { font-size: 15px; }
.mini.event.reunion { border-left: 4px solid var(--green); }
.mini.event.recordatorio { border-left: 4px solid #FFB547; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #C9C9C5; display: grid; place-items: center; cursor: pointer; }
.tick:hover { border-color: #18A818; }
.tick.done { background: var(--green); border-color: var(--green); }
.tick svg { width: 13px; height: 13px; }
.late { color: var(--danger); font-weight: 700; }
.stack { display: grid; gap: 20px; align-content: start; }
.stack-sm { display: grid; gap: 8px; }

/* Agenda */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 108px; display: flex; flex-direction: column; gap: 4px; }
.day small { color: var(--muted); font-weight: 700; text-transform: capitalize; }
.day > b { font-family: var(--display); font-size: 22px; font-weight: 600; }
.day.today { border-color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.dot { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 6px; background: var(--green-100); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot.recordatorio { background: #FFE7C2; }
.day-title { font-size: 14px; font-weight: 800; margin: 16px 0 8px; }
.day-title:first-child { margin-top: 0; }

/* Tareas */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: #EDEDEA; border-radius: var(--r-lg); padding: 12px; display: grid; gap: 10px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.col-head .n { background: #fff; border-radius: 99px; padding: 0 8px; font-size: 12px; font-weight: 800; }
.col-empty { text-align: center; padding: 14px 0; margin: 0; }
.tcard { background: var(--surface); border-radius: 14px; padding: 12px; display: grid; gap: 8px; cursor: pointer; border: 1px solid transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.tcard:hover { border-color: #CFCFCB; }
.tcard p { margin: 0; color: var(--ink-2); font-size: 13px; }
.tcard.done b { text-decoration: line-through; color: var(--muted); }
.tmeta, .tmove { display: flex; align-items: center; gap: 6px; }
.tmove { justify-content: space-between; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm svg { width: 15px; height: 15px; }

/* Chat */
.chip.tiny { font-size: 10px; padding: 1px 6px; }
.dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-left: 4px; vertical-align: middle; }
.msg .from { display: block; font-size: 12px; margin-bottom: 2px; color: var(--green-ink); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px 0; }
.back-btn { display: none; }
.input.search { max-width: 300px; }

/* Locales y menús */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.store-card { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; background: var(--surface); transition: transform .15s, box-shadow .15s; }
.store-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.store-card .cover { height: 110px; background: #EFEFEC; display: grid; place-items: center; font-size: 40px; position: relative; }
.store-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.store-card .cover .chip { position: absolute; top: 8px; left: 8px; }
.store-card .body { padding: 12px 14px; display: grid; gap: 2px; }
.store-card small { color: var(--muted); }
.menu-list { display: grid; gap: 6px; }
.menu-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.menu-item.off { opacity: .55; }
.menu-item .thumb { width: 52px; height: 52px; border-radius: 10px; background: #EFEFEC; display: grid; place-items: center; font-size: 24px; overflow: hidden; }
.menu-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.menu-item small { color: var(--muted); display: block; }
.switch { width: 42px; height: 24px; border-radius: 99px; background: #D5D5D1; border: 0; position: relative; padding: 0; transition: background .2s; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch.on { background: #18C318; }
.switch.on i { transform: translateX(18px); }

@media (max-width: 1250px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1000px) { .week { grid-template-columns: repeat(4, minmax(0, 1fr)); } .board { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-chip { display: none; }
  .back-btn { display: grid; }
  .menu-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .menu-item .thumb { width: 44px; height: 44px; }
  .menu-item > b.mono { grid-column: 2; }
  .input.search { max-width: none; }
  .top h1 { font-size: 20px; }
}
.av svg { width: 18px; height: 18px; }
.thread .meta { align-content: start; }
.unread { line-height: 18px; min-width: 18px; text-align: center; }

/* =========================================================
   Versión 3: perfil, fotos y aprobación de administradores
   ========================================================= */
.av.photo { background: #EDEDEA; overflow: hidden; padding: 0; }
.av.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.xl { width: 96px; height: 96px; font-size: 32px; }
.face img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.side .me { padding: 8px; gap: 6px; }
.me-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: inherit; padding: 4px; border-radius: 10px; }
.me-link:hover, .me-link.on { background: var(--black-3); }
.me-link span { min-width: 0; }
.me-link b, .me-link small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intro { margin: -6px 0 0; }
.small-inline { font-size: 12px; }
.choices.one { grid-template-columns: minmax(0, 340px); }

/* Perfil */
.profile { display: grid; gap: 20px; max-width: 640px; }
.profile-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
.profile-photo { display: grid; justify-items: center; gap: 12px; }
.profile-photo label.btn { cursor: pointer; }

/* Usuarios internos */
.card.attention { border-color: #F2D49B; background: #FFFBF2; }
.req-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #F4E5C4; flex-wrap: wrap; }
.req-row:first-of-type { border-top: 0; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn + .btn { margin-left: 4px; }

@media (max-width: 860px) {
  .profile-card { grid-template-columns: 1fr; justify-items: stretch; }
  .profile-photo { justify-items: center; }
  .row-actions { white-space: normal; text-align: left; }
  .row-actions .btn { margin: 2px 0; }
}
.team-list { display: grid; }
.team-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.team-row:first-child { border-top: 0; padding-top: 0; }
.team-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.team-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; padding-left: 50px; }
@media (max-width: 860px) { .team-row { grid-template-columns: 1fr; } .team-meta { justify-content: flex-start; padding-left: 50px; } }
/* Las tablas anchas se desplazan dentro de su tarjeta, sin ensanchar la página */
.content > *, .card, .stack > *, .grid-side > *, .grid-2 > *, .grid-3 > *, .drawer-body > * { min-width: 0; }
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
.menu-bg { display: none; }
@media (max-width: 860px) {
  .menu-bg { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 29; }
  .quick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .quick::-webkit-scrollbar { display: none; }
  .quick .tab { flex: none; }
  .conv-head { gap: 8px; }
}
/* Varios responsables por tarea */
.avs { display: inline-flex; align-items: center; }
.avs .av { border: 2px solid #fff; margin-left: -8px; }
.avs .av:first-child { margin-left: 0; }
.more-av { background: #EDEDEA; font-size: 10px; }
