/**
 * marduk-brand-override.css — Aplica el manual de marca DEAJ
 * (Dirección Ejecutiva de Administración Judicial / Rama Judicial Colombia)
 * sobre la SPA ya compilada del MVP-DEAJ.
 *
 * Carga DESPUÉS del CSS principal del bundle para que `:root` y reglas
 * comunes ganen por especificidad/orden de cascada.
 */

/* ─── Tokens de marca DEAJ (extraídos de BRAND-MANUAL.html) ──────────── */
:root {
  --primary:         #033e75;
  --primary-deep:    #153f71;
  --primary-bright:  #2680eb;
  --primary-soft:    #5d86d1;
  --primary-pale:    #7d9eda;
  --secondary:       #39a44c;
  --secondary-deep:  #1e5c2a;
  --secondary-soft:  #71ce82;
  --secondary-pale:  #c8e9d0;
  --accent-coral:    #e96b64;
  --accent-yellow:   #fdb611;
  --green-ok:        #39a44c;
  --wine-warn:       #e96b64;
  --carbon:          #0a0a0b;
  --ink:             #1f2937;
  --text:            #343a40;
  --muted:           #6c757d;
  --grid-gray:       #dee2e6;
  --cream:           #fafafa;
  --cream-warm:      #f5f5f7;
  --cream-deep:      #ececec;
  --ff-display: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-body:    'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-mono:    'JetBrains Mono', 'Courier New', monospace;
  --bs-primary: var(--primary);
  --bs-primary-rgb: 3, 62, 117;
  --bs-secondary: var(--secondary);
  --bs-success: var(--green-ok);
  --bs-danger: var(--wine-warn);
  --bs-warning: var(--accent-yellow);
  --bs-body-color: var(--text);
  --bs-body-bg: var(--cream-warm);
  --bs-body-font-family: var(--ff-body);
}

html, body {
  font-family: var(--ff-body) !important;
  background: var(--cream-warm);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  color: var(--primary-deep);
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1 { font-weight: 800; }
.eyebrow, .overline, [class*="overline"], small.text-uppercase, .label-uppercase {
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  font-weight: 600;
}
code, pre, kbd, samp { font-family: var(--ff-mono); }

button.btn-primary, .btn-primary,
button[class*="primary"]:not(.btn-outline-primary),
[role="button"][class*="primary"]:not([class*="outline"]),
.MuiButton-containedPrimary, input[type="submit"] {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 60%, var(--primary-bright) 100%) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(3,62,117,0.18), 0 4px 12px rgba(3,62,117,0.12) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease !important;
}
button.btn-primary:hover, .btn-primary:hover, .MuiButton-containedPrimary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(3,62,117,0.24), 0 12px 24px rgba(3,62,117,0.18) !important;
  opacity: 0.97;
}
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--primary-bright) !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}
button.btn-secondary, .btn-secondary, .MuiButton-containedSecondary {
  background: linear-gradient(135deg, var(--secondary-deep) 0%, var(--secondary) 60%, var(--secondary-soft) 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
}
.btn-outline-primary, .MuiButton-outlinedPrimary {
  color: var(--primary) !important;
  border: 1.5px solid var(--primary) !important;
  background: transparent !important;
  border-radius: 8px !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="file"]),
textarea, select, .form-control, .MuiOutlinedInput-input {
  border-radius: 8px !important;
  border: 1.5px solid var(--grid-gray) !important;
  background: #fff !important;
  color: var(--ink) !important;
  font-family: var(--ff-body) !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, textarea:focus, select:focus, .form-control:focus {
  border-color: var(--primary-bright) !important;
  box-shadow: 0 0 0 3px rgba(38,128,235,0.18) !important;
  outline: none !important;
}
label, .form-label { color: var(--ink); font-weight: 600; }

.card, .MuiCard-root, .panel, [class*="card_container"] {
  border-radius: 12px !important;
  border: 1px solid var(--grid-gray) !important;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 4px 12px rgba(15,23,42,0.05);
}

table { border-collapse: separate; border-spacing: 0; }
table thead th, .table thead th {
  background: var(--cream-deep) !important;
  color: var(--ink) !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78em;
  border-bottom: 2px solid var(--primary) !important;
}
table tbody tr:hover, .table tbody tr:hover {
  background: rgba(125, 158, 218, 0.08) !important;
}

a:not(.btn):not([class*="button"]) {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
a:not(.btn):not([class*="button"]):hover {
  color: var(--primary-bright);
  border-bottom-color: var(--primary-bright);
}
a:not(.btn):not([class*="button"]):visited { color: var(--primary-deep); }

.badge.bg-success, .badge-success, .MuiChip-colorSuccess,
[class*="badge"][class*="success"] {
  background: var(--secondary-pale) !important;
  color: var(--secondary-deep) !important;
}
.badge.bg-danger, .badge-danger, .MuiChip-colorError,
[class*="badge"][class*="error"] {
  background: rgba(233,107,100,0.12) !important;
  color: var(--wine-warn) !important;
}
.badge.bg-warning, .badge-warning, .MuiChip-colorWarning {
  background: rgba(253,182,17,0.18) !important;
  color: #5a3e00 !important;
}
.badge.bg-primary, .badge-primary {
  background: var(--primary-pale) !important;
  color: var(--primary-deep) !important;
}

header, .navbar, .app-header, [class*="Header_"], [class*="navbar"] {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%) !important;
  color: #fff !important;
  border-bottom: 3px solid var(--accent-yellow);
  box-shadow: 0 2px 8px rgba(3,62,117,0.15);
}
header a, .navbar a, [class*="Header_"] a { color: rgba(255,255,255,0.92) !important; }
header a:hover, .navbar a:hover { color: #fff !important; }

footer, .footer, [class*="Footer_"] {
  background: var(--carbon) !important;
  color: rgba(255,255,255,0.78) !important;
  border-top: 4px solid var(--primary-bright);
}
footer a { color: rgba(255,255,255,0.85) !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cream-deep); }
::-webkit-scrollbar-thumb { background: var(--primary-pale); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-soft); }

::selection { background: rgba(38,128,235,0.28); color: var(--primary-deep); }

#splash-deaj {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 60%, var(--primary-bright) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 99999; transition: opacity 0.45s ease;
  color: #fff; font-family: var(--ff-display);
}
#splash-deaj img {
  height: 84px; margin-bottom: 24px;
  filter: brightness(0) invert(1); opacity: 0.95;
}
#splash-deaj .splash-title {
  font-size: 1.05rem; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 600; opacity: 0.95;
}
#splash-deaj .splash-sub {
  font-size: 0.78rem; letter-spacing: 0.10em;
  opacity: 0.75; margin-top: 4px;
}
#splash-deaj .splash-bar {
  width: 180px; height: 3px; background: rgba(255,255,255,0.25);
  border-radius: 2px; margin-top: 28px; overflow: hidden; position: relative;
}
#splash-deaj .splash-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent-yellow), transparent);
  animation: deaj-loader 1.4s ease-in-out infinite;
}
@keyframes deaj-loader {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
body.deaj-ready #splash-deaj { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
