@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===========================
   Variables
   =========================== */
:root {
  --red-900: #7B1010;
  --red-800: #921B1B;
  --red-700: #B71C1C;
  --red-600: #C0392B;
  --red-500: #E53935;
  --red-400: #EF5350;
  --red-300: #E57373;
  --red-200: #FFCDD2;
  --red-100: #FFEBEE;
  --red-50:  #FFF5F5;

  --white:    #FFFFFF;
  --gray-50:  #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;

  --color-primary:      var(--red-600);
  --color-primary-dark: var(--red-800);
  --color-primary-bg:   var(--red-50);

  --color-sidebar-bg:     #160404;
  --color-sidebar-hover:  rgba(192,57,43,0.22);
  --color-sidebar-active: var(--red-600);
  --color-sidebar-text:   #F0DEDE;
  --color-sidebar-icon:   #C49898;

  --color-bg:      var(--gray-100);
  --color-surface: var(--white);
  --color-border:  var(--gray-300);
  --color-text:    var(--gray-900);
  --color-muted:   var(--gray-600);

  --color-success: #27AE60;
  --color-warning: #E67E22;
  --color-danger:  var(--red-600);
  --color-info:    #2980B9;

  --sidebar-w:  260px;
  --sidebar-sm: 68px;
  --topbar-h:   62px;

  --radius:    8px;
  --radius-sm: 4px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow:    0 2px 8px rgba(0,0,0,.10);
  --shadow-md: 0 6px 20px rgba(0,0,0,.13);

  --t: .22s ease;
}

/* ===========================
   Reset
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; }

/* ===========================
   Layout principal
   =========================== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--color-sidebar-bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--t);
}

.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--t);
}

/* --- Estado colapsado --- */
body.sidebar-collapsed .sidebar           { width: var(--sidebar-sm); }
body.sidebar-collapsed .main-wrapper      { margin-left: var(--sidebar-sm); }
body.sidebar-collapsed .sidebar-logo-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .submenu-arrow,
body.sidebar-collapsed .sidebar-footer,
body.sidebar-collapsed .nav-section-label { display: none; }
body.sidebar-collapsed .sidebar-nav a,
body.sidebar-collapsed .sidebar-nav .submenu-toggle { justify-content: center; padding: 12px 0; }
body.sidebar-collapsed .nav-icon           { margin-right: 0; }
body.sidebar-collapsed .submenu            { display: none !important; }

/* ===========================
   Sidebar - logo
   =========================== */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

/* ===========================
   Sidebar - nav
   =========================== */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.nav-section-label {
  color: rgba(255,255,255,.3);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 14px 18px 5px;
  white-space: nowrap;
}

.sidebar-nav li > a,
.sidebar-nav li > .submenu-toggle {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  color: var(--color-sidebar-text);
  font-size: .875rem;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
  width: 100%;
  cursor: pointer;
}

.sidebar-nav li > a:hover,
.sidebar-nav li > .submenu-toggle:hover { background: var(--color-sidebar-hover); color: white; }
.sidebar-nav li.active > a              { background: var(--color-primary); color: white; }
.sidebar-nav li.active .nav-icon        { color: white; }

.nav-icon {
  width: 20px;
  text-align: center;
  margin-right: 11px;
  font-size: .9rem;
  flex-shrink: 0;
  color: var(--color-sidebar-icon);
  transition: color var(--t);
}

.sidebar-nav li > a:hover .nav-icon { color: white; }
.nav-label     { flex: 1; }
.submenu-arrow {
  margin-left: auto;
  font-size: .68rem;
  transition: transform var(--t);
  color: var(--color-sidebar-icon);
}
.has-submenu.open > .submenu-toggle .submenu-arrow { transform: rotate(180deg); }

.submenu         { display: none; background: rgba(0,0,0,.22); }
.has-submenu.open .submenu { display: block; }

.submenu li > a {
  padding: 8px 18px 8px 49px;
  font-size: .835rem;
  color: rgba(240,222,222,.7);
}
.submenu li > a:hover    { color: white; background: rgba(192,57,43,.18); }
.submenu li.active > a   { color: white; background: rgba(192,57,43,.35); }

/* ===========================
   Sidebar - footer (usuario)
   =========================== */
.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .8rem;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-name { color: white; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: var(--color-sidebar-icon); font-size: .7rem; }

.sidebar-logout-btn { color: var(--color-sidebar-icon); font-size: .95rem; padding: 4px; transition: color var(--t); }
.sidebar-logout-btn:hover { color: var(--red-300); }

/* ===========================
   Topbar
   =========================== */
.topbar {
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-toggle {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 1rem;
  transition: background var(--t), color var(--t);
  flex-shrink: 0;
}
.topbar-toggle:hover { background: var(--gray-100); color: var(--color-primary); }

.topbar-breadcrumb {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--color-muted);
}
.topbar-breadcrumb .bc-current { color: var(--color-text); font-weight: 500; }
.topbar-breadcrumb .bc-sep     { color: var(--gray-400); }

.topbar-right { display: flex; align-items: center; gap: 8px; }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--radius);
  transition: background var(--t);
}
.topbar-user:hover { background: var(--gray-100); }

.topbar-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .8rem;
}
.topbar-username { font-size: .855rem; font-weight: 500; }

/* ===========================
   Contenido
   =========================== */
.content { flex: 1; padding: 24px; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title    { font-size: 1.35rem; font-weight: 700; color: var(--gray-900); }
.page-subtitle { color: var(--color-muted); font-size: .83rem; margin-top: 3px; }

/* ===========================
   Cards
   =========================== */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title  { font-size: .95rem; font-weight: 600; color: var(--gray-900); }
.card-body   { padding: 20px; }
.card-footer {
  padding: 13px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- Stats dashboard --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px,1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow var(--t);
}
.stat-card:hover { box-shadow: var(--shadow); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-icon.red  { background: var(--red-100); color: var(--red-600); }
.stat-icon.gray { background: var(--gray-100); color: var(--gray-600); }

.stat-value { font-size: 1.65rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: .77rem; color: var(--color-muted); margin-top: 5px; }

/* ===========================
   Tablas
   =========================== */
.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: .875rem; }

thead th {
  text-align: left;
  padding: 11px 16px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td      { background: var(--gray-50); }

.table-actions { display: flex; gap: 5px; align-items: center; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-muted);
}
.empty-state i  { font-size: 2.8rem; color: var(--gray-300); display: block; margin-bottom: 14px; }
.empty-state p  { font-size: .875rem; }

/* ===========================
   Formularios
   =========================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px,1fr));
  gap: 16px;
}

.form-group       { display: flex; flex-direction: column; gap: 5px; }
.form-group.full  { grid-column: 1 / -1; }
.form-group.half  { grid-column: span 2; }

label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-700);
}
.required::after { content: ' *'; color: var(--color-primary); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: .88rem;
  color: var(--gray-900);
  background: white;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--red-100);
}

input::placeholder, textarea::placeholder { color: var(--gray-400); }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23BDBDBD' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 34px;
}

textarea { min-height: 90px; resize: vertical; }

.form-hint  { font-size: .73rem; color: var(--color-muted); }
.error-msg  { font-size: .73rem; color: var(--color-danger); }

.form-section {
  margin-bottom: 28px;
}
.form-section-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--red-200);
}

/* ===========================
   Botones
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: .875rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
  line-height: 1;
}

.btn-sm   { padding: 6px 12px; font-size: .8rem; }
.btn-lg   { padding: 11px 24px; font-size: 1rem; }
.btn-icon { padding: 7px; width: 32px; height: 32px; justify-content: center; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary  { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }

.btn-secondary { background: var(--gray-100); color: var(--gray-800); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-200); }

.btn-danger  { background: var(--red-600); color: white; border-color: var(--red-600); }
.btn-danger:hover { background: var(--red-800); border-color: var(--red-800); }

.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--red-50); }

.btn-ghost  { background: transparent; color: var(--gray-600); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-success { background: var(--color-success); color: white; border-color: var(--color-success); }

/* ===========================
   Badges
   =========================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  font-size: .71rem;
  font-weight: 600;
  border-radius: 100px;
}
.badge-red    { background: var(--red-100);   color: var(--red-700); }
.badge-green  { background: #E8F5E9;           color: #2E7D32; }
.badge-gray   { background: var(--gray-200);   color: var(--gray-700); }
.badge-yellow { background: #FFF8E1;           color: #BF6000; }

/* ===========================
   Alertas
   =========================== */
.alert {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: #E8F5E9; color: #2E7D32; border-color: #C8E6C9; }
.alert-danger  { background: var(--red-100); color: var(--red-800); border-color: var(--red-200); }
.alert-warning { background: #FFF8E1; color: #BF6000; border-color: #FFECB3; }
.alert-info    { background: #E3F2FD; color: #1565C0; border-color: #BBDEFB; }

/* ===========================
   Filas dinámicas (cuentas bancarias, etc.)
   =========================== */
.dynamic-section {
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 16px;
}

.dynamic-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dynamic-section-title { font-size: .82rem; font-weight: 600; color: var(--gray-700); }

.dynamic-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr 1.5fr 1fr auto;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}
.dynamic-row:last-child { border-bottom: none; }

.dynamic-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}
.dynamic-row-3:last-child { border-bottom: none; }

.dynamic-row-full {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}
.dynamic-row-full:last-child { border-bottom: none; }

.remove-row-btn {
  width: 30px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-danger);
  background: var(--red-50);
  transition: background var(--t);
  flex-shrink: 0;
  font-size: .85rem;
}
.remove-row-btn:hover { background: var(--red-100); }

/* ===========================
   Modal
   =========================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
  transform: scale(.96);
  transition: transform var(--t);
}
.modal-overlay.open .modal { transform: scale(1); }

.modal-header {
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.modal-icon.danger { background: var(--red-100); color: var(--red-600); }

.modal-title  { font-size: 1rem; font-weight: 600; }
.modal-body   { padding: 18px 22px; font-size: .88rem; color: var(--gray-700); line-height: 1.6; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 8px; }

/* ===========================
   Toasts
   =========================== */
.toast-container {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: .855rem;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 240px;
  animation: toastIn .28s ease;
}
.toast.success { background: var(--color-success); }
.toast.error   { background: var(--color-danger); }
.toast.warning { background: var(--color-warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
   Login
   =========================== */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(140deg, #1A0505 0%, #3D0F0F 55%, #6B1414 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px 38px;
  width: 100%;
  max-width: 390px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}

.login-logo { text-align: center; margin-bottom: 30px; }

.login-logo-icon {
  width: 54px; height: 54px;
  background: var(--color-primary);
  border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-size: 1.4rem; font-weight: 700;
  margin-bottom: 12px;
}

.login-title    { font-size: 1.45rem; font-weight: 700; color: var(--gray-900); }
.login-subtitle { font-size: .82rem; color: var(--color-muted); margin-top: 4px; }
.login-form .form-group { margin-bottom: 15px; }

/* ===========================
   Imagen de perfil (postulantes)
   =========================== */
.img-upload-wrap { position: relative; width: fit-content; }

.img-preview {
  width: 120px; height: 120px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--gray-300);
}

.img-placeholder {
  width: 120px; height: 120px;
  border-radius: var(--radius);
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  font-size: 2rem;
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.img-placeholder:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ===========================
   Vista detalle
   =========================== */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px,1fr));
  gap: 18px;
}

.detail-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.detail-value { font-size: .875rem; color: var(--gray-900); }
.detail-value.empty { color: var(--gray-400); font-style: italic; }

/* ===========================
   Grilla Hainze sub-módulos
   =========================== */
.hainze-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px,1fr));
  gap: 20px;
}

.hainze-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
  display: block;
  color: inherit;
}
.hainze-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.hainze-card-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--red-100);
  color: var(--red-600);
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.hainze-card-name { font-weight: 700; font-size: .98rem; color: var(--gray-900); margin-bottom: 6px; }
.hainze-card-desc { font-size: .78rem; color: var(--color-muted); }

/* ===========================
   Buscador
   =========================== */
.search-bar { position: relative; }
.search-bar i {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400); font-size: .85rem;
  pointer-events: none;
}
.search-bar input { padding-left: 32px; }

/* ===========================
   Divisor de secciones
   =========================== */
.section-divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 22px 0;
}

/* ===========================
   Utilidades
   =========================== */
.d-flex          { display: flex; }
.align-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap       { flex-wrap: wrap; }
.flex-1          { flex: 1; }
.gap-8           { gap: 8px; }
.gap-12          { gap: 12px; }
.gap-16          { gap: 16px; }
.mt-8            { margin-top: 8px; }
.mt-16           { margin-top: 16px; }
.mt-24           { margin-top: 24px; }
.mb-16           { margin-bottom: 16px; }
.mb-24           { margin-bottom: 24px; }
.text-center     { text-align: center; }
.text-right      { text-align: right; }
.text-muted      { color: var(--color-muted); }
.text-danger     { color: var(--color-danger); }
.text-success    { color: var(--color-success); }
.fw-600          { font-weight: 600; }
.fs-sm           { font-size: .82rem; }
.w-100           { width: 100%; }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
  .dynamic-row { grid-template-columns: 1fr 1fr 1fr auto; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0 !important; }
  body.sidebar-collapsed .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
  .content { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .dynamic-row, .dynamic-row-3, .dynamic-row-full { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .login-card { padding: 28px 22px; }
  .stat-grid { grid-template-columns: 1fr; }
}
