/* Portal del equipo E109 — estilos tomados del prototipo (artefacto "Portal del equipo E109"). */
:root {
  --ink: #101010; --body: #333333; --muted: #595959; --band: #F7F7F7; --line: #E6E6E6; --line-soft: #EEEEEE;
  --field: #CFCFCF; --coral: #E3444C; --red: #C9303A; --red-dark: #9E222B;
  --ok-bg: #E8F5EE; --ok: #145A38; --warn-bg: #FFF4DB; --warn: #6B4600; --err-bg: #FDECEC; --err: #A31F28;
  --info-bg: #E7F1FB; --info: #1D4F86; --violet-bg: #EFEDFF; --violet: #4B3BA6;
}
* { box-sizing: border-box; }
body { margin: 0; background: #ffffff; color: var(--body); font-family: Ubuntu, system-ui, sans-serif; }
a { color: var(--red); } a:hover { color: var(--red-dark); }
input, select, textarea, button { font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: not-allowed; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 32px; }
main { display: flex; flex-direction: column; gap: 24px; }

/* Barra superior */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px 12px 20px; border-radius: 100px; background: #fff; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.topbar.dark { background: var(--ink); color: #fff; box-shadow: none; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 36px; height: 36px; border-radius: 8px; background: var(--coral); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; letter-spacing: .5px; }
.brand-text { display: flex; flex-direction: column; }
.brand-text b { font-weight: 500; font-size: 16px; color: var(--ink); }
.brand-text span { font-size: 12px; color: var(--muted); }
.dark .brand-text b { color: #fff; } .dark .brand-text span { color: #BDBDBD; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.user { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-mail { font-size: 13px; color: var(--muted); }
.dark .user-mail { color: #BDBDBD; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--band); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 500; flex-shrink: 0; }
.avatar.lg { width: 44px; height: 44px; }

/* Botones */
.pill { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 100px; font-size: 14px; cursor: pointer; background: var(--band); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
.pill.active { background: var(--ink); color: #fff; }
.dark .pill { background: #2A2A2A; color: #fff; }
.btn { min-height: 44px; padding: 14px 26px; border: 0; border-radius: 100px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; background: var(--red); color: #fff; }
.btn.sm { padding: 12px 22px; }
.btn.dark { background: var(--ink); }
.btn.outline { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.btn.quiet { background: var(--band); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Títulos */
.head { display: flex; flex-direction: column; gap: 10px; padding: 8px 4px 0; }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); }
h1 { margin: 0; font-size: 40px; font-weight: 500; line-height: 1.1; color: var(--ink); }
h1.hello { font-size: 45px; }
h2 { margin: 0; font-size: 20px; font-weight: 500; color: var(--ink); }
.lead { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.45; }
.note { margin: 0; padding: 0 4px; font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }

/* Tarjetas */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.band { padding: 28px; border-radius: 24px; background: var(--band); display: flex; flex-direction: column; gap: 6px; }
.box { padding: 24px; border-radius: 24px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.big { display: flex; align-items: baseline; gap: 8px; }
.big b { font-size: 56px; font-weight: 500; color: var(--ink); line-height: 1; }
.big span { font-size: 16px; color: var(--body); }
.small { font-size: 14px; color: var(--muted); }

/* Avisos */
.banner { padding: 16px 20px; border-radius: 16px; font-size: 15px; line-height: 1.45; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner.err { background: var(--err-bg); color: var(--err); }
.banner.info { background: var(--info-bg); color: var(--info); }
.callout { padding: 12px 16px; border-radius: 14px; font-size: 14px; background: var(--warn-bg); color: var(--warn); }

/* Feriados y fechas */
.date-row { display: flex; gap: 14px; align-items: center; }
.date-tile { width: 52px; flex-shrink: 0; padding: 6px 0; border-radius: 12px; background: var(--band); text-align: center; display: flex; flex-direction: column; }
.date-tile b { font-size: 20px; font-weight: 500; color: var(--ink); }
.date-tile span { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.date-text { display: flex; flex-direction: column; gap: 2px; }
.date-text b { font-size: 15px; font-weight: 400; color: var(--ink); }
.date-text span { font-size: 13px; color: var(--muted); }

/* Formulario */
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.form { flex: 999 1 520px; min-width: 0; padding: 28px; border-radius: 24px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink); }
.field select, .field input { height: 48px; padding: 0 14px; border: 1px solid var(--field); border-radius: 14px; background: #fff; font-size: 15px; color: var(--ink); width: 100%; }
.field textarea { padding: 12px 14px; border: 1px solid var(--field); border-radius: 14px; font-size: 15px; color: var(--ink); resize: vertical; width: 100%; }
.fields-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.summary { flex: 1 1 320px; min-width: 0; padding: 28px; border-radius: 24px; background: var(--band); display: flex; flex-direction: column; gap: 18px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.sum-row b { font-weight: 500; color: var(--ink); }
.sum-row b.big-count { font-size: 32px; }
.rule { height: 1px; background: #E0E0E0; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.checks li svg { flex-shrink: 0; margin-top: 1px; }
.checks .ok { color: var(--ok); } .checks .warn { color: var(--warn); } .checks .err { color: var(--err); }
.summary .btn { height: 52px; margin-top: 4px; }

/* Listas */
.list { border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.row { display: flex; flex-direction: column; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line-soft); }
.row:last-child { border-bottom: 0; }
.row-main { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.row-text { display: flex; flex-direction: column; gap: 4px; }
.row-text b { font-size: 16px; font-weight: 400; color: var(--ink); }
.row-text span { font-size: 14px; color: var(--muted); }
.empty { padding: 24px; color: var(--muted); }
.proposal { padding: 16px; border-radius: 16px; background: var(--info-bg); color: var(--info); display: flex; flex-direction: column; gap: 10px; font-size: 15px; }

/* Etiquetas */
.chip { flex-shrink: 0; padding: 6px 14px; border-radius: 100px; font-size: 13px; font-weight: 500; }
.chip.pending { background: var(--warn-bg); color: var(--warn); }
.chip.confirmed { background: var(--ok-bg); color: var(--ok); }
.chip.counterproposed { background: var(--info-bg); color: var(--info); }
.chip.cancelled, .chip.rejected { background: var(--band); color: var(--muted); }
.team { display: inline-block; padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 500; background: var(--band); color: var(--ink); }
.team.t-diseno { background: var(--err-bg); color: var(--err); }
.team.t-marketing { background: var(--info-bg); color: var(--info); }
.team.t-management { background: var(--violet-bg); color: var(--violet); }

/* Administración */
.admin { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.side { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 24px; background: var(--band); }
.side button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 44px; text-align: left; padding: 10px 14px; border: 0; border-radius: 14px; font-size: 15px; cursor: pointer; background: transparent; color: var(--ink); }
.side button.active { background: var(--ink); color: #fff; }
.badge { min-width: 24px; padding: 2px 8px; border-radius: 100px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.content { flex: 999 1 680px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.req { padding: 24px; border-radius: 24px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.req-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.who { display: flex; gap: 14px; align-items: center; }
.who-text { display: flex; flex-direction: column; gap: 4px; }
.who-name { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.who-name b { font-size: 17px; font-weight: 500; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 12px 14px; border-radius: 14px; background: var(--band); display: flex; flex-direction: column; gap: 2px; }
.stat span { font-size: 12px; color: var(--muted); }
.stat b { font-size: 18px; font-weight: 500; color: var(--ink); }
.propose { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px; border-radius: 16px; background: var(--band); }
.propose .field { flex: 1 1 180px; }
.propose .field.grow { flex: 3 1 260px; }
.propose .field input { height: 46px; }
.propose .btn { height: 46px; padding: 0 22px; }

/* Administración: formularios y gestión */
.panel { padding: 20px; border-radius: 20px; background: var(--band); display: flex; flex-direction: column; gap: 16px; }
.panel.white { background: #fff; border: 1px solid var(--line); }
.fields-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.group-label { font-size: 14px; font-weight: 500; color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); }
.checks-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { position: relative; display: inline-flex; }
.check-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-pill span { min-height: 40px; padding: 9px 16px; border-radius: 100px; border: 1px solid var(--field); background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; }
.check-pill input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.check-pill input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.check-pill input:disabled + span { opacity: .45; cursor: not-allowed; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 100px; background: var(--band); }
.seg button { min-height: 40px; padding: 8px 14px; border: 0; border-radius: 100px; background: transparent; color: var(--ink); font-size: 13px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.confirm { padding: 16px; border-radius: 16px; background: var(--err-bg); color: var(--err); display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.btn.danger { background: var(--err); }
.role { display: inline-block; padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 500; background: var(--band); color: var(--ink); }
.role.off { background: var(--err-bg); color: var(--err); }
.hol-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.hol-row:last-child { border-bottom: 0; }
.editor { width: 100%; min-height: 420px; padding: 14px; border: 1px solid var(--field); border-radius: 14px; font: 14px/1.5 ui-monospace, Menlo, monospace; color: var(--ink); resize: vertical; }
.sent { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.sent:last-child { border-bottom: 0; }
.sent b { font-size: 15px; font-weight: 400; color: var(--ink); }

/* Normas (portal) */
.rules { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.rules-nav { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 24px; background: var(--band); }
.rules-nav button { display: flex; gap: 8px; width: 100%; min-height: 44px; text-align: left; padding: 10px 14px; border: 0; border-radius: 14px; font-size: 15px; cursor: pointer; background: transparent; color: var(--ink); }
.rules-nav button[aria-current="true"] { background: var(--ink); color: #fff; }
.rules-nav b { width: 22px; flex-shrink: 0; }
.rules-body { flex: 999 1 560px; min-width: 0; }
.rule-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.rule-item b { flex-shrink: 0; width: 48px; font-size: 14px; color: var(--red); }
.rule-item span { font-size: 16px; line-height: 1.5; }
.ex { border: 1px solid var(--line); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.ex h3 { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.ex ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.45; }
.ex .result { margin-top: auto; padding: 14px 16px; border-radius: 16px; background: var(--ok-bg); color: var(--ok); font-size: 15px; font-weight: 500; }
.ex .tag { align-self: flex-start; padding: 5px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; background: var(--ink); color: #fff; }
.ex .tag.e109 { background: var(--err-bg); color: var(--err); }
.notice-item { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.notice-item:last-child { border-bottom: 0; padding-bottom: 0; }

/* Ingreso */
.login { max-width: 520px; padding: 48px 4px; display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 640px) {
  h1 { font-size: 32px; } h1.hello { font-size: 36px; }
  .topbar { border-radius: 24px; }
  .user-mail { display: none; }
  .big b { font-size: 44px; }
  .form, .summary, .band { padding: 20px; }
  .row { padding: 16px; }
}
