/* ============================================================
   CerraGest — Estilo global premium
   ============================================================ */

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

:root {
  --bg: #0f1419;
  --surface: #1a2028;
  --surface-2: #232b35;
  --surface-3: #2a323d;
  --border: #2d3640;
  --border-light: #3a4550;
  --text: #e8edf2;
  --text-muted: #8892a0;
  --text-dim: #5a6470;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.25);
  --radius: 12px;

  --estado-solicitado: #3b82f6;
  --estado-presupuestado: #a855f7;
  --estado-aceptado: #06b6d4;
  --estado-finalizado: #22c55e;
  --estado-cancelado: #6b7280;

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  /* Forzar el modo oscuro en los controles nativos del navegador */
  color-scheme: dark;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   SELECTS Y OPTIONS — Fix de fondo claro en Firefox/Chrome
   ============================================================ */
select {
  background-color: var(--bg);
  color: var(--text);
  color-scheme: dark;
}

select option {
  background-color: var(--surface);
  color: var(--text);
  padding: 8px;
}

select option:checked,
select option:hover {
  background-color: var(--accent);
  color: #1a1a1a;
}

/* En algunos navegadores el optgroup también necesita estilo */
select optgroup {
  background-color: var(--surface-2);
  color: var(--accent);
  font-weight: 700;
}

select optgroup option {
  color: var(--text);
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  background: linear-gradient(180deg, #1a2028 0%, #151b23 100%);
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  backdrop-filter: blur(10px);
}

.topbar h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.topbar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.topbar-version {
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.3px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link.activo {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  color: #1a1a1a;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ============================================================
   LAYOUT
   ============================================================ */
main {
  padding: 24px 20px 60px;
  max-width: 760px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
}

/* ============================================================
   BOTONES PRINCIPALES
   ============================================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  color: #1a1a1a;
  border: none;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 4px 14px var(--accent-glow);
  letter-spacing: 0.2px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.btn-primary:active { transform: translateY(0); }

/* ============================================================
   FILTROS
   ============================================================ */
.filtros {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.filtros::-webkit-scrollbar { height: 4px; }
.filtros::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.filtro {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: inherit;
}

.filtro:hover { border-color: var(--border-light); color: var(--text); }

.filtro.activo {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  border-color: var(--accent);
  color: #1a1a1a;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ============================================================
   BUSCADOR
   ============================================================ */
.search-box { margin-bottom: 20px; }

.search-box input {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.search-box input::placeholder { color: var(--text-dim); }
.search-box input:hover { border-color: var(--border-light); }

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.03);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* ============================================================
   LISTAS
   ============================================================ */
.lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cliente-card, .trabajo-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, var(--surface) 0%, rgba(26, 32, 40, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.2s ease;
  animation: aparecer 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cliente-card:hover, .trabajo-card:hover {
  background: var(--surface-2);
  border-color: var(--border-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #b45309);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.info { flex: 1; min-width: 0; }

.nombre {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
}

.detalle {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}

.vacio {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   TARJETAS DE TRABAJO
   ============================================================ */
.trabajo-card {
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  position: relative;
}

.trabajo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trabajo-numero {
  font-size: 21px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.trabajo-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-solicitado    { background: rgba(59,130,246,0.15);  color: var(--estado-solicitado); }
.badge-presupuestado { background: rgba(168,85,247,0.15);  color: var(--estado-presupuestado); }
.badge-aceptado      { background: rgba(6,182,212,0.15);   color: var(--estado-aceptado); }
.badge-finalizado    { background: rgba(34,197,94,0.15);   color: var(--estado-finalizado); }
.badge-cancelado     { background: rgba(107,114,128,0.2);  color: var(--estado-cancelado); }

.badge-prio-urgente  { background: rgba(239,68,68,0.2);  color: #ef4444; }
.badge-prio-agendado { background: rgba(59,130,246,0.15); color: var(--estado-solicitado); }
.badge-prio-normal   { background: rgba(34,197,94,0.15); color: var(--estado-finalizado); }

.badge-pago-pagado    { background: rgba(34,197,94,0.2); color: #22c55e; }
.badge-pago-parcial   { background: rgba(245,158,11,0.2); color: #f59e0b; }
.badge-pago-pendiente { background: rgba(239,68,68,0.2); color: #ef4444; }

.trabajo-linea { font-size: 14px; color: var(--text); line-height: 1.5; }
.trabajo-linea strong { font-weight: 700; }
.trabajo-sub { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.trabajo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  gap: 10px;
  flex-wrap: wrap;
}

.trabajo-total {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.btn-estado {
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-estado:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1a1a;
}

/* ============================================================
   MODALES
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.18s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-overlay.hidden { display: none; }

.modal {
  background: linear-gradient(180deg, rgba(35, 43, 53, 0.6) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(245, 158, 11, 0.05);
  animation: subir 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-chico { max-width: 400px; }

@keyframes subir {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  z-index: 1;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.btn-cerrar {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s;
  line-height: 1;
}

.btn-cerrar:hover {
  background: var(--surface-2);
  color: var(--text);
}

form { padding: 24px; }

/* ============================================================
   CAMPOS
   ============================================================ */
.campo { margin-bottom: 16px; }

.campo label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 7px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.campo input::placeholder,
.campo textarea::placeholder { color: var(--text-dim); }

.campo input:hover,
.campo select:hover,
.campo textarea:hover { border-color: var(--border-light); }

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.03);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.campo textarea { resize: vertical; min-height: 80px; }

.check-linea {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 14px !important;
  color: var(--text) !important;
  cursor: pointer;
  user-select: none;
}

.check-linea input[type="checkbox"] {
  width: auto !important;
  accent-color: var(--accent);
  transform: scale(1.15);
  cursor: pointer;
}

/* ============================================================
   BOTONES ESPECIALES
   ============================================================ */
.btn-mas {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  padding: 12px;
  border-radius: 10px;
  width: 100%;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  margin-bottom: 16px;
  transition: all 0.2s;
  font-weight: 600;
}

.btn-mas:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245, 158, 11, 0.03);
}

.hidden { display: none !important; }

.btn-guardar {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  color: #1a1a1a;
  border: none;
  padding: 14px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  font-family: inherit;
  box-shadow: 0 4px 14px var(--accent-glow);
  letter-spacing: 0.2px;
}

.btn-guardar:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.btn-guardar:active { transform: translateY(0); }

/* ============================================================
   SELECTOR DE CLIENTE
   ============================================================ */
.cliente-selector { position: relative; }

.cliente-elegido {
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.cliente-elegido button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.15s;
  font-family: inherit;
}

.cliente-elegido button:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.sugerencias {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 6px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.sugerencia {
  padding: 11px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.sugerencia:last-child { border-bottom: none; }
.sugerencia:hover { background: var(--surface); }

.sugerencia .nombre { font-weight: 600; color: var(--text); }
.sugerencia .detalle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.sugerencia-vacia {
  padding: 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   PRIORIDAD
   ============================================================ */
.prioridad-botones {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.prio-btn {
  padding: 10px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.15s;
}

.prio-btn:hover { border-color: var(--border-light); }
.prio-btn.activo {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface-2);
}
.prio-btn[data-prio="Urgente"].activo { border-color: var(--danger); background: rgba(239,68,68,0.08); }
.prio-btn[data-prio="Agendado"].activo { border-color: var(--estado-solicitado); background: rgba(59,130,246,0.08); }

/* ============================================================
   BOTONES MINI
   ============================================================ */
.btn-mini {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px 12px;
  margin-top: 8px;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  font-weight: 600;
}

.btn-mini:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   MODALES DE ESTADO / PAGO
   ============================================================ */
.estado-opciones,
.pago-opciones {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.estado-btn {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.estado-btn:hover {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.03);
}

.estado-btn.actual {
  background: var(--surface-2);
  border-color: var(--accent);
}

.estado-btn .check {
  color: var(--accent);
  font-weight: 800;
}

/* ============================================================
   INFO / SECCIONES
   ============================================================ */
.texto-info {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.seccion-titulo {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin: 26px 0 14px;
  font-weight: 800;
}

.mensaje-ok {
  text-align: center;
  color: var(--success);
  font-weight: 700;
  padding: 12px;
  margin-top: 10px;
  animation: aparecer 0.25s ease-out;
}

/* ============================================================
   FICHA
   ============================================================ */
.ficha-contenido { padding: 24px; }

.ficha-datos {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ficha-campo {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.ficha-campo:last-child { border-bottom: none; }

.ficha-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 800;
  margin-bottom: 5px;
}

.ficha-valor {
  font-size: 15px;
  color: var(--text);
  word-break: break-word;
  line-height: 1.5;
}

.ficha-acciones {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   BOTONES DE ACCIÓN
   ============================================================ */
.btn-primario {
  flex: 1;
  min-width: 120px;
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  color: #1a1a1a;
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primario:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.btn-secundario {
  flex: 1;
  min-width: 120px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-secundario:hover {
  border-color: var(--accent);
  background: var(--surface-3);
}

.btn-pago {
  flex: 1;
  min-width: 120px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.btn-pago:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.btn-peligro {
  flex: 1;
  min-width: 120px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-peligro:hover { background: rgba(239, 68, 68, 0.12); }

.pago-info {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 11px;
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 14px;
  color: #fca5a5;
  text-align: center;
  line-height: 1.5;
}

.pago-info strong {
  color: var(--danger);
  font-size: 17px;
  font-weight: 800;
}

/* ============================================================
   TOTAL PREVIEW
   ============================================================ */
.total-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
}

.total-linea {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.total-linea span:last-child {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.total-grande {
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 12px;
  font-size: 17px;
}

.total-grande span:first-child {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.total-grande span:last-child {
  color: var(--accent);
  font-weight: 800;
  font-size: 20px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 500px) {
  main { padding: 18px 16px 60px; }
  .page-header h2 { font-size: 22px; }
  .btn-primary { padding: 10px 14px; font-size: 13px; }
  .topbar { padding: 10px 16px; }
  .nav-link { padding: 7px 10px; font-size: 13px; }
  .topbar-logo { width: 34px; height: 34px; }
  .topbar h1 { font-size: 16px; }
  .modal-header { padding: 16px 18px; }
  form { padding: 18px; }
  .ficha-contenido { padding: 18px; }
  .total-grande span:last-child { font-size: 18px; }
  .trabajo-numero { font-size: 19px; }
  .trabajo-total { font-size: 17px; }
}