/* =========================================================
   PasTele — UNIFIED VISUAL SYSTEM
   Loaded after every page stylesheet.
   Does not replace page-specific layouts; it synchronizes
   colors, surfaces, typography, focus, scrolling and theme.
   ========================================================= */
:root{
  --pt-bg:#f5f7fb;--pt-surface:#ffffff;--pt-surface-2:#f8fafc;--pt-surface-3:#eef2f7;
  --pt-text:#0f172a;--pt-muted:#64748b;--pt-line:#e2e8f0;--pt-line-strong:#cbd5e1;
  --pt-primary:#635bff;--pt-primary-2:#8b5cf6;--pt-cyan:#06b6d4;--pt-blue:#3b82f6;
  --pt-green:#10b981;--pt-orange:#f59e0b;--pt-red:#ef4444;--pt-pink:#ec4899;
  --pt-shadow:0 18px 55px rgba(15,23,42,.09);--pt-radius:16px;
}
html[data-theme="dark"],html.theme-dark,body.theme-dark{
  --pt-bg:#080d16;--pt-surface:#101722;--pt-surface-2:#151e2b;--pt-surface-3:#1b2635;
  --pt-text:#f8fafc;--pt-muted:#94a3b8;--pt-line:rgba(255,255,255,.10);--pt-line-strong:rgba(255,255,255,.18);
  --pt-shadow:0 20px 65px rgba(0,0,0,.34);
}
html,body{min-height:100%;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important}
html{background:var(--pt-bg);color:var(--pt-text);scroll-behavior:smooth}
body{background:var(--pt-bg);color:var(--pt-text);min-height:100vh}
button,a,input,select,textarea{font:inherit}
button,a{touch-action:manipulation}
img{max-width:100%;height:auto}
*:focus-visible{outline:3px solid color-mix(in srgb,var(--pt-primary) 32%,transparent);outline-offset:2px}
/* common app surfaces */
.app-page main,.app-page .main-content{color:var(--pt-text)}
/* Index uses its own --ix variables; map them to the same system. */
.index-page{
  --ix-bg:var(--pt-bg);--ix-surface:var(--pt-surface);--ix-soft:var(--pt-surface-2);
  --ix-text:var(--pt-text);--ix-muted:var(--pt-muted);--ix-line:var(--pt-line);
  --ix-shadow:var(--pt-shadow);--ix-blue:var(--pt-blue);--ix-green:var(--pt-green);
}
html[data-theme="dark"] .index-page,html.theme-dark .index-page{
  --ix-bg:#080d16;--ix-surface:#101722;--ix-soft:#151e2b;--ix-text:#f8fafc;--ix-muted:#94a3b8;
  --ix-line:rgba(255,255,255,.10);--ix-shadow:0 20px 65px rgba(0,0,0,.34);
}
/* Common cards/controls remain readable in both themes. */
html[data-theme="dark"] .card,html[data-theme="dark"] .panel,html[data-theme="dark"] .box,
html[data-theme="dark"] .form-card,html[data-theme="dark"] .content-card,
html[data-theme="dark"] .settings-card,html[data-theme="dark"] .stat-card{
  background:var(--pt-surface)!important;color:var(--pt-text)!important;border-color:var(--pt-line)!important;
}
/* Public pages must never be trapped by page-specific overflow rules. */
.index-page main{min-height:0!important;overflow:visible!important}
/* Footer generated by footer.js */
.pastele-footer{background:var(--pt-surface)!important;color:var(--pt-muted);border-top:1px solid var(--pt-line)!important}
.pastele-footer a{color:var(--pt-muted)}
.pastele-footer a:hover{color:var(--pt-primary)}
/* Hide navbar on explicitly public/standalone pages even if stale markup exists. */
body.public-no-navbar #navbar{display:none!important}
@media(max-width:700px){html,body{overflow-x:hidden!important}.pastele-footer{margin-left:0!important}}
