/* ─────────────────────────────────────────────────────────────
   Beclectic · panel (/admin) y portales de cliente (/c/…)
   Misma identidad que el sitio: tinta, papel claro y lima.
   Todo bajo body.is-panel; los capítulos conservan su estructura.
   ───────────────────────────────────────────────────────────── */
body.is-panel {
  --ink: #0a0b06; --ink-2: #1a1d15; --ink-3: #2f332a; --muted: #5b6055;
  --line: #e2e4da; --line-2: #eceee6; --paper: #f4f5ef; --desk: #f4f5ef; --white: #ffffff;
  --lav: #ffffff; --lime: #d2ff3c; --olive: #4c5f00;
  background: var(--paper); color: var(--ink);
}
.is-panel #app { background: var(--paper); }
.is-panel .kicker { color: var(--olive); }

/* ── barra superior oscura ── */
.is-panel .topbar { background: #070807; color: #eef0e8; border-bottom: 0; padding: 0 20px; gap: 6px 18px; min-height: 64px; position: sticky; top: 0; z-index: 30; flex-wrap: nowrap; }
.is-panel .brand { display: inline-flex; align-items: center; gap: 10px; color: #eef0e8; text-decoration: none; padding: 12px 0; flex: none; }
.is-panel .brand-b { width: 30px; height: 30px; border-radius: 8px; background: var(--lime); color: #0a0b06; display: grid; place-items: center; font-weight: 900; font-style: italic; font-size: 17px; }
.is-panel .brand-w { font-weight: 800; font-stretch: 72%; font-size: 20px; letter-spacing: .01em; }
.is-panel .mainnav { flex: 1; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px; }
.is-panel .mainnav::-webkit-scrollbar { display: none; }
.is-panel .mainnav a { color: #b8bdb1; min-height: 64px; padding: 0 12px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: 0; }
.is-panel .mainnav a:hover { color: #fff; }
.is-panel .mainnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--lime); }
.is-panel .crumb { color: #6b7064; flex: none; }
.is-panel .crumb a { color: #fff; }
.is-panel .top-btn { color: #eef0e8; border: 1.5px solid #2f332a; border-radius: 999px; min-height: 38px; padding: 0 14px; margin: 0; flex: none; background: transparent; }
.is-panel .top-btn:hover { border-color: var(--lime); color: var(--lime); }
.is-panel .topbar .top-btn + .top-btn { margin-left: 0; }

/* ── botones ── */
.is-panel .btn { border-radius: 999px; background: var(--ink); color: var(--lime); }
.is-panel .btn:hover { background: #000; color: var(--lime); }
.is-panel .btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.is-panel .btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ── encabezados de página ── */
.is-panel .home { max-width: 1240px; padding: 32px 20px 64px; }
.is-panel .home-head { border-bottom: 1px solid var(--line); }
.is-panel .home-head h1, .is-panel .page-head h1 { font-stretch: 72%; text-transform: uppercase; letter-spacing: -.01em; font-weight: 850; }

/* ── tarjetas de proyecto (libros) ── */
.is-panel .book { background: #fff !important; color: var(--ink) !important; border-radius: 24px; box-shadow: 0 1px 0 rgba(10,11,6,.04), inset 0 0 0 1px var(--line); }
.is-panel .book:hover { box-shadow: 0 24px 50px -30px rgba(10,11,6,.35), inset 0 0 0 1.5px var(--ink); }
.is-panel .book-top, .is-panel .book-open { color: var(--ink); }
.is-panel .book-top span:last-child { color: var(--muted); }
.is-panel .book-client { color: var(--muted); }
.is-panel .book h2 { font-stretch: 72%; text-transform: uppercase; letter-spacing: -.01em; font-weight: 850; }
.is-panel .book p, .is-panel .book-phase { color: var(--muted) !important; }
.is-panel .book-parts a { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 999px; }
.is-panel .book-parts a:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.is-panel .bar { background: var(--line-2); border-radius: 999px; overflow: hidden; height: 8px; }
.is-panel .bar > div, .is-panel .bar > i { background: var(--book-accent, var(--ink)) !important; border-radius: 999px; }
.is-panel .bar.dark { background: rgba(255,255,255,.14); }

/* ── portada del libro ── */
.is-panel .cover { background: var(--ink) !important; color: #eef0e8 !important; border-radius: 28px; }
.is-panel .cover-top { color: var(--accent); }
.is-panel .cover .muted { color: #8d9285; }
.is-panel .cover h1 { font-stretch: 72%; text-transform: uppercase; letter-spacing: -.01em; font-weight: 850; }
.is-panel .cover-title p, .is-panel .cover-phase { color: #b8bdb1 !important; }
.is-panel .cover-site { color: var(--accent); }
.is-panel .cover .bar.dark > div { background: var(--accent) !important; }
.is-panel .facts { background: transparent; border-top: 1px solid #23271f; gap: 0; }
.is-panel .facts > div { background: transparent !important; color: #eef0e8 !important; padding: 14px 12px 0 0; }
.is-panel .facts .mono:first-child { color: #8d9285; }
.is-panel .index { background: #fff; border-radius: 28px; box-shadow: inset 0 0 0 1px var(--line); }
.is-panel .part { background: var(--paper); border-radius: 18px; box-shadow: none; }
.is-panel .part:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.is-panel .part .num { color: var(--olive); }
.is-panel .spread { box-shadow: none; background: transparent; gap: 14px; }

/* ── páginas de capítulo ── */
.is-panel .toc { background: #fff !important; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); }
.is-panel .toc a { color: var(--muted) !important; border-radius: 12px; }
.is-panel .toc a[aria-current="page"] { background: var(--ink) !important; color: var(--lime) !important; }
.is-panel .toc a[aria-current="page"] .mono { color: var(--lime); }
.is-panel .page { background: #fff; border-radius: 28px; box-shadow: inset 0 0 0 1px var(--line); }
.is-panel .pager .btn { color: var(--lime); }

/* bienvenida del cliente */
.is-panel .welcome { background: #fff !important; }
.is-panel .pillar, .is-panel .pillars.dark .pillar { background: var(--paper) !important; }
.is-panel .pillar .mono { color: var(--olive); }

/* indicadores y finanzas */
.is-panel .kpis { background: transparent; border: 0; gap: 12px; }
.is-panel .kpis > div, .is-panel .kpis > a { background: #fff !important; color: var(--ink) !important; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); }
.is-panel .kpis > :first-child { background: var(--ink) !important; color: #eef0e8 !important; }
.is-panel .kpis > :first-child .kicker { color: var(--lime); }
.is-panel .kpis > :first-child span:last-child { color: #8d9285; }
.is-panel .price-total { background: var(--ink) !important; color: #eef0e8 !important; border-radius: 22px; }
.is-panel .price-total .kicker { color: var(--lime); }
.is-panel .price-total .muted-ink, .is-panel .price-total span { color: #b8bdb1 !important; }
.is-panel .price-total strong { color: #fff !important; }
.is-panel .table-wrap { background: #fff; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.is-panel .card, .is-panel .prop, .is-panel .pay, .is-panel .deliv { border-radius: 18px; }
.is-panel .calendar, .is-panel .timeline { background: #fff; border-radius: 22px; }

/* ═════════ RESUMEN ═════════ */
.dash { gap: 18px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 6px; }
.dash-head h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 850; font-stretch: 70%; text-transform: uppercase; line-height: .92; margin: 6px 0 8px; }
.dash-head p { color: var(--muted); font-size: 17px; }
.dash-head p strong { color: var(--ink); background: var(--lime); padding: 0 6px; border-radius: 6px; }
.dash-new { min-height: 48px; padding: 0 22px; font-size: 15px; }
.dash-newp { display: grid; gap: 16px; padding: 22px; border-radius: 24px; background: var(--ink); color: #eef0e8; animation: dash-in .35s ease; }
.dash-newp[hidden] { display: none; }
.dash-newp .kicker { color: var(--lime); }
.dash-newp h2 { font-size: 24px; margin: 6px 0; }
.dash-newp p { color: #b8bdb1; max-width: 70ch; }
.dash-phrase { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.06); }
.dash-phrase code { flex: 1; min-width: 220px; background: none; color: #fff; font-size: 13.5px; line-height: 1.5; padding: 0; }
.dash-phrase .btn.ghost { color: #eef0e8; box-shadow: inset 0 0 0 1.5px #3a3f34; }
.dash-howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dash-howto li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); }
.dash-howto strong { color: var(--lime); font-size: 13px; }
.dash-howto span { color: #d7dbd0; font-size: 14px; }
@keyframes dash-in { from { opacity: 0; transform: translateY(-6px); } }

.dash-kpis { grid-template-columns: repeat(2, 1fr); }
.dash-kpis > a { padding: 18px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.dash-kpis > a:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--ink); }
.dash-kpis > a:first-child:hover { box-shadow: none; }
.dash-kpis strong { font-size: clamp(22px, 3.4vw, 30px); font-weight: 600; letter-spacing: -.02em; }
.dash-kpis span:last-child { font-size: 13px; color: var(--muted); }

.dash-grid { display: grid; gap: 14px; }
.dash-card { background: #fff; border-radius: 24px; box-shadow: inset 0 0 0 1px var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dash-card-head h2 { font-size: 20px; letter-spacing: -.01em; }
.dash-card-head > span, .dash-card-head > a { font-size: 12px; color: var(--muted); text-decoration: none; }
.dash-card-head > span { min-width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--ink); color: var(--lime); padding: 0 8px; }
.dash-card-head > a:hover { color: var(--ink); }
.dash-empty { color: var(--muted); padding: 18px; border-radius: 16px; border: 1px dashed var(--line); }

.att-list, .feed, .prow-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.att { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--paper); text-decoration: none; color: var(--ink); transition: box-shadow .2s ease; }
.att:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.att-tag { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.att.t-cobro .att-tag { background: var(--lime); box-shadow: none; }
.att.t-prop .att-tag { background: var(--ink); color: var(--lime); box-shadow: none; }
.att.t-todo .att-tag { background: #fdf1de; color: #8a4b00; box-shadow: none; }
.att-txt { display: flex; flex-direction: column; min-width: 0; }
.att-txt strong { font-size: 15px; line-height: 1.3; }
.att-txt span { font-size: 13px; color: var(--muted); }
.att-go { color: var(--muted); }

.feed li a { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding: 8px 4px; text-decoration: none; color: var(--ink); border-radius: 12px; }
.feed li a:hover { background: var(--paper); }
.feed-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--book-accent, var(--ink)); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); }
.feed-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feed-meta .mono { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.feed-txt strong { font-size: 14.5px; font-weight: 600; line-height: 1.35; }

.prow { display: grid; grid-template-columns: 6px 1fr; grid-template-areas: 'spine main' 'spine bar' 'spine meta'; gap: 6px 14px; padding: 14px; border-radius: 16px; background: var(--paper); text-decoration: none; color: var(--ink); transition: box-shadow .2s ease; }
.prow:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.prow-spine { grid-area: spine; border-radius: 6px; background: var(--book-accent, var(--ink)); }
.prow-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.prow-main strong { font-size: 17px; }
.prow-main span { font-size: 13px; color: var(--muted); }
.prow-bar { grid-area: bar; display: flex; align-items: center; gap: 10px; }
.prow-bar .bar { flex: 1; height: 8px; border-radius: 999px; background: #fff; overflow: hidden; }
.prow-bar .bar i { display: block; height: 100%; background: var(--book-accent, var(--ink)); border-radius: 999px; }
.prow-bar .mono, .prow-meta { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.prow-meta { grid-area: meta; }

@media (min-width: 760px) {
  .is-panel .topbar { padding: 0 28px; }
  .is-panel .home { padding: 40px 28px 72px; }
  .dash-kpis { grid-template-columns: repeat(4, 1fr); }
  .dash-howto { grid-template-columns: repeat(3, 1fr); }
  .dash-newp { padding: 28px; }
  .prow { grid-template-columns: 6px minmax(0, 1.2fr) minmax(0, 1fr) auto; grid-template-areas: 'spine main bar meta'; align-items: center; }
}
@media (min-width: 1100px) {
  .dash-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; }
}
@media (max-width: 759px) {
  .is-panel .brand-w { display: none; }
  .is-panel .topbar { padding: 0 12px; gap: 8px; }
  .is-panel .crumb { display: none; }
  .is-panel .top-btn { padding: 0 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .dash-newp { animation: none; } .dash-kpis > a { transition: none; } }
.prow-spine { align-self: stretch; min-height: 100%; }
@media (max-width: 759px) {
  .is-panel .topbar { flex-wrap: wrap; padding-top: 6px; }
  .is-panel .topbar .mainnav { order: 3; flex: 1 0 100%; margin: 0 -12px; padding: 0 6px; border-top: 1px solid #1d2019; }
  .is-panel .mainnav a { min-height: 46px; padding: 0 10px; font-size: 14px; }
  .is-panel .topbar .grow { display: none; }
  .is-panel .brand { margin-right: auto; }
  .att { grid-template-columns: 1fr auto; grid-template-areas: 'tag go' 'txt go'; row-gap: 6px; }
  .att-tag { grid-area: tag; justify-self: start; }
  .att-txt { grid-area: txt; }
  .att-go { grid-area: go; }
}

/* Estudio: la página del estudio ocupa todo el alto bajo la barra del panel */
.is-panel .studio-frame { padding: 0; margin: 0; max-width: none; }
.is-panel .studio-frame iframe { display: block; width: 100%; height: calc(100dvh - 64px); border: 0; background: #050605; }
@media (max-width: 759px) { .is-panel .studio-frame iframe { height: calc(100dvh - 118px); } }
/* sin proyecto abierto, el menú usa todo el ancho (el espaciador no le quita lugar) */
.is-panel .topbar .mainnav + .grow { flex: 0; }

/* ── página inicial del portal: recorrido interactivo (p.landing) ── */
.tourland { background: #0a0b06; color: #eef0e8; align-self: stretch; width: 100%; }
.tourland-in { max-width: 1240px; margin: 0 auto; padding: 26px 28px 18px; display: flex; flex-direction: column; gap: 16px; }
.tourland-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.tourland .kicker { color: #d2ff3c; }
.tourland h1 { margin: 6px 0 0; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.05; letter-spacing: -0.02em; color: #fff; }
.tourland-head p { margin: 8px 0 0; max-width: 64ch; color: #b9bcae; font-size: 15.5px; }
.tourland .btn.ghost { color: #eef0e8; border-color: rgba(238, 240, 232, 0.35); background: transparent; }
.tourland-frame { position: relative; border-radius: 14px; overflow: hidden; background: #FBF9F5; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.tourland-frame iframe { display: block; width: 100%; height: min(86vh, 940px); min-height: 560px; border: 0; }
.tourland-skip { align-self: center; color: #d2ff3c; text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; }
.tourland-skip:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .tourland-in { padding: 18px 12px 12px; }
  .tourland-frame { border-radius: 10px; }
  .tourland-frame iframe { height: 82vh; min-height: 520px; }
}
.advance-only + .note { margin-top: 12px; }
