/* ===== Notetaker 4U Lab — réplica fiel del sistema visual de 4ulab.cloud ===== */

@font-face { font-family: soliden; font-weight: 400; font-display: swap;
  src: url("fonts/Soliden_Regular.woff2") format("woff2"); }
@font-face { font-family: soliden; font-weight: 700; font-display: swap;
  src: url("fonts/Soliden_Bold.woff2") format("woff2"); }
@font-face { font-family: solidenExp; font-weight: 400; font-display: swap;
  src: url("fonts/Soliden_Expanded.woff2") format("woff2"); }
@font-face { font-family: solidenExp; font-weight: 700; font-display: swap;
  src: url("fonts/Soliden_BoldExpanded.woff2") format("woff2"); }

:root {
  /* superficies (idénticas al sitio) */
  --black: #f4f1ec; --ink: #ffffff; --char: #f5f3ee; --line: #e4e0d8;
  --smoke: #0000000a; --smoke-2: #00000012;
  /* marca */
  --orange: #f26504; --amber: #ffae29; --magenta: #cb1334; --violet: #5d0c8e; --blue: #0000fb;
  --crema: #141414; --mute: #6b6760; --dim: #9a958c;
  /* degradado oficial */
  --grad: linear-gradient(135deg, #0000fb 0%, #5d0c8e 25%, #cb1334 50%, #f26504 75%, #ffae29 100%);
  --grad-90: linear-gradient(90deg, #0000fb 0%, #5d0c8e 25%, #cb1334 50%, #f26504 75%, #ffae29 100%);
  /* tipografía */
  --sans: soliden, system-ui, sans-serif;
  --exp: solidenExp, soliden, system-ui, sans-serif;
  /* "fuente oficial de Apple" (San Francisco) para etiquetas/UI; reemplaza a la mono */
  --mono: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", sans-serif;
  --sf: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", sans-serif;
  /* forma y movimiento */
  --r-sm: 10px; --r: 14px; --r-lg: 16px; --pill: 999px;
  --e-out: cubic-bezier(.16,1,.3,1);
  --glossy: inset 0 1px #fff6, inset 0 -1px 2px #00000026;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0; min-height: 100dvh;
  background: var(--ink); color: var(--crema);
  font-family: var(--sf); font-size: 16px; font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; padding-bottom: env(safe-area-inset-bottom);
}
::selection { background: #f2650452; color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--pill);
  border: 2px solid var(--ink); }

/* ---- tipografía base ---- */
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.02em;
  line-height: 1.08; margin: 0; }
.grad-text {
  background: var(--grad); background-size: 240% 240%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-right: .08em; animation: gradflow 4.7s linear infinite;
}
@keyframes gradflow { 0% { background-position: 0%; } 50% { background-position: 100%; } 100% { background-position: 0%; } }

/* eyebrow / etiqueta mono — firma del sitio */
.eyebrow {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .22em;
  font-size: .72rem; font-weight: 500; color: #141414c9;
}

/* ===== Topbar ===== */
.topbar {
  display: flex; align-items: center; gap: 11px;
  padding: calc(15px + env(safe-area-inset-top)) 18px 15px;
  position: sticky; top: 0; z-index: 20;
  background: #ffffffe6; backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand-logo { height: 28px; width: auto; display: block; }

/* ===== Vista ===== */
#view { max-width: 720px; margin: 0 auto; padding: 20px 16px 30px; min-height: 60vh; }
.page-title { font-family: var(--mono); text-transform: uppercase; letter-spacing: .22em;
  font-size: .72rem; font-weight: 500; color: #141414c9; margin: 2px 0 16px;
  display: flex; align-items: center; gap: 8px; }
.page-title::before { content: ""; width: 18px; height: 1px; background: var(--orange); }

/* ===== Tabs (bottom nav) ===== */
.tabs {
  position: sticky; bottom: 0; z-index: 20; display: flex;
  background: #ffffffe6; backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 8px 13px; color: var(--dim); text-decoration: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  position: relative; transition: color .25s var(--e-out);
}
.tabs a svg { width: 22px; height: 22px; stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.active { color: var(--crema); }
.tabs a.active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%;
  height: 2px; background: var(--orange); border-radius: var(--pill); }

/* ===== Cards ===== */
.card {
  position: relative; display: block;
  background: var(--char); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 17px; margin-bottom: 12px; text-decoration: none; color: inherit;
  transition: transform .3s var(--e-out), border-color .3s var(--e-out), box-shadow .3s var(--e-out);
}
a.card:hover, a.card:active { transform: translateY(-2px); border-color: #cfc9bd;
  box-shadow: 0 10px 26px #00000017; }
.card h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.card .meta { color: var(--mute); font-family: var(--mono); font-size: 12px;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* tarjeta-sección con eyebrow y acento naranja */
.card.section { padding-left: 18px; }
.card.section::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px;
  width: 3px; border-radius: var(--pill); background: var(--orange); }
.card.section h3 { font-family: var(--mono); font-weight: 500; font-size: .72rem;
  letter-spacing: .22em; text-transform: uppercase; color: #141414c9; margin-bottom: 12px; }

.badge { background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; font-weight: 700; }

/* ===== Status pills (paleta estricta de marca) ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono);
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  padding: 4px 10px; border-radius: var(--pill); border: 1px solid currentColor; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--done { color: var(--orange); }
.pill--failed { color: var(--magenta); }
.pill--processing { color: #a9710c; }
.pill--processing::before { animation: blip 1.4s ease-in-out infinite; }
@keyframes blip { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 #ffae2980; }
  50% { opacity: .5; box-shadow: 0 0 0 5px #ffae2900; } }

/* ===== Detalle ===== */
.detail-head h2 { font-family: var(--exp); font-weight: 700; font-size: 25px;
  letter-spacing: -.03em; line-height: 1.06; margin-bottom: 10px; }
.detail-head .meta { color: var(--mute); font-family: var(--mono); font-size: 12px;
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }

.summary-body { font-size: 15.5px; line-height: 1.7; color: #2a2722; }
.summary-body strong { color: #141414; font-weight: 700; }
.card.section ul { margin: 0; padding-left: 18px; }
.card.section li { margin: 7px 0; line-height: 1.55; }

/* ===== Transcripción ===== */
.seg { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 15px; }
.seg time { color: var(--dim); font-family: var(--mono); font-size: 11px; padding-top: 3px;
  font-variant-numeric: tabular-nums; }
.seg .text { grid-column: 2; color: #2a2722; line-height: 1.6; }
.seg .speaker { display: block; font-family: var(--mono); font-weight: 600; font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.spk0 { color: #3d44c0; } .spk1 { color: #8b3fc0; } .spk2 { color: #c83056; }
.spk3 { color: #c25210; } .spk4 { color: #9a6b0c; }

/* ===== Inputs / botones ===== */
input, button, textarea { font-family: var(--mono); font-size: 15px; }
input, textarea {
  width: 100%; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--char); color: var(--crema); padding: 13px 15px;
  transition: border-color .25s var(--e-out), box-shadow .25s var(--e-out);
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus { outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px #f2650426, 0 0 20px #f2650433; }

button {
  border: 0; border-radius: var(--pill); padding: 13px 22px; cursor: pointer;
  color: #fff; font-weight: 700; letter-spacing: .02em;
  background: var(--orange);
  box-shadow: 0 9px 22px -9px rgba(242,101,4,.6), inset 0 1px rgba(255,255,255,.22);
  transition: transform .3s var(--e-out), box-shadow .3s var(--e-out), filter .2s var(--e-out);
}
button:hover { transform: translateY(-1px); filter: brightness(1.05); }
button:active { transform: translateY(0) scale(.98); }

.reproc { background: transparent; color: var(--orange); border: 1px solid var(--orange);
  box-shadow: none; padding: 8px 15px; font-size: 13px; margin: 2px 0 18px; }
.reproc:hover { background: #f2650414; filter: none; transform: none; }
.reproc:disabled { opacity: .6; }

.search-wrap { position: relative; margin-bottom: 18px; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; stroke: var(--dim); fill: none; stroke-width: 1.8; }
.search-wrap input { padding-left: 40px; }

/* ===== Audio ===== */
audio { width: 100%; margin: 4px 0 10px; border-radius: var(--r); accent-color: var(--orange); }
audio::-webkit-media-controls-panel { background: var(--char); }

/* ===== Chat ===== */
.chat-log { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.msg { padding: 12px 15px; border-radius: var(--r-lg); max-width: 86%; font-size: 15px;
  line-height: 1.55; animation: rise .3s var(--e-out); }
.msg.me { background: var(--orange); color: #fff;
  margin-left: auto; border-bottom-right-radius: 5px; box-shadow: 0 6px 18px -8px rgba(242,101,4,.5); }
.msg.bot { background: var(--char); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.chat-form { display: flex; gap: 9px; margin-top: 16px; position: sticky; bottom: 8px; }
.chat-form button { flex-shrink: 0; }

/* ===== Estados / utilidades ===== */
.muted { color: var(--mute); }
.empty { text-align: center; padding: 52px 18px; color: var(--mute);
  font-family: var(--mono); font-size: 13px; }
.empty .em-ico { font-size: 30px; opacity: .8; margin-bottom: 10px; }
.skel { border: 1px solid var(--line); border-radius: var(--r-lg); height: 66px; margin-bottom: 12px;
  background: linear-gradient(100deg, var(--char) 30%, #eeeae2 50%, var(--char) 70%);
  background-size: 220% 100%; animation: sweep 1.3s linear infinite; }
@keyframes sweep { from { background-position: 220% 0; } to { background-position: -120% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
