/* Portal ROSES v24DLO · shared shell/theme/performance CSS
   Low-risk layer: tidak override layout modul secara agresif; hanya seragamkan token, footer, scroll-x, dan dark/light fallback. */
:root{--roses-shell-bg:#07111f;--roses-shell-surface:rgba(255,255,255,.94);--roses-shell-soft:rgba(239,246,255,.88);--roses-shell-text:#0f172a;--roses-shell-muted:#64748b;--roses-shell-line:rgba(148,163,184,.28);--roses-shell-primary:#1d4ed8;--roses-shell-shadow:0 18px 42px rgba(15,23,42,.14)}
html[data-theme="dark"]{--roses-shell-bg:#07111f;--roses-shell-surface:rgba(15,23,42,.92);--roses-shell-soft:rgba(30,41,59,.72);--roses-shell-text:#e5eefc;--roses-shell-muted:#a8b6cc;--roses-shell-line:rgba(148,163,184,.24);--roses-shell-primary:#60a5fa;--roses-shell-shadow:0 18px 46px rgba(2,6,23,.36)}
html[data-theme="light"]{color-scheme:light}html[data-theme="dark"]{color-scheme:dark}
html{overflow-x:hidden}body{overflow-x:hidden;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;background-color:var(--roses-shell-bg);color:var(--roses-shell-text)}
body:not(.rkp-v24dlj):not(.print-body):not(.rkp-print-view-body){min-height:100dvh}
img,svg,video,canvas{max-width:100%}.page,.phone-shell,.app-shell,.content-shell,.main-shell{min-width:0}.card,.panel,.glass-card,.app-card{min-width:0}
.user-topbar,.topbar,.app-header,.page-header,.shell-header{background:var(--roses-shell-surface);border-color:var(--roses-shell-line);color:var(--roses-shell-text);box-shadow:var(--roses-shell-shadow)}
.user-topbar a,.topbar a,.app-header a,.page-header a{color:inherit}.theme-toggle,#themeToggle,[data-theme-toggle]{touch-action:manipulation}
.roses-auto-footer{width:min(1120px,calc(100% - 24px));margin:18px auto calc(86px + env(safe-area-inset-bottom));padding:10px 14px;border:1px solid var(--roses-shell-line);border-radius:18px;background:var(--roses-shell-surface);color:var(--roses-shell-muted);box-shadow:var(--roses-shell-shadow);font-size:11px;font-weight:900;letter-spacing:.04em;display:flex;align-items:center;justify-content:center;text-align:center;gap:10px}
.roses-auto-footer-dot{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;background:var(--roses-shell-soft);color:var(--roses-shell-primary)}
.roses-dom-ready .skeleton-screen:not([data-keep-loader]),.roses-dom-ready .page-loader:not([data-keep-loader]),.roses-dom-ready .roses-loader:not([data-keep-loader]){opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,visibility .18s ease}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}
@media (max-width:760px){.roses-auto-footer{width:calc(100% - 16px);margin-top:12px;border-radius:14px;font-size:10px}}
@media print{.roses-auto-footer,[data-roses-footer="auto"]{display:none!important}html,body{background:#fff!important;color:#111827!important;overflow:visible!important}}


/* v24DLO · safer theme inheritance for legacy cards/tables */
html[data-theme="dark"] body:not(.print-body) .card,
html[data-theme="dark"] body:not(.print-body) .panel,
html[data-theme="dark"] body:not(.print-body) .glass-card,
html[data-theme="dark"] body:not(.print-body) .app-card,
html[data-theme="dark"] body:not(.print-body) .content-card{background-color:var(--roses-shell-surface);color:var(--roses-shell-text);border-color:var(--roses-shell-line)}
html[data-theme="dark"] body:not(.print-body) table{color:var(--roses-shell-text)}
html[data-theme="dark"] body:not(.print-body) input,
html[data-theme="dark"] body:not(.print-body) select,
html[data-theme="dark"] body:not(.print-body) textarea{background-color:rgba(15,23,42,.86);color:var(--roses-shell-text);border-color:var(--roses-shell-line)}
html[data-theme="light"] body:not(.print-body) input,
html[data-theme="light"] body:not(.print-body) select,
html[data-theme="light"] body:not(.print-body) textarea{background-color:#fff;color:#0f172a;border-color:rgba(148,163,184,.35)}


/* v24DLO · theme button hardening: lightweight no empty invisible icon button */
.theme-toggle,#themeToggle,[data-theme-toggle]{display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:38px;line-height:1;vertical-align:middle}
.theme-toggle svg,#themeToggle svg,[data-theme-toggle] svg{width:20px;height:20px;display:block;pointer-events:none}
.theme-toggle:empty::before,#themeToggle:empty::before,[data-theme-toggle]:empty::before{content:"☀";font-size:17px;font-weight:900}
html[data-theme="light"] .theme-toggle:empty::before,html[data-theme="light"] #themeToggle:empty::before,html[data-theme="light"] [data-theme-toggle]:empty::before{content:"☾"}


/* ROSES v24DLY · Touch Scroll Guard
   Tujuan: pulihkan touch-to-scroll pada mobile/tablet/native WebView tanpa mengubah cetakan.
   Punca v24DLX: beberapa page mengunci body/page kepada 100vh + overflow:hidden, dan sentuhan WebView tidak mendapat scroller yang sah. */
@media (hover:none), (pointer:coarse), (max-width:1023px){
  html:not(.print-mode):not(.is-printing),
  body:not(.print-body):not(.rkp-print-view-body):not(.slot-f4-print-body){
    overscroll-behavior-y:auto!important;
    touch-action:pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body:not(.modal-open):not(.acc-modal-open):not(.slot-f4-print-popup-open):not(.rkp-print-view-body):not(.print-body):not([data-print-mode="1"]){
    overflow-y:auto!important;
    max-height:none!important;
  }
  .page,
  .phone-shell,
  .app-shell,
  .minimal-shell,
  .content-card,
  .menu-home-card,
  .glass-card,
  .panel,
  .card,
  main,
  section{
    touch-action:pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .table-responsive,
  .table-scroll,
  .scroll-x,
  .horizontal-scroll,
  .slot-f4-table-scroll,
  .rkp-student-list,
  .rkp-recent-list,
  .rkp-class-list,
  .rkp-level-list,
  .rkp-absent-box,
  .erph-mobile-cards,
  .tpu-collection-body,
  .tku-table-wrap,
  .home-pdp-slot-list,
  .gbt-week-list,
  .sar-main,
  .sar-table-scroll,
  .modal-body,
  .dialog-body,
  [data-scroll],
  [data-scrollable="1"]{
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-x pan-y pinch-zoom!important;
    overscroll-behavior:auto!important;
  }
}
@media (hover:none) and (min-width:1024px), (pointer:coarse) and (min-width:1024px){
  body:not(.print-body):not(.rkp-print-view-body):not(.slot-f4-print-popup-open):not(.modal-open):not(.acc-modal-open){
    touch-action:pan-y pinch-zoom!important;
  }
}
