/* Proyectos: diálogo, listado y panel */
.pj-btn {
  font: 500 14px/1 Inter, sans-serif; height: 32px; padding: 0 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid #c4c7cf; background: #fff; color: #191b23; white-space: nowrap;
}
.pj-btn:hover { background: #f4f5f5; }
.pj-btn:focus-visible, .pj-link:focus-visible, .pj-step:focus-visible, .pj-switch__btn:focus-visible { outline: 2px solid #2b8dfe; outline-offset: 2px; }
.pj-btn--primary { background: #191b23; border-color: #191b23; color: #fff; font-weight: 600; }
.pj-btn--primary:hover { background: #33363f; }
.pj-btn--lg { height: 40px; padding: 0 18px; font-size: 15px; }
.pj-btn--icon { width: 32px; padding: 0; font-size: 18px; }
.pj-link { all: unset; color: #2b5de8; cursor: pointer; text-decoration: underline; }
.pj-nd { color: #9a9ca6; }

/* ---------- Diálogo ---------- */
.pj-dialog { padding: 0; border: 0; border-radius: 12px; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: hidden; color: #191b23; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.pj-dialog[open] { display: flex; animation: pj-in .2s ease-out; }
.pj-dialog::backdrop { background: rgba(25, 27, 35, .55); }
@keyframes pj-in { from { opacity: 0; transform: translateY(-12px); } }
.pj-dialog__body { flex: 1 1 55%; padding: 40px; overflow-y: auto; }
.pj-dialog__art { flex: 0 0 320px; position: relative; background: #b987ff; }
.pj-dialog__art svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.pj-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.pj-close:hover { background: rgba(255,255,255,.2); }
.pj-dialog h1 { margin: 0 0 20px; font-size: 28px; line-height: 36px; font-weight: 600; }
.pj-field { margin-bottom: 24px; }
.pj-field[hidden] { display: none; }
.pj-field label { display: block; margin-bottom: 8px; font-size: 15px; }
.pj-opt { color: #6c6e79; font-size: 13px; }
.pj-input { position: relative; display: flex; align-items: center; border: 1px solid #c4c7cf; border-radius: 6px; background: #fff; height: 40px; }
.pj-input:focus-within { border-color: #6a5cff; box-shadow: 0 0 0 3px rgba(106, 92, 255, .25); }
.pj-input.is-invalid { border-color: #d92b2b; box-shadow: 0 0 0 3px rgba(217, 43, 43, .15); }
.pj-input input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 12px; font: 15px Inter, sans-serif; color: #191b23; outline: none; }
.pj-clear { border: 0; background: transparent; width: 32px; height: 32px; font-size: 20px; color: #6c6e79; cursor: pointer; }
.pj-hint { margin: 10px 0 0; font-size: 15px; color: #444; line-height: 1.45; }
.pj-hint.is-warn { color: #8a5a00; background: #fff6e0; border-radius: 6px; padding: 8px 10px; font-size: 14px; }
.pj-error { margin: 8px 0 0; font-size: 14px; color: #d92b2b; }
.pj-error[hidden] { display: none; }
.pj-check { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; font-size: 15px; cursor: pointer; }
.pj-check input { position: absolute; opacity: 0; }
.pj-check__box { width: 20px; height: 20px; border: 1px solid #aeb1bb; border-radius: 4px; background: #fff; display: grid; place-items: center; }
.pj-check input:checked + .pj-check__box { background: #6a5cff; border-color: #6a5cff; }
.pj-check input:checked + .pj-check__box::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.pj-check input:focus-visible + .pj-check__box { outline: 2px solid #2b8dfe; outline-offset: 2px; }
.pj-actions { display: flex; gap: 12px; }
.pj-actions .pj-btn { height: 40px; padding: 0 18px; font-size: 15px; }
@media (max-width: 640px) { .pj-dialog__art { display: none; } .pj-dialog__body { padding: 24px; } }

/* ---------- Cabecera de página ---------- */
.pj-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pj-head .page-title { margin-bottom: 4px; }
.pj-tools { display: flex; gap: 8px; align-items: center; }
.pj-sub { margin: 0; color: #6c6e79; }
.pj-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pj-ext { color: #2b5de8; text-decoration: none; font-size: 18px; }

/* Menú desplegable */
.pj-switch { position: relative; display: inline-block; }
.pj-switch__btn { all: unset; cursor: pointer; color: #2b5de8; font-weight: 700; border-radius: 4px; }
.pj-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 240px; background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; font-size: 14px; font-weight: 400; }
.pj-menu[hidden] { display: none; }
.pj-menu--right { left: auto; right: 0; }
.pj-menu a, .pj-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: #191b23; text-decoration: none; font: 14px Inter, sans-serif; cursor: pointer; }
.pj-menu a small { display: block; color: #6c6e79; }
.pj-menu a:hover, .pj-menu button:hover { background: #f0f0f0; }
.pj-menu [aria-current] { background: #ececff; }
.pj-menu hr { border: 0; border-top: 1px solid #e3e3e3; margin: 6px 0; }
.pj-menu .is-danger { color: #d92b2b; }

/* ---------- Listado ---------- */
.pj-list { display: grid; gap: 12px; }
.pj-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.06); padding: 16px 20px; }
.pj-card header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pj-dot { width: 16px; height: 16px; border-radius: 50%; background: #191b23; }
.pj-card__name { font-weight: 700; font-size: 16px; color: #2b5de8; text-decoration: none; }
.pj-card__name:hover { text-decoration: underline; }
.pj-card__domain { color: #6c6e79; }
.pj-badge { font-size: 12px; background: #ececec; color: #444; border-radius: 4px; padding: 2px 6px; }
.pj-badge--blue { background: #e4edff; color: #2b5de8; }
.pj-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.pj-stats dt { color: #444; font-size: 13px; margin-bottom: 4px; }
.pj-stats dd { margin: 0; font-size: 22px; font-weight: 700; color: #5b5bd6; }
.pj-empty { display: flex; gap: 32px; align-items: center; }
.pj-empty__art { flex: 0 0 180px; height: 180px; border-radius: 10px; overflow: hidden; }
.pj-empty__art svg { width: 100%; height: 100%; }
.pj-empty h2 { font-size: 20px; }

/* ---------- Panel ---------- */
.pj-setup { padding: 20px 24px; }
.pj-setup__top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.pj-setup h2 { font-size: 18px; margin: 0 0 4px; }
.pj-setup h2 span { color: #6c6e79; font-weight: 400; font-size: 16px; }
.pj-setup p { margin: 0; }
.pj-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pj-step { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px dashed #c4c7cf; border-radius: 8px; background: #fff; color: #6c6e79; font: 14px Inter, sans-serif; cursor: pointer; }
.pj-step:hover { border-color: #8b8e99; }
.pj-step.is-done { border: 1px solid #e3e3e3; color: #191b23; }
.pj-step__row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pj-step.is-done b { color: #191b23; }
.pj-pill { font-size: 12px; background: #ececec; color: #444; border-radius: 10px; padding: 1px 8px; font-weight: 500; }
.pj-pill--ok { background: #c8f2dd; color: #0a6b3d; }

.pj-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding: 0; }
.pj-kpis > div { padding: 20px 24px; border-right: 1px solid #ececec; }
.pj-kpis > div:last-child { border-right: 0; }
.pj-kpis h3 { margin: 0 0 8px; font-size: 15px; font-weight: 500; }
.pj-kpis strong { display: flex; align-items: center; gap: 8px; font-size: 28px; color: #5b5bd6; margin-bottom: 14px; }
.pj-kpis dl, .pj-kpis dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 13px; }
.pj-kpis dd { margin: 0; color: #2b5de8; text-align: right; }
.is-err { color: #d92b2b !important; }
.is-ok { color: #0a8a50; }

.pj-legend { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 12px; }
.pj-legend label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pj-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.pj-chart__plot { position: relative; }
.pj-chart svg { width: 100%; height: auto; display: block; }
.pj-chart__empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #6c6e79; }
.pj-section { font-size: 22px; margin: 28px 0 12px; }
.pj-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.pj-two .card h3 { margin: 0 0 12px; font-size: 17px; }
.pj-muted { color: #6c6e79; margin: 0 0 6px; }
.pj-big { font-size: 26px; font-weight: 700; color: #5b5bd6; margin: 0 0 8px; }
.pj-big small { font-size: 13px; font-weight: 400; margin-left: 6px; }
.pj-bar { height: 8px; background: #ececec; border-radius: 4px; overflow: hidden; }
.pj-bar i { display: block; height: 100%; background: #5b5bd6; }
.pj-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pj-table th { text-align: left; color: #6c6e79; font-weight: 500; padding: 6px 4px; border-bottom: 1px solid #ececec; }
.pj-table td { padding: 8px 4px; border-bottom: 1px solid #f0f0f0; }
.pj-table a { color: #2b5de8; text-decoration: none; }
