.po-toolbar { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 12px; }
.po-toolbar button { padding:8px 12px; border:1px solid var(--border-color,#cbd5e1); border-radius:7px; background:var(--input-bg,var(--bg-header,#fff)); color:var(--text-primary,#182235); font-weight:600; cursor:pointer; }
.po-dialog { box-sizing:border-box; width:min(1150px,96vw); max-height:92vh; border:1px solid var(--border-color,#cbd5e1); border-radius:12px; padding:0; color:var(--text-primary,#182235); background:var(--bg-header,#fff); font:14px/1.5 system-ui,sans-serif; }
.po-dialog::backdrop { background:rgba(8,20,35,.65); }
.po-dialog * { box-sizing:border-box; }
.po-dialog header, .po-dialog footer { display:flex; align-items:center; gap:12px; justify-content:space-between; flex-wrap:wrap; padding:16px 20px; background:var(--bg-header,#f8fafc); }
.po-dialog h2 { font-size:19px; margin:0; }
.po-dialog h3 { font-size:15px; margin:15px 0 6px; }
.po-content { padding:0 20px 16px; }
.po-dialog p { margin:8px 0; }
.po-dialog button, .po-dialog select, .po-dialog input[type=file] { font:inherit; color:inherit; }
.po-dialog button,
.po-dialog input[type=file]::file-selector-button { cursor:pointer; padding:8px 12px; border-radius:6px; border:1px solid var(--border-color,#cbd5e1); background:var(--input-bg,var(--bg-header,#fff)); color:var(--text-primary,#182235); font-weight:600; }
.po-dialog input[type=file]::file-selector-button { margin-right:8px; font-family:inherit; }
.po-toolbar button:not(:disabled):hover,
.po-dialog button:not(:disabled):hover,
.po-dialog input[type=file]:not(:disabled)::file-selector-button:hover { background:var(--btn-hover,var(--input-bg,#f5f6f6)); }
.po-dialog button.po-confirm { background:#145a8c; color:white; border-color:#145a8c; }
.po-dialog button.po-confirm:not(:disabled):hover { background:#104c76; border-color:#104c76; }
/* Mantener legibles los controles inactivos sin habilitar sus acciones. */
.po-dialog button:disabled,
.po-dialog button.po-confirm:disabled,
.po-dialog input[type=file]:disabled::file-selector-button { cursor:not-allowed; opacity:1; background:var(--bg-header,#f0f2f5); color:var(--text-primary,#182235); border-color:var(--text-secondary,#667781); border-style:dashed; box-shadow:none; }
.po-toolbar button:focus-visible,
.po-dialog button:focus-visible,
.po-dialog input[type=file]:focus-visible { outline:2px solid var(--text-primary,#182235); outline-offset:2px; }
.po-dialog label { display:block; margin:10px 0; }
.po-dialog input[type=checkbox] { vertical-align:middle; margin-right:8px; }
.po-dialog select { padding:7px; border:1px solid var(--border-color,#cbd5e1); border-radius:5px; background:var(--bg-header,#fff); max-width:100%; }
.po-profile { width:100%; }
.po-table-scroll { overflow:auto; border:1px solid var(--border-color,#cbd5e1); border-radius:6px; margin:12px 0; }
.po-table { width:100%; border-collapse:collapse; font-size:13px; }
.po-table th, .po-table td { padding:10px; border-bottom:1px solid var(--border-color,#dce3ec); text-align:right; vertical-align:top; }
.po-table th { background:var(--bg-sidebar,#edf2f7); white-space:normal; min-width:85px; }
.po-table th:first-child, .po-table td:first-child { text-align:left; min-width:230px; }
.po-table small { display:block; font-size:12px; }
.po-map { display:grid; gap:5px; margin-top:7px; }
.po-map select { min-width:190px; max-width:350px; }
.po-summary { display:flex; flex-wrap:wrap; gap:8px 22px; padding:12px; background:var(--bg-sidebar,#edf2f7); border-radius:6px; }
.po-status, .po-warning, .po-error { padding:10px 12px; border:1px solid; border-radius:6px; margin:10px 0; white-space:pre-line; }
.po-status { border-color:#66859b; background:rgba(28,97,147,.09); }
.po-warning { border-color:#b78b25; background:rgba(220,173,58,.12); }
.po-error { border-color:#c55252; background:rgba(192,70,70,.1); }
.po-dialog [hidden] { display:none!important; }
.po-history-entry { border-bottom:1px solid var(--border-color,#dce3ec); padding:10px 0; }
.po-history-entry button { margin:5px 8px 0 0; }
@media(max-width:650px){ .po-content { padding:0 10px 10px; } .po-dialog header,.po-dialog footer{padding:12px;} .po-table th,.po-table td {padding:7px;} }
.po-dialog header { position:sticky; top:0; z-index:3; border-bottom:1px solid var(--border-color,#dce3ec); }
.po-dialog footer { position:sticky; bottom:0; z-index:3; border-top:1px solid var(--border-color,#dce3ec); }
.po-table-scroll { max-height:42vh; }
.po-table th { position:sticky; top:0; z-index:1; }
