/* Zeez Personal Manager V5 — Mobile-first additions only. 
   Load after Axelit, zeez-personal, weekly habits and dark mode CSS. */
:root{color-scheme:light}
html[data-zeez-theme="dark"]{color-scheme:dark}
html{max-width:100%;overflow-x:hidden}
body{max-width:100%;overflow-x:hidden}
.zeez-menu-button{appearance:none;border:1px solid var(--zp-border);background:var(--zp-card);color:var(--zp-text);border-radius:11px;min-width:42px;min-height:42px;display:none;align-items:center;justify-content:center;cursor:pointer;line-height:1}
.zeez-menu-button i{font-size:22px}
.zeez-menu-close{display:none;border:1px solid var(--zp-border);background:var(--zp-card2);border-radius:11px;color:var(--zp-text);min-width:42px;min-height:42px;align-items:center;justify-content:center;cursor:pointer}
.zeez-nav-overlay{display:none;position:fixed;inset:0;z-index:1049;background:rgba(3,8,20,.72);border:0;cursor:pointer}
.zeez-nav-open .zeez-nav-overlay{display:block}
/* Fix contrast of weekly habit rows in BOTH themes. */
html[data-zeez-theme="dark"] .zeez-habit-grid tbody tr{background:var(--zp-card2)!important}
html[data-zeez-theme="dark"] .zeez-habit-grid tbody td,html[data-zeez-theme="dark"] .zeez-habit-grid tbody th{background:var(--zp-card2)!important;color:var(--zp-text)!important}
html[data-zeez-theme="dark"] .zeez-habit-grid tbody .zeez-rest-cell{background:#282545!important}
html[data-zeez-theme="dark"] .zeez-habit-grid thead .zeez-rest-head{background:#282545!important;color:#b9afff!important}
html[data-zeez-theme="dark"] .zeez-week-score,html[data-zeez-theme="dark"] .zeez-habit-grid .zeez-habit-name{color:var(--zp-text)!important}
html[data-zeez-theme="dark"] .zeez-habit-delete{color:#b5c3e3!important}
html[data-zeez-theme="light"] .zeez-habit-grid tbody td,html[data-zeez-theme="light"] .zeez-habit-grid tbody th{background:#f7f8fe}
html[data-zeez-theme="light"] .zeez-habit-grid tbody .zeez-rest-cell{background:#f1eaff}
html[data-zeez-theme="light"] .zeez-habit-grid tbody tr{background:#f7f8fe!important}
/* Keep header top artifact from Axelit out of view. */
header.header-main.zeez-header:before{display:none!important}
/* No fixed footer obscuring forms */
.zeez-footer{position:relative!important;bottom:auto!important;width:auto!important;background:var(--zp-bg)!important}
@media(max-width:991.98px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  .app-wrapper{display:block!important;overflow-x:clip!important;width:100%!important}
  .app-wrapper .app-content{padding-left:0!important;padding-top:64px!important;padding-bottom:0!important;width:100%!important;min-width:0!important;overflow:visible!important;box-shadow:none!important;transition:none!important}
  .app-wrapper nav.zeez-nav{position:fixed!important;left:0!important;right:auto!important;top:0!important;bottom:0!important;width:min(84vw,310px)!important;min-width:0!important;height:100dvh!important;z-index:1051!important;transform:translateX(-105%)!important;transition:transform .22s ease!important;visibility:visible!important;display:block!important;overflow-y:auto!important;box-shadow:12px 0 36px rgba(0,0,0,.24);border-radius:0!important}
  .app-wrapper.zeez-nav-open nav.zeez-nav{transform:translateX(0)!important}
  body.zeez-mobile-menu-active{overflow:hidden!important;touch-action:none}
  .zeez-menu-button{display:inline-flex!important;flex:0 0 auto}
  .zeez-menu-close{display:inline-flex!important;flex:0 0 auto;margin-left:auto}
  .zeez-nav .app-logo{display:flex!important;align-items:center!important;gap:8px;padding:16px 15px!important;min-height:70px!important}
  .zeez-nav .app-nav{width:100%!important;height:auto!important;overflow:visible!important;max-height:none!important}
  .zeez-sidebar-bottom{display:block!important;position:static!important;margin-top:25px;padding:13px 16px!important}
  .zeez-nav .main-nav .zeez-nav-item{min-height:48px!important;display:flex!important;align-items:center!important}
  header.header-main.zeez-header{position:fixed!important;top:0!important;right:0!important;left:0!important;padding-left:0!important;width:100%!important;height:64px!important;z-index:1040!important;box-shadow:0 4px 18px rgba(0,0,0,.14)!important}
  .zeez-header .container-fluid{height:100%!important;padding:0 14px!important}
  .zeez-header .row{height:100%!important;margin:0!important}
  .zeez-header .header-left,.zeez-header .header-right{display:flex!important;align-items:center!important;min-width:0!important}
  .zeez-header .header-left{width:45%!important;flex:0 0 45%!important}
  .zeez-header .header-right{width:55%!important;flex:0 0 55%!important}
  .zeez-header-label{display:inline!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px!important;letter-spacing:.3px!important}
  .zeez-content{padding:12px 10px 24px!important;max-width:100%!important}
  .zeez-content .row{max-width:100%!important}
  .zeez-page-intro{margin-bottom:8px!important}
  .zeez-page-intro h4{font-size:24px!important;line-height:1.25!important}
  .zeez-live-badge{display:none!important}
  .zeez-stat .card-body{padding:16px!important}
  .zeez-panel .card-header,.zeez-panel .card-body{padding:14px!important}
  .zeez-footer{padding:17px 12px!important;font-size:10px!important}
  .table-responsive,.zeez-table-area,.zeez-habit-grid-wrap{max-width:100%!important;-webkit-overflow-scrolling:touch!important;overflow-x:auto!important}
  .zeez-habit-grid{min-width:560px!important}
  .zeez-habit-grid tbody th:first-child,.zeez-habit-grid thead th:first-child{position:sticky!important;left:0!important;z-index:2;box-shadow:2px 0 8px rgba(0,0,0,.13)}
  .zeez-habit-grid thead th:first-child{background:var(--zp-card)!important;z-index:3}
  .zeez-panel .form-control,.zeez-panel .form-select{font-size:16px!important;min-height:44px!important}
  .zeez-panel .btn{min-height:40px}
}
@media(max-width:575.98px){
  .zeez-header .header-left{width:42%!important;flex:0 0 42%!important}
  .zeez-header .header-right{width:58%!important;flex:0 0 58%!important;gap:4px}
  .zeez-header-label{display:none!important}
  .zeez-date{display:none!important}
  .zeez-user-avatar{width:32px!important;height:32px!important;margin-left:3px!important}
  .zeez-theme-toggle{padding:8px!important;min-width:43px!important;min-height:43px!important;justify-content:center!important}
  .zeez-content{padding:12px 8px 26px!important}
  .zeez-page-intro h4{font-size:22px!important}
  .zeez-eyebrow{font-size:9px!important}
  .zeez-stat-row>div{width:100%!important;flex:0 0 100%!important}
  .zeez-stat{min-height:auto!important}
  .zeez-stat-number{margin:12px 0 0!important}
  .zeez-panel .card-header{flex-wrap:wrap!important;gap:10px!important}
  .zeez-list-item{display:flex;flex-wrap:wrap!important;gap:8px!important}
  .zeez-list-item>.flex-grow-1{flex:1 1 calc(100% - 60px)!important}
  .zeez-list-item>a.btn,.zeez-list-item>form:last-child{margin-top:4px}
  .zeez-panel .table td,.zeez-panel .table th{white-space:nowrap}
  .zeez-habit-grid-wrap{position:relative}
  .zeez-habit-grid{min-width:565px!important}
  .zeez-habit-grid tbody th{min-width:140px!important}
  .zeez-habit-grid thead th:first-child{min-width:140px!important}
  .zeez-week-header h5{font-size:15px!important}
  .zeez-week-arrows .btn{min-width:42px;min-height:42px;display:inline-flex;align-items:center;justify-content:center}
  .zeez-day-state{width:34px!important;height:34px!important}
  .zeez-footer .container-fluid{padding:0!important;display:block!important}
  .zeez-footer span{display:block;margin:3px 0}
}
@media(prefers-reduced-motion:reduce){.app-wrapper nav.zeez-nav{transition:none!important}}
