/* ───────────────────────────────────────────────────────────
   Control horario · identidad Néboa Films
   Paleta violeta/crema · Poppins · tarjetas suaves · píldoras
   ─────────────────────────────────────────────────────────── */
:root {
  --violeta: #593B8A;
  --violeta-osc: #3D2860;
  --violeta-claro: #8C75B5;
  --lavanda: #ECE7F3;
  --gris: #C8C7C7;
  --gris-claro: #F3F1F5;
  --crema: #FAF7F3;
  --tinta: #211B33;
  --texto: #3a3450;
  --muted: #6b647e;
  --linea: #ece8f1;
  --blanco: #fff;
  --ok: #1c8a4d;
  --ok-bg: #e7f6ed;
  --no: #c0392b;
  --no-bg: #fdecea;
  --radio: 14px;
  --radio-sm: 10px;
  --sombra: 0 8px 30px rgba(33, 27, 51, .10);
  --sombra-sm: 0 2px 10px rgba(33, 27, 51, .06);
  --max: 1080px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--texto);
  background: var(--crema);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--tinta); line-height: 1.2; font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h2 { font-size: 1.15rem; }
a { color: var(--violeta); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* franja superior de acento */
body::before {
  content: ""; display: block; height: 4px;
  background: linear-gradient(90deg, var(--violeta) 0%, var(--violeta-claro) 100%);
}

/* ── Cabecera ── */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 12px 24px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 34px; display: block; }
.brand-sep { width: 1px; height: 24px; background: var(--gris); opacity: .6; }
.brand-app {
  color: var(--tinta); font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .14em;
}
.top nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.top nav a {
  color: var(--tinta); text-decoration: none; font-weight: 500;
  padding: 8px 14px; border-radius: 30px; font-size: .94rem;
}
.top nav a:hover { background: var(--lavanda); color: var(--violeta); }
.userchip {
  background: var(--lavanda); color: var(--violeta-osc);
  padding: 6px 13px; border-radius: 30px; font-size: .82rem; font-weight: 500;
}
.inline { display: inline; margin: 0; }
.link {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font: inherit; font-size: .94rem; padding: 8px 12px; border-radius: 30px;
}
.link:hover { color: var(--violeta); background: var(--lavanda); }

/* ── Contenedor ── */
.wrap { max-width: var(--max); margin: 1.6rem auto; padding: 0 20px; }

/* ── Tarjetas y formularios ── */
.card {
  background: var(--blanco); border: 1px solid var(--linea);
  border-radius: var(--radio); padding: 1.3rem 1.4rem; margin: 1.1rem 0;
  box-shadow: var(--sombra-sm);
}
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
fieldset { border: 0; border-top: 1px solid var(--linea); padding: 1rem 0 0; margin: 1rem 0 0; }
fieldset:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
legend {
  font-weight: 600; font-size: .76rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--violeta-claro); padding: 0;
}
label { display: block; margin: .7rem 0; font-size: .88rem; font-weight: 500; color: var(--tinta); }
input, select {
  display: block; width: 100%; margin-top: .3rem;
  padding: .62rem .7rem; font: inherit; font-size: 1rem; color: var(--tinta);
  border: 1px solid #d8d3e2; border-radius: var(--radio-sm); background: #fff;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus {
  outline: none; border-color: var(--violeta);
  box-shadow: 0 0 0 3px rgba(89, 59, 138, .15);
}
input:disabled { background: var(--gris-claro); color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .8rem; }
@media (max-width: 540px) { .row, .row3 { grid-template-columns: 1fr; } .hide-sm { display: none; } }

details { margin: .6rem 0; }
summary { cursor: pointer; color: var(--violeta); font-weight: 500; font-size: .9rem; }
.lock { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.rgpd {
  font-size: .8rem; color: var(--muted);
  background: var(--gris-claro); border-radius: var(--radio-sm);
  padding: .7rem .8rem; border: 1px solid var(--linea);
}

/* ── Botones ── */
.btn {
  display: inline-block; margin-top: 1rem; padding: 12px 28px;
  background: var(--violeta); color: #fff; font-weight: 600; font-size: .98rem;
  border: 0; border-radius: 40px; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--violeta-osc); }
.btn:active { transform: translateY(1px); }
.btn-mini {
  display: inline-block; padding: 7px 16px; border: 0; border-radius: 30px;
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--lavanda); color: var(--violeta-osc);
}
.btn-mini:hover { background: #e0d8ee; }
.btn-mini.ok { background: var(--ok); color: #fff; }
.btn-mini.no { background: var(--no-bg); color: var(--no); }
.btn-mini.no:hover { background: #f8dcd8; }

/* ── Avisos ── */
.flash {
  padding: .8rem 1rem; border-radius: var(--radio-sm); margin: .6rem 0;
  font-size: .92rem; border: 1px solid transparent;
}
.flash-ok { background: var(--ok-bg); color: #135f33; border-color: #bfe6cd; }
.flash-error { background: var(--no-bg); color: #8e2b22; border-color: #f3c4be; }

/* ── Tablas ── */
.tabla-scroll { overflow-x: auto; margin: 0 -.2rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .6rem; border-bottom: 1px solid var(--linea); white-space: nowrap; }
thead th {
  color: var(--violeta-osc); font-weight: 600; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .06em;
  background: var(--gris-claro); border-bottom: 1px solid var(--linea);
}
thead th:first-child { border-top-left-radius: 8px; }
thead th:last-child { border-top-right-radius: 8px; }
tbody tr:hover { background: #faf9fc; }
td strong { color: var(--violeta-osc); }
.acciones { display: flex; gap: .35rem; }

/* ── Píldoras de estado ── */
.badge {
  display: inline-block; background: var(--lavanda); color: var(--violeta-osc);
  border-radius: 30px; padding: .15rem .65rem; font-size: .78rem; font-weight: 600;
}
.badge.ok { background: var(--ok-bg); color: #135f33; }
.badge.pend { background: #fbeccd; color: #8a5a00; }

/* ── Pie ── */
.foot {
  text-align: center; color: #c9bfe2; font-size: .82rem;
  background: var(--violeta-osc); padding: 1.6rem 1rem;
  margin-top: 2.5rem;
}

/* ── Mi jornada ── */
.jornada-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.proy-sel { margin: 0; }
.proy-sel select { width: auto; padding: .5rem .7rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-top: .3rem; }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: .85rem .9rem; font-size: .74rem; color: var(--muted); box-shadow: var(--sombra-sm);
}
.stat span { display: block; font-size: 1.5rem; font-weight: 700; color: var(--tinta); line-height: 1.15; margin-bottom: .15rem; }
.stat.big { background: linear-gradient(135deg, var(--violeta) 0%, var(--violeta-osc) 100%); border: 0; color: #d6c9f0; }
.stat.big span { color: #fff; }

/* ── Invitaciones ── */
.invite-box { border-color: #cfe9d8; background: var(--ok-bg); }
.copia {
  font-family: ui-monospace, Menlo, monospace; font-size: .85rem;
  background: #fff; margin-top: .4rem;
}

/* ── Login ── */
.login-hero { text-align: center; margin: 1rem 0 .4rem; }
.login-hero img { height: 52px; }
.kicker {
  text-transform: uppercase; letter-spacing: .18em; font-size: .76rem;
  font-weight: 600; color: var(--violeta-claro); margin: .8rem 0 .2rem; text-align: center;
}
