/* ==========================================================
   Guate-Subasta · estilos principales
   Las fuentes se cargan desde header.php (Bricolage Grotesque + DM Sans)
   ========================================================== */
:root {
  --ink: #0a1226;
  --navy: #101a34;
  --navy-2: #1a2748;
  --blue: #2f5bea;
  --blue-dark: #2548c4;
  --gold: #e8a317;
  --gold-soft: #fdf3d8;
  --green: #0f9d74;
  --green-soft: #def5ec;
  --red: #d6403f;
  --red-soft: #fde8e8;
  --violet: #7c5cf0;
  --paper: #f3f4f8;
  --card: #ffffff;
  --text: #121a2e;
  --muted: #667089;
  --line: #e3e6ee;
  --shadow: 0 1px 2px rgba(10,18,38,.05), 0 8px 24px -12px rgba(10,18,38,.14);
  --shadow-lift: 0 2px 4px rgba(10,18,38,.06), 0 18px 34px -14px rgba(10,18,38,.22);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --font-display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: color .15s ease, background-color .15s ease; }

:focus-visible { outline: 3px solid rgba(47,91,234,.45); outline-offset: 2px; }

.ico { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- BARRA SUPERIOR ---------- */
header {
  height: 64px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--gold);
}
header a { color: #fff; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand em { font-style: normal; color: var(--gold); }
.brand-dash { color: var(--gold); }
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink);
}
.brand-mark .ico { width: 20px; height: 20px; }

nav { display: flex; gap: 12px; align-items: center; }

.bell-btn {
  position: relative;
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  color: #e6eaf5;
}
.bell-btn:hover { background: rgba(232,163,23,.22); color: var(--gold); }
.bell-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--red); color: #fff;
  font-size: .7rem; font-weight: 700;
  border-radius: 999px;
  border: 2px solid var(--ink);
}

.user-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 16px 4px 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}
.avatar {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue); color: #fff;
  font-weight: 700; font-size: .9rem;
}
.user-text { display: flex; flex-direction: column; line-height: 1.15; }
.user-text b { font-size: .88rem; font-weight: 600; color: #fff; }
.user-text small { font-size: .74rem; color: #9fabc9; }

.logout-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  color: #dbe1f0 !important;
  font-size: .86rem; font-weight: 600;
}
.logout-btn .ico { width: 17px; height: 17px; }
.logout-btn:hover { background: var(--red); border-color: var(--red); color: #fff !important; }

/* ---------- ESTRUCTURA Y MENÚ LATERAL ---------- */
.shell { display: flex; min-height: calc(100vh - 66px); }

aside {
  width: 248px;
  flex-shrink: 0;
  background: var(--navy);
  padding: 22px 14px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  margin-bottom: 4px;
  border-radius: var(--r-md);
  color: #b4bfd8;
  font-weight: 500;
  font-size: .94rem;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active {
  background: var(--navy-2);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gold);
}
.nav-link.active .ico { color: var(--gold); }
.nav-group {
  margin: 22px 14px 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.09);
  font-size: .78rem;
  font-weight: 600;
  color: #7f8bab;
}

/* ---------- CONTENIDO ---------- */
main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 34px 40px 48px;
}
h1 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 6px;
}
h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0 0 14px;
}
h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
main > p { color: var(--muted); margin: 0 0 26px; max-width: 70ch; }

/* ---------- TARJETAS DE ESTADÍSTICAS ---------- */
@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 24px 0 28px;
}

.stats > div {
  position: relative;
  min-height: 134px;
  display: flex; flex-direction: column;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  /* Sombra base suave y preparación para la línea inferior de color */
  box-shadow: 0 2px 6px rgba(10,18,38,.04), inset 0 0 0 0 currentColor;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: fadeSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Retraso en cascada para que entren una por una al cargar */
.stats > div:nth-child(1) { animation-delay: 0s; }
.stats > div:nth-child(2) { animation-delay: 0.08s; }
.stats > div:nth-child(3) { animation-delay: 0.16s; }
.stats > div:nth-child(4) { animation-delay: 0.24s; }

/* Hover: la tarjeta se eleva, acentúa la sombra y pinta una barra inferior de su color */
.stats > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(16, 26, 52, 0.12), 0 4px 8px rgba(16, 26, 52, 0.04), inset 0 -4px 0 0 currentColor;
  border-color: transparent;
}

.stats small { 
  color: var(--muted); font-size: .88rem; font-weight: 600; 
  transition: color 0.3s ease; 
}
.stats > div:hover small:first-child { color: var(--ink); }

.stats b {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
  transform-origin: left bottom;
}

/* El número adquiere el color de la tarjeta y crece sutilmente al pasar el mouse */
.stats > div:hover b {
  transform: scale(1.05);
  color: currentColor; 
}

.stats small:not(:first-child) { 
  margin-top: auto; padding-top: 10px; font-size: .8rem; font-weight: 500; 
}

/* Ícono de cada métrica (esquina superior derecha) */
.stats > div::before, .stats > div::after {
  content: ''; position: absolute; top: 18px; right: 20px;
  width: 40px; height: 40px; border-radius: 12px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.stats > div::before { background: currentColor; opacity: .12; }
.stats > div::after {
  background: currentColor;
  width: 20px; height: 20px; top: 28px; right: 30px; border-radius: 0;
  -webkit-mask: var(--stat-ico) center / contain no-repeat;
          mask: var(--stat-ico) center / contain no-repeat;
}

/* Animación del cuadrito del ícono al pasar el mouse (crece y rota) */
.stats > div:hover::before { transform: scale(1.15) rotate(-6deg); opacity: 0.18; }
.stats > div:hover::after { transform: scale(1.15) rotate(-6deg); }

/* Asignación de colores e íconos originales para no romper el diseño */
.stats > div:nth-child(1) { color: var(--blue); --stat-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M22 21v-2a4 4 0 0 0-3-3.87'/><path d='M16 3.13a4 4 0 0 1 0 7.75'/></svg>"); }
.stats > div:nth-child(2) { color: var(--gold); --stat-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m7.5 4.27 9 5.15'/><path d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/><path d='m3.3 7 8.7 5 8.7-5'/><path d='M12 22V12'/></svg>"); }
.stats > div:nth-child(3) { color: var(--green); --stat-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m14 13-8.5 8.5a2.12 2.12 0 0 1-3-3L11 10'/><path d='m16 16 6-6'/><path d='m8 8 6-6'/><path d='m9 7 8 8'/><path d='m21 11-8-8'/></svg>"); }
.stats > div:nth-child(4) { color: var(--violet); --stat-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m22 7-8.5 8.5-5-5L2 17'/><path d='M16 7h6v6'/></svg>"); }
.stats > div > * { position: relative; color: initial; }
.stats b { color: var(--ink); }

/* ---------- PANELES Y TARJETAS DE SUBASTA ---------- */
.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}
.panel { overflow-x: auto; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 22px;
}
.item-subasta {
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .2s ease, box-shadow .2s ease;
}
.item-subasta:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.item-subasta img {
  width: 100%;
  object-fit: contain !important;
  background: #f6f7fb !important;
  padding: 8px !important;
  border-radius: var(--r-md) !important;
  border: 1px solid var(--line);
}
.item-subasta h3 { font-size: 1.15rem; color: var(--ink); min-height: 2.6em; margin: 14px 0 6px; }

.placeholder, .hero {
  height: 150px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eef0f7, #e2e6f1);
  border-radius: var(--r-md);
  font-size: 50px;
}
.hero { height: 270px; }
.detail, .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.narrow { max-width: 680px; }

/* Cuenta regresiva (uso: <span class="countdown" data-countdown="2026-11-01 12:00:00"></span>) */
.countdown {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #8a5b00;
  font-size: .84rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.countdown::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.countdown.is-urgent { background: var(--red-soft); color: #a22826; }
.countdown.is-urgent::before { background: var(--red); animation: pulso 1.2s ease-in-out infinite; }
.countdown.is-done { background: #eceef4; color: var(--muted); }
.countdown.is-done::before { background: #a9b0c2; }
@keyframes pulso { 50% { opacity: .25; } }

/* ---------- BOTONES (principal · .gold · .ghost · .danger · .sm) ---------- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px;
  padding: 11px 20px;
  background: var(--blue);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: inherit; font-weight: 600; font-size: .93rem;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
button:hover, .button:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 6px 16px -6px rgba(47,91,234,.55); }
button:active, .button:active { transform: translateY(1px); }
.button.gold, button.gold { background: var(--gold); color: var(--ink); }
.button.gold:hover, button.gold:hover { background: #d4920d; color: var(--ink); box-shadow: 0 6px 16px -6px rgba(232,163,23,.6); }
.button.ghost, button.ghost { background: transparent; color: var(--ink); border-color: #cfd4e2; }
.button.ghost:hover, button.ghost:hover { background: #eceef6; color: var(--ink); box-shadow: none; }
.button.danger, button.danger { background: var(--red-soft); color: #a22826; }
.button.danger:hover, button.danger:hover { background: var(--red); color: #fff; box-shadow: none; }
.button.sm, button.sm, td .button, td button { padding: 7px 14px; font-size: .85rem; border-radius: 9px; }
td .button, td button { margin-top: 0; }

/* ---------- ESTADOS (BADGES) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #0b7a5a;
  font-size: .78rem; font-weight: 700;
  text-transform: capitalize;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.programada, .badge.warn, .badge.pendiente { background: var(--gold-soft); color: #8a5b00; }
.badge.cerrada, .badge.muted, .badge.finalizada { background: #eceef4; color: #5a647c; }
.badge.cancelada, .badge.danger, .badge.inactivo { background: var(--red-soft); color: #a22826; }

/* ---------- TABLAS ---------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  display: block;
  overflow-x: auto;
}
@media (min-width: 900px) { table { display: table; } }
th, td {
  text-align: left;
  padding: 14px 14px;
  border-bottom: 1px solid #eef0f5;
  vertical-align: middle;
}
td:not(:first-child), th:not(:first-child) { white-space: nowrap; }  /* evita fechas partidas en 3 líneas */
td:first-child { min-width: 170px; }
th {
  background: #f7f8fb;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
th:first-child { border-top-left-radius: var(--r-sm); }
th:last-child { border-top-right-radius: var(--r-sm); }
tbody tr:hover td { background: #fafbfd; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- FORMULARIOS Y LOGIN ---------- */
.auth-card {
  max-width: 440px;
  margin: 55px auto;
  padding: 38px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lift);
}
label { display: block; margin: 16px 0 6px; font-weight: 600; font-size: .9rem; color: #2c3550; }
input, select, textarea {
  width: 100%; max-width: 100%; min-width: 0;
  padding: 11px 14px;
  background: #fafbfd;
  border: 1.5px solid #d3d8e6;
  border-radius: var(--r-md);
  font-family: inherit; font-size: .95rem; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47,91,234,.14);
}
textarea { min-height: 95px; }

/* ---------- ALERTAS Y EXTRAS ---------- */
.flash {
  margin-bottom: 22px;
  padding: 14px 18px;
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  border-radius: var(--r-md);
  color: #6f4a00;
  font-weight: 500;
}
.demo { margin-top: 20px; padding: 12px 14px; background: #eef0f6; border-radius: var(--r-md); font-size: .88rem; }
.location-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: .85rem; color: var(--muted); }
.pickup-location { margin: 18px 0; padding: 18px; background: #eef3ff; border: 1px solid #c9d7fb; border-radius: 14px; }
.zoomable { cursor: zoom-in; }
.zoom-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 25px;
  background: rgba(6,12,28,.92);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}
.zoom-overlay img { max-width: 95vw; max-height: 90vh; object-fit: contain; border-radius: var(--r-md); box-shadow: 0 25px 50px rgba(0,0,0,.5); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 950px) {
  header { height: auto; min-height: 64px; padding: 10px 18px; gap: 10px; flex-wrap: wrap; }
  nav { flex-wrap: wrap; gap: 10px; }
  aside { width: 200px; padding: 16px 10px; }
  main { padding: 22px; }
  .grid2, .detail { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  aside { display: flex; width: 100%; overflow-x: auto; gap: 6px; padding: 10px 12px; }
  .nav-link { flex: 0 0 auto; white-space: nowrap; margin: 0; padding: 9px 12px; font-size: .86rem; }
  .nav-link.active { box-shadow: inset 0 -3px 0 var(--gold); }
  .nav-group { display: none; }
  main { padding: 16px 14px 32px; }
  .user-text small, .logout-btn span { display: none; }
  .user-pill { padding-right: 12px; }
  .logout-btn { padding: 9px; }
  .location-fields { grid-template-columns: 1fr; }
  .auth-card { margin: 18px auto; padding: 24px; }
  h1 { font-size: 1.65rem; }
}
@media (max-width: 480px) {
  .stats, .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- IMPRESIÓN ---------- */
@media print {
  header, aside, .audit-actions, button, .flash, #filtro-auditoria-texto, #filtro-auditoria-evento { display: none !important; }
  body, main { background: #fff !important; color: #000 !important; padding: 0 !important; }
  .shell { display: block; }
  table { display: table; font-size: 10px; }
  th, td, td:not(:first-child), th:not(:first-child) { padding: 5px; overflow-wrap: anywhere; white-space: normal; }
  section.panel { box-shadow: none; border: 0; }
}

/* ==========================================================
   PANEL PRINCIPAL (views/admin/dashboard.php)
   ========================================================== */
.muted { color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.panel-head h2 { margin-bottom: 0; }
.link-more { font-size: .88rem; font-weight: 600; }
.link-more:hover { text-decoration: underline; }
.empty { padding: 18px 0 4px; }
.empty p { margin: 0 0 12px; color: var(--muted); }
.empty .button { margin-top: 0; }

/* Fila de subasta */
.lot {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.5fr) auto auto auto;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.panel-head + .lot { border-top: 0; }
.lot .button { margin-top: 0; }
.lot-tile {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
}
.lot-tile { position: relative; }
.lot-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--navy); }
.lot-main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.lot-name { color: var(--ink); font-weight: 700; font-size: 1rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-name:hover { color: var(--blue); }
.lot-meta { color: var(--muted); font-size: .84rem; margin-bottom: 4px; }
.lot-price, .lot-time { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.lot-price { text-align: right; }
.lot-price small, .lot-time small { color: var(--muted); font-size: .78rem; }
.lot-price b { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.lot-time { align-items: flex-start; }

/* Accesos rápidos */
.quick { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* Tarjeta base: diseño oscuro institucional para todos */
.quick-link {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-2) 100%);
  border: 1px solid var(--navy);
  border-radius: var(--r-md);
  box-shadow: 0 4px 12px -4px rgba(16, 26, 52, 0.4);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  position: relative;
}

/* Efecto hover suave que levanta la tarjeta */
.quick-link:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 10px 20px -6px rgba(16, 26, 52, 0.5); 
}

/* Línea decorativa dorada lateral al pasar el mouse */
.quick-link::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 4px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.quick-link:hover::before { opacity: 1; }

/* Ícono dorado para todos */
.quick-ico { 
  width: 42px; height: 42px; 
  display: grid; place-items: center; 
  border-radius: 10px; 
  background: var(--gold); 
  color: var(--ink); 
  flex-shrink: 0; 
  box-shadow: 0 4px 12px -2px rgba(232, 163, 23, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}
.quick-link:hover .quick-ico { 
  transform: scale(1.08); 
  box-shadow: 0 6px 14px -2px rgba(232, 163, 23, 0.6); 
}

/* Textos */
.quick-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.quick-text b { font-weight: 700; font-size: .95rem; color: #fff; transition: color 0.15s; }
.quick-text small { color: #a9b5d2; font-size: .82rem; margin-top: 2px; }

/* Efecto hover en el texto */
.quick-link:hover .quick-text b { color: var(--gold); }

@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .lot { grid-template-columns: 52px minmax(0, 1fr); gap: 10px 14px; }
  .lot-price, .lot-time, .lot > .button { grid-column: 2; align-items: flex-start; text-align: left; }
  .lot > .button { justify-self: start; }
}

/* ==========================================================
   DETALLE DE SUBASTA (views/cliente/detalle.php)
   ========================================================== */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.back-link:hover { color: var(--blue); }
.back-link .ico { width: 16px; height: 16px; }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.title-row h1 { margin: 0; }
.detail-page { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.gallery-main { display: block; width: 100%; height: 380px; object-fit: contain; background: #f6f7fb; border: 1px solid var(--line); border-radius: var(--r-md); }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs img { width: 72px; height: 72px; flex-shrink: 0; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; opacity: .65; transition: opacity .15s ease; }
.gallery-thumbs img:hover, .gallery-thumbs img.on { opacity: 1; border-color: var(--gold); }
.no-image { height: 240px; display: grid; place-items: center; background: #f6f7fb; border: 1px dashed #c9cfdf; border-radius: var(--r-md); color: var(--muted); }

.facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.map-frame { display: block; width: 100%; height: 240px; border: 0; border-radius: var(--r-md); margin-top: 14px; }

.price-label { color: var(--muted); font-size: .9rem; }
.price-big { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.bid-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.bid-meta b { color: var(--ink); font-weight: 600; }
.bid-form { margin-top: 6px; }
.money-input { position: relative; }
.money-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }
.money-input input { padding-left: 34px; font-size: 1.15rem; font-weight: 700; }
.bid-form .hint { margin: 6px 0 0; }
.button.block, button.block { width: 100%; }

.notice { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); font-size: .92rem; }
.notice p { margin: 4px 0 0; }
.notice .button { margin-top: 10px; }
.notice.info { background: #eaf0ff; color: #1c3a8f; }
.notice.warn { background: var(--gold-soft); color: #6f4a00; }
.notice.danger { background: var(--red-soft); color: #8f2220; }
.notice.success { background: var(--green-soft); color: #0b6b4f; }
.notice.neutral { background: #eceef4; color: #3f4962; }
.detail-page form + .notice, .notice + form { margin-top: 14px; }

.bids { list-style: none; margin: 0; padding: 0; }
.bid-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.bid-row:first-child { border-top: 0; }
.bid-pos { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #eceef4; color: #4a5570; font-weight: 700; font-size: .82rem; }
.bid-row.lead .bid-pos { background: var(--gold); color: var(--ink); }
.bid-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.bid-who b { font-weight: 600; }
.bid-who small { color: var(--muted); font-size: .8rem; }
.bid-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.lead-tag { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: #8a5b00; font-size: .72rem; font-weight: 700; }

@media (max-width: 1000px) {
  .detail-page { grid-template-columns: 1fr; }
  .gallery-main { height: 280px; }
}

/* ==========================================================
   MIS PUJAS (views/cliente/mis_pujas.php)
   ========================================================== */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 20px; }
.chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.chip b { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.chip.win b { color: var(--green); }
.chip.lost b { color: #b26a00; }
.table-panel { padding: 8px 14px 14px; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.row-actions form { margin: 0; }
.row-actions button { margin-top: 0; }

/* ==========================================================
   COMUNES: encabezados de página, formularios
   ========================================================== */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 0; color: var(--muted); }
.page-head .button { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-section > h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--ink); }
input[type=checkbox], input[type=radio] { width: auto; padding: 0; accent-color: var(--blue); }
input[readonly] { background: #eef0f6; color: var(--muted); }
input[type=file] { padding: 10px; border-style: dashed; cursor: pointer; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 7px 14px; border: 0; border-radius: 8px; background: var(--navy); color: #fff; font-family: inherit; font-weight: 600; cursor: pointer; }

/* ==========================================================
   CATÁLOGO (views/cliente/catalogo.php)
   ========================================================== */
@keyframes cardFloatIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Panel de filtros moderno */
.filters { 
  display: grid; grid-template-columns: minmax(220px, 2fr) 1fr 1fr auto; gap: 16px; align-items: end; 
  padding: 22px 26px; margin-bottom: 28px; 
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); 
  box-shadow: 0 6px 16px -4px rgba(10,18,38,.06);
}
.filters label { 
  margin: 0 0 8px; font-size: .82rem; color: var(--navy); font-weight: 700; 
  text-transform: uppercase; letter-spacing: .04em; 
}
.filters .count { padding-bottom: 12px; color: var(--muted); font-size: .9rem; white-space: nowrap; font-weight: 500; }

.search { position: relative; }
.search .ico { position: absolute; left: 14px; bottom: 12px; width: 18px; height: 18px; color: var(--blue); pointer-events: none; }
.search input { padding-left: 42px; border-color: #cfd4e2; }

/* Estilizado personalizado para los "Select" (Categoría y Estado) */
.filters select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f5bea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  border-color: #cfd4e2;
  font-weight: 500;
}
.filters select:hover, .search input:hover { border-color: var(--blue); }

/* Tarjetas de artículos */
.lot-card { 
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; 
  box-shadow: 0 4px 10px rgba(10,18,38,.03); 
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: cardFloatIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Retraso en cascada para la aparición de las tarjetas */
.cards > .lot-card:nth-child(1) { animation-delay: 0.05s; }
.cards > .lot-card:nth-child(2) { animation-delay: 0.10s; }
.cards > .lot-card:nth-child(3) { animation-delay: 0.15s; }
.cards > .lot-card:nth-child(4) { animation-delay: 0.20s; }
.cards > .lot-card:nth-child(5) { animation-delay: 0.25s; }
.cards > .lot-card:nth-child(6) { animation-delay: 0.30s; }
.cards > .lot-card:nth-child(7) { animation-delay: 0.35s; }
.cards > .lot-card:nth-child(8) { animation-delay: 0.40s; }

/* Efecto hover vibrante */
.lot-card:hover { 
  transform: translateY(-6px); 
  box-shadow: 0 16px 32px -12px rgba(16, 26, 52, 0.15), 0 0 0 1px var(--blue); 
  border-color: transparent;
}

/* Contenedor de la imagen con gradiente sutil */
.lot-cover { 
  position: relative; flex-shrink: 0; height: 230px; overflow: hidden; display: grid; place-items: center; 
  background: linear-gradient(160deg, #f1f3f9 0%, #ffffff 100%); color: var(--muted); font-size: .9rem; 
}
.lot-cover img { 
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; 
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Zoom a la imagen al pasar el mouse */
.lot-card:hover .lot-cover img { transform: scale(1.07); }

.lot-cover.no-img::after { content: 'Imagen no disponible'; }
.lot-card.is-closed .lot-cover img { filter: grayscale(.6); opacity: .7; }

/* Posicionamiento de etiquetas */
.lot-cover .badge { position: absolute; z-index: 1; top: 14px; left: 14px; box-shadow: 0 4px 8px rgba(0,0,0,.08); }
.lot-cover .countdown { position: absolute; z-index: 1; top: 14px; right: 14px; box-shadow: 0 4px 8px rgba(0,0,0,.08); }

.lot-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 20px 22px 24px; }
.lot-cat { font-size: .82rem; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: .02em; }

.lot-card h3 { 
  margin: 0 0 6px; font-size: 1.2rem; line-height: 1.25; color: var(--ink); 
  transition: color 0.2s ease;
}
.lot-card:hover h3 { color: var(--blue); }

.lot-money { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin: 8px 0 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.lot-money small { display: block; color: var(--muted); font-size: .82rem; }
.lot-money b { 
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; 
  color: var(--ink); font-variant-numeric: tabular-nums; 
  transition: color 0.3s ease;
}
.lot-card:hover .lot-money b { color: var(--blue); }

.lot-facts { margin: 0; color: var(--muted); font-size: .88rem; }
.lot-facts strong { color: var(--text); font-weight: 600; }
.lot-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: auto; padding-top: 18px; }
.lot-actions .button, .lot-actions button { margin-top: 0; flex: 1; }
.lot-actions form { margin: 0; width: 100%; display: flex; gap: 10px; }

/* ==========================================================
   PAGO (views/cliente/pago.php)
   ========================================================== */
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start; max-width: 980px; }
.pay-total { margin: 2px 0 12px; font-family: var(--font-display); font-size: 2.8rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.summary-line b { color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.cc { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1.586; max-width: 360px; margin-top: 22px; padding: 22px; border-radius: 18px; background: linear-gradient(135deg, var(--navy) 0%, #2b3d75 100%); color: #fff; box-shadow: var(--shadow-lift); }
.cc-top { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: #c9d3ee; }
.cc-chip { width: 42px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #f3cf7a, #c9921a); }
.cc-num { font-size: 1.3rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.cc-name { font-size: .85rem; letter-spacing: .06em; color: #dbe3f8; }
.pay-grid .block + .block { margin-top: 10px; }

/* ==========================================================
   ARTÍCULOS (views/subastador/articulos.php)
   ========================================================== */
@keyframes artCardIn {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes modalPopIn {
  0% { opacity: 0; transform: scale(0.94) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.articles-grid { 
  display: grid; 
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); 
  gap: 24px; 
  align-items: start; 
}

/* Paneles con acento institucional superior y animación de entrada */
.articles-grid > .panel {
  position: relative;
  border-top: 4px solid var(--navy);
  box-shadow: 0 8px 24px -10px rgba(10, 18, 38, 0.1);
  animation: artCardIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.articles-grid > .panel:nth-child(2) {
  border-top-color: var(--gold);
  animation-delay: 0.08s;
}

/* Títulos de ambos paneles con línea decorativa */
.articles-grid > .panel > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.articles-grid > .panel > h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--gold);
  border-radius: 999px;
}

/* Mejoras en los campos del formulario de artículos */
.articles-grid input:not([type=checkbox]):not([type=file]),
.articles-grid select,
.articles-grid textarea {
  border-color: #cfd4e2;
  background: #f9fafd;
  transition: all 0.2s ease;
}
.articles-grid input:not([type=checkbox]):not([type=file]):hover,
.articles-grid select:hover,
.articles-grid textarea:hover {
  border-color: var(--blue);
  background: #ffffff;
}
.articles-grid input:not([type=checkbox]):not([type=file]):focus,
.articles-grid select:focus,
.articles-grid textarea:focus {
  background: #ffffff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 91, 234, 0.14);
  transform: translateY(-1px);
}

/* Selector "Estado físico" con flecha personalizada */
.articles-grid select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f5bea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  font-weight: 500;
}

/* Zona de carga de fotografías moderna */
.articles-grid input[type=file] {
  padding: 14px;
  background: linear-gradient(135deg, #f4f7ff 0%, #fafbff 100%);
  border: 2px dashed #b8c7f8;
  border-radius: var(--r-md);
  color: var(--navy);
  font-weight: 500;
  transition: all 0.25s ease;
}
.articles-grid input[type=file]:hover {
  border-color: var(--blue);
  background: #eef3ff;
  box-shadow: 0 4px 12px rgba(47, 91, 234, 0.08);
}
.articles-grid input[type=file]::file-selector-button {
  margin-right: 14px;
  padding: 8px 16px;
  border: 0;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.articles-grid input[type=file]:hover::file-selector-button {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-1px);
}

.char-count { margin-top: 6px; text-align: right; font-size: .84rem; color: var(--green); font-weight: 600; }

/* Vista previa de miniaturas de fotos */
.foto-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 12px; margin: 12px 0; }
.foto-tarjeta { 
  min-width: 0; padding: 8px; background: #ffffff; border: 1px solid var(--line); 
  border-radius: var(--r-md); box-shadow: 0 2px 6px rgba(10,18,38,.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.foto-tarjeta:hover { transform: translateY(-3px); box-shadow: 0 8px 16px -4px rgba(10,18,38,.12); border-color: var(--blue); }
.foto-tarjeta img { width: 100%; height: 84px; object-fit: cover; border-radius: 8px; }
.foto-tarjeta small { display: block; margin: 6px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; color: var(--muted); font-weight: 500; }
.foto-quitar { width: 100%; margin: 0; padding: 5px; font-size: .78rem; background: var(--red-soft); color: #a22826; border-radius: 8px; }
.foto-quitar:hover { background: var(--red); color: #fff; box-shadow: none; }

.mapa-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; }
.mapa-acciones button { margin-top: 0; }

/* Barra superior de administración ("Marca los artículos que quieres retirar...") */
.admin-bar { 
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; 
  margin-bottom: 16px; padding: 14px 16px; 
  background: linear-gradient(135deg, #f4f6fb 0%, #eef2f9 100%); 
  border: 1px solid #d5dceb;
  border-left: 4px solid var(--navy);
  border-radius: var(--r-md); 
}
.admin-bar p { flex: 1 1 220px; margin: 0; font-size: .88rem; color: var(--navy); font-weight: 500; }
.admin-bar button { margin-top: 0; }

/* Lista de artículos registrados como tarjetas interactivas */
.art-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.art-row { 
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; 
  padding: 14px 16px; 
  background: #fafbfd;
  border: 1px solid var(--line); 
  border-radius: var(--r-md);
  box-shadow: 0 2px 5px rgba(10, 18, 38, 0.03);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  animation: artCardIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Cascada para los artículos de la lista */
.art-list .art-row:nth-child(1) { animation-delay: 0.05s; }
.art-list .art-row:nth-child(2) { animation-delay: 0.10s; }
.art-list .art-row:nth-child(3) { animation-delay: 0.15s; }
.art-list .art-row:nth-child(4) { animation-delay: 0.20s; }
.art-list .art-row:nth-child(5) { animation-delay: 0.25s; }
.art-list .art-row:nth-child(6) { animation-delay: 0.30s; }

/* Barra lateral dorada al pasar el mouse */
.art-row::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.art-row:hover {
  background: #ffffff;
  border-color: #c3cbe0;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(16, 26, 52, 0.15);
}
.art-row:hover::before { opacity: 1; }

/* Si el administrador marca el checkbox, resalta la tarjeta */
.art-row:has(.archivar-check:checked) {
  background: #fff9eb;
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(232, 163, 23, 0.15);
}
.art-row:has(.archivar-check:checked)::before {
  opacity: 1;
}

.archivar-check {
  width: 18px !important;
  height: 18px !important;
  cursor: pointer;
}

.art-row .lot-tile { 
  flex-shrink: 0; 
  width: 56px; 
  height: 56px; 
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(10, 18, 38, 0.1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.art-row:hover .lot-tile { transform: scale(1.07); }

.art-main { flex: 1; min-width: 150px; display: flex; flex-direction: column; line-height: 1.35; }
.art-main b { color: var(--ink); font-weight: 700; font-size: 1rem; transition: color 0.2s ease; }
.art-row:hover .art-main b { color: var(--blue); }
.art-main small { color: var(--muted); font-size: .84rem; margin-top: 2px; }

.art-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.art-actions form { margin: 0; }
.art-actions button { margin-top: 0; }
.art-actions .btn-ver-detalles {
  background: #ffffff;
  border-color: #cfd4e2;
  font-weight: 600;
}
.art-actions .btn-ver-detalles:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(16, 26, 52, 0.25);
}

/* Modal de detalles con animación */
.modal-back { display: none; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; padding: 20px; background: rgba(6,12,28,.72); backdrop-filter: blur(4px); }
.modal-box { 
  position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; 
  padding: 28px; background: var(--card); border-radius: var(--r-lg); 
  border-top: 4px solid var(--gold);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); 
  animation: modalPopIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.modal-close { position: absolute; top: 12px; right: 14px; margin: 0; padding: 2px 10px; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1.2; box-shadow: none; }
.modal-close:hover { background: #eceef4; color: var(--ink); box-shadow: none; }
.modal-gallery { display: flex; gap: 10px; margin: 14px 0; padding-bottom: 6px; overflow-x: auto; }
.modal-gallery img { height: 140px; width: auto; object-fit: contain; padding: 6px; background: #f6f7fb; border: 1px solid var(--line); border-radius: var(--r-md); }
.modal-desc { margin: 0; padding: 14px; background: #f7f8fb; border: 1px solid var(--line); border-radius: var(--r-md); white-space: pre-wrap; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-foot .button, .modal-foot button { margin-top: 0; }

/* ==========================================================
   PROGRAMAR (views/subastador/programar.php)
   ========================================================== */
.program-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.quick-mins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.quick-mins button { margin-top: 0; }
#textoFin.notice { margin: 14px 0 0; font-weight: 600; }
.tips { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.tips li { display: flex; gap: 12px; font-size: .93rem; }
.tips .ico { margin-top: 2px; color: var(--gold); }

@media (max-width: 1000px) {
  .articles-grid, .program-grid, .pay-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .form-row, .filters { grid-template-columns: 1fr; }
}

/* ==========================================================
   NOTIFICACIONES (views/cliente/avisos_subastas.php)
   ========================================================== */
.notif { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.notif-list .notif:first-child { border-top: 0; }
.notif-dot { width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: #cfd4e2; }
.notif.unread .notif-dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(47,91,234,.15); }
.notif h3 { margin: 0 0 2px; font-size: 1rem; color: var(--ink); }
.notif:not(.unread) h3 { font-weight: 600; color: #3c4660; }
.notif p { margin: 0 0 4px; font-size: .93rem; color: #3c4660; }
.notif small { color: var(--muted); }
.notif .button { margin-top: 0; }
@media (max-width: 560px) {
  .notif { grid-template-columns: 10px minmax(0, 1fr); }
  .notif .button { grid-column: 2; justify-self: start; }
}

/* Interruptor (checkbox con aspecto de switch) */
.toggle { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; font-weight: 500; font-size: .93rem; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { position: relative; flex-shrink: 0; width: 44px; height: 26px; border-radius: 999px; background: #c7cddd; transition: background-color .15s ease; }
.toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s ease; }
.toggle input:checked + .toggle-ui { background: var(--blue); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-ui { outline: 3px solid rgba(47,91,234,.45); outline-offset: 2px; }

/* ==========================================================
   COMPROBANTE (views/cliente/factura.php)
   ========================================================== */
.gs-fact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }
.gs-fact-actions button, .gs-fact-actions a { margin-top: 0; }
.gs-fact-paper { max-width: 820px; margin: 0 auto; padding: 40px; background: #fff; color: #1a2540; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.gs-fact-top { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 3px solid var(--gold); }
.gs-fact-top p { margin: 4px 0; color: var(--muted); }
.gs-fact-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.gs-fact-logo .ico { width: 26px; height: 26px; color: var(--gold); }
.gs-stamp { display: inline-block; margin-top: 10px; padding: 4px 12px; border: 1.5px solid var(--gold); border-radius: 999px; color: #8a5b00; font-size: .78rem; font-weight: 700; }
.gs-fact-ref { text-align: right; }
.gs-fact-ref strong { font-size: 1.05rem; color: var(--navy); overflow-wrap: anywhere; }
.gs-fact-paper h3 { margin: 0 0 8px; font-family: var(--font-body); font-size: .88rem; font-weight: 600; color: var(--muted); }
.gs-fact-section { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px 0; }
.gs-fact-section p { margin: 4px 0; }
.gs-fact-table { display: table; width: 100%; margin: 8px 0 22px; border-collapse: collapse; }
.gs-fact-table th { background: #f2f5fb; color: var(--navy); }
.gs-fact-table th, .gs-fact-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: normal; }
.gs-fact-table td p { margin: 4px 0; font-size: .9rem; color: var(--muted); }
.gs-fact-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 14px; font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--navy); }
.gs-fact-total span { font-family: var(--font-body); font-size: .95rem; font-weight: 600; color: var(--muted); }
.gs-fact-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.gs-fact-foot p { margin: 4px 0; color: var(--muted); font-size: .9rem; }
.gs-qr { width: 146px; height: 146px; display: flex; align-items: center; justify-content: center; background: #fff; }
.gs-qr img, .gs-qr canvas { width: 136px !important; height: 136px !important; }
.gs-fact-note { margin: 18px 0 0; font-size: .75rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 650px) {
  .gs-fact-paper { padding: 20px; }
  .gs-fact-section { grid-template-columns: 1fr; }
  .gs-fact-top, .gs-fact-foot { flex-direction: column; align-items: flex-start; }
  .gs-fact-ref { text-align: left; }
  .gs-fact-table { display: block; overflow-x: auto; font-size: .85rem; }
}
@media print {
  .gs-back, .gs-fact-actions { display: none !important; }
  .gs-fact-paper { max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .gs-fact-section { grid-template-columns: 1fr 1fr; }
  .gs-fact-top, .gs-fact-foot { flex-direction: row; }
  .gs-fact-ref { text-align: right; }
  .gs-fact-table { display: table; font-size: 13px; }
  .gs-fact-table th, .gs-fact-table td { padding: 10px; }
  @page { size: A4; margin: 13mm; }
}

/* ==========================================================
   LOGIN (views/auth/login.php)
   ========================================================== */
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); max-width: 900px; margin: 32px auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lift); }
.auth-aside { display: flex; flex-direction: column; gap: 18px; padding: 40px 36px; background: var(--navy); color: #fff; }
.auth-aside .brand-mark { width: 46px; height: 46px; border-radius: 12px; }
.auth-aside .brand-mark .ico { width: 24px; height: 24px; }
.auth-aside h2 { margin: 0; font-size: 1.7rem; line-height: 1.2; color: #fff; }
.auth-aside p { margin: 0; color: #b4bfd8; }
.auth-points { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 0; padding: 0; list-style: none; }
.auth-points li { display: flex; gap: 12px; font-size: .93rem; color: #d7def0; }
.auth-points .ico { margin-top: 2px; color: var(--gold); }
.auth-form { padding: 40px 36px; }
.auth-form h1 { margin-bottom: 4px; font-size: 1.8rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 84px; }
.pw-toggle { position: absolute; right: 5px; top: 5px; bottom: 5px; margin: 0; padding: 0 12px; background: transparent; color: var(--blue); font-size: .82rem; box-shadow: none; }
.pw-toggle:hover { background: #eaf0ff; color: var(--blue-dark); box-shadow: none; }
.auth-foot { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: .92rem; }
.demo-box { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 22px; padding: 14px; background: #f3f4f8; border-radius: var(--r-md); font-size: .88rem; }
.demo-box button { margin-top: 0; }
@media (max-width: 760px) {
  .auth-split { grid-template-columns: 1fr; margin: 12px auto; }
  .auth-aside, .auth-form { padding: 28px 24px; }
}

/* ==========================================================
   VERIFICACIÓN DE COMPROBANTE (views/cliente/verificar_factura.php)
   ========================================================== */
.verify { max-width: 560px; margin: 28px auto; }
.verify h1 { text-align: center; font-size: 1.7rem; }
.verify .lead { margin: 0 0 20px; text-align: center; color: var(--muted); }
.verify-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; }
.verify-icon .ico { width: 30px; height: 30px; }
.verify-icon.ok { background: var(--green-soft); color: var(--green); }
.verify-icon.fail { background: var(--red-soft); color: var(--red); }

/* ==========================================================
   ADMINISTRACIÓN Y AUDITORÍA (usuarios.php, auditoria.php)
   ========================================================== */
.badge.info { background: #e3ebff; color: #2548c4; }
.badge.rol-administrador { background: var(--gold-soft); color: #8a5b00; }
.badge.rol-auditor { background: #ece8fd; color: #5b3fd0; }
.badge.rol-subastador { background: #e3ebff; color: #2548c4; }
.badge.rol-cliente { background: #eceef4; color: #4a5570; }

.user-cell { display: flex; align-items: center; gap: 12px; }
.avatar.lg { width: 40px; height: 40px; font-size: 1rem; flex-shrink: 0; }
.user-info { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.user-info b { color: var(--ink); font-weight: 600; }
.user-info small { color: var(--muted); }
.fila-usuario[data-activo="0"] .user-cell { opacity: .55; }

.row-actions.wrap { flex-wrap: wrap; }
.row-actions select { width: auto; margin: 0; padding: 7px 10px; font-size: .88rem; }
.audit-actions button { margin-top: 0; }
td.cell-wrap, th.cell-wrap { white-space: normal; min-width: 260px; max-width: 520px; }

@media print {
  .filters { display: none !important; }
  .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==========================================================
   ESTADÍSTICAS (views/admin/estadisticas.php)
   ========================================================== */
.page-head .audit-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.audit-actions .button { margin-top: 0; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.chart-card { min-width: 0; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.chart-card h2 { margin: 0 0 4px; }
.chart-card p { margin: 0 0 14px; color: var(--muted); font-size: .88rem; }
.chart-card canvas { display: block; width: 100%; height: auto; border-radius: var(--r-sm); }
.chart-card button { margin-top: 12px; }

/* Íconos propios de las tarjetas de esta pantalla */
.stats.kpi > div:nth-child(1) { color: var(--blue); }
.stats.kpi > div:nth-child(2) { color: var(--green); }
.stats.kpi > div:nth-child(3) { color: var(--red); --stat-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='m15 9-6 6'/><path d='m9 9 6 6'/></svg>"); }
.stats.kpi > div:nth-child(4) { color: var(--gold); --stat-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='20' height='14' x='2' y='5' rx='2'/><path d='M2 10h20'/></svg>"); }
.stats.kpi > div:nth-child(1) { --stat-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m14 13-8.5 8.5a2.12 2.12 0 0 1-3-3L11 10'/><path d='m16 16 6-6'/><path d='m8 8 6-6'/><path d='m9 7 8 8'/><path d='m21 11-8-8'/></svg>"); }
.stats.kpi > div:nth-child(2) { --stat-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m22 7-8.5 8.5-5-5L2 17'/><path d='M16 7h6v6'/></svg>"); }

@media (max-width: 850px) { .chart-grid { grid-template-columns: 1fr; } }
@media print {
  .chart-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-card { break-inside: avoid; box-shadow: none; }
}