/* ============================================================
   components.css - Botones, forms, paneles, badges (~130 lin)
   Todos los colores via CSS variables
   ============================================================ */

/* === Forms === */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 0.75rem; font-weight: 600;
  color: var(--brand-text); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.form-input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--brand-border);
  border-radius: 8px; font-size: 1rem; font-family: var(--font-family);
  background: var(--brand-surface); color: var(--brand-text);
  transition: border-color 0.15s; outline: none;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(147,193,31,0.12); }
.form-input::placeholder { color: var(--brand-text-muted); }
.form-error { font-size: 0.8rem; color: var(--brand-error); margin-top: 4px; }

/* === Botones === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px; border-radius: 8px;
  font-size: 0.875rem; font-weight: 600; font-family: var(--font-family);
  cursor: pointer; border: none; transition: all 0.15s;
  text-decoration: none; min-height: 44px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--brand-accent); color: var(--brand-primary); }
.btn-primary:hover:not(:disabled) { background: var(--brand-highlight); }
.btn-secondary { background: var(--brand-primary); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: var(--brand-secondary); }
.btn-outline { background: transparent; color: var(--brand-text); border: 1.5px solid var(--brand-border); }
.btn-outline:hover:not(:disabled) { border-color: var(--brand-accent); color: var(--brand-accent); }
.btn-full { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }

/* === Paneles === */
.panel {
  background: var(--brand-surface); border-radius: 12px;
  border: 1px solid var(--brand-border); overflow: hidden;
}
.panel-header {
  padding: 14px 16px; border-bottom: 1px solid var(--brand-border);
  font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-body { padding: 16px; }

@media (min-width: 769px) {
  .panel-header { padding: 16px 20px; }
  .panel-body { padding: 20px; }
}

/* === Placeholder modulo === */
.placeholder-body { text-align: center; padding: 48px 20px; }
.placeholder-icon { font-size: 2.5rem; color: var(--brand-accent); margin-bottom: 16px; display: block; }
.placeholder-body h3 { font-weight: 600; margin-bottom: 8px; }
.placeholder-path {
  display: inline-block; margin-top: 8px;
  background: var(--brand-bg); padding: 2px 10px; border-radius: 4px;
  font-size: 0.75rem;
}

/* === Badges === */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
}

/* === Grids === */
.grid-2 {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 769px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* === ConfirmDialog Modal === */
.cdlg-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
}
.cdlg-box {
  background: var(--brand-surface, #fff); border-radius: 14px;
  padding: 1.75rem 2rem; max-width: 420px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: scale(.95); animation: cdlg-in .2s ease forwards;
}
@keyframes cdlg-in { to { transform: scale(1); } }
.cdlg-title { font-size: 1.05rem; font-weight: 700; color: var(--brand-text, #1a1a1a); margin-bottom: .5rem; }
.cdlg-msg { font-size: .88rem; color: var(--brand-text-muted, #666); line-height: 1.45; margin-bottom: 1.25rem; }
.cdlg-btns { display: flex; gap: .5rem; justify-content: flex-end; }
.cdlg-btn {
  padding: .55rem 1.15rem; border-radius: 8px; font-size: .82rem;
  font-weight: 600; border: none; cursor: pointer; transition: all .15s;
}
.cdlg-btn--cancel { background: var(--brand-border, #e5e7eb); color: var(--brand-text, #333); }
.cdlg-btn--cancel:hover { background: #d1d5db; }
.cdlg-btn--ok { background: var(--brand-primary, #084734); color: #fff; }
.cdlg-btn--ok:hover { filter: brightness(1.15); }
.cdlg-btn--danger { background: #ef4444; color: #fff; }
.cdlg-btn--danger:hover { background: #dc2626; }

/* === Reportes date picker in hero === */
.rep-date-group { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.rep-hero-select {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  color: #fff; padding: .45rem .75rem; border-radius: 8px; font-size: .82rem;
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .5rem center; background-size: 14px;
  padding-right: 1.8rem;
}
.rep-hero-select option { color: #333; background: #fff; }
.rep-date-custom { display: flex; align-items: center; gap: .3rem; color: rgba(255,255,255,.8); }
.rep-date-input {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  color: #fff; padding: .35rem .5rem; border-radius: 6px; font-size: .78rem;
  width: 130px;
}
.rep-date-input::-webkit-calendar-picker-indicator { filter: invert(1); }
