:root {
  --ctp-brand: #0d6efd;
  --ctp-brand-2: #0aa2c0;
}

body {
  background: #FFF8E7;
  background-color: #FFF8E7;
  min-height: 100vh;
}

[data-bs-theme="dark"] body {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(13, 110, 253, 0.24), transparent 60%),
    radial-gradient(900px 480px at 92% 0%, rgba(10, 162, 192, 0.18), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
}

.ctp-navbar {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

[data-bs-theme="dark"] .ctp-navbar {
  background: rgba(20, 24, 33, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ctp-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--ctp-brand), var(--ctp-brand-2));
  box-shadow: 0 8px 18px rgba(13, 110, 253, 0.35);
}

.ctp-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .ctp-card {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.ctp-stat {
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--bs-body-bg);
}

[data-bs-theme="dark"] .ctp-stat {
  border-color: rgba(255, 255, 255, 0.08);
}

.ctp-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ctp-table thead th:hover {
  color: var(--ctp-brand);
}

.ctp-table td {
  vertical-align: middle;
  font-size: 0.9rem;
}

.ctp-table-wrap {
  max-height: 62vh;
  overflow: auto;
  border-radius: 14px;
}

.ctp-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.ctp-chip {
  cursor: pointer;
  user-select: none;
}

.ctp-fade {
  animation: ctpFade 0.35s ease;
}

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

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.18);
}

#historial .list-group-item {
  background: transparent;
}

@media print {
  .no-print,
  .ctp-navbar,
  footer {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .ctp-table-wrap {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
  }

  .ctp-card {
    box-shadow: none !important;
    border: none !important;
  }

  .ctp-table {
    font-size: 10px;
  }

  .ctp-table thead th {
    background: #e9eef7 !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .badge {
    border: 1px solid #999 !important;
    color: #000 !important;
    background: #fff !important;
  }

  @page {
    size: A4 landscape;
    margin: 12mm;
  }
}
