/* ============================================================
   CondoMax · capa de marca y refinamientos sobre WowDash
   Carga DESPUÉS de style.css
   ============================================================ */

/* ---------- 1. Paleta de marca (violeta CondoMax) ---------- */
:root {
  --primary-50:  #F1EFFD;
  --primary-100: #E2DEFB;
  --primary-200: #C5BDF7;
  --primary-300: #A79CF2;
  --primary-400: #8A7BEC;
  --primary-500: #6C5CE7;
  --primary-600: #5B4BD6;
  --primary-700: #4A3CBE;
  --primary-800: #3B2F9E;
  --primary-900: #2D2479;
  --brand: var(--primary-600);

  /* Fallbacks de info (parcial) por si el tema no los define */
  --info-main: #2E7DFF;
  --info-focus: rgba(46, 125, 255, 0.13);
}

/* Botones en violeta de marca (el tema base los trae en azul fijo) */
.btn-primary {
  background-color: var(--primary-600) !important;
  border-color: var(--primary-600) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--primary-700) !important;
  border-color: var(--primary-700) !important;
}
.btn-outline-primary {
  color: var(--primary-600) !important;
  border-color: var(--primary-600) !important;
  background-color: transparent;
}
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  background-color: var(--primary-600) !important;
  border-color: var(--primary-600) !important;
  color: #fff !important;
}
.btn-primary:focus-visible, .btn-outline-primary:focus-visible {
  box-shadow: 0 0 0 3px var(--primary-100) !important;
}

/* Densidad de tablas: más columnas visibles sin scroll */
.table.bordered-table > :not(caption) > * > * { padding: 13px 14px; }

/* ---------- 2. Tarjetas KPI del dashboard ---------- */
.kpi-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; flex-shrink: 0;
}
.bg-tint-success { background: linear-gradient(135deg, rgba(69,179,105,.14), rgba(69,179,105,.02)); }
.bg-tint-warning { background: linear-gradient(135deg, rgba(255,159,41,.16), rgba(255,159,41,.02)); }
.bg-tint-danger  { background: linear-gradient(135deg, rgba(239,74,0,.13),  rgba(239,74,0,.02)); }
.bg-tint-primary { background: linear-gradient(135deg, rgba(108,92,231,.14), rgba(108,92,231,.02)); }
.bg-tint-info    { background: linear-gradient(135deg, rgba(46,125,255,.13), rgba(46,125,255,.02)); }

.kpi-card { transition: transform .15s ease, box-shadow .15s ease; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(45,36,121,.10); }

.stat-mini .icon-chip {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}

/* ---------- 3. Avatares por iniciales ---------- */
.avatar-initials {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
  letter-spacing: .3px;
}
.avatar-initials.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-initials.lg { width: 52px; height: 52px; font-size: 18px; }

/* ---------- 4. Tablas ---------- */
.table-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table > :not(caption) > * > * { vertical-align: middle; }
.row-actions .btn-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; border: none; transition: filter .12s ease;
}
.row-actions .btn-icon:hover { filter: brightness(.92); }

/* Chips de filtro (bandeja de pagos, etc.) */
.filter-chip {
  border: 1px solid var(--neutral-300); background: var(--white);
  color: var(--text-secondary-light, #6b7280);
  border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  transition: all .12s ease; line-height: 1;
}
.filter-chip .count {
  background: var(--neutral-200); border-radius: 999px; padding: 2px 9px;
  font-size: 12px; font-weight: 700;
}
.filter-chip.active { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.filter-chip.active .count { background: rgba(255,255,255,.25); color: #fff; }

/* ---------- 5. Formularios ---------- */
.form-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--primary-600); margin-bottom: 4px;
}
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--neutral-200); }
.form-label { font-weight: 600; }
.req::after { content: " *"; color: var(--danger-main); }
.form-hint { font-size: 12.5px; color: var(--text-secondary-light, #6b7280); margin-top: 4px; }

.input-icon-group .input-group-text {
  background: var(--neutral-50); border-color: var(--neutral-300);
  color: var(--text-secondary-light, #6b7280);
}

/* Placeholders en gris MUY claro.
   El tema base los pinta con --text-secondary-light (#4B5563), casi tan
   oscuros como el texto real, y se confunden con datos ya capturados.
   Ajustable: subir el valor del color = más tenue. */
.form-control::placeholder,
.form-select::placeholder,
textarea::placeholder,
input::placeholder {
  color: #C2C8D2 !important;
  opacity: 1 !important;            /* Firefox baja la opacidad por defecto */
}
.form-control::-webkit-input-placeholder,
textarea::-webkit-input-placeholder,
input::-webkit-input-placeholder { color: #C2C8D2 !important; }
.form-control:-ms-input-placeholder,
textarea:-ms-input-placeholder,
input:-ms-input-placeholder { color: #C2C8D2 !important; }
.form-control::-ms-input-placeholder,
textarea::-ms-input-placeholder,
input::-ms-input-placeholder { color: #C2C8D2 !important; }

/* ---------- 6. Estados vacíos / dropzone ---------- */
.dashed-card {
  border: 2px dashed var(--neutral-300); border-radius: 12px;
  background: transparent; transition: all .15s ease;
}
.dashed-card:hover { border-color: var(--primary-400); background: var(--primary-50); }

/* ---------- 7. Plantillas de mensajes ---------- */
.template-var {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--primary-50); color: var(--primary-700);
  border-radius: 6px; padding: 1px 7px; font-size: .85em; font-weight: 600;
  white-space: nowrap;
}

/* ---------- 8. Documentos ---------- */
.doc-tile {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0;
}

/* ---------- 9. Login ---------- */
.auth-wrap { min-height: 100vh; }
.auth-brand-panel {
  background: url('../images/Fondo_index.jpg') center / cover no-repeat;
  color: #fff;
}
.auth-brand-panel .point-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center;
  font-size: 21px;
}
.auth-card { max-width: 440px; width: 100%; }

/* ---------- 10. Estado de cuenta / impresión ---------- */
.statement-summary-box { border: 1px solid var(--neutral-200); border-radius: 12px; padding: 16px 20px; }
@media print {
  .sidebar, .navbar-header, .d-footer, .no-print { display: none !important; }
  .dashboard-main { margin-left: 0 !important; }
  .dashboard-main-body { padding: 0 !important; background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  body { background: #fff !important; }
  a[href]::after { content: "" !important; }
}

/* ---------- 11. Detalles generales ---------- */
:focus-visible { outline: 2px solid var(--primary-400); outline-offset: 2px; }
.text-balance { text-wrap: balance; }
.cursor-pointer { cursor: pointer; }
.progress-thin { height: 7px; border-radius: 99px; background: var(--neutral-200); }
.progress-thin .progress-bar { border-radius: 99px; }

@media (max-width: 575.98px) {
  .dashboard-main-body { padding: 16px 12px; }
  .row-actions { white-space: nowrap; }
}

/* Toasts demo */
.toast-cm { border-left: 4px solid var(--primary-600); }
.toast-cm.toast-success { border-left-color: var(--success-main); }
.toast-cm.toast-danger { border-left-color: var(--danger-main); }
