:root {
  --sidebar: #0b0b0c;
  --sidebar-2: #141416;
  --text: #f3e7ea;
  --ink: #f6f1f2;
  --paper: #f6f1f2;
  --muted: #e7b7cc;
  --line: rgba(224, 18, 123, 0.45);
  --green: #e0127b;
  --info: #e0127b;
  --teal: #ff4da6;
  --blue: #ff4da6;
  --fucsia: #e0127b;
  --fucsia-2: #ff4da6;
  --fucsia-deep: #a10d58;
  --fucsia-soft: #ffd0e6;
  --black: #0b0b0c;
  --panel: #141416;
  --header-h: 68px;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  color: var(--paper);
  background: var(--black);
}
button, input, select { font-family: inherit; font-size: 14px; font-weight: 300; }
h1, h2, h3, h4 {
  font-family: "Cormorant Garamond", "Palatino Linotype", serif;
  font-weight: 500;
  letter-spacing: -0.02em;
}
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.ico { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.solid { fill: currentColor; stroke: none; }

#header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: #000; z-index: 30;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  box-shadow: none;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fucsia-soft); font-weight: 500; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; }
.header-right { display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px; background: transparent; border: 0; padding: 0; height: 36px;
}
.search input {
  border: 1px solid var(--line); background: var(--panel); outline: none; width: 210px; height: 36px;
  color: #fff; padding: 0 12px; border-radius: 0;
}
.search button {
  flex: none; width: auto; height: 36px; padding: 0 16px; border: 1px solid var(--fucsia);
  background: var(--fucsia); color: #fff; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; font-weight: 500;
}
.icon-btn {
  width: 34px; height: 34px; border: 0; background: transparent; color: #6d757c; border-radius: 4px; position: relative;
}
.icon-btn:hover, .user-btn:hover { background: #2a1020; }
.user-btn {
  display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #fff; height: 36px; padding: 0 8px; border-radius: 4px;
}
.avatar {
  width: 28px; height: 28px; display: inline-block; flex: none;
  background: var(--fucsia);
  -webkit-mask: url("monigote.svg") center / contain no-repeat;
  mask: url("monigote.svg") center / contain no-repeat;
}
.avatar.lg { width: 86px; height: 86px; }
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #8b939a; display: inline-block; }
.menu {
  position: absolute; top: 42px; right: 0; background: #140810; min-width: 190px;
  border: 1px solid var(--fucsia); box-shadow: none; border-radius: 0; padding: 6px 0; z-index: 40; display: none;
}
.menu.open { display: block; }
.menu a, .menu button.item {
  display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 16px; color: var(--paper); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
}
.menu a:hover, .menu button.item:hover { background: #2a1020; }
.menu .sep { height: 1px; background: #e8ecef; margin: 4px 0; }
.rel { position: relative; }
.note-pop { min-width: 260px; padding: 0; }
.note-pop h3 { margin: 0; padding: 10px 12px; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line); }
.note-pop p { margin: 0; padding: 16px 12px; color: #8b939a; }
.note-pop .foot { padding: 8px 12px; border-top: 1px solid var(--line); text-align: right; }

#sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--sidebar); color: var(--muted); z-index: 20; overflow: auto;
  border-right: 1px solid var(--line);
}
.nav-profile { position: relative; height: 128px; overflow: hidden; }
.cover {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.18) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.12) 0 2px, transparent 3px),
    linear-gradient(160deg, #3a0a22, #000 70%);
}
.nav-profile .who { position: absolute; left: 14px; right: 10px; bottom: 12px; display: flex; gap: 10px; align-items: flex-end; color: #fff; }
.nav-profile .avatar { width: 42px; height: 42px; border: 0; }
.nav-profile .who-text b { display: block; font-family: "Cormorant Garamond", "Palatino Linotype", serif; font-size: 20px; font-weight: 500; line-height: 1.1; max-width: 150px; }
.nav-profile .who-text small { display: block; color: var(--fucsia-soft); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 4px; }
.side-link, .sub a {
  display: flex; align-items: center; gap: 10px; color: var(--paper); padding: 10px 18px; position: relative; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; font-weight: 400;
}
.side-link:hover, .sub a:hover { color: var(--fucsia-2); }
.side-link.active, li.open > .side-link { background: var(--sidebar-2); color: var(--fucsia-2); border-left: 3px solid var(--fucsia); }
.sub { display: none; list-style: none; margin: 0; padding: 4px 0 8px; background: #000; }
li.open .sub { display: block; }
.sub a { padding: 5px 16px 5px 44px; font-size: 12px; }
.sub a::before {
  content: ""; width: 6px; height: 6px; border: 1px solid #6d767e; border-radius: 50%; position: absolute; left: 26px;
}
.sub a.active { color: #fff; }
.sub a.active::before { background: var(--blue); border-color: var(--blue); }
.side-caret { margin-left: auto; }
li.open .side-caret { transform: rotate(180deg); }
.minify {
  margin: 10px auto 16px; display: block; width: 36px; height: 22px; border-radius: 12px; border: 0;
  background: #1a2026; color: #c5ccd3;
}
body.min #sidebar { width: 60px; }
body.min #content { margin-left: 60px; }
body.min .who-text, body.min .side-link span, body.min .side-caret, body.min .sub { display: none; }
body.min li.open .sub { display: none; }

#content { margin-left: var(--sidebar-w); margin-top: var(--header-h); padding: 28px 32px 48px; min-height: calc(100vh - var(--header-h)); background: var(--black); }
.view { display: none; }
.view.on { display: block; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; }
.page-head h1 { margin: 0; font-family: "Cormorant Garamond", "Palatino Linotype", serif; font-size: 40px; font-weight: 500; letter-spacing: -0.02em; color: var(--paper); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.page-head h1 .ico { width: 18px; height: 18px; color: var(--fucsia-soft); }
.page-head h1 small { font-family: "Outfit", "Segoe UI", sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fucsia-soft); }
.actions { display: flex; gap: 6px; align-items: center; }
.btn {
  border: 1px solid var(--fucsia); background: var(--fucsia); color: #fff; border-radius: 0; height: 42px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px;
}
.btn:hover { background: var(--fucsia-deep); border-color: var(--fucsia-soft); }
.btn-green { background: var(--fucsia); border-color: var(--fucsia); }
.btn-info { background: var(--fucsia); border-color: var(--fucsia); }
a.btn { color: #fff; text-decoration: none; }
.portabilidad { height: 30px; }
.btn-dark { background: var(--fucsia); color: #fff; height: 34px; width: auto; min-width: 38px; justify-content: center; position: relative; padding: 0 10px; }
.btn .caret { border-top-color: #fff; }
.drop { position: relative; }
.drop .menu { top: 34px; right: 0; left: auto; min-width: 180px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 0; box-shadow: none; overflow: hidden; }
.tabs { display: flex; background: var(--black); height: 46px; align-items: stretch; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button {
  border: 0; background: transparent; color: var(--paper); padding: 0 16px; font-size: 12px; letter-spacing: 0.12em; font-weight: 400;
}
.tabs button.on { background: var(--fucsia); color: #fff; font-weight: 500; }
.panel-body { padding: 14px 15px 12px; }
.filters { display: grid; grid-template-columns: 1.05fr 1.05fr 1.05fr 1.25fr 1.9fr; gap: 8px 14px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; color: var(--fucsia-2); font-size: 12px; }
.field input, .field select, .modal input, .modal select {
  height: 38px; border: 1px solid var(--line); border-radius: 0; padding: 0 10px; background: var(--black); color: var(--paper); width: 100%;
}
.estado { grid-column: 1 / span 2; }
.badge {
  position: absolute; top: -7px; right: -7px; background: var(--teal); color: #fff; border-radius: 10px;
  font-size: 10px; line-height: 16px; min-width: 16px; text-align: center; font-weight: 700;
}
.rule { height: 1px; background: var(--line); margin: 12px 0 10px; }
.dt-top, .dt-bot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #fff; font-size: 12px; }
.dt-top select, .dt-top input { height: 34px; border: 1px solid var(--line); border-radius: 0; background: var(--black); color: var(--paper); }
.dt-top input { width: 150px; padding: 0 6px; }
.table-scroll { overflow-x: auto; margin-top: 8px; }
table.grid { width: 100%; border-collapse: collapse; background: #100c10; min-width: 860px; }
table.grid.wide { min-width: 2200px; }
table.grid th, table.grid td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; white-space: nowrap; font-size: 14px; color: var(--paper); font-weight: 300; }
table.grid th { color: var(--fucsia-soft); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; background: var(--black); }
table.grid th .sort { display: inline-block; width: 8px; height: 11px; margin-left: 4px; position: relative; vertical-align: middle; }
table.grid th .sort::before, table.grid th .sort::after {
  content: ""; position: absolute; left: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
}
table.grid th .sort::before { top: 0; border-bottom: 4px solid #c5ccd1; }
table.grid th .sort::after { bottom: 0; border-top: 4px solid #c5ccd1; }
table.grid tr.sample td { background: var(--fucsia); color: #fff; }
table.grid .empty td { text-align: center; color: var(--fucsia-soft, #ffd0e8); font-weight: 400; background: #100c10; }
.paginador { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 14px; }
.paginador button {
  min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 0;
  background: var(--black); color: var(--paper); letter-spacing: 0.04em;
}
.paginador button.on { background: var(--fucsia); border-color: var(--fucsia); color: #fff; }
.paginador button:disabled { opacity: 0.35; }
.paginador .puntos { color: var(--fucsia-soft); padding: 0 4px; }
.id-link { color: var(--fucsia-2); font-weight: 600; }
.gear { background: var(--blue); }

.profile-card { background: linear-gradient(135deg, rgba(224, 18, 123, 0.22), transparent 46%), var(--panel); border: 1px solid var(--fucsia); border-radius: 0; color: var(--paper); display: flex; gap: 16px; padding: 28px 26px; position: relative; overflow: hidden; }
.profile-card::before { content: none; }
.profile-card > * { position: relative; }
.profile-card h2 { margin: 6px 0 2px; font-size: 42px; line-height: 0.95; }
.profile-card .co { color: var(--fucsia-soft); margin-bottom: 14px; letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; }
.mini { display: flex; gap: 10px; flex-wrap: wrap; }
.mini button { border: 1px solid var(--fucsia); color: #fff; border-radius: 0; height: 36px; padding: 0 16px; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.b-blue { background: var(--fucsia); }
.b-yellow { background: #ff4da6; color: #fff; }
.b-pink { background: #a10d58; }
.ptabs { display: flex; gap: 4px; background: transparent; border-bottom: 1px solid var(--line); padding: 0; }
.ptabs button { border: 0; background: transparent; height: 44px; padding: 0 16px; color: var(--muted); font-size: 12px; letter-spacing: 0.16em; border-bottom: 2px solid transparent; }
.ptabs button.on { color: var(--fucsia-soft); border-bottom-color: var(--fucsia); font-weight: 500; }
.timeline { display: flex; flex-direction: column; gap: 16px; padding: 22px 8px 10px 8px; max-width: 920px; }
.t-item { display: grid; grid-template-columns: 72px 18px 1fr; gap: 8px; }
.when { text-align: right; color: var(--fucsia-2); font-size: 12px; padding-top: 10px; }
.rail { position: relative; }
.rail::before { content: ""; position: absolute; left: 7px; top: 0; bottom: -16px; width: 2px; background: var(--fucsia); }
.rail i { width: 12px; height: 12px; border-radius: 50%; background: var(--fucsia); border: 2px solid #ffd0e8; display: block; margin-top: 14px; position: relative; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 16px 18px; }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.who-line { display: flex; gap: 8px; align-items: center; color: #f6e7ee; }
.who-line b { color: #fff; }
.tag { color: var(--fucsia-2); font-size: 11px; }
.card hr { border: 0; border-top: 1px solid #eceff2; margin: 10px 0; }
.more { background: none; border: 0; color: var(--fucsia-2); margin: 8px auto; display: block; }

.modal-back { position: fixed; inset: 0; background: rgba(20,24,28,.45); z-index: 50; display: none; align-items: flex-start; justify-content: center; padding-top: 80px; }
.modal-back.on { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--fucsia); width: min(520px, calc(100% - 32px)); border-radius: 0; box-shadow: none; }
.modal header, .modal footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
.modal header { border-bottom: 1px solid var(--line); }
.modal header h3 { margin: 0; color: var(--paper); font-size: 32px; font-weight: 500; }
.modal header button, .toast { border: 0; background: transparent; font-size: 18px; color: #888; }
.modal .body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.modal footer { border-top: 1px solid var(--line); justify-content: flex-end; gap: 8px; }
.btn-plain { background: transparent; color: var(--fucsia-soft); border: 1px solid var(--fucsia-soft); }
.ficha { display: grid; grid-template-columns: 148px 1fr; gap: 4px 10px; margin: 0; }
.ficha dt { color: var(--ink); font-weight: 600; }
.ficha dd { margin: 0; word-break: break-word; }
.toast {
  position: fixed; right: 16px; bottom: 16px; background: var(--panel); color: var(--paper); border: 1px solid var(--fucsia); padding: 12px 16px; border-radius: 0; letter-spacing: 0.04em;
  z-index: 60; display: none; font-size: 12px; max-width: 280px;
}
.toast.on { display: block; }

.menu-lado, .menu-lado ul { list-style: none; margin: 8px 0 0; padding: 0; }
[hidden] { display: none !important; }
button.id-link { border: 0; background: transparent; padding: 0; cursor: pointer; }
tr.fila.ejecucion td { background: rgba(224, 18, 123, 0.28); color: var(--paper); }
.cards-reporte { display: grid; gap: 14px; }
.cards-reporte h2 { margin: 0 0 10px; font-size: 18px; color: var(--ink); font-weight: 500; }
.modal-ancha { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 120px); overflow: auto; }
.modal h4 { margin: 8px 0 6px; color: var(--ink); font-size: 13px; }
.perfil-datos p { margin: 0 0 8px; color: #fff; }
.vacio-timeline { color: #f3d5e4; padding: 18px; }
#login { min-height: 100vh; display: grid; place-items: center; background: var(--black); padding: 24px 0; }
.login-card {
  width: min(480px, calc(100% - 32px));
  background: linear-gradient(135deg, rgba(224, 18, 123, 0.18), transparent 42%), var(--panel);
  border: 1px solid var(--fucsia);
  padding: 42px 36px;
  border-radius: 0;
  display: flex; flex-direction: column; gap: 12px; color: var(--paper);
}
.login-card h1 { font-size: clamp(40px, 6vw, 56px); line-height: 0.95; margin: 0; font-weight: 500; }
.login-kicker { margin: 14px 0 0; letter-spacing: 0.28em; text-transform: uppercase; color: var(--fucsia-soft); font-size: 12px; font-weight: 500; }
.login-note { margin: 0 0 8px; color: #f3e7ea; font-size: 16px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fucsia-soft); }
.login-card input { height: 42px; border: 1px solid var(--line); border-radius: 0; padding: 0 12px; background: var(--black); color: var(--paper); letter-spacing: 0; text-transform: none; font-size: 16px; }
.login-error { color: var(--fucsia-soft); margin: 0; }
.login-brand { color: var(--fucsia-soft); }
.login-card .btn { width: 100%; justify-content: center; height: 46px; margin-top: 8px; }

@media (max-width: 1100px) {
  .filters { grid-template-columns: 1fr 1fr 1fr; }
  .estado { grid-column: auto; }
}
