/* ============================================================
   seguridad.css - Estilos modulo Seguridad
   Docs entrada/salida/cartera, tipos doc, pedidos, auditoria
   ============================================================ */

/* ---- Hero seguridad ---- */
.seg-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: .75rem 1rem;
  border-radius: .75rem;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  color: #fff;
  margin-bottom: .75rem;
}
.seg-hero__icon {
  width: 40px; height: 40px; border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.15); font-size: 1.1rem;
}
.seg-hero__title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.seg-hero__sub   { font-size: .72rem; opacity: .8; }

/* ---- KPI strip ---- */
.seg-kpi-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .5rem; margin-bottom: .75rem;
}
.seg-kpi {
  background: #fff; border-radius: .5rem; padding: .6rem .75rem;
  border: 1px solid var(--brand-border);
}
.seg-kpi__val   { font-size: 1.2rem; font-weight: 700; color: var(--brand-primary); }
.seg-kpi__label { font-size: .68rem; color: var(--brand-muted); }

/* ---- Tabla seguridad ---- */
.seg-table-wrap { overflow-x: auto; }
.seg-tbl {
  width: 100%; border-collapse: collapse; font-size: .78rem;
}
.seg-tbl th {
  text-align: left; padding: .5rem .6rem;
  border-bottom: 2px solid var(--brand-border);
  font-weight: 600; font-size: .7rem; text-transform: uppercase;
  color: var(--brand-muted); white-space: nowrap;
}
.seg-tbl td {
  padding: .45rem .6rem; border-bottom: 1px solid var(--brand-border);
  vertical-align: middle;
}
.seg-tbl tr:hover { background: var(--brand-bg-hover, #f8fafc); }

/* ---- Badges ---- */
.seg-badge {
  display: inline-flex; padding: .15rem .45rem;
  border-radius: .25rem; font-size: .68rem; font-weight: 600;
}
.seg-badge--ok      { background: #dcfce7; color: #15803d; }
.seg-badge--warn    { background: #fef9c3; color: #a16207; }
.seg-badge--danger  { background: #fee2e2; color: #b91c1c; }
.seg-badge--info    { background: #dbeafe; color: #1d4ed8; }
.seg-badge--neutral { background: #f1f5f9; color: #475569; }

/* ---- Tabs seguridad ---- */
.seg-tabs {
  display: flex; gap: .25rem; margin-bottom: .75rem;
  border-bottom: 2px solid var(--brand-border); padding-bottom: 0;
}
.seg-tab {
  padding: .45rem .75rem; font-size: .75rem; font-weight: 500;
  border: none; background: none; cursor: pointer;
  color: var(--brand-muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .2s;
}
.seg-tab:hover  { color: var(--brand-primary); }
.seg-tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); font-weight: 600; }

/* ---- Filtro barra ---- */
.seg-toolbar {
  display: flex; gap: .5rem; align-items: center;
  flex-wrap: wrap; margin-bottom: .75rem;
}
.seg-search {
  display: flex; align-items: center; gap: .4rem;
  background: #fff; border: 1px solid var(--brand-border);
  border-radius: .4rem; padding: .35rem .6rem; flex: 1; min-width: 200px;
}
.seg-search i   { color: var(--brand-muted); font-size: .8rem; }
.seg-search input {
  border: none; outline: none; width: 100%; font-size: .8rem;
  background: transparent;
}
.seg-filter {
  padding: .35rem .6rem; border-radius: .4rem;
  border: 1px solid var(--brand-border); background: #fff;
  font-size: .78rem; cursor: pointer;
}

/* ---- Acciones inline ---- */
.seg-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .5rem; border-radius: .3rem;
  font-size: .7rem; font-weight: 500; border: none; cursor: pointer;
  transition: background .2s;
}
.seg-btn--primary { background: var(--brand-accent); color: #1a1a2e; }
.seg-btn--ghost   { background: transparent; color: var(--brand-primary); }
.seg-btn--danger  { background: #fee2e2; color: #dc2626; }
.seg-btn--primary:hover { filter: brightness(.9); }
.seg-btn--ghost:hover   { background: #f1f5f9; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .seg-hero { flex-direction: column; text-align: center; }
  .seg-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .seg-toolbar { flex-direction: column; }
  .seg-search { min-width: 100%; }
}
