/* PORTAL LOA – Estilos comunes */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red:   #A31E22;
  --red-2: #861619;
  --dark:  #1A1F26;
  --gray:  #F3F4F6;
  --white: #ffffff;
  --text:  #374151;
  --muted: #9CA3AF;
  --border:#E5E7EB;
  --ok:    #15803D;
}
body { font-family: 'Inter', sans-serif; background: var(--gray); color: var(--text); min-height: 100vh; }
a { color: inherit; }

/* ── TOPBAR ── */
.topbar {
  background: var(--dark); height: 60px; display: flex; align-items: center;
  padding: 0 32px; gap: 16px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.topbar-logo { height: 34px; filter: brightness(0) invert(1); display: block; }
.topbar-sep { width: 1px; height: 28px; background: rgba(255,255,255,.15); margin: 0 4px; }
.topbar-label { font-size: 12px; color: rgba(255,255,255,.4); letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.75); text-decoration: none; }
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%; background: var(--red);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #fff;
}
.btn-salir {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.75);
  font: inherit; font-size: 12px; padding: 6px 12px; border-radius: 6px; cursor: pointer;
}
.btn-salir:hover { border-color: var(--red); color: #fff; }

/* ── MENÚ ── */
.menu { display: flex; gap: 4px; margin-left: 12px; overflow-x: auto; }
.menu a {
  color: rgba(255,255,255,.6); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; white-space: nowrap;
}
.menu a:hover { color: #fff; background: rgba(255,255,255,.06); }
.menu a.activo { color: #fff; background: var(--red); }
.menu-aviso {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 4px; border-radius: 9px; background: #F59E0B; color: #1A1F26; font-size: 11px; font-weight: 700;
}

/* ── CABECERA DE PÁGINA ── */
.banner { background: var(--dark); padding: 0 32px 40px; position: relative; overflow: hidden; }
.banner::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px;
  background: var(--red); opacity: .07; transform: rotate(45deg); border-radius: 32px;
}
.banner-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 2; padding-top: 36px; }
.banner-greeting { font-size: 13px; color: rgba(255,255,255,.45); margin-bottom: 6px; letter-spacing: .03em; }
.banner-title { font-size: 26px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.banner-title span { color: var(--red); }
.banner-sub { font-size: 13px; color: rgba(255,255,255,.4); }
.banner-accent {
  display: inline-block; width: 4px; height: 36px; background: var(--red); border-radius: 2px;
  vertical-align: middle; margin-right: 14px; margin-bottom: -2px;
}

/* ── CONTENIDO ── */
.page { max-width: 1100px; margin: 0 auto; padding: 32px 32px 60px; }
.sec-title {
  font-size: 11px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--red);
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.sec-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 24px; }

/* ── FORMULARIOS ── */
.campo { margin-bottom: 16px; }
.campo label { display: block; font-size: 12px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.campo input, .campo select, .campo textarea {
  width: 100%; font: inherit; font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--dark);
}
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(163,30,34,.12); }
.campo .ayuda { font-size: 11px; color: var(--muted); margin-top: 4px; }
.campo .error { font-size: 12px; color: var(--red); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  background: var(--red); color: #fff;
}
.btn:hover { background: var(--red-2); }
.btn-sec { background: #fff; color: var(--dark); border-color: var(--border); }
.btn-sec:hover { background: var(--gray); }
.btn-sm { font-size: 12px; padding: 6px 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── TABLAS ── */
.tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tabla td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabla tr:hover td { background: #FAFAFA; }

.etq { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; display: inline-block; }
.etq-pendiente { background: #FEF3C7; color: #92400E; }
.etq-impreso   { background: #DCFCE7; color: var(--ok); }
.etq-anulado   { background: var(--gray); color: var(--muted); }

/* ── MENSAJES ── */
.flash { max-width: 1100px; margin: 16px auto 0; padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.flash-ok    { background: #DCFCE7; color: var(--ok); }
.flash-error { background: #FEE2E2; color: var(--red); }
.flash-info  { background: #E0F2FE; color: #075985; }

/* ── PIE ── */
.foot {
  border-top: 1px solid var(--border); padding: 20px 32px; display: flex; align-items: center; gap: 16px;
  max-width: 1100px; margin: 0 auto;
}
.foot img { height: 24px; opacity: .35; filter: grayscale(1); }
.foot p { font-size: 12px; color: var(--muted); }

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-label, .topbar-sep, .topbar-nombre { display: none; }
  .menu { margin-left: 0; }
  .menu a { padding: 8px 10px; }
  .page { padding: 20px 16px 40px; }
  .banner { padding: 0 16px 32px; }
}

/* ── IMPRESIÓN: oculta el portal y deja solo el área imprimible ── */
@media print {
  .topbar, footer, .flash, .no-imprimir { display: none !important; }
  body { background: #fff; }
}
