/* Responsive and mobile-first behavior */
@media (max-width:1080px){.desktop-primary-nav{gap:0}.desktop-nav-link{padding:0 9px}.desktop-nav-link span{display:none}.desktop-nav-link .ui-icon{width:20px;height:20px}.profile-button-copy{display:none}.profile-button{padding:4px;max-width:46px}.profile-chevron{display:none}.admin-module-grid{grid-template-columns:1fr 1fr}.quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:820px){.app-topbar{height:58px;top:6px;width:calc(100% - 20px);margin-top:6px;border-radius:18px;padding:6px 7px 6px 9px}.app-brand .brand-mark{width:36px;height:36px;border-radius:11px}.brand-copy strong{font-size:13px}.brand-copy small{display:none}.desktop-primary-nav{display:none}.topbar-actions .theme-toggle{display:grid}.topbar-actions .profile-button{display:flex}.topbar-actions{margin-left:auto}.app-page-shell{width:calc(100% - 20px);margin:16px auto calc(102px + env(safe-area-inset-bottom))}.mobile-tabbar{position:fixed;z-index:70;display:grid;grid-template-columns:repeat(5,1fr);left:50%;bottom:max(8px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(580px,calc(100% - 16px));height:68px;padding:5px;border:1px solid var(--app-separator);border-radius:22px;background:var(--app-glass);box-shadow:var(--app-shadow-lg);backdrop-filter:saturate(180%) blur(26px);-webkit-backdrop-filter:saturate(180%) blur(26px)}.mobile-tab{min-width:0;border:0;border-radius:16px;background:transparent;color:var(--app-text-tertiary);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;font:inherit;font-size:10px;font-weight:650;cursor:pointer}.mobile-tab .ui-icon{width:22px;height:22px}.mobile-tab.is-active{background:var(--app-blue-soft);color:var(--app-blue)}.floating-safe-button{position:fixed;z-index:69;right:14px;bottom:calc(82px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:7px;min-height:44px;padding:0 14px;border-radius:22px;background:var(--app-text);color:var(--app-bg);box-shadow:var(--app-shadow-md);font-size:12px;font-weight:700;text-decoration:none}.floating-safe-button .ui-icon{width:18px;height:18px}.more-sheet{top:auto;right:0;bottom:0;width:100%;max-height:min(82vh,720px);padding:10px 14px calc(16px + env(safe-area-inset-bottom));border-radius:28px 28px 0 0;border-bottom:0;transform:translateY(104%);opacity:1}.more-sheet.is-open{transform:none}.sheet-handle{display:block;width:38px;height:5px;margin:0 auto 10px;border-radius:3px;background:var(--app-separator-strong)}.sheet-backdrop{z-index:90}.app-footer{display:none}.toast-stack{top:72px;right:10px;width:calc(100% - 20px)}.dashboard-hero,.pre-mpls-hero{padding:22px;align-items:flex-start}.dashboard-hero .profile-orb{display:none}.stats-grid,.stats-grid.four,.stats-grid.five{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-module-grid{grid-template-columns:1fr}.action-panel{min-height:auto;align-items:flex-start}.action-panel>.button,.action-panel>.button-row{width:100%}.action-panel>.button-row .button{flex:1}.app-section-header{align-items:flex-start;flex-direction:column}.app-section-header .button-row{width:100%}.app-section-header .button-row .button{flex:1}.continue-card{grid-template-columns:50px minmax(0,1fr) 36px;padding:15px;gap:12px}.continue-card-icon{width:48px;height:48px}.continue-card strong{font-size:17px}.progress-summary{grid-template-columns:1fr}.progress-ring{margin:auto}.quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{padding:32px 24px}.hero-emblem{display:none}.hero h1{font-size:clamp(48px,15vw,72px)}}
@media (max-width:600px){body{font-size:14px}.panel{padding:18px;border-radius:20px}.app-page-shell{width:calc(100% - 16px);margin-top:12px}.brand-copy{display:none}.app-topbar{width:calc(100% - 16px)}.dashboard-hero h1,.pre-mpls-hero h1{font-size:35px}.dashboard-hero p,.pre-mpls-hero p{font-size:14px}.button{min-height:48px}.button-row{width:100%}.button-row .button{flex:1 1 100%}.stats-grid,.stats-grid.four,.stats-grid.five{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.stat-card{padding:15px}.stat-card strong{font-size:23px}.stat-card small{font-size:10px}.activity-card{grid-template-columns:42px minmax(0,1fr) auto;padding:12px;gap:10px}.activity-card-number{width:38px;height:38px}.activity-card-status .badge{display:none}.activity-card-copy strong{font-size:14px}.activity-card-copy small{font-size:11px}.progress-summary{gap:14px}.quick-action{min-height:96px;padding:14px}.quick-action strong{font-size:13px}.choice-grid{grid-template-columns:1fr}.choice-card{padding:18px}.auth-panel{margin-top:14px}.auth-panel .section-heading h1{font-size:30px}.form-grid{gap:13px}.filter-bar{grid-template-columns:1fr!important}.filter-bar>*{grid-column:auto!important}.complaint-row{grid-template-columns:42px minmax(0,1fr)!important}.complaint-row>.badge,.complaint-row>.complaint-message-count{grid-column:2!important}.table-panel{padding:0!important}.table-wrap{overflow:visible}table.responsive-cards,table.responsive-cards tbody,table.responsive-cards tr,table.responsive-cards td{display:block;width:100%}table.responsive-cards thead{display:none}table.responsive-cards{min-width:0}table.responsive-cards tr{padding:14px;border-bottom:1px solid var(--app-separator)}table.responsive-cards td{padding:5px 0;border:0!important}table.responsive-cards td:before{content:attr(data-label);display:block;margin-bottom:2px;color:var(--app-text-tertiary);font-size:10px;font-weight:700;text-transform:uppercase}.pre-mpls-steps{grid-template-columns:1fr!important}.day-grid{display:flex;overflow:auto;scroll-snap-type:x mandatory;padding-bottom:4px}.day-card{min-width:78%;scroll-snap-align:start}.hero{min-height:auto;border-radius:28px}.hero p{font-size:15px}.mobile-tabbar{height:66px;border-radius:21px}.mobile-tab{font-size:9px}.mobile-tab .ui-icon{width:21px;height:21px}.floating-safe-button span{display:none}.floating-safe-button{width:44px;padding:0;justify-content:center}.more-sheet{max-height:88vh}.sheet-menu-list{gap:0}.sheet-menu-item{padding:8px}.app-toast{font-size:13px}}
@media (max-width:360px){.stats-grid,.stats-grid.four,.stats-grid.five{grid-template-columns:1fr 1fr}.stat-card{padding:13px}.mobile-tab span{font-size:8px}.app-page-shell{width:calc(100% - 12px)}.panel{padding:16px}.quick-actions{grid-template-columns:1fr 1fr}.quick-action{padding:12px}}
@media (hover:none){.button:hover,.choice-card:hover,.activity-card:hover,.complaint-row:hover{transform:none}.desktop-nav-link:hover,.icon-button:hover,.profile-button:hover,.sheet-menu-item:hover,.preference-row:hover{background:transparent}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}

/* v0.7.1 — Keep theme and profile controls visible on phones */
@media (max-width:820px){
  .topbar-actions{gap:2px;flex:0 0 auto}
  .topbar-actions .theme-toggle,.topbar-actions .notification-link{width:40px;height:40px}
  .topbar-actions .profile-button{width:42px;height:42px;max-width:42px;padding:2px;border-radius:50%;justify-content:center}
  .topbar-actions .profile-button .user-chip-avatar{width:36px;height:36px;min-width:36px}
  .topbar-actions .profile-button-copy,.topbar-actions .profile-chevron{display:none}
}
@media (max-width:420px){
  .app-topbar{padding-left:7px;padding-right:5px}
  .topbar-actions{gap:0}
  .topbar-actions .theme-toggle,.topbar-actions .notification-link{width:38px;height:38px}
  .topbar-actions .profile-button{width:40px;height:40px;max-width:40px}
  .topbar-actions .profile-button .user-chip-avatar{width:34px;height:34px;min-width:34px}
}

/* v0.7.1 — Kelompok Saya and portfolio refinements on mobile */
@media (max-width:720px){
  .my-group-card{grid-template-columns:1fr;gap:13px;padding:17px;border-radius:21px}
  .my-group-main{grid-template-columns:52px minmax(0,1fr);gap:11px}
  .my-group-sigil{width:52px;height:52px;border-radius:16px;font-size:17px}
  .my-group-title-row{align-items:flex-start;gap:6px}.my-group-title-row h2{font-size:24px}.my-group-heading p{margin-top:5px;font-size:12px}
  .my-group-facts{grid-template-columns:1fr;gap:7px}.my-group-fact{padding:9px 10px}.my-group-action{width:100%;box-sizing:border-box}
  .portfolio-preview{min-height:180px;max-height:70vh}.portfolio-preview img{max-height:70vh!important}
  .portfolio-review-image,.profile-portfolio-card>a{min-height:180px;aspect-ratio:auto}.portfolio-review-image img,.profile-portfolio-card img{height:auto!important;max-height:70vh!important}
  .portfolio-gallery-image{aspect-ratio:auto;min-height:220px;max-height:75vh}.portfolio-gallery-image img{height:auto!important;max-height:75vh!important}
  .portfolio-artwork{max-height:75vh!important}
}
@media (max-width:360px){
  .my-group-main{grid-template-columns:46px minmax(0,1fr)}.my-group-sigil{width:46px;height:46px;border-radius:14px;font-size:15px}.my-group-title-row h2{font-size:21px}.my-group-title-row .badge{font-size:9px;padding:5px 7px}
}

/* v0.7.2 — theme stays in top bar; Akun + Lainnya stay side by side in mobile tab bar */
@media (max-width:820px){
  .app-topbar{
    display:flex!important;
    align-items:center!important;
  }
  .topbar-actions{
    display:flex!important;
    align-items:center!important;
    margin-left:auto!important;
    flex:0 0 auto!important;
    gap:4px!important;
  }
  .topbar-actions .topbar-theme-toggle{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    border:1px solid var(--app-separator)!important;
    background:var(--app-surface-secondary)!important;
    color:var(--app-text)!important;
    z-index:2;
  }
  .topbar-actions .topbar-theme-toggle .ui-icon{
    width:20px!important;
    height:20px!important;
  }
  /* Profile is now a permanent bottom-bar item on phones. */
  .topbar-actions .profile-button{
    display:none!important;
  }
  .topbar-actions .notification-link{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
  }
  .mobile-tabbar{
    grid-template-columns:repeat(var(--mobile-tab-count,6),minmax(0,1fr))!important;
    column-gap:1px;
  }
  .mobile-tab{
    min-width:0!important;
    padding:3px 1px!important;
    overflow:hidden;
  }
  .mobile-tab>span{
    display:block;
    width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    text-align:center;
  }
  .mobile-more-tab .ui-icon{
    width:22px;
    height:22px;
  }
}
@media (max-width:600px){
  .mobile-tabbar{
    width:calc(100% - 12px)!important;
    padding:5px 3px!important;
  }
  .mobile-tab{
    font-size:8.5px!important;
    gap:2px!important;
    border-radius:14px!important;
  }
  .mobile-tab .ui-icon{
    width:20px!important;
    height:20px!important;
  }
}
@media (max-width:360px){
  .topbar-actions .topbar-theme-toggle,
  .topbar-actions .notification-link{
    width:37px!important;
    height:37px!important;
    min-width:37px!important;
  }
  .mobile-tab{
    font-size:7.5px!important;
  }
  .mobile-tab .ui-icon{
    width:19px!important;
    height:19px!important;
  }
}
