/* Preference is scoped to private pages. Export canvases retain their own artwork. */
html[data-admin-theme="dark"]{color-scheme:dark}
html[data-admin-theme="light"]{color-scheme:light}
html[data-admin-theme="light"] body[data-admin-refresh]{
 --admin-ground:#f7f5f0;--admin-surface:#ffffff;--admin-raised:#eeeae1;--admin-hover:#e4dfd3;
 --admin-ink:#29261f;--admin-muted:#625d52;--admin-faint:#625d52;--admin-rule:#d6d0c4;
 --admin-control:#817a6d;--admin-accent:#80501e;--admin-accent-ink:#ffffff;--admin-negative:#962e1d;
 --admin-selection:#dce8f0;
 --admin-selection-ink:#172d3b;
 --admin-count-bg:#e9e4d9;
 --admin-avatar-bg:#e9ddc6;
 --admin-avatar-ink:#704310;
 --admin-selected:#efe2cd;
 --admin-accent-hover:#714518;
 --admin-danger-bg:#fff0eb;
 --admin-danger-border:#a34228;
 --admin-notice-bg:#fff0eb;
 --admin-notice-border:#a34228;
 --admin-notice-ink:#8c321f;
 --admin-step-bg:#e6dfd2;
 --admin-success-ink:#285d39;
 --admin-skeleton:#d5d1c8;
 --admin-available-bg:#eaf3fc;
 --admin-available-hover:#dcecf9;
 --admin-available-accent:#265c87;
 --admin-available-badge:#d9eafb;
 --admin-available-ink:#17476d;
 --admin-available-border:#426e91;
 --admin-reserved-bg:#fff5dd;
 --admin-reserved-hover:#f8e8bc;
 --admin-reserved-ink:#694b10;
 --admin-reserved-border:#876218;
 --admin-sold-bg:#ebf5ed;
 --admin-sold-hover:#dceddf;
 --admin-sold-ink:#255335;
 --admin-sold-border:#487252;
 --admin-pending-bg:#faf0f5;
 --admin-pending-hover:#f1e0e9;
 --admin-pending-accent:#79465e;
 --admin-pending-ink:#6f3e55;
 --admin-pending-border:#87536c;
 --admin-neutral-accent:#655f52;
 --admin-neutral-badge:#e9e5dc;
 --admin-neutral-ink:#4b473d;
 --admin-neutral-border:#777064;
 --admin-coral-bg:#fff0e7;
 --admin-coral-ink:#803b1e;
 --admin-coral-border:#9d5937;
 color-scheme:light;scrollbar-color:#817a6d var(--admin-ground);
}
body[data-admin-refresh]{--eco-admin-bg:var(--admin-ground);--eco-admin-surface:var(--admin-surface);--eco-admin-ink:var(--admin-ink);--eco-admin-muted:var(--admin-muted);--eco-admin-focus:var(--admin-accent)}
body[data-admin-refresh] .ecosystem-admin-links{color:var(--admin-ink)}
body[data-admin-refresh] .ecosystem-admin-links a{background:var(--admin-raised);color:var(--admin-ink)}
body[data-admin-refresh] .admin-theme-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 5px 8px;color:var(--admin-muted);font-size:12px;line-height:1.4}
body[data-admin-refresh] .admin-theme-choice select{width:auto;min-width:96px;min-height:44px;padding:8px 10px;background:var(--admin-ground);color:var(--admin-ink);border:1px solid var(--admin-control);border-radius:8px;font:500 14px/1.5 Montserrat,Arial,sans-serif;cursor:pointer}
body[data-admin-refresh] .admin-theme-choice select:focus-visible{outline:3px solid var(--admin-accent);outline-offset:3px}
body[data-admin-refresh] .admin-theme-standalone{position:relative;z-index:13;justify-content:flex-end;margin:0;padding:12px max(16px,env(safe-area-inset-right,0px));background:var(--admin-ground)}
body[data-admin-refresh] #login-screen .admin-theme-choice{margin:0 0 24px;color:var(--admin-muted)}
/* The access form has its own incumbent palette; pair every light surface and foreground. */
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen{
 --access-ground:var(--admin-ground);--access-surface:var(--admin-surface);--access-raised:var(--admin-raised);--access-ink:var(--admin-ink);--access-muted:var(--admin-muted);--access-faint:var(--admin-faint);--access-gold:var(--admin-accent);--access-line:var(--admin-rule);color-scheme:light;
}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen .login-box{background:var(--admin-surface)}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen .brand img{filter:none}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen .access-profile-tabs{background:var(--admin-ground);border-color:var(--admin-control)}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen .access-profile-indicator{background:var(--admin-selected);border-color:var(--admin-control)}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen #login-form input{background:var(--admin-ground);border-color:var(--admin-control);color:var(--admin-ink)}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen #login-form input:-webkit-autofill{-webkit-text-fill-color:var(--admin-ink);-webkit-box-shadow:0 0 0 100px var(--admin-raised) inset;caret-color:var(--admin-ink)}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen .form-error{color:var(--admin-negative)}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen #login-form .button{background:var(--admin-accent);color:var(--admin-accent-ink);border-color:var(--admin-accent)}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen #login-form .button:not(:disabled):hover,
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen #login-form .button:active{background:var(--admin-accent-hover);border-color:var(--admin-accent-hover);color:var(--admin-accent-ink)}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen #login-form .button:disabled{background:var(--admin-raised);color:var(--admin-muted);border-color:var(--admin-control)}
html[data-admin-theme="light"] body[data-admin-refresh] #login-screen .demo-access>.button{background:var(--admin-raised);color:var(--admin-ink);border-color:var(--admin-control)}
@media(max-width:900px){body[data-admin-refresh] .sidebar .admin-theme-choice{grid-column:1/-1;display:flex;justify-content:flex-start;gap:14px;margin:0;padding-top:10px;border-top:1px solid var(--admin-rule)}}
@media(max-width:359px){html[data-admin-theme="light"] body[data-admin-refresh] #login-screen .login-box{background:transparent}}
@media print{body[data-admin-refresh] .admin-theme-choice{display:none!important}}

/* Consulta comercial privada: mismas superficies y contraste que el panel. */
body[data-admin-refresh].pc-private{background:var(--admin-ground);color:var(--admin-ink)}
body[data-admin-refresh].pc-private .pc-header,body[data-admin-refresh].pc-private .pc-results,body[data-admin-refresh].pc-private .pc-skip{background:var(--admin-surface);color:var(--admin-ink)}
body[data-admin-refresh].pc-private :is(.pc-header,.pc-coverage,.pc-shortcuts,.pc-lot,.pc-footer){border-color:var(--admin-control)}
body[data-admin-refresh].pc-private :is(.pc-coverage dt,.pc-lot dt,.pc-age-note,.pc-result-help,.pc-search-status,.pc-session-status){color:var(--admin-muted)}
body[data-admin-refresh].pc-private :is(input,select,.pc-logout){background:var(--admin-ground);color:var(--admin-ink);border:1px solid var(--admin-control);min-height:44px;font:inherit;padding:8px 12px;border-radius:6px}
body[data-admin-refresh].pc-private .pc-submit{background:var(--admin-accent);color:var(--admin-accent-ink)}
body[data-admin-refresh].pc-private .pc-shortcut.is-current{background:var(--admin-selected);border-bottom-color:var(--admin-accent)}
body[data-admin-refresh].pc-private .pc-status.available{background:var(--admin-available-badge);color:var(--admin-available-ink)}
body[data-admin-refresh].pc-private .pc-status.reserved{background:var(--admin-reserved-hover);color:var(--admin-reserved-ink)}
body[data-admin-refresh].pc-private .pc-status.sold{background:var(--admin-sold-hover);color:var(--admin-sold-ink)}
body[data-admin-refresh].pc-private .pc-status:is(.release_pending,.unavailable){background:var(--admin-pending-hover);color:var(--admin-pending-ink)}
body[data-admin-refresh].pc-private .pc-age{color:var(--admin-ink)}
body[data-admin-refresh].pc-private :focus-visible{outline:3px solid var(--admin-accent);outline-offset:3px}
body[data-admin-refresh].pc-private .pc-header nav{align-items:center;flex-wrap:wrap;gap:12px}
body[data-admin-refresh].pc-private .pc-session-status{margin-top:12px;font-size:15px;max-width:70ch}
@media(hover:hover)and(pointer:fine){body[data-admin-refresh].pc-private .pc-shortcut:hover{background:var(--admin-hover)}}
@media(max-width:600px){body[data-admin-refresh].pc-private .pc-header{display:block;padding:16px}body[data-admin-refresh].pc-private .pc-header nav{margin-top:12px;gap:8px 16px}body[data-admin-refresh].pc-private .pc-header nav a{white-space:normal}body[data-admin-refresh].pc-private .pc-shell{padding:20px 16px}}

body[data-admin-refresh] .private-access-error{max-width:650px;margin:clamp(32px,10vh,96px) auto;padding:24px;display:grid;gap:24px;color:var(--admin-ink)}
body[data-admin-refresh] .private-access-error h1{font-size:clamp(28px,5vw,44px);line-height:1.15;letter-spacing:-.025em}
body[data-admin-refresh] .private-access-error p{line-height:1.6;color:var(--admin-muted)}
body[data-admin-refresh] .private-access-error a{display:flex;align-items:center;min-height:48px;width:fit-content;text-underline-offset:4px;color:var(--admin-ink)}
body[data-admin-refresh] .private-access-error .button{background:var(--admin-accent);color:var(--admin-accent-ink);padding:12px 20px;border-radius:8px;text-decoration:none}

/* All private sidebar copy follows the paired theme, including older portal styles. */
html[data-admin-theme] body[data-admin-refresh] .sidebar .sidebar-label,
html[data-admin-theme] body[data-admin-refresh] .sidebar .sidebar-note p,
html[data-admin-theme] body[data-admin-refresh] .sidebar .user-box small{
 color:var(--admin-muted);opacity:1;
}
html[data-admin-theme] body[data-admin-refresh] .sidebar .sidebar-note strong,
html[data-admin-theme] body[data-admin-refresh] .sidebar .user-box strong{color:var(--admin-ink);opacity:1}
