/* ── BOTONES ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  transition: all .18s;
}
.btn-primary   { background: var(--azul); color: #fff; }
.btn-primary:hover { background: #0165a5; }
.btn-secondary { background: var(--gris-bg); color: var(--texto); border: 1px solid var(--gris-borde); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-success   { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.btn-danger    { background: #fee2e2; color: var(--rojo); border: 1px solid #fecaca; }
.btn-sm        { padding: 5px 10px; font-size: 12px; }

/* ── CARD ────────────────────────────────────────────────────── */
.card { background: #fff; border-radius: var(--radio); border: 1px solid var(--gris-borde); overflow: hidden; }
.card-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--gris-borde); }
.card-title { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 700; color: var(--azul-oscuro); }
.card-header .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── TABS ────────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--gris-borde); background: #fff; padding: 0 20px; }
.tab { padding: 12px 20px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--texto-suave); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; display: flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--azul); }
.tab.active { color: var(--azul); border-bottom-color: var(--azul); }
.tab-count { background: var(--azul); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.tab.active .tab-count { background: var(--azul-oscuro); }

/* ── FILTER BAR ──────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 10px; padding: 12px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--gris-borde); background: #f8fafc; }
.filter-bar input, .filter-bar select { padding: 7px 12px; border: 1px solid var(--gris-borde); border-radius: 7px; font-family: 'Nunito', sans-serif; font-size: 13px; background: #fff; color: var(--texto); }
.filter-bar input { flex: 1; min-width: 180px; }

/* ── TABLE ───────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--azul-oscuro); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .8px; padding: 10px 12px; text-align: left; white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--gris-borde); font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* ── BADGES ──────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.bd { background: #dcfce7; color: #15803d; }
.ba { background: #dbeafe; color: #1d4ed8; }
.bb { background: #f3f4f6; color: #6b7280; }
.bp { background: #fee2e2; color: #dc2626; }
.bn { background: #fef9c3; color: #854d0e; }
.bq { background: #fee2e2; color: #dc2626; }
.chip-si { background: #dcfce7; color: #15803d; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.chip-no { background: #f3f4f6; color: #6b7280; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }

/* ── STOCK BANNER ────────────────────────────────────────────── */
.stock-banner { display: flex; gap: 0; background: linear-gradient(135deg, var(--azul-oscuro) 0%, #014d7a 100%); flex-wrap: wrap; align-items: stretch; }
.stock-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 28px; flex: 1; min-width: 100px; }
.stock-num { font-family: 'Barlow Condensed', sans-serif; font-size: 42px; font-weight: 700; color: #fff; line-height: 1; }
.stock-lbl { font-size: 10px; color: var(--azul-claro); font-weight: 700; letter-spacing: 1px; margin-top: 3px; }
.stock-sep { width: 1px; background: rgba(255,255,255,.15); align-self: stretch; }
.stock-edit { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 8px 14px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'Nunito', sans-serif; display: flex; align-items: center; gap: 6px; margin: 18px 20px 18px auto; white-space: nowrap; }
.stock-edit:hover { background: rgba(255,255,255,.22); }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.on { display: flex; }
.modal { background: #fff; border-radius: 14px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--gris-borde); }
.modal-title { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; color: var(--azul-oscuro); }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--texto-suave); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gris-borde); display: flex; justify-content: flex-end; gap: 10px; }

/* ── FORMULARIOS ─────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
label { font-size: 12px; font-weight: 700; color: var(--texto-suave); letter-spacing: .5px; }
input, select, textarea { padding: 9px 12px; border: 1.5px solid var(--gris-borde); border-radius: 7px; font-family: 'Nunito', sans-serif; font-size: 13px; color: var(--texto); transition: border-color .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); }
textarea { resize: vertical; min-height: 60px; }

/* ── DASHBOARD ───────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 16px; margin-bottom: 24px; }
.dash-card { background: #fff; border: 1px solid var(--gris-borde); border-radius: var(--radio); padding: 20px; display: flex; align-items: flex-start; gap: 14px; }
.dash-icon { font-size: 26px; background: var(--gris-bg); border-radius: 10px; padding: 10px; }
.dash-info .val { font-family: 'Barlow Condensed', sans-serif; font-size: 32px; font-weight: 700; color: var(--azul); }
.dash-info .lbl { font-size: 12px; color: var(--texto-suave); font-weight: 600; }

/* ── MOVIMIENTOS ─────────────────────────────────────────────── */
.mov-item { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--gris-borde); font-size: 13px; }
.mov-item:last-child { border-bottom: none; }

/* ── CONFIG ──────────────────────────────────────────────────── */
.cfg-block { background: var(--gris-bg); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.cfg-block h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; color: var(--azul-oscuro); margin-bottom: 12px; }
.cfg-code { background: var(--azul-oscuro); color: #a5f3fc; border-radius: 8px; padding: 12px 16px; font-family: monospace; font-size: 11px; overflow-x: auto; white-space: pre; }
