/**
 * LKlas Mobile App Shell — tampilan khusus layar ≤767px
 * Gaya mirip template Flutter / Material 3 (app bar, nav bar, sheet, tile, grid).
 * Desktop (≥768px) tidak terpengaruh.
 */
@media (max-width: 767px) {
  :root {
    --m-appbar-h: 56px;
    --m-nav-h: 64px;
    --m-radius: 18px;
    --m-radius-sm: 14px;
    --m-pad: 16px;
    --m-elev: 0 4px 16px rgba(15, 23, 42, 0.06);
    --m-elev-nav: 0 -2px 16px rgba(15, 23, 42, 0.06);
    --touch: 48px;
    --page-pad-x: 16px;
    --page-pad-y: 12px;
    --vaca-radius: 18px;
    --m-blue: #2563EB;
    --m-blue-deep: #1E3A8A;
    --m-blue-mid: #1D4ED8;
    --m-ink: #0F172A;
    --m-muted: #64748B;
    --m-line: #E8EEF5;
    --m-bg: #F5F7FB;
  }

  html {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
  }

  body.vaff-shell {
    background: var(--m-bg) !important;
    padding-bottom: calc(var(--m-nav-h) + env(safe-area-inset-bottom, 0px));
    overscroll-behavior-y: contain;
  }

  body.vaff-shell.nav-open {
    overflow: hidden;
  }

  /* ---- App chrome ---- */
  .vaff-wrap {
    margin-left: 0 !important;
    border-radius: 0 !important;
    background: var(--m-bg);
    min-height: 100dvh;
  }

  .vaff-navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto !important;
    min-height: calc(var(--m-appbar-h) + env(safe-area-inset-top, 0px));
    margin: 0 !important;
    padding: env(safe-area-inset-top, 0px) 0 28px !important;
    border-radius: 0 !important;
    border: 0;
    background:
      radial-gradient(ellipse 90% 80% at 12% 0%, rgba(255,255,255,.14), transparent 50%),
      radial-gradient(ellipse 70% 60% at 88% 20%, rgba(255,255,255,.08), transparent 45%),
      linear-gradient(165deg, #0B2A6B 0%, var(--m-blue-deep) 38%, var(--m-blue-mid) 72%, var(--m-blue) 100%) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    color: #fff;
    overflow: visible;
  }

  .vaff-navbar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 22px;
    background: var(--m-bg);
    border-radius: 22px 22px 0 0;
    pointer-events: none;
  }

  .vaff-navbar__inner {
    height: var(--m-appbar-h);
    padding: 0 12px 0 6px;
    position: relative;
    z-index: 1;
  }

  .vaff-bars span {
    background: #fff;
  }

  .vaff-navbar__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .vaff-navbar__title strong {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    max-width: min(56vw, 240px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vaff-navbar__sub {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 11px;
    font-weight: 600;
    margin-top: 0;
    max-width: min(58vw, 240px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vaff-navbar__sub:not([hidden])::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: #4ADE80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.28);
    flex: 0 0 auto;
  }

  .vaff-nav-bell {
    color: #fff;
  }

  .vaff-nav-bell.has-notif {
    color: #fff;
  }

  .vaff-nav-bell__badge {
    background: #F43F5E;
    border: 2px solid var(--m-blue-mid);
  }

  .vaff-avatar {
    border: 2px solid rgba(255, 255, 255, 0.45);
    width: 34px;
    height: 34px;
  }

  .vaff-caret {
    display: none;
  }

  /* ---- Main content ---- */
  .vaff-main {
    padding: 4px var(--m-pad) 28px !important;
    max-width: none !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
  }

  .vaff-main > h1,
  .vaff-main .text-xl.font-bold,
  .vaff-page-head h1 {
    font-size: 1.35rem !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
  }

  .vaff-main > h1 + p,
  .vaff-page-head p {
    font-size: 13px !important;
    line-height: 1.45;
  }

  /* ---- Cards / tiles (Material) ---- */
  .k-card {
    border-radius: var(--m-radius) !important;
    border: 0 !important;
    box-shadow: var(--m-elev) !important;
    overflow: hidden;
  }

  .vaff-flash {
    border-radius: var(--m-radius-sm);
    margin-bottom: 12px;
  }

  /* ---- Forms: full width, stacked, 48dp ---- */
  .k-input,
  .vaff-filters .k-input,
  .vaff-form-grid .k-input {
    min-height: 48px !important;
    border-radius: var(--m-radius-sm) !important;
    font-size: 16px !important;
    padding: 12px 14px !important;
    background: #fff;
    border-color: #E2E8F0;
  }

  .vaff-form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .vaff-form-grid > label,
  label:has(> .k-input) {
    font-size: 12px !important;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .btn-primary,
  .vaff-page-head .btn-primary,
  form .btn-primary {
    min-height: 48px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-weight: 700;
    background: var(--m-blue, var(--k-primary)) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  }

  .btn-primary:active {
    transform: scale(0.98);
  }

  .vaff-filters,
  .vaff-filters.is-grid {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 14px !important;
    border-radius: var(--m-radius);
    background: #fff;
    box-shadow: var(--m-elev);
    border: 0;
  }

  .vaff-filters.is-grid {
    grid-template-columns: 1fr !important;
  }

  .vaff-filters__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .vaff-filters__actions .btn-primary,
  .vaff-filters__actions .vaff-btn-ghost {
    width: 100%;
  }

  /* ---- Dashboard grids ---- */
  .vaff-mod-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .vaff-mod-grid > a,
  .vaff-mod-grid > .k-card {
    border-radius: var(--m-radius) !important;
    min-height: 88px;
  }

  .vaff-dash-charts,
  .vaff-dash-lists {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .vaff-hero {
    border-radius: var(--m-radius) !important;
    padding: 16px !important;
    margin-bottom: 12px;
  }

  .vaff-hero h1 {
    font-size: 1.25rem !important;
  }

  .vaff-session-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* ---- Book / catalog grid ---- */
  .vaff-book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .vaff-book-card {
    border-radius: var(--m-radius) !important;
    border: 0 !important;
    box-shadow: var(--m-elev) !important;
  }

  .vaff-lib-filter,
  .vaff-lib-filter__row {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }

  .vaff-lib-filter__row {
    grid-template-columns: 1fr !important;
  }

  /* ---- Tables hidden; mobile list cards ---- */
  .k-card:has(table.js-dt),
  .k-card.overflow-x-auto:has(table.js-dt) {
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
  }

  .k-card:has(table.js-dt) table.dataTable,
  .k-card:has(table.js-dt) .dataTables_scroll,
  .vaff-m-hide-dt table.dataTable {
    display: none !important;
  }

  .k-card:has(table.js-dt) .dataTables_wrapper {
    padding: 0 !important;
  }

  .vaff-m-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 8px;
  }

  .vaff-m-card,
  .vaff-m-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--m-elev);
    border: 1px solid rgba(226, 232, 240, 0.8);
    min-height: 72px;
  }

  .vaff-m-card__ico {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .vaff-m-card__ico.is-blue { background: #DBEAFE; color: #2563EB; }
  .vaff-m-card__ico.is-green { background: #DCFCE7; color: #16A34A; }
  .vaff-m-card__ico.is-orange { background: #FFEDD5; color: #EA580C; }
  .vaff-m-card__ico.is-purple { background: #EDE9FE; color: #7C3AED; }
  .vaff-m-card__ico.is-pink { background: #FCE7F3; color: #DB2777; }
  .vaff-m-card__ico.is-cyan { background: #CFFAFE; color: #0891B2; }

  .vaff-m-card__body {
    flex: 1;
    min-width: 0;
  }

  .vaff-m-card__title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--m-ink);
    line-height: 1.3;
  }

  .vaff-m-card__sub {
    margin: 3px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--m-blue);
    line-height: 1.3;
  }

  .vaff-m-card__meta {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--m-muted);
    line-height: 1.35;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }

  .vaff-m-card__meta svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    opacity: 0.85;
  }

  .vaff-m-card__more,
  .vaff-m-card__go {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    margin: 0;
    border: 0;
    background: #EFF6FF;
    border-radius: 99px;
    color: var(--m-blue);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .vaff-m-card__more:active,
  .vaff-m-card__go:active {
    background: #DBEAFE;
  }

  .vaff-m-card__go svg {
    width: 16px;
    height: 16px;
  }

  .vaff-m-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--m-elev);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 14px;
    width: 100%;
    text-align: left;
    cursor: pointer;
  }

  .vaff-m-cta__ico {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--m-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .vaff-m-cta__ico svg { width: 22px; height: 22px; }

  .vaff-m-cta__body { flex: 1; min-width: 0; }
  .vaff-m-cta__title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--m-blue);
  }
  .vaff-m-cta__sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--m-muted);
    font-weight: 500;
  }
  .vaff-m-cta__chev {
    color: #94A3B8;
    width: 18px;
    height: 18px;
  }

  .vaff-m-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 10px;
  }

  .vaff-m-section__title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--m-ink);
  }

  .vaff-m-section__badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #DBEAFE;
    color: #1D4ED8;
    font-size: 11px;
    font-weight: 800;
  }

  .vaff-m-empty {
    text-align: center;
    padding: 36px 20px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--m-elev);
  }

  .vaff-m-empty h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
  }

  .vaff-m-empty p {
    margin: 0;
    font-size: 13px;
    color: #64748B;
  }

  .vaff-m-skel {
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(90deg, #EEF2F7 25%, #F8FAFC 50%, #EEF2F7 75%);
    background-size: 200% 100%;
    animation: mSkel 1.2s ease infinite;
  }

  @keyframes mSkel {
    to { background-position: -200% 0; }
  }

  .k-card:has(table.js-dt) .dataTables_info,
  .k-card:has(table.js-dt) .dataTables_paginate {
    padding: 8px 4px !important;
    font-size: 12px;
  }

  .vaff-m-more {
    text-align: center;
    padding: 16px 8px 8px;
    color: #94A3B8;
    font-size: 12px;
    font-weight: 600;
  }

  .vaff-m-more.is-loading .vaff-m-more__lab::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid #BFDBFE;
    border-top-color: var(--m-blue, #2563EB);
    border-radius: 99px;
    vertical-align: -3px;
    animation: mSpin 0.7s linear infinite;
  }

  @keyframes mSpin {
    to { transform: rotate(360deg); }
  }

  .dataTables_wrapper.is-dt-paging-off .dataTables_paginate,
  .dataTables_wrapper.is-dt-paging-off .dataTables_info {
    display: none !important;
  }

  /* Mobile: sembunyikan paging DT — diganti infinite scroll */
  html.is-mobile-app .dataTables_wrapper .dataTables_paginate,
  html.is-mobile-app .dataTables_wrapper .dataTables_info,
  body.is-mobile-app .dataTables_wrapper .dataTables_paginate,
  body.is-mobile-app .dataTables_wrapper .dataTables_info {
    display: none !important;
  }

  .vaff-m-search-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: -8px 0 12px;
    position: relative;
    z-index: 2;
  }

  .vaff-m-search-row .vaff-filters__search {
    flex: 1 1 auto;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    display: block !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent;
    text-transform: none;
    letter-spacing: 0;
    gap: 0 !important;
    height: 48px;
  }

  .vaff-m-search-row .vaff-filters__search::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    margin: auto 0;
    z-index: 1;
    pointer-events: none;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%2394A3B8' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke-width='2'/%3E%3Cpath stroke-width='2' stroke-linecap='round' d='M20 20l-3-3'/%3E%3C/svg%3E");
  }

  .vaff-m-search-row .js-dt-q {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    border-radius: 14px !important;
    border: 0 !important;
    background: #fff !important;
    box-shadow: var(--m-elev) !important;
    padding: 0 14px 0 42px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 48px !important;
    color: var(--m-ink) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
  }

  .vaff-m-filter-btn {
    flex: 0 0 48px;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 14px;
    border: 0;
    background: #fff;
    box-shadow: var(--m-elev);
    color: var(--m-blue);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    line-height: 0;
    cursor: pointer;
  }

  .vaff-m-filter-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
  }

  /* ---- Bottom NavigationBar (Flutter) ---- */
  .vaff-mnav {
    display: block !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: #fff !important;
    backdrop-filter: none !important;
    border-top: 1px solid #E8EEF4;
    box-shadow: var(--m-elev-nav);
    /* pastikan tidak terpotong viewport / safe-area */
    min-height: calc(var(--m-nav-h) + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    overflow: visible;
  }

  .vaff-mnav__grid {
    display: grid;
    grid-template-columns: repeat(var(--m-nav-n, 5), minmax(0, 1fr));
    grid-auto-flow: column;
    gap: 0;
    max-width: none;
    margin: 0;
    padding: 6px 4px 8px !important;
    height: auto !important;
    min-height: var(--m-nav-h);
    align-items: stretch;
    box-sizing: border-box;
    overflow: hidden;
  }

  .vaff-mnav__item {
    position: relative;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px !important;
    height: auto !important;
    max-height: none !important;
    gap: 2px;
    padding: 6px 2px 8px !important;
    border-radius: 14px;
    color: #94A3B8;
    transition: color 0.15s ease;
    overflow: visible;
    box-sizing: border-box;
  }

  .vaff-mnav__item.is-active {
    color: var(--m-blue, #2563EB);
    background: transparent;
    font-weight: 800;
  }

  .vaff-mnav__item span:not(.vaff-mnav__dot):not(.vaff-nav-count) {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }

  .vaff-mnav__item .vaff-nav-count {
    position: absolute;
    top: 2px;
    right: calc(50% - 22px);
    margin-left: 0;
    min-width: 1.05rem;
    height: 1.05rem;
    line-height: 1.05rem;
    font-size: 9px;
    padding: 0 .28rem;
    box-shadow: 0 0 0 2px #fff;
  }

  .vaff-mnav__dot {
    display: none;
  }

  .vaff-mnav-ico {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
  }

  /* ---- Modal = bottom sheet / full form ---- */
  .vaff-modal {
    align-items: flex-end !important;
    padding: 0 !important;
    background: rgba(15, 23, 42, 0.45);
    z-index: 120 !important;
    overflow: hidden !important;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
  }

  .vaff-modal.vaff-confirm-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding: 20px 16px !important;
    z-index: 14000 !important;
    overflow: auto !important;
  }

  .vaff-modal.vaff-confirm-overlay .vaff-confirm-card {
    width: min(400px, calc(100vw - 32px)) !important;
    max-width: 400px !important;
    max-height: none !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    padding: 28px 22px 20px !important;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28) !important;
    animation: vaffConfirmIn 0.22s ease !important;
  }

  .vaff-modal.vaff-confirm-overlay .vaff-confirm-card::before {
    display: none !important;
  }

  .vaff-modal__card,
  .vaff-modal__card.is-wide {
    width: 100% !important;
    max-width: none !important;
    max-height: min(92dvh, 920px);
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 12px 16px 0 !important;
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.2);
    animation: mSheetUp 0.28s ease;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
  }

  .vaff-modal__card::-webkit-scrollbar {
    width: 5px;
  }
  .vaff-modal__card::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 0;
  }
  .vaff-modal__card::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 99px;
  }
  .vaff-modal__card::-webkit-scrollbar-thumb:active {
    background: #94A3B8;
  }

  .vaff-modal__card form .flex.justify-end,
  .vaff-modal__card .vaff-modal__foot {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 12px !important;
    padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    background: #fff;
    border-top: 1px solid #E7EEF8;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.06);
  }

  .vaff-modal__card::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    margin: 2px auto 12px;
    border-radius: 99px;
    background: #CBD5E1;
  }

  @keyframes mSheetUp {
    from { transform: translateY(24px); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* Saat modal/sheet terbuka: sembunyikan chrome yang menumpuk tombol Simpan */
  body.modal-open .vaff-mnav,
  body.modal-open .vaff-m-fab,
  body.sheet-open .vaff-mnav,
  body.sheet-open .vaff-m-fab,
  body.combo-sheet-open .vaff-m-fab,
  body.note-dialog-open .vaff-mnav,
  body.note-dialog-open .vaff-m-fab {
    display: none !important;
  }

  body.modal-open {
    overflow: hidden !important;
  }

  /* ---- Sidebar drawer: above header, no clip / no black shadow ---- */
  .vaff-sidebar {
    width: min(86vw, 300px) !important;
    max-width: min(86vw, 300px);
    --side-w: min(86vw, 300px);
    margin-left: 0 !important;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding-top: env(safe-area-inset-top, 0px);
    border-radius: 0 !important;
    transform: translateX(-110%);
    box-shadow: none !important;
    filter: none !important;
    visibility: hidden;
    pointer-events: none;
    z-index: 90 !important;
    transition: transform 0.25s ease, visibility 0.25s;
    will-change: transform;
  }

  body.nav-open .vaff-sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    box-shadow: none !important;
  }

  .vaff-side-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .vaff-overlay {
    background: rgba(15, 23, 42, 0.4);
    z-index: 85 !important;
  }

  body.nav-open .vaff-overlay {
    display: block !important;
  }

  body.nav-open .vaff-navbar {
    z-index: 40;
  }

  body.nav-open .vaff-navbar::after {
    display: none;
  }

  /* Header: hide subtitle / penjelasan page di mobile */
  .vaff-navbar__sub {
    display: none !important;
  }

  /* ---- Page actions sticky ---- */
  .vaff-page-head {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
    margin-bottom: 14px;
  }

  .vaff-page-head > .btn-primary,
  .vaff-page-head > .flex,
  .vaff-page-head > div.flex,
  .vaff-page-head__acts {
    width: 100%;
  }

  .vaff-page-head > .btn-primary,
  .vaff-page-head .btn-primary,
  .vaff-page-head__acts > .btn-primary,
  .vaff-page-head__acts > a.btn-primary {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    overflow: visible;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    text-align: center;
  }

  /* ---- List rows / dash rows as tiles ---- */
  .vaff-dash-row {
    border-radius: var(--m-radius-sm);
    padding: 12px !important;
    min-height: 56px;
  }

  .room-group h2 {
    font-size: 15px;
  }

  /* ---- Toast above nav ---- */
  .vaff-toast-wrap {
    bottom: calc(var(--m-nav-h) + 12px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    right: 12px !important;
  }

  /* ---- Exam take: hide chrome ---- */
  body.is-exam-take .vaff-mnav,
  body.is-exam-take .vaff-navbar .vaff-bars {
    display: none !important;
  }

  body.is-exam-take {
    padding-bottom: 0 !important;
  }

  /* ---- Login as mobile app screen (sheet putih di atas biru) ---- */
  body.vaff-guest {
    background:
      radial-gradient(ellipse 90% 55% at 0% 0%, rgba(147, 197, 253, 0.28), transparent 55%),
      radial-gradient(ellipse 70% 45% at 100% 8%, rgba(96, 165, 250, 0.22), transparent 50%),
      linear-gradient(165deg, color-mix(in srgb, var(--k-primary) 88%, #0f172a), color-mix(in srgb, var(--k-primary) 55%, #1e3a8a));
    min-height: 100dvh;
    position: relative;
  }

  body.vaff-guest:has(.vaff-login-page)::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ccircle cx='8' cy='8' r='1.6' fill='%23ffffff' fill-opacity='0.14'/%3E%3Ccircle cx='68' cy='38' r='1.1' fill='%23ffffff' fill-opacity='0.09'/%3E%3Cpath d='M98 78h12M104 72v12' stroke='%23ffffff' stroke-opacity='0.08' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280' viewBox='0 0 280 280' fill='none'%3E%3Ccircle cx='220' cy='40' r='90' stroke='%23ffffff' stroke-opacity='0.08' stroke-width='1.2'/%3E%3Ccircle cx='220' cy='40' r='58' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1'/%3E%3Ccircle cx='36' cy='210' r='70' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1.2'/%3E%3Cpath d='M24 48c18-6 34 8 28 24' stroke='%23ffffff' stroke-opacity='0.1' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: repeat, no-repeat;
    background-position: 0 0, 100% -20px;
    background-size: 120px 120px, min(100vw, 360px) auto;
  }

  .vaff-login-page {
    display: flex !important;
    flex-direction: column;
    min-height: 100dvh;
    grid-template-columns: none !important;
    position: relative;
    z-index: 1;
    background: transparent;
  }

  .vaff-login-brand {
    display: flex !important;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 20px;
    background: transparent !important;
    justify-content: center;
    overflow: hidden;
  }

  .vaff-login-brand::before {
    display: block !important;
    opacity: 0.85;
    background-image:
      radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.14), transparent 42%),
      radial-gradient(circle at 92% 70%, rgba(147, 197, 253, 0.18), transparent 46%),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Ccircle cx='3' cy='3' r='1.25' fill='%23ffffff' fill-opacity='0.11'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: auto, auto, 48px 48px;
  }

  .vaff-login-brand__deco {
    display: block !important;
  }

  .vaff-login-brand__deco::before {
    width: 220px;
    height: 220px;
    right: -70px;
    top: -80px;
    opacity: 0.7;
  }

  .vaff-login-brand__deco::after {
    width: 160px;
    height: 160px;
    left: -50px;
    right: auto;
    bottom: -55px;
    opacity: 0.55;
  }

  .vaff-login-brand__inner {
    text-align: center;
    width: 100%;
    max-width: 320px;
    padding: 0;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 0;
  }

  .vaff-login-brand__top {
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  .vaff-login-brand__school {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    margin: 0 auto 12px;
    padding: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  }

  .vaff-login-brand h1 {
    color: #fff !important;
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em;
    margin: 0;
  }

  .vaff-login-brand__bar {
    order: unset;
    margin: 12px auto 0;
    width: 36px;
    height: 3px;
    background: rgba(255, 255, 255, 0.4) !important;
  }

  .vaff-login-brand__tag {
    order: unset;
    margin: 10px 0 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
  }

  .vaff-login-brand__app,
  .vaff-login-brand__appname {
    display: none !important;
  }

  .vaff-login-main {
    flex: 1;
    background: #fff !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 4px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12) !important;
    margin-top: 0;
    position: relative;
    z-index: 2;
  }

  .vaff-login-panel {
    width: 100%;
    max-width: 400px;
    gap: 8px;
  }

  .vaff-login-card {
    width: 100%;
    margin: 0;
    padding: 22px 4px 12px !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  .vaff-login-ico {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
  }

  .vaff-login-ico svg {
    width: 24px;
    height: 24px;
  }

  .vaff-login-welcome,
  .vaff-login-welcome-sub,
  .vaff-login-card h2,
  .vaff-login-card .sub {
    display: block !important;
  }

  .vaff-login-card h2,
  .vaff-login-welcome {
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
  }

  .vaff-login-card .sub,
  .vaff-login-welcome-sub {
    margin: 4px 0 18px;
    font-size: 13px;
    text-align: center;
  }

  .vaff-login-card label.fld {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .vaff-field {
    margin-bottom: 14px;
  }

  .vaff-field .k-input {
    height: 50px !important;
    min-height: 50px !important;
    font-size: 16px !important; /* hindari zoom iOS */
    border-radius: 12px !important;
    /* ruang untuk ikon kiri (+ mata di kanan untuk password) */
    padding: 12px 48px 12px 52px !important;
  }

  .vaff-field .ico {
    left: 16px;
    width: 18px;
    height: 18px;
    z-index: 1;
  }

  .vaff-field .toggle-pass {
    right: 8px;
    z-index: 1;
  }

  .vaff-login-row {
    margin: 2px 0 18px;
    font-size: 14px;
  }

  .vaff-login-submit {
    height: 50px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
  }

  .vaff-login-submit svg {
    display: none;
  }

  .vaff-login-foot {
    margin: 10px 0 8px;
    gap: 8px;
  }

  .vaff-login-foot__brand {
    display: block !important;
  }

  .vaff-login-foot__brand img {
    height: 26px;
    width: auto;
    max-width: 112px;
    object-fit: contain;
    margin: 0 auto;
  }

  .vaff-login-foot__brand.is-mark img {
    height: 30px;
  }

  .vaff-login-foot__appname {
    display: none !important;
  }

  .vaff-login-foot__desk {
    display: inline;
  }

  .vaff-login-foot__desk-app {
    display: none;
  }

  .vaff-login-foot__copy {
    font-size: 11px;
    color: #94a3b8;
  }

  /* ---- Help / misc ---- */
  .vaff-help__tabs {
    gap: 6px;
  }

  .vaff-help__tab {
    min-height: 40px;
    border-radius: 999px;
    padding: 8px 14px;
  }

  .vaff-nav-user__btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px;
  }

  .vaff-nav-user__btn:hover,
  .vaff-nav-user.is-open .vaff-nav-user__btn {
    background: rgba(255, 255, 255, 0.22);
  }

  .vaff-drop {
    right: 8px;
    top: calc(100% + 6px);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
  }

  /* ---- Sticky filter chips spacing ---- */
  .vaff-badge {
    border-radius: 999px;
  }

  /* ---- Admin account / wide forms ---- */
  .vaff-modal__card .flex.justify-end {
    flex-wrap: wrap;
    gap: 8px;
  }

  .vaff-modal__card .flex.justify-end > * {
    flex: 1 1 auto;
    min-width: 120px;
    justify-content: center;
  }

  /* ---- Design system: app bar, chips, FAB, sheets, full form ---- */
  body.vaff-shell {
    background: var(--m-bg) !important;
  }

  .vaff-wrap {
    background: var(--m-bg);
  }

  .vaff-mnav__item {
    min-height: 52px !important;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
  }

  .vaff-mnav__item.is-active {
    color: var(--m-blue) !important;
    background: transparent !important;
    font-weight: 800;
  }

  /* indikator aktif di bawah ikon, bukan di bawah label (menghindari label terpotong) */
  .vaff-mnav__item.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: auto;
    top: 30px;
    width: 16px;
    height: 3px;
    margin-left: -8px;
    border-radius: 99px;
    background: var(--m-blue);
  }

  .vaff-mnav__grid {
    height: auto !important;
    min-height: var(--m-nav-h);
    padding: 6px 4px 8px !important;
  }

  .vaff-m-search,
  .vaff-filters .dataTables_filter,
  .vaff-filters .js-dt-q,
  .vaff-filters input.js-dt-q {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 14px !important;
    background: #fff !important;
    border: 0 !important;
    box-shadow: var(--m-elev);
    font-size: 14px !important;
    margin: 0 !important;
  }

  .vaff-filters {
    position: relative;
  }

  .vaff-m-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 10px;
    margin: 0 0 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .vaff-m-chips::-webkit-scrollbar { display: none; }

  .vaff-m-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    height: 38px;
    padding: 0 12px 0 10px;
    border-radius: 999px;
    border: 1px solid var(--m-line);
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  .vaff-m-chip svg {
    width: 15px;
    height: 15px;
    color: var(--m-blue);
    flex: 0 0 auto;
    display: block;
  }

  .vaff-m-chip > span {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
  }

  .vaff-m-chip__chev {
    width: 12px !important;
    height: 12px !important;
    color: #94A3B8 !important;
    margin-left: 2px;
  }

  .vaff-m-chip.is-on {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: var(--m-blue);
  }

  .vaff-m-fab {
    position: fixed;
    right: 18px;
    bottom: calc(var(--m-nav-h) + 18px + env(safe-area-inset-bottom, 0px));
    z-index: 55;
    width: 58px;
    height: 58px;
    border-radius: 99px;
    border: 0;
    background: var(--m-blue);
    color: #fff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.42);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .vaff-m-fab:active { transform: scale(0.96); }
  .vaff-m-fab svg { width: 26px; height: 26px; }

  .vaff-m-sheet.k-sheet {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }

  .vaff-m-sheet.k-sheet.hidden { display: none !important; }

  .vaff-m-sheet__panel {
    width: 100%;
    max-height: min(86dvh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 22px 22px 0 0;
    padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.2);
  }

  .vaff-m-sheet__hint {
    margin: -4px 0 12px;
    font-size: 12px;
    color: #94A3B8;
  }

  .vaff-m-sheet__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .vaff-m-sheet__link,
  .vaff-m-actions .vaff-m-act {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 12px;
    border-radius: 14px;
    color: #0F172A;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    background: #F8FAFC;
    width: 100%;
    text-align: left;
    cursor: pointer;
  }

  .vaff-m-sheet__link:active,
  .vaff-m-act:active { background: #EEF2F7; }

  .vaff-m-act.is-danger { color: #DC2626; }

  .vaff-m-sheet__chev {
    width: 18px;
    height: 18px;
    margin-left: auto;
    color: #CBD5E1;
  }

  .vaff-m-sheet__cancel {
    width: 100%;
    margin-top: 12px;
    min-height: 48px;
    border-radius: 14px;
    border: 0;
    background: #F1F5F9;
    font-weight: 700;
    color: #64748B;
    cursor: pointer;
  }

  .vaff-m-filter-sheet__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .vaff-m-filter-sheet__foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .vaff-m-filter-sheet__foot .btn-primary,
  .vaff-m-filter-sheet__foot .vaff-btn-ghost {
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }

  /* Filter mobile langsung (tanpa tunggu kelas JS) — cegah flash UI desktop */
  .vaff-filters > label:not(.vaff-m-keep):not(.vaff-filters__search),
  .vaff-filters .vaff-sch-days,
  .vaff-filters .vaff-filters__actions {
    display: none !important;
  }

  .vaff-filters > .vaff-filters__search {
    display: block !important;
    width: 100%;
    order: -1;
  }

  .vaff-filters,
  .vaff-filters.is-grid,
  .vaff-filters.k-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
    padding: 0 !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .vaff-page-head[data-actions-kept] > .flex,
  .vaff-page-head .vaff-m-overflow-src,
  .vaff-m-overflow-src {
    display: none !important;
  }

  .vaff-page-head h1 {
    display: none !important;
  }

  .vaff-page-lead {
    display: none !important;
  }

  .vaff-page-head {
    margin-bottom: 0;
  }

  .vaff-m-page-acts {
    margin: 0 0 10px;
  }

  .vaff-m-chip.is-export {
    border-color: color-mix(in srgb, var(--k-primary, #2563eb) 40%, #e2e8f0);
    color: var(--k-primary, #2563eb);
    background: color-mix(in srgb, var(--k-primary, #2563eb) 9%, #fff);
  }

  .vaff-m-page-more {
    width: 100%;
    min-height: 40px !important;
    border-radius: 12px !important;
    justify-content: center;
    background: #fff !important;
    box-shadow: var(--m-elev);
    font-size: 13px !important;
    font-weight: 700 !important;
  }

  /* Hide empty page-head chrome when only leftover button would float */
  .vaff-page-head:empty {
    display: none !important;
  }

  .vaff-modal__card.is-m-full {
    max-height: 100dvh !important;
    height: 100dvh;
    border-radius: 0 !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
  }

  .vaff-modal__card.is-m-full::before { display: none; }

  .vaff-sch__tabs {
    margin-bottom: 10px;
  }

  .vaff-sch__tabs .vaff-seg {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #fff;
    padding: 5px;
    border-radius: 14px;
    box-shadow: var(--m-elev);
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: visible;
  }

  /* Tab Unit / Materi / Tugas / Penilaian (dan seg lain) = slider geser */
  [data-seg] {
    max-width: 100%;
    min-width: 0;
  }

  .vaff-seg-bar:not(.vaff-sch__tabs) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .vaff-seg-bar:not(.vaff-sch__tabs) .vaff-seg,
  .vaff-room-seg,
  [data-seg] > .vaff-seg-bar .vaff-seg {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scroll-snap-type: x proximity;
    padding: 2px 4px 10px;
    margin: 0;
    scrollbar-width: none;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .vaff-seg-bar:not(.vaff-sch__tabs) .vaff-seg::-webkit-scrollbar,
  .vaff-room-seg::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .vaff-seg-bar:not(.vaff-sch__tabs) .vaff-seg > .vaff-btn-ghost,
  .vaff-room-seg > .vaff-btn-ghost {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap;
    scroll-snap-align: start;
    min-height: 42px;
  }

  /* Judul disembunyikan; baris chip aksi (.vaff-m-page-acts) tetap di afterend */
  .vaff-page-head[data-actions-kept] {
    display: none !important;
  }

  .vaff-page-head[data-actions-kept] + .vaff-m-page-acts {
    display: flex !important;
  }

  /* Rumah mapel: rombel + cari satu kolom, tidak berjejer sempit */
  .vaff-m-keep-row {
    width: 100%;
    margin: 0 0 10px;
  }

  .vaff-m-keep-row .vaff-room-switch,
  .vaff-m-keep-row .vaff-m-keep {
    display: block !important;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .vaff-m-keep-row .vaff-combo,
  .vaff-m-keep-row .vaff-combo__btn,
  .vaff-m-keep-row select.k-input {
    width: 100% !important;
    max-width: none !important;
  }

  .vaff-room-toolbar.vaff-m-filter-host,
  form.vaff-filters.vaff-room-toolbar {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
    width: 100%;
  }

  .vaff-room-toolbar .vaff-room-switch,
  .vaff-room-toolbar .vaff-m-keep {
    display: block !important;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .vaff-room-toolbar .vaff-room-switch .vaff-combo,
  .vaff-room-toolbar .vaff-room-switch .vaff-combo__btn,
  .vaff-room-toolbar .vaff-room-switch select.k-input {
    width: 100% !important;
    max-width: none !important;
  }

  .vaff-m-search-row + form.vaff-room-toolbar,
  .vaff-m-chips + form.vaff-room-toolbar {
    margin-top: 0;
  }

  /* Setelah rombel+cari dipindah ke luar form, sembunyikan shell kosong */
  .vaff-room-toolbar.vaff-m-filter-host:not(:has(.vaff-m-keep)):not(:has(.vaff-filters__search)):not(:has(> label)) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
  }

  .vaff-room-unit__addlabel {
    display: inline-block !important;
  }

  .vaff-sch__tabs .vaff-btn-ghost {
    justify-content: center;
    min-height: 42px;
    border-radius: 12px;
    margin: 0;
  }

  .vaff-sch__tabs .vaff-btn-ghost.is-on {
    background: color-mix(in srgb, var(--k-primary) 12%, #fff);
    color: var(--k-primary);
    font-weight: 800;
  }

  .vaff-sch-days__row {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  [data-seg-add],
  .vaff-m-page-more {
    min-height: 44px;
  }

  html.is-mobile-app [data-seg-add],
  body.is-mobile-app [data-seg-add] {
    display: none !important;
  }

  .vaff-combo__btn {
    min-height: 48px !important;
    border-radius: 12px !important;
  }

  .vaff-combo__opt {
    min-height: 48px !important;
    padding: 14px 12px !important;
    font-size: 15px !important;
  }

  /* ---- Dashboard mobile: rapikan ---- */
  .vaff-dash-head {
    display: none !important;
  }

  .vaff-dash-welcome {
    margin: 0 0 14px !important;
    border-radius: 18px !important;
    padding: 14px 14px 16px !important;
    gap: 10px !important;
  }

  .vaff-dash-welcome__copy h1 {
    font-size: 1.2rem !important;
  }

  .vaff-dash-welcome__copy p {
    font-size: 13px !important;
  }

  .vaff-dash-welcome__art {
    width: min(160px, 55%) !important;
  }

  .vaff-dash-chip {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 7px 12px;
    background: #fff;
    border: 1px solid var(--m-line, #E8EEF5);
    box-shadow: var(--m-elev);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vaff-dash-urgent {
    margin: 0 0 14px;
    border-radius: 18px;
    padding: 14px 14px 16px;
  }

  .vaff-dash-urgent__head h2 {
    font-size: 1rem !important;
  }

  .vaff-dash-urgent__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vaff-alert {
    padding: 12px;
  }

  .vaff-kpi__sub {
    font-size: 11px;
  }

  .vaff-kpi.is-danger,
  .vaff-kpi.is-warn {
    border-width: 1.5px;
  }

  .vaff-kpi--fresh .vaff-kpi__ico {
    border-radius: 14px !important;
  }

  .vaff-mod--fresh {
    border-radius: 16px !important;
  }

  .vaff-sec-row {
    margin-bottom: 10px;
  }

  .plan-strip {
    margin: 0 0 12px !important;
    border-radius: 14px !important;
  }

  .plan-strip-inner {
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 10px;
    padding: 12px !important;
  }

  .plan-strip-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px !important;
    line-height: 1.4;
  }

  .vaff-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .vaff-kpi {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 14px 12px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: var(--m-elev) !important;
    min-height: 0;
  }

  .vaff-kpi__ico {
    width: 40px !important;
    height: 40px !important;
  }

  .vaff-kpi__ico svg {
    width: 18px !important;
    height: 18px !important;
  }

  .vaff-kpi__label {
    font-size: 10px !important;
    letter-spacing: 0.06em;
    line-height: 1.2;
  }

  .vaff-kpi__value {
    font-size: 1.55rem !important;
    margin: 2px 0 0 !important;
  }

  .vaff-kpi__link {
    display: none !important;
  }

  .vaff-sec-title {
    font-size: 15px !important;
    font-weight: 800;
    margin: 4px 0 10px !important;
    color: var(--m-ink, #0F172A);
  }

  .vaff-dash-charts,
  .vaff-dash-lists {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }

  .vaff-dash-card,
  .vaff-chart {
    border-radius: 18px !important;
    padding: 14px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: var(--m-elev) !important;
    overflow: hidden;
  }

  .vaff-chart__head h2 {
    font-size: 14px !important;
    font-weight: 800;
    margin: 0 0 2px !important;
  }

  .vaff-chart__head p {
    font-size: 12px !important;
    margin: 0 0 10px !important;
    color: #64748B;
  }

  .vaff-chart__body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vaff-chart__body svg {
    max-width: 100%;
    height: auto;
  }

  .vaff-mod-grid {
    margin-bottom: 14px !important;
  }

  .vaff-schedule-board .vaff-dash-row,
  .vaff-dash-card .vaff-dash-row {
    background: #F8FAFC;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: none;
    border: 1px solid #EEF2F7;
    padding: 12px !important;
  }

  .vaff-dash-row:last-child {
    margin-bottom: 0;
  }

  /* Jadwal hari ini — 1 kolom di mobile (hindari overlap) */
  .vaff-sched-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .vaff-sched-grid .vaff-sched-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    height: 100%;
    padding: 10px;
    border-radius: 14px;
    box-shadow: var(--m-elev);
    border: 1px solid #EEF2F7;
    background: #fff;
  }

  .vaff-sched-grid .vaff-sched-row.is-now {
    border-color: color-mix(in srgb, var(--m-blue) 45%, #E2E8F0);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--m-blue) 18%, transparent), var(--m-elev);
  }

  .vaff-sched-grid .vaff-sched-row__time {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
  }

  .vaff-sched-grid .vaff-sched-row__time b {
    font-size: 12px;
    font-weight: 800;
  }

  .vaff-sched-grid .vaff-sched-row__time small {
    font-size: 10px;
    width: 100%;
  }

  .vaff-sched-grid .vaff-sched-row__time .vaff-badge {
    font-size: 9px;
    padding: 2px 6px;
  }

  .vaff-sched-grid .vaff-sched-row__body {
    flex: 1 1 auto;
    min-width: 0;
  }

  .vaff-sched-grid .vaff-sched-row__body b {
    font-size: 13px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .vaff-sched-grid .vaff-sched-row__body small {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .vaff-sched-grid .vaff-sched-row__st {
    font-size: 10px;
    margin-top: 2px;
  }

  .vaff-sched-grid .vaff-sched-row__act {
    margin-top: auto;
    width: 100%;
  }

  .vaff-sched-grid .vaff-sched-row__act .btn-primary,
  .vaff-sched-grid .vaff-sched-row__act .vaff-btn-ghost {
    width: 100%;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 10px;
  }

  .vaff-sched-grid .vaff-sched-row__act .btn-ico__svg {
    width: 14px;
    height: 14px;
  }

  .mb-6 {
    margin-bottom: 14px !important;
  }

  .vaff-stat {
    border-radius: 16px !important;
    box-shadow: var(--m-elev);
    border: 0 !important;
  }

  /* Guru / siswa dashboard — mobile polish */
  .vaff-gdash {
    gap: 12px;
  }

  /* Hero: teks penuh, ilustrasi disembunyikan agar tidak berantakan di layar sempit */
  .vaff-gdash-welcome {
    margin: 0 0 4px !important;
    padding: 2px 0 8px !important;
    background: transparent !important;
    overflow: visible !important;
  }

  .vaff-gdash-hero {
    border-radius: 0;
    box-shadow: none;
    border: 0;
    padding: 4px 2px 8px !important;
    min-height: 0 !important;
    background: transparent !important;
    display: block !important;
  }

  .vaff-gdash-hero__text {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .vaff-gdash-hero__hello {
    font-size: 1.28rem !important;
    line-height: 1.3 !important;
    margin: 0 0 6px !important;
  }

  .vaff-gdash-hero__sub {
    font-size: 13px !important;
    line-height: 1.45 !important;
    max-width: 36rem;
  }

  .vaff-gdash-hero__art {
    display: none !important;
  }

  /* Hapus tautan “Lihat/Buka/Kerjakan →” di kartu ringkasan (mobile) */
  .vaff-gdash-stat__go {
    display: none !important;
  }

  .vaff-gdash-stat {
    min-height: 0 !important;
    padding: 14px 12px !important;
  }

  .vaff-adash .vaff-gdash-welcome {
    margin: 0 0 4px !important;
  }

  .vaff-gdash-stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }

  .vaff-gdash-stat {
    box-shadow: var(--m-elev);
    border: 0;
  }

  .vaff-gdash-mid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .vaff-gdash-panel,
  .vaff-gdash-quick {
    box-shadow: var(--m-elev);
    border: 0;
  }

  .vaff-gdash-sched {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 8px 2px 2px 8px;
    align-items: stretch;
  }

  .vaff-gdash-sched__item {
    height: auto;
    box-shadow: none;
    min-width: 0;
    max-width: 100%;
  }

  .vaff-gdash-sched__main {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 10px 12px 12px 14px;
    height: auto;
    min-width: 0;
  }

  .vaff-gdash-sched__info {
    min-width: 0;
    max-width: 100%;
  }

  .vaff-gdash-sched__time {
    padding-right: 96px;
    font-size: 12px;
  }

  .vaff-gdash-sched__subj {
    font-size: 14px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .vaff-gdash-sched__meta {
    min-width: 0;
    max-width: 100%;
  }

  .vaff-gdash-class {
    max-width: 100% !important;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px !important;
  }

  .vaff-gdash-sched__side {
    flex-direction: row;
    align-items: center;
    justify-content: stretch;
    width: 100%;
    margin-top: 8px;
    gap: 8px;
  }

  .vaff-gdash-pill {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    max-width: 42%;
    white-space: nowrap;
  }

  .vaff-gdash-sched__btn {
    width: 100% !important;
    min-height: 36px !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  .vaff-gdash-quick__grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }

  .vaff-gdash-quick__track {
    margin: 0;
    padding: 0;
    overflow: visible;
    display: contents;
  }
}
