/* ─── DASHBOARD ──────────────────────────────────────────────── */

body.dashboard-page {
  background: #f3f6fb;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
}

/* ─── HEADER USER AREA (reusa estilos .header del index) ─────── */
.header__user-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header__user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 600;
}
.header__user-info svg { width: 16px; height: 16px; }

.header__logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: 2px solid #fecaca;
  background: transparent;
  color: #dc2626;
  font-family: inherit;
  font-weight: 600;
  font-size: .9rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}
.header__logout svg { width: 16px; height: 16px; }
.header__logout:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220,38,38,.3);
}

/* ─── MAIN ───────────────────────────────────────────────────── */
.dash-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 32px) 24px 60px;
}

/* ─── PAGE HEAD ──────────────────────────────────────────────── */
.dash-page-head { margin-bottom: 28px; }
.dash-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}
.dash-page-head h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #0d3272;
  margin-bottom: 14px;
  letter-spacing: -.01em;
}
/* ─── CONTEXTO: Cliente + Punto de servicio ──────────────── */
.dash-context {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 1px solid #e1e8f2;
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(13,50,114,.05);
  flex-wrap: wrap;
}
.dash-context__item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 240px;
  padding: 8px 12px;
}
.dash-context__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-context__icon svg { width: 22px; height: 22px; }
.dash-context__icon--blue {
  background: var(--blue-light);
  color: var(--blue);
}
.dash-context__icon--accent {
  background: #fef3c7;
  color: #b45309;
}
.dash-context__label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 2px;
  font-weight: 700;
}
.dash-context__item strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.dash-context__select {
  display: block;
  margin-top: 2px;
  max-width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  background: #f4f7fc;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  padding: 6px 34px 6px 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d3272' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dash-context__select:hover { border-color: var(--blue); }
.dash-context__select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-light);
}
.dash-context__divider {
  width: 1px;
  height: 48px;
  background: #e1e8f2;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .dash-context__divider { width: 100%; height: 1px; }
}

/* ─── STATS CARDS ────────────────────────────────────────────── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.dash-stat-card {
  background: #fff;
  border: 1px solid #e5ecf5;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(13,50,114,.04);
  transition: var(--transition);
}
.dash-stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(13,50,114,.08); }

.dash-stat-card__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-stat-card__icon svg { width: 22px; height: 22px; }
.dash-stat-card__icon--blue   { background: #e0edff; color: #1e5bb8; }
.dash-stat-card__icon--green  { background: #dcfce7; color: #16a34a; }
.dash-stat-card__icon--amber  { background: #fef3c7; color: #d97706; }
.dash-stat-card__icon--purple { background: #ede9fe; color: #7c3aed; }

.dash-stat-card__label {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.dash-stat-card strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.text-success { color: #16a34a !important; }
.text-warning { color: #d97706 !important; }

/* ─── CARD ───────────────────────────────────────────────────── */
.dash-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(13,50,114,.06);
  border: 1px solid #e5ecf5;
  overflow: hidden;
}
.dash-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(90deg, #0d3272 0%, #1a6fbf 100%);
  color: #fff;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-card__header h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-card__header h2 svg { width: 20px; height: 20px; }
.dash-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── SEARCH + SELECT ────────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  width: 16px; height: 16px;
  color: rgba(255,255,255,.7);
  pointer-events: none;
}
.search-wrap input {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: 8px 14px 8px 36px;
  border-radius: 8px;
  font-family: inherit;
  font-size: .85rem;
  width: 280px;
  outline: none;
  transition: background .2s, border-color .2s;
}
.search-wrap input::placeholder { color: rgba(255,255,255,.65); }
.search-wrap input:focus {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.5);
}
.dash-select {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: .85rem;
  cursor: pointer;
  outline: none;
}
.dash-select option { background: #0d3272; color: #fff; }

/* ─── TABLE ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.data-table thead th {
  background: #f3f6fb;
  color: var(--text);
  font-weight: 700;
  font-size: .78rem;
  text-align: center;
  padding: 14px 12px;
  border-bottom: 2px solid #e5ecf5;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.data-table thead th.text-left { text-align: left; }

.data-table tbody td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid #eef2f7;
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody td.text-left { text-align: left; }
.data-table tbody tr:hover { background: #f8fbff; }
.data-table tbody tr:last-child td { border-bottom: none; }

.col-id {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--blue-dark);
}
.col-name {
  font-weight: 600;
  color: var(--text);
}
.col-legajo {
  font-family: 'Courier New', monospace;
  font-size: .85rem;
  font-weight: 700;
  color: #6b7280;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}
.col-date {
  font-family: 'Courier New', monospace;
  font-size: .85rem;
  white-space: nowrap;
  color: #334155;
}
.col-date--empty {
  font-style: italic;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
}

/* Status badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 999px;
  text-transform: uppercase;
}
.status-badge--activo    { background: #dcfce7; color: #166534; }
.status-badge--inactivo  { background: #fee2e2; color: #991b1b; }

/* ─── TABLE FOOTER / PAGINATION ─────────────────────────────── */
.table-footer {
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eef2f7;
  flex-wrap: wrap;
  gap: 12px;
  background: #fafcfe;
}
.table-footer__info { font-size: .85rem; color: var(--text-muted); }
.pagination { display: flex; gap: 4px; }
.pagination button {
  padding: 6px 12px;
  border: 1px solid #d8e1ee;
  background: #fff;
  border-radius: 6px;
  font-family: inherit;
  font-size: .8rem;
  cursor: pointer;
  color: var(--text);
  transition: all .15s;
}
.pagination button:hover:not(:disabled) { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }
.pagination button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.pagination button:disabled { opacity: .45; cursor: not-allowed; }

/* ─── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .search-wrap input { width: 200px; }
}
@media (max-width: 900px) {
  .dash-stats { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .header__user-info { display: none; }
}
@media (max-width: 768px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash-card__header { flex-direction: column; align-items: flex-start; }
  .dash-card__actions { width: 100%; }
  .search-wrap, .search-wrap input { width: 100%; }
  .dash-page-head h1 { font-size: 1.5rem; }
}

/* ─── MODAL CAMBIAR CONTRASEÑA ──────────────────────────────── */
.pass-form { text-align: left; margin-top: 6px; }
.pass-form__error {
  display: block;
  color: #dc2626;
  font-size: .82rem;
  min-height: 1.1em;
  margin-bottom: 6px;
}
