/* =========================================================
   styles.css — Congreso 2026 (versión B)
   Paleta: azul #102F5E, verde #008037, acento #953149
   Módulos: Autor/Participante, Evaluador, Coordinador, Superadmin
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Roboto:wght@400;500;700&display=swap');

/* ---------- Variables ---------- */
:root{
  --color-primary:#102F5E;
  --color-secondary:#008037;
  --color-accent:#953149;
  --color-light:#ffffff;
  --color-dark:#0c0e1b;

  --bg:#f6f9ff;
  --muted:#64748b;
  --muted-2:#94a3b8;

  --radius:14px;
  --radius-sm:10px;
  --radius-lg:18px;

  --shadow:0 10px 30px rgba(16,47,94,.08);
  --shadow-2:0 14px 40px rgba(16,47,94,.12);
  --border:1px solid rgba(2,6,23,.08);

  --container:1100px;

  --focus-ring:0 0 0 3px rgba(16,47,94,.12);
}

/* ---------- Reset básico ---------- */
*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:'Roboto',sans-serif;
  background:var(--bg);
  color:#0f172a;
  line-height:1.5;
}
img{max-width:100%;height:auto;display:block}

/* ---------- Contenedores y tarjetas ---------- */
.container{max-width:var(--container);margin:0 auto;padding:22px}
.container-narrow{max-width:820px}
.card{
  background:#fff;border:var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:22px;margin:18px 0;
}
.card-soft{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}

/* ---------- Tipografía ---------- */
h1,h2,h3,h4{font-family:'Poppins',sans-serif;color:var(--color-accent);margin:0 0 12px}
h1{font-size:1.8rem} h2{font-size:1.4rem} h3{font-size:1.15rem}
p{margin:0 0 10px}
.small{font-size:.9rem;color:var(--muted)}
.muted{color:var(--muted)}
a{color:#0b1220;text-decoration:none}
a:hover{color:var(--color-accent)}

/* ---------- Header con hamburguesa ---------- */
.header{background:var(--color-primary);color:#fff;box-shadow:0 6px 24px rgba(16,47,94,.25)}
.header-flex{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:12px;font-family:'Poppins',sans-serif;font-weight:700}
.brand img{height:46px;width:auto}
.brand .title{font-size:1.05rem;line-height:1.2;color:#fff}

.hamburger-wrapper{position:relative}
.menu-btn{
  border:0;background:#fff;color:#102F5E;padding:10px 12px;border-radius:12px;font-weight:700;
  box-shadow:0 6px 18px rgba(16,47,94,.15);cursor:pointer
}
.menu-panel{
  display:none;position:absolute;right:0;top:50px;background:#fff;border:1px solid rgba(2,6,23,.08);
  border-radius:12px;box-shadow:0 10px 30px rgba(16,47,94,.18);min-width:220px;overflow:hidden;z-index:50
}
.menu-item{
  display:block;padding:12px 14px;color:#0b1220;text-decoration:none;font-weight:600;
  border-bottom:1px solid rgba(2,6,23,.06)
}
.menu-item:last-child{border-bottom:none}
.menu-item:hover{background:#f1f5f9;color:#102F5E}

@media (max-width:980px){
  .brand img{height:42px}
  .brand .title{font-size:.98rem}
}
@media (max-width:520px){
  .brand img{height:38px}
}

/* ---------- Botones ---------- */
.btn{
  display:inline-block;padding:10px 16px;border-radius:12px;border:1px solid #d7deea;
  background:#fff;color:#0b1220;font-weight:600;cursor:pointer;transition:.15s
}
.btn:hover{background:#f6f8fd}
.btn:focus{outline:none;box-shadow:var(--focus-ring)}
.btn.primary{background:var(--color-accent);color:#fff;border-color:transparent}
.btn.primary:hover{filter:brightness(.96)}
.btn.success{background:var(--color-secondary);color:#fff;border-color:transparent}
.btn.warning{background:#F59E0B;color:#fff;border-color:transparent}
.btn.danger{background:#DC2626;color:#fff;border-color:transparent}
.btn.ghost{background:transparent;border-color:transparent}
.btn.block{display:block;width:100%}
.btn-sm{padding:8px 12px;border-radius:10px}

/* ---------- Formularios ---------- */
.label{display:block;font-weight:600;margin:14px 0 6px;color:#0f172a}
.input, select, textarea{
  width:100%;padding:12px 14px;border-radius:12px;border:1px solid #d7deea;background:#fbfdff;
  outline:none;transition:.15s;font-size:16px
}
.input:focus, select:focus, textarea:focus{border-color:#8aa2c7;box-shadow:var(--focus-ring);background:#fff}
textarea{resize:vertical;min-height:120px}
.input[readonly]{background:#f8fafc;color:#475569}
.input[type=file]{padding:10px;border:2px dashed #d7deea;background:#fcfdff}
.help{color:var(--muted);font-size:.88rem;margin-top:6px}

/* Grids del formulario */
.grid{display:grid;gap:14px}
.grid-2{grid-template-columns:1fr 1fr}
.grid-3{grid-template-columns:repeat(3,1fr)}
@media (max-width:900px){.grid-2,.grid-3{grid-template-columns:1fr}}
.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}

/* Switch / check compactos */
.switch{display:inline-flex;align-items:center;gap:8px}
.switch input[type=checkbox]{width:20px;height:20px}

/* ---------- Avisos / estados ---------- */
.notice{
  background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;
  border-radius:12px;padding:10px 14px;margin:10px 0
}
.alert{
  background:#fef2f2;border:1px solid #fecaca;color:#991b1b;
  border-radius:12px;padding:10px 14px;margin:10px 0
}
.info{
  background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af;
  border-radius:12px;padding:10px 14px;margin:10px 0
}

/* ---------- Chips de estatus ---------- */
.chip{display:inline-block;padding:4px 10px;border-radius:999px;font-weight:700;font-size:.8rem}
.chip--recibido{background:#e0f2fe;color:#075985}
.chip--en_revision{background:#ede9fe;color:#5b21b6}
.chip--en_correccion{background:#fff7ed;color:#9a3412}
.chip--aceptado{background:#dcfce7;color:#166534}
.chip--rechazado{background:#fee2e2;color:#991b1b}

/* ---------- Tabla/cards responsive (paneles y listados) ---------- */
.table{width:100%;border-collapse:separate;border-spacing:0 10px}
.thead{color:#334155;font-weight:700;font-size:.92rem}
.tr{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:12px;box-shadow:var(--shadow)}
.tr>div{padding:10px 12px}
.tr.header>div{padding:2px 12px 8px}
.label-sm{display:none}
@media (min-width:860px){
  .tr{display:grid;grid-template-columns:2fr 1.3fr 1.6fr 1fr 1fr;align-items:center}
}
@media (max-width:859px){
  .thead{display:none}
  .tr{padding:10px}
  .tr>div{padding:6px 0}
  .label-sm{display:block;color:var(--muted);font-size:.78rem;margin-bottom:3px}
}
/* filas extra (comentarios/acciones) */
.row-extra{padding:10px 12px 16px;border-top:1px dashed #e5e7eb;margin-top:6px}
.comment{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;margin:8px 0}
.comment time{color:var(--muted);font-size:.8rem}
.actions-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}

/* ---------- Tabs (evaluador / coordinador) ---------- */
.tabs{display:flex;gap:6px;border-bottom:1px solid #e5e7eb;margin:8px 0 16px}
.tab{
  padding:10px 14px;border-radius:12px 12px 0 0;background:#eef2ff;color:#0b1220;
  border:1px solid #e5e7eb;border-bottom:0;font-weight:600;cursor:pointer
}
.tab.active{background:#fff;color:#0b1220;border-color:#d7deea}

/* ---------- Toolbar y filtros ---------- */
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:6px 0 14px}
.filter{display:flex;gap:8px;flex-wrap:wrap}
.tag{display:inline-block;padding:4px 10px;border-radius:999px;background:#f1f5f9;color:#334155;font-weight:600}
.tag.green{background:#dcfce7;color:#166534}
.tag.red{background:#fee2e2;color:#991b1b}
.tag.blue{background:#e0f2fe;color:#075985}

/* ---------- Paginación ---------- */
.pagination{display:flex;gap:6px;align-items:center;margin:10px 0}
.page-link{
  display:inline-block;padding:8px 12px;border-radius:10px;border:1px solid #d7deea;background:#fff;
  color:#0b1220
}
.page-link.active{background:var(--color-primary);color:#fff;border-color:transparent}
.page-link:hover{background:#f6f8fd}

/* ---------- Sidebar de administración ---------- */
.layout{
  display:grid;grid-template-columns:260px 1fr;gap:18px;
}
.sidebar{
  background:#0e2a52;color:#fff;border-radius:16px;padding:16px;position:sticky;top:16px;height:max-content;
  box-shadow:0 12px 28px rgba(16,47,94,.25)
}
.sidebar .title{font-family:'Poppins',sans-serif;font-weight:700;margin-bottom:10px}
.sidebar a{
  display:block;color:#e2e8f0;padding:10px 12px;border-radius:10px;margin:4px 0;font-weight:600
}
.sidebar a:hover{background:rgba(255,255,255,.08);color:#fff}
@media (max-width:1000px){.layout{grid-template-columns:1fr}.sidebar{position:static}}

/* ---------- Kanban (coordinador) ---------- */
.kanban{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.kan-col{background:#fff;border:var(--border);border-radius:14px;box-shadow:var(--shadow);padding:12px}
.kan-col .head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.kan-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:12px;margin:10px 0}
.kan-card .meta{font-size:.85rem;color:var(--muted)}
@media (max-width:1100px){.kanban{grid-template-columns:repeat(2,1fr)}}
@media (max-width:720px){.kanban{grid-template-columns:1fr}}

/* ---------- Modales ---------- */
.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);display:none;z-index:80}
.modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;border-radius:16px;
  border:var(--border);box-shadow:var(--shadow-2);width:min(680px,94vw);max-height:84vh;overflow:auto;display:none;z-index:90}
.modal .modal-head{padding:14px 18px;border-bottom:1px solid #e5e7eb;display:flex;justify-content:space-between;align-items:center}
.modal .modal-body{padding:18px}
.modal .modal-foot{padding:12px 18px;border-top:1px solid #e5e7eb;display:flex;gap:10px;justify-content:flex-end}

/* ---------- Toast (mensajes flotantes) ---------- */
.toast{
  position:fixed;right:16px;bottom:16px;background:#0f172a;color:#fff;padding:12px 14px;border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.25);z-index:100;display:none
}
.toast.success{background:var(--color-secondary)}
.toast.warn{background:#F59E0B}
.toast.error{background:#DC2626}

/* ---------- Tooltips simples ---------- */
.tooltip{position:relative}
.tooltip .tip{
  position:absolute;left:50%;transform:translateX(-50%);bottom:130%;background:#111827;color:#fff;
  padding:6px 8px;border-radius:8px;font-size:.78rem;white-space:nowrap;display:none
}
.tooltip:hover .tip{display:block}

/* ---------- Ayudas de login/register ---------- */
.auth-box{max-width:560px;margin:0 auto}
.auth-actions{display:flex;gap:10px;flex-wrap:wrap}
.auth-note{font-size:.95rem;color:var(--muted)}

/* ---------- Utilidades ---------- */
.mt-0{margin-top:0}.mt-6{margin-top:6px}.mt-10{margin-top:10px}.mt-16{margin-top:16px}
.mb-0{margin-bottom:0}.mb-6{margin-bottom:6px}.mb-10{margin-bottom:10px}.mb-16{margin-bottom:16px}
.p-0{padding:0}.p-6{padding:6px}.p-10{padding:10px}.p-16{padding:16px}
.flex{display:flex}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-8{gap:8px}.gap-12{gap:12px}
.hidden{display:none}.block{display:block}.inline{display:inline}
.w-100{width:100%}

/* ---------- Estados de archivos ---------- */
.file-row{display:flex;align-items:center;gap:10px}
.file-name{color:#0b1220;font-weight:600}
.file-meta{font-size:.85rem;color:var(--muted)}

/* ---------- Badges ---------- */
.badge{
  display:inline-block;padding:4px 8px;border-radius:8px;background:#e5e7eb;color:#111827;font-weight:700;font-size:.75rem
}
.badge.blue{background:#e0f2fe;color:#075985}
.badge.green{background:#dcfce7;color:#166534}
.badge.yellow{background:#fef9c3;color:#854d0e}
.badge.red{background:#fee2e2;color:#991b1b}

/* ---------- Secciones separadoras ---------- */
.section-title{
  font-family:'Poppins',sans-serif;font-weight:700;color:var(--color-accent);
  border-bottom:2px solid rgba(149,49,73,.2);padding-bottom:6px;margin:16px 0 10px
}
.toast{
  position:fixed; right:16px; bottom:16px; background:#0f172a; color:#fff;
  padding:12px 14px; border-radius:12px; box-shadow:0 12px 30px rgba(0,0,0,.25);
  z-index:100; display:none; transition:opacity .6s ease;
}
.toast.success{ background:#008037; }  /* verde */
.toast.error{ background:#DC2626; }    /* rojo */
/* ===============================
   UI · Form Kit — Congreso 2026
   (aplicar global a todos los forms)
   =============================== */

:root{
  --brand: #9e1f3f;          /* color institucional del header/botón primario si ya existe */
  --ink: #0f172a;            /* texto */
  --muted: #6b7280;          /* textos de ayuda */
  --bg: #ffffff;             /* fondo de inputs */
  --border: #d1d5db;         /* borde neutro */
  --ring: rgba(158,31,63,.18); /* foco suave del brand */
}

/* Layout general del formulario */
form.form,
.card form {
  display: grid;
  gap: 16px;
}

/* Filas de 2 columnas (auto-responsive) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px){
  .form-row { grid-template-columns: 1fr; }
}

/* Etiquetas y ayudas */
label{
  display:block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
small.muted{
  display:block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .9rem;
}

/* Inputs base (incluye inputs con datalist, selects y textareas) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[list],
select,
textarea{
  width:100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
  transition: border .12s ease, box-shadow .12s ease;
  outline: none;
}
textarea{ min-height: 120px; resize: vertical; }

/* Enfoque accesible */
input:focus,
select:focus,
textarea:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}

/* Placeholder sutil */
::placeholder{ color: #9aa0a6; }

/* Grupo input + botón (ej. Mostrar/Ocultar) */
.input-group{
  display:flex;
  align-items: stretch;
  gap: 0;
}
.input-group > input{
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group > .btn{
  border: 1px solid var(--border);
  background: #f8fafc;
  border-left: 0;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 0 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}
.input-group > .btn:hover{
  background:#eef2f7;
}
.input-group > .btn:active{
  background:#e6eaf1;
}

/* Select bonito (flecha) — compatible cross-browser */
select{
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, #7b8794 50%),
    linear-gradient(135deg, #7b8794 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) calc(1em - 2px),
    calc(100% - 13px) calc(1em - 2px),
    100% 0;
  background-size:5px 5px, 5px 5px, 2.8em 2.8em;
  background-repeat:no-repeat;
  padding-right: 2.8em;
}

/* Acciones alineadas */
.actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap: wrap;
}

/* Alertas de error (por si no las tenías) */
.alert.error{
  border:1px solid #f3c3c8;
  background:#fff5f6;
  color:#7a1a27;
  padding:12px 14px;
  border-radius:12px;
}

/* Botones; respeta tu .btn/.btn.primary si ya existen */
.btn{
  border-radius: 12px;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  background:#fff;
  cursor:pointer;
}
.btn.primary{
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn.primary:hover{ filter: brightness(.96); }

.rec{
   color:#7a1a27;
   text-align: center;
}

/* --- Ajuste para evitar desbordes de texto largo --- */
.resumen p {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
}

