/* Plataforma de clientes de Raíz — estética de marca
   (tokens de "Raíz Design System/tokens/*.css") */

:root {
  --paper: #F1EBD8;
  --paper-card: #FBF8EF;
  --white: #FFFFFF;
  --ink: #211B14;
  --ink-soft: #4A4032;
  --forest: #1C3B30;
  --forest-light: #2F5C4C;
  --forest-pale: #E7EEE8;
  --gold: #B8874B;
  --gold-light: #D9AE72;
  --green: #2B6E4E;
  --red: #9C2B2B;
  --rule: #C7B78E;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-stamp: "Special Elite", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--forest); margin: 0 0 .4em; font-weight: 600; }
a { color: var(--forest); }
.eyebrow {
  font-family: var(--font-stamp); font-size: .7rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold);
}
.stamp { font-family: var(--font-stamp); }
.muted { color: var(--ink-soft); }
.small { font-size: .82rem; }

/* ---- Barra superior ---- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--paper-card); border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 20;
}
.topbar .marca { display: flex; flex-direction: column; line-height: 1.1; }
.topbar .marca .nombre { font-family: var(--font-display); font-weight: 700; color: var(--forest); font-size: 1.15rem; }
.topbar .acciones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---- Contenedores ---- */
.contenedor { max-width: 960px; margin: 0 auto; padding: 20px; }
.centro { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }

/* ---- Tarjetas ---- */
.card {
  background: var(--paper-card); border: 1px solid var(--rule); border-radius: 12px;
  padding: 22px; margin-bottom: 16px;
}
.card.login { max-width: 420px; width: 100%; background: var(--white); }

/* ---- Botones ---- */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  padding: 11px 18px; border-radius: 8px; border: 1.5px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: var(--forest); color: #FDFBF4; }
.btn-primary:hover { background: var(--forest-light); }
.btn-ghost { background: transparent; border-color: var(--rule); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--forest); color: var(--forest); }
.btn-bloque { width: 100%; justify-content: center; }
.btn-peligro { background: transparent; border-color: var(--red); color: var(--red); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-link { background: none; border: none; color: var(--forest); text-decoration: underline; cursor: pointer; font-size: .85rem; padding: 4px; }

/* ---- Formularios ---- */
.campo { margin-bottom: 14px; }
.campo label {
  display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 5px;
}
.input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--rule); border-radius: 7px;
  background: var(--white); font-family: var(--font-body); font-size: .92rem; color: var(--ink);
}
textarea { resize: vertical; min-height: 74px; }
.fila { display: flex; gap: 12px; }
.fila .campo { flex: 1; }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; }
.chk input { margin-top: 3px; }

/* ---- Pestañas ---- */
.tabs { display: flex; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.tabs button {
  flex: 1; background: none; border: none; padding: 10px; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}
.tabs button.activa { color: var(--forest); border-bottom-color: var(--forest); }

/* ---- Expedientes (cliente) ---- */
.exp-card {
  background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--gold);
  border-radius: 8px; padding: 16px; margin-bottom: 12px; cursor: pointer;
}
.exp-card:hover { border-left-color: var(--forest); }
.exp-card .codigo { font-family: var(--font-stamp); font-size: .72rem; color: var(--ink-soft); }
.exp-card .tramite { font-family: var(--font-display); font-size: 1.05rem; color: var(--forest); margin: 3px 0; }
.exp-card .estado { font-size: .9rem; }

.hitos { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hito { font-size: .7rem; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--rule); color: var(--ink-soft); }
.hito.pagado { background: var(--forest-pale); border-color: var(--green); color: var(--green); }

/* ---- Línea de tiempo ---- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0 10px 18px; border-left: 2px solid var(--rule); position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--gold);
}
.timeline .cuando { font-family: var(--font-stamp); font-size: .68rem; color: var(--ink-soft); }

/* ---- Listas de archivos ---- */
.lista-archivos { list-style: none; padding: 0; margin: 10px 0 0; }
.lista-archivos li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 11px; background: var(--white); border: 1px solid var(--rule);
  border-radius: 6px; margin-bottom: 7px; font-size: .86rem;
}
.lista-archivos .nombre { overflow-wrap: anywhere; }
.subir {
  display: inline-block; padding: 10px 16px; border: 1.5px dashed var(--gold);
  border-radius: 8px; background: var(--forest-pale); color: var(--forest);
  cursor: pointer; font-weight: 600; font-size: .88rem;
}

/* ---- Tablero equipo ---- */
.tablero { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.columna { flex: 0 0 240px; background: var(--paper-card); border: 1px solid var(--rule); border-radius: 8px; padding: 10px; }
.columna h3 { font-family: var(--font-stamp); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; margin: 2px 0 8px; }
.columna .cuenta { color: var(--ink-soft); font-weight: 400; }
.mini-card { background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 9px 11px; margin-bottom: 7px; cursor: pointer; }
.mini-card:hover { border-color: var(--forest-light); }
.mini-card .c-codigo { font-family: var(--font-stamp); font-size: .64rem; color: var(--ink-soft); }
.mini-card .c-cliente { font-weight: 600; font-size: .88rem; }
.mini-card .c-tramite { font-size: .74rem; color: var(--ink-soft); }

/* ---- Panel lateral / modal ---- */
.backdrop { position: fixed; inset: 0; background: rgba(33,27,20,.45); z-index: 40; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  background: var(--paper-card); border-left: 1px solid var(--rule); z-index: 50;
  overflow-y: auto; box-shadow: -12px 0 30px rgba(0,0,0,.15);
}
.panel .cabecera { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--paper-card); }
.panel .cuerpo { padding: 18px 20px 40px; }
.cerrar { background: none; border: none; font-size: 1.4rem; color: var(--ink-soft); cursor: pointer; line-height: 1; }
.modal { background: var(--paper-card); border: 1px solid var(--rule); border-radius: 10px; max-width: 440px; margin: 8vh auto; padding: 24px; position: relative; z-index: 50; }
.separador { border-top: 1px solid var(--rule); margin: 18px 0; }
.seccion-titulo { font-family: var(--font-display); color: var(--forest); font-size: 1rem; margin: 4px 0 8px; }

/* ---- Aviso flotante ---- */
.aviso-flotante {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: var(--forest); color: #FDFBF4; padding: 12px 20px; border-radius: 8px;
  font-size: .88rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: 90vw;
}
.aviso-flotante.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.aviso-flotante.error { background: var(--red); }
.aviso-flotante.ok { background: var(--green); }

.disclaimer {
  font-size: .74rem; color: var(--ink-soft); background: var(--forest-pale);
  border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; margin-top: 16px;
}

@media (max-width: 560px) {
  .fila { flex-direction: column; gap: 0; }
  .contenedor { padding: 14px; }
}
