/* Lo propio de la consola de Partners (prefijo `pt-`): solo lo que no está en el ui-kit (app.css, suite-console.css,
   console.css, dialog.css). Los colores, con los tokens de app.css (claro y oscuro); el color de Partners solo
   identifica la aplicación (lo pone el kit en la barra). Una regla base por clase (SUITE-CONSOLAS §7). */
/* el acento de las consolas de la suite IT es el azul de atlas (botón principal y enlaces, SUITE-CONSOLAS §7) */
body[data-ov-app="partners"] { --a: #2f6fb3; --a2: #254770; --a-soft: #eaf2fb; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-ov-app="partners"] { --a: #3d7cc4; --a2: #8ab8ec; --a-soft: #172433; }
}
:root[data-theme="dark"] body[data-ov-app="partners"] { --a: #3d7cc4; --a2: #8ab8ec; --a-soft: #172433; }

.pt-main { flex: 1; min-width: 0; padding: calc(var(--ov-sh-head, 156px) + 16px) 24px 40px; max-width: 1320px; box-sizing: border-box; }
.pt-view { display: grid; gap: 16px; }
.pt-section { margin: 0; }
.pt-muted { color: var(--dim); font-size: var(--fs-sm); }
.pt-hint { font-size: var(--fs-xs); color: var(--dim2); }
.pt-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pt-mono { font-family: var(--ov-font-mono, monospace); }

/* el foco, siempre visible */
.pt-main a:focus-visible, .pt-main button:focus-visible, .pt-main input:focus-visible, .pt-main select:focus-visible,
.pt-main textarea:focus-visible, .pt-main [tabindex]:focus-visible { outline: 2px solid var(--a2); outline-offset: 2px; }
.pt-main:focus { outline: none; }

/* la cabecera de una pantalla: título, (i), contador y acciones a la derecha (SUITE-CONSOLAS §6) */
.pt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.pt-title { font-size: 20px; margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.pt-info { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--bd2);
  color: var(--dim); font-size: 11px; font-style: italic; font-weight: 600; cursor: help; }
.pt-count { color: var(--dim); font-size: var(--fs-md); }
.pt-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.pt-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pt-btn-danger { border-color: var(--danger); color: var(--danger-tx); background: transparent; }
.pt-btn-danger:hover { background: var(--danger-soft); }

/* las cifras de Inicio: tarjetas con borde y el número en el color de su estado; cada una lleva a lo que cuenta */
.pt-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pt-figures:empty { display: none; }
.pt-figure { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--bd); border-radius: var(--radius-lg, 10px); background: var(--bg2); color: var(--tx); text-decoration: none; }
.pt-figure:hover { border-color: var(--bd2); box-shadow: var(--sh-2); }
.pt-figure-value { font-size: 24px; font-weight: 600; }
.pt-figure-label { font-size: var(--fs-sm); color: var(--dim); }
.pt-figure-ok .pt-figure-value { color: var(--ok-tx); }
.pt-figure-warn .pt-figure-value { color: var(--warn-tx); }
.pt-figure-danger .pt-figure-value { color: var(--danger-tx); }

/* los primeros pasos y lo que pide atención */
.pt-steps, .pt-attention { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pt-step, .pt-attention-item { display: flex; gap: 10px; align-items: flex-start; }
.pt-step-body { display: grid; gap: 2px; }
.pt-step-title { font-weight: 600; }

/* los avisos dentro de una pantalla */
.pt-notice { padding: 10px 12px; border-radius: var(--radius, 8px); border: 1px solid var(--bd); background: var(--bg3); margin: 0 0 10px; }
.pt-notice-ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok-tx); }
.pt-notice-warn { border-color: var(--warn); background: var(--warn-soft); color: var(--warn-tx); }
.pt-notice-danger { border-color: var(--danger); background: var(--danger-soft); color: var(--danger-tx); }

/* las tablas: la fila a la que se llega, marcada (SUITE-CONSOLAS §5) */
.pt-table td { vertical-align: top; }
table.data-table tr.pt-row-marked td { background: var(--a-soft); }
table.data-table tr.pt-row-marked td:first-child { box-shadow: inset 3px 0 0 var(--a); }

/* los datos de una ficha */
.pt-detail { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: var(--fs-md); }
.pt-detail dt { color: var(--dim); }
.pt-detail dd { margin: 0; overflow-wrap: anywhere; }

/* los formularios */
.pt-form { display: grid; gap: 10px; }
.pt-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.pt-field { margin: 0; }

/* el selector de inquilino en la barra */
.pt-tenant-select { max-width: 220px; }

/* sin sesión: lo que pasó con el login */
.pt-signin { max-width: 520px; margin: 80px auto; display: grid; gap: 12px; }

/* P1 · fichas, formularios en ventana, «ver como» */
.pt-field-wide { grid-column: 1 / -1; }
.pt-logo { max-height: 64px; max-width: 220px; object-fit: contain; }
.pt-thumb { width: 96px; height: 64px; object-fit: cover; border-radius: var(--radius, 8px); border: 1px solid var(--bd); }
.pt-checks { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.pt-check { display: flex; gap: 8px; align-items: center; }
.pt-modal { border: 1px solid var(--bd); border-radius: var(--radius-lg, 10px); background: var(--bg2); color: var(--tx); padding: 20px; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 64px); overflow: auto; }
.pt-modal::backdrop { background: rgba(0, 0, 0, .45); }
.pt-modal-title { font-size: 18px; margin: 0 0 12px; }
.pt-modal-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.pt-viewas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px; margin: 0 0 12px;
  border: 1px solid var(--warn); background: var(--warn-soft); color: var(--warn-tx); border-radius: var(--radius, 8px); }

/* P4 · las filas editables de la tarifa y los textos con saltos */
.pt-rows input, .pt-rows select { width: 100%; min-width: 90px; box-sizing: border-box; }
.pt-pre { white-space: pre-line; margin: 0; }

/* P7 · los cubos, el kanban por etapa y los informes */
.pt-tabs .btn { text-decoration: none; }
.pt-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.pt-kanban-col { background: var(--bg3); border: 1px solid var(--bd); border-radius: var(--radius-lg, 10px); padding: 10px; display: grid; gap: 8px; align-content: start; }
.pt-kanban-title { font-size: var(--fs-md); margin: 0; }
.pt-kanban-card { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--bd); border-radius: var(--radius, 8px); background: var(--bg2); color: var(--tx); text-decoration: none; }
.pt-kanban-card:hover { border-color: var(--bd2); box-shadow: var(--sh-2); }
.pt-report { border-top: 1px solid var(--bd); padding: 10px 0; display: grid; gap: 6px; }

/* P9 · el formulario público del comercial */
.pt-public { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; box-sizing: border-box; }
.pt-public textarea { width: 100%; box-sizing: border-box; }

/* P10 · la foto de un contacto */
.pt-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
