:root { color-scheme:light;--portal-ink:#17283b;--portal-page:#f2f5f8;--portal-border:#dbe3eb;--portal-muted:#5a6b7e;--portal-positive:#14624c;--portal-accent:#155cb0;--portal-control-border:#8896a6;--portal-danger:#9a2020;--portal-disabled:#748399;--portal-secondary:#e9eff5;--portal-accent-hover:#104981;--portal-white:#fff;--portal-selected:#e7f0fb;--portal-positive-border:#a5cec1;--portal-positive-bg:#eff9f5;--portal-danger-bg:#fff2f2;--portal-muted-strong:#4d6073;--portal-border-strong:#b4c3d2;--portal-surface:#fff;--portal-button-text:#fff;}
:root[data-bs-theme="dark"] { color-scheme:dark;--portal-ink:#e6edf5;--portal-page:#0f1722;--portal-surface:#182331;--portal-border:#3c4e62;--portal-muted:#b4c4d6;--portal-positive:#8bdfbf;--portal-accent:#8bc1ff;--portal-control-border:#8599b0;--portal-danger:#ffb4b4;--portal-disabled:#526175;--portal-secondary:#2b3b4e;--portal-accent-hover:#b4d8ff;--portal-selected:#253e59;--portal-positive-border:#466e61;--portal-positive-bg:#19372f;--portal-danger-bg:#40262b;--portal-muted-strong:#bdcbdc;--portal-border-strong:#6c829c;--portal-button-text:#102136;}
:root { font-family: system-ui, sans-serif; color: var(--portal-ink); background: var(--portal-page); }
body { margin: 0; padding: 48px 20px; }
main { max-width: 720px; margin: auto; padding: 36px; background: var(--portal-surface); border: 1px solid var(--portal-border); border-radius: 16px; }
h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); overflow-wrap: anywhere; margin: 12px 0; }
p { line-height: 1.65; }
.eyebrow { color: var(--portal-muted); font-size: .8rem; font-weight: 700; letter-spacing: .1em; }
.status { color: var(--portal-positive); font-weight: 600; }
a { color: var(--portal-accent); font-weight: 600; }
a:focus-visible { outline: 3px solid var(--portal-accent); outline-offset: 4px; }
.note { color: var(--portal-muted); font-size: .9rem; margin-top: 32px; }
@media (max-width: 480px) { body { padding: 20px 12px; } main { padding: 22px; } }

form { display:grid; gap:12px; max-width:440px; margin:24px 0; }
label { font-weight:650; }
input,button { box-sizing:border-box; width:100%; padding:12px; border-radius:8px; font:inherit; }
input { border:1px solid var(--portal-control-border); color:var(--portal-ink); background:var(--portal-surface); }
button { border:0; color:var(--portal-button-text); background:var(--portal-accent); font-weight:650; cursor:pointer; margin-top:8px; }
input:focus-visible,button:focus-visible { outline:3px solid var(--portal-positive); outline-offset:3px; }
.error { color:var(--portal-danger); border-left:4px solid var(--portal-danger); padding-left:12px; }
select { width:100%; padding:12px; border:1px solid var(--portal-control-border); border-radius:8px; font:inherit; }
fieldset { border:1px solid var(--portal-control-border); border-radius:8px; padding:12px; }
.check { display:flex; align-items:center; gap:10px; margin:12px 0; }
.check input { width:auto; }
.hint { font-size:.9rem; color:var(--portal-muted); margin:0; }
.table-scroll { overflow-x:auto; }
table { border-collapse:collapse; width:100%; margin:24px 0; }
caption { text-align:left; font-weight:700; margin-bottom:12px; }
th,td { padding:12px; text-align:left; border-bottom:1px solid var(--portal-border); overflow-wrap:anywhere; }
th { background:var(--portal-page); }
.compact { margin:0; min-width:110px; }
button:disabled { background:var(--portal-disabled); cursor:default; }
.pagination { display:flex; flex-wrap:wrap; align-items:center; gap:20px; margin-top:24px; }
textarea { box-sizing:border-box; width:100%; padding:12px; border:1px solid var(--portal-control-border); border-radius:8px; font:inherit; resize:vertical; }
textarea:focus-visible,select:focus-visible { outline:3px solid var(--portal-positive); outline-offset:3px; }
.app-icon { width:40px; height:40px; }
dt { font-weight:700; margin-top:16px; }
dd { margin:6px 0 0; overflow-wrap:anywhere; }
.hash { font-family:monospace; overflow-wrap:anywhere; }
.multiline { white-space:pre-wrap; }
.conductor-shell { max-width:1040px; }
.conductor-nav { display:flex; flex-wrap:wrap; gap:8px 20px; padding:12px 0; border-bottom:1px solid var(--portal-border); }
.conductor-nav a { padding:8px 0; text-underline-offset:5px; }
.conductor-nav a[aria-current="page"] { color:var(--portal-ink); text-decoration-thickness:3px; }
.logout-form { display:block; margin:8px 0 24px; max-width:none; text-align:right; }
.logout-form button { width:auto; margin:0; padding:8px 14px; background:var(--portal-secondary); color:var(--portal-ink); }
.app-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:20px; }
.app-card { border:1px solid var(--portal-border); border-radius:12px; padding:24px; overflow-wrap:anywhere; }
.app-card h2 { margin:12px 0 8px; }
.package { overflow-wrap:anywhere; color:var(--portal-muted); font-size:.9rem; }
.empty-state { padding:20px; margin:24px 0; border-radius:12px; background:var(--portal-page); }
.release-data { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:0 24px; }
.button-link { display:inline-block; background:var(--portal-accent); color:var(--portal-button-text); border-radius:8px; padding:14px 20px; text-decoration:none; }
.history-filters { max-width:none; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); align-items:end; }
.history-filters label { display:block; margin-bottom:8px; }
.conductor-shell .table-scroll table { min-width:760px; }
.conductor-shell .table-scroll th,.conductor-shell .table-scroll td { overflow-wrap:normal; }
summary { cursor:pointer; padding:12px 0; font-weight:650; }
summary:focus-visible,.table-scroll:focus-visible { outline:3px solid var(--portal-positive); outline-offset:3px; }
.skip-link { position:absolute; left:-10000px; }
.skip-link:focus { position:static; display:block; padding:12px; }

/* Fase 7: base Bootstrap local, navegación común y controles accesibles. */
body { color:var(--portal-ink); background:var(--portal-page); line-height:1.55; padding:28px 20px; }
main { width:100%; max-width:1120px; min-width:0; }
main:focus { outline:none; }
main.auth-shell { max-width:600px; }
h1,h2,h3 { color:var(--portal-ink); line-height:1.25; }
h2 { font-size:1.35rem; margin:30px 0 14px; }
label { display:block; }
form { max-width:560px; }
input:not([type="checkbox"]):not([type="radio"]),select,textarea { min-width:0; max-width:100%; }
input[type="checkbox"],input[type="radio"] { flex:0 0 auto; width:22px; height:22px; padding:0; margin:0; accent-color:var(--portal-accent); }
button,.button-link,select { min-height:48px; }
button { line-height:1.4; }
button:hover:not(:disabled),.button-link:hover { background:var(--portal-accent-hover); color:var(--portal-button-text); }
a { text-underline-offset:3px; overflow-wrap:anywhere; }
nav a { display:inline-block; min-height:44px; padding:10px 8px; }
nav { margin-bottom:12px; }
.portal-brand { font-size:1.15rem; text-decoration:none; color:var(--portal-ink); }
.portal-brand span { display:block; color:var(--portal-muted); font-size:.8rem; font-weight:600; }
.portal-header { padding-bottom:12px; margin-bottom:24px; border-bottom:1px solid var(--portal-border); }
.portal-header .logout-form { margin:0; }
.portal-nav { margin:16px 0 0; }
.portal-nav a { text-decoration:none; border-radius:8px; padding:10px 14px; }
.portal-nav a[aria-current="page"],.portal-nav a:hover { background:var(--portal-selected); color:var(--portal-accent-hover); }
.status { padding:14px 16px; border:1px solid var(--portal-positive-border); border-radius:8px; background:var(--portal-positive-bg); }
.error { padding:14px 16px; background:var(--portal-danger-bg); border-radius:8px; }
.hint,.note,.package { color:var(--portal-muted-strong); }
.table-scroll { max-width:100%; border:1px solid var(--portal-border); border-radius:10px; margin:20px 0; }
.table-scroll table { margin:0; min-width:650px; }
.table-scroll caption { caption-side:top; padding:14px; color:var(--portal-ink); }
.table-scroll th { white-space:normal; }
.table-scroll td { vertical-align:top; }
.table-scroll td form { margin:8px 0; }
.table-scroll:focus-visible { outline-offset:4px; }
.table-help { color:var(--portal-muted-strong); font-size:.9rem; margin-bottom:6px; }
.table-scroll .hash { word-break:break-all; }
.conductor-shell .table-scroll th,.conductor-shell .table-scroll td { overflow-wrap:anywhere; }
.check { min-height:44px; line-height:1.5; }
.check input { align-self:flex-start; margin-top:3px; }
.pagination { gap:12px; }
.pagination span { padding:8px; }
.empty-state { border:1px dashed var(--portal-border-strong); }
progress { width:100%; height:24px; accent-color:var(--portal-accent); }
.secondary { color:var(--portal-ink); background:var(--portal-secondary); }
dialog { color:var(--portal-ink); border:1px solid var(--portal-border-strong); border-radius:16px; padding:28px; max-width:min(92vw,540px); }
dialog::backdrop { background:rgb(15 30 45 / 55%); }
dialog h2 { margin-top:0; }
.dialog-actions { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:0; }
.dialog-actions button { flex:1 1 160px; }
.skip-link:focus { position:fixed; left:12px; top:12px; z-index:2000; background:var(--portal-surface); border:3px solid var(--portal-accent); border-radius:8px; }
@media (max-width:600px) {
  body { padding:14px 10px; }
  main { padding:20px 16px; border-radius:12px; }
  form { max-width:none; }
  .portal-nav { gap:4px!important; }
  .portal-nav a { padding:10px; }
  .app-card { padding:18px; }
  .history-filters { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }
@media (forced-colors:active) { button,.button-link,.table-scroll { border:1px solid ButtonText; } }

/* Theme switches do not submit forms or recreate their controls. */
.theme-toggle { width:auto; margin:0; padding:8px 14px; display:inline-flex; gap:12px; align-items:center; }
.theme-toggle[hidden] { display:none; }
.theme-toggle span { font-size:.85em; }
.theme-toggle[aria-checked="true"] { border:2px solid var(--portal-accent); }
select,textarea,dialog { color:var(--portal-ink); background:var(--portal-surface); }
input::placeholder,textarea::placeholder { color:var(--portal-muted-strong); opacity:1; }
caption { color:var(--portal-ink); }
input[type="file"]::file-selector-button { color:var(--portal-ink); background:var(--portal-secondary); border:1px solid var(--portal-control-border); border-radius:6px; }
@media print { :root { color-scheme:light; } body,main,table,th,td { color:#17283b!important; background:#fff!important; } .theme-toggle { display:none; } }
