/* ============================================================
   Sistema de Dictámenes — Modern Theme
   H. Ayuntamiento de Toluca
   ============================================================ */

:root {
  --primary: #8e2a45;
  --primary-dark: #651b32;
  --primary-light: #b84a6a;
  --primary-bg: rgba(142, 42, 69, 0.08);
  --accent: #e67e22;
  --success: #2dce89;
  --info: #11cdef;
  --warning: #fb6340;
  --danger: #e74c3c;
  --dark: #1a1a2e;
  --gray-100: #f8f9fc;
  --gray-200: #e9ecef;
  --gray-600: #8898aa;
  --gray-800: #32325d;
  --font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --transition: all 0.25s ease;
}

/* ---- Base ---- */
body {
  font-family: var(--font-family);
  background: var(--gray-100);
  color: var(--gray-800);
  -webkit-font-smoothing: antialiased;
}

/* ---- Cards ---- */
.card-modern {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: #fff;
}
.card-modern:hover {
  box-shadow: var(--shadow-md);
}
.card-modern .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
}
.card-modern .card-body {
  padding: 1.5rem;
}

/* ---- Buttons ---- */
.btn-modern {
  border-radius: var(--radius-md);
  padding: 10px 24px;
  font-weight: 500;
  transition: var(--transition);
  border: none;
}
.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.btn-modern-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
}
.btn-modern-primary:hover { color: #fff; }
.btn-modern-success {
  background: linear-gradient(135deg, var(--success) 0%, #1aa86a 100%);
  color: #fff;
}
.btn-modern-success:hover { color: #fff; }
.btn-modern-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* ---- Badges ---- */
.badge-modern {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
}

/* ---- Tables ---- */
.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-modern thead th {
  background: var(--primary-dark);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border: none;
}
.table-modern thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.table-modern thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.table-modern tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.table-modern tbody tr:hover { background: var(--primary-bg); }
.table-modern tbody tr:last-child td:first-child { border-radius: 0 0 0 var(--radius-sm); }
.table-modern tbody tr:last-child td:last-child { border-radius: 0 0 var(--radius-sm) 0; }

/* ---- Form Controls ---- */
.form-modern {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: var(--transition);
  background: #fafbfc;
}
.form-modern:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(142,42,69,0.12);
  background: #fff;
}

/* ---- Alerts ---- */
.alert-modern {
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

/* ---- Utilities ---- */
.text-primary-custom { color: var(--primary); }
.bg-primary-gradient {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
}

/* ---- Animations ---- */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bbb; }

/* ---- DataTables refinements ---- */
.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid var(--gray-200) !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 12px !important;
  font-size: 0.9rem;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(142,42,69,0.12) !important;
  outline: none;
}
.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--gray-200) !important;
  border-radius: var(--radius-sm) !important;
}
