@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --bg-color: #f4f6f9;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --header-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

body {
  background-color: var(--bg-color);
  font-family: 'DM Sans', sans-serif;
  color: #334155;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: #0f172a;
}

/* Custom Navbar Premium */
.navbar-premium {
  background-color: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--header-shadow);
  border-bottom: 1px solid #e2e8f0;
}
.navbar-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  background: linear-gradient(135deg, #0d6efd, #6610f2);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-link {
  font-weight: 500;
  color: #64748b !important;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
}
.nav-link:hover, .nav-link.active {
  color: #0f172a !important;
  background-color: #f1f5f9;
}

/* Cards Premium */
.card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
}
.card-header {
  background-color: #fff;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  border-top-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
}

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s;
}
.btn-primary {
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.35);
}

/* Tables */
.table {
  vertical-align: middle;
}
.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom-width: 2px;
  background-color: #f8fafc;
}
.table td {
  color: #334155;
  font-size: 0.95rem;
}

/* Forms */
.form-control, .form-select {
  border-radius: 8px;
  padding: 0.6rem 1rem;
  border-color: #cbd5e1;
}
.form-control:focus, .form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Utilities */
.mono-text {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
}
.fade-in {
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── DNI/RUC Search ── */
.input-group .btn-outline-primary {
  border-color: #cbd5e1;
}
.input-group .btn-outline-primary:hover {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
}
.form-control.border-success {
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.2);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* ── List Group premium ── */
.list-group-item-action {
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.list-group-item-action:hover {
  background-color: #f8fafc;
  transform: translateX(3px);
}

/* ── JSON block ── */
pre::-webkit-scrollbar { height: 6px; width: 6px; }
pre::-webkit-scrollbar-track { background: #1e293b; }
pre::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }

/* ── Auth pages ── */
body.bg-auth {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 50%, #fdf4ff 100%);
  min-height: 100vh;
}

/* Input groups - fix border radius join */
.input-group .form-control.border-start-0 {
  border-left: none;
}
.input-group .input-group-text {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #94a3b8;
}
.input-group .form-control:focus ~ .input-group-text,
.input-group .input-group-text + .form-control:focus {
  border-color: #86b7fe;
}
.input-group:focus-within .input-group-text {
  border-color: #86b7fe;
}

/* ── Stat cards ── */
.card .stat-icon,
.card [class*="rounded-3"] {
  flex-shrink: 0;
}
