/* Phase 6 — calm dashboard layer (loaded after theme). Apple/Google-style: quiet surfaces, clear hierarchy, generous space. */
html,body{max-width:100%;overflow-x:hidden}
body{min-height:100dvh;-webkit-text-size-adjust:100%;text-rendering:optimizeLegibility}
.fo-act-hidden{display:none!important}
.page-body{--fo-gap:1.25rem}
.page-header .page-title{font-weight:800;letter-spacing:-.015em}
.page-pretitle{letter-spacing:.06em}
.card{border-radius:16px;border-color:var(--ui-line);box-shadow:0 1px 2px rgba(16,24,40,.04)}
.card-header{border-bottom-color:var(--ui-line);background:transparent}
.card-title{font-weight:700;letter-spacing:-.005em}
.card-footer{background:transparent}
.btn{border-radius:10px}
.btn:active{transform:scale(.98)}
.badge{font-weight:600;border-radius:999px}
.form-control,.form-select{border-radius:10px}
.modal-content{border-radius:18px;border:0}
.table>:not(caption)>*>*{padding-top:.75rem;padding-bottom:.75rem}
.table thead th{font-size:.72rem;letter-spacing:.06em;color:var(--ui-muted);font-weight:700}
.empty{padding:3rem 1rem}
.empty .empty-title{font-weight:700}
:focus-visible{outline:2px solid #00AEEF;outline-offset:2px}
@media (max-width:767.98px){
  .page-body{margin-top:.75rem}
  .container-xl{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
  .row-cards{--tblr-gutter-y:.75rem}
  .card-body{padding:1rem}
  .table-responsive.fo-rtable-wrap{overflow:visible;border:0}
  .card .table-responsive.fo-rtable-wrap{margin:0}
  .fo-rtable td .btn-list{justify-content:flex-end}
  .modal-dialog{margin:0}
  .modal.show .modal-dialog:not(.modal-dialog-centered){min-height:100dvh}
  input,select,textarea{font-size:16px!important} /* prevent iOS zoom */
}
@media (prefers-reduced-motion:reduce){.btn:active{transform:none}}
.fo-hdr-kebab{display:none}
@media (max-width:767.98px){.fo-hdr-extra{display:none!important}.fo-hdr-kebab{display:inline-grid}.page-title .btn-list[data-fo-act]{flex-wrap:nowrap;padding-right:env(safe-area-inset-right);padding-left:env(safe-area-inset-left)}.page-title .btn-list[data-fo-act]>.btn{flex:1 1 0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:44px}.page-title .btn-list[data-fo-act]>.btn .ti{flex:none}}
.fo-lib__rm{display:inline-flex;align-items:center;gap:.25rem}
/* badge contrast: solid badges always get white text */
.badge[class*=" bg-"]:not([class*="-lt"]):not(.bg-light):not(.bg-white):not(.bg-yellow),.badge[class^="bg-"]:not([class*="-lt"]){color:#fff!important}
.badge.bg-yellow{color:#1d1d1f!important}
.btn-group[data-fo-act="1"]{align-items:center}

/* ── Phase 8: calm group cards, chips, filter bar, reader mobile ── */
.fo-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;font-size:.72rem;font-weight:600;background:var(--ui-surface-2);color:var(--ui-muted);line-height:1.6}
.fo-chip .ti{font-size:12px}
.fo-chip.is-ok{background:rgba(47,179,68,.12);color:#2fb344}
.fo-chip.is-warn{background:rgba(247,103,7,.12);color:#d9480f}
.fo-btn-soft{background:var(--ui-surface-2);border:1px solid var(--ui-line);color:var(--ui-text);font-weight:600;border-radius:10px}
.fo-btn-soft:hover{background:var(--ui-line)}
.fo-kebab--sm{width:36px;height:36px}
.fo-gcard{border-radius:16px;border:1px solid var(--ui-line);padding:14px 14px 12px;gap:12px;display:flex;flex-direction:column}
.fo-gcard__head{display:flex;align-items:center;gap:8px;min-width:0}
.fo-gcard__title{flex:1;min-width:0;text-align:left;background:none;border:0;padding:0;font-weight:700;font-size:1.02rem;color:var(--ui-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-pill{flex-shrink:0;font-size:.72rem;font-weight:600;padding:3px 9px;border-radius:999px;background:var(--ui-surface-2);color:var(--ui-muted)}
.fo-pill.is-on{background:rgba(47,179,68,.12);color:#2fb344}.fo-pill.is-run{background:rgba(0,174,239,.12);color:#0096ce}
.fo-pill.is-err{background:rgba(214,57,57,.12);color:#d63939}.fo-pill.is-off{color:var(--ui-muted)}
.fo-gcard__stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;cursor:pointer}
.fo-gcard__stats>div{background:var(--ui-surface-2);border-radius:12px;padding:10px 8px;text-align:center}
.fo-gcard__stats b{display:block;font-size:1.15rem;font-weight:700;color:var(--ui-text);font-variant-numeric:tabular-nums}
.fo-gcard__stats span{font-size:.72rem;color:var(--ui-muted)}
.fo-gcard__foot{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fo-gcard__sched{font-size:.8rem;color:var(--ui-muted);display:flex;align-items:center;gap:6px;min-width:0}
.fo-gcard__sched .ti{font-size:15px;flex-shrink:0}
.fo-gcard__run{flex-shrink:0;min-height:36px;border-radius:10px;background:rgba(0,174,239,.1);color:#0096ce;border:0;font-weight:600;gap:4px;display:inline-flex;align-items:center}
.fo-gcard__run:hover{background:rgba(0,174,239,.18);color:#0096ce}
.feed-card-item.no-img{grid-template-columns:1fr!important}
.fo-sheet--form{max-height:85dvh;display:flex;flex-direction:column}
.fo-sheet__body{overflow:auto;padding:0 4px}
.fo-sheet__body .card-body{padding:4px 12px}
.fo-sheet__body .fo-filter-actions,.fo-sheet__body [class*="fo-filter-field--actions"]{display:none!important}
.fo-sheet__actions{display:flex;gap:10px;padding:12px 12px 4px}
.fo-sheet__actions .btn{flex:1;min-height:44px;border-radius:12px}
@media (max-width:767.98px){
  .fo-fcard-collapsed{display:none!important}
  .fo-fbar{display:flex;gap:8px;align-items:center;margin:0 0 12px}
  .fo-fbar__search{flex:1;min-width:0}
  .fo-fbar__search input{min-height:44px;border-radius:12px}
  .fo-fbar__btn{flex-shrink:0;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border-radius:12px;border:1px solid var(--ui-line);background:var(--ui-surface);color:var(--ui-text);font-weight:600}
  .fo-fbar__btn b{min-width:20px;height:20px;border-radius:10px;background:#00AEEF;color:#fff;font-size:.72rem;display:inline-flex;align-items:center;justify-content:center;padding:0 6px}
  .page-header{margin-top:.25rem!important;padding-top:.25rem!important;margin-bottom:.5rem!important}
  .page-body{margin-top:.5rem!important}
  /* Reader: natural page scroll, no dead space above the tab bar */
  .reader-page .reader-wrapper{height:auto!important;min-height:0!important;overflow:visible!important;border-bottom:0}
  .reader-page .reader-list{width:100%!important;height:auto!important;overflow:visible!important}
  .reader-page .stream-items{overflow:visible!important;padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .reader-list .list-header h3{font-size:1.05rem;margin:0;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .feed-card-item .card-item-actions{display:flex;align-items:center;gap:6px}
  .fo-gcard__run{min-height:44px}
  .fo-kebab{min-width:44px;min-height:44px}
}
@media (max-width:767.98px){
  .page-body .btn:not(.btn-sm):not(.btn-icon),.page-body .form-control,.page-body .form-select{min-height:44px}
  .page-body .btn-sm{min-height:36px}
  .page-body .form-check-input{width:1.25rem;height:1.25rem}
  .page-body .form-switch .form-check-input{width:2.4rem}
  .card-title{font-size:1rem}
  .subheader{letter-spacing:.02em;text-transform:none;font-size:.78rem}
}
.fo-sheet__body .fo-sheet-hide{display:none!important}

/* notifications bell + panel */
.fo-bell{position:relative;display:inline-grid;place-items:center;width:40px;height:40px;border:0;border-radius:12px;background:transparent;color:var(--tblr-body-color);font-size:1.3rem;cursor:pointer}
.fo-bell:hover,.fo-bell:focus-visible{background:var(--tblr-bg-surface-secondary,rgba(0,0,0,.05))}
.fo-bell__n{position:absolute;top:3px;right:2px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#F1592A;color:#fff;font-size:.68rem;font-weight:700;line-height:18px;text-align:center}
.fo-bell--page{display:none}
@media (max-width:767.98px){
  .page-header.fo-has-bell{position:relative;padding-right:calc(48px + env(safe-area-inset-right))}
  .fo-bell--page{display:inline-grid;position:absolute;top:max(2px,env(safe-area-inset-top,0px));right:max(4px,env(safe-area-inset-right));width:44px;height:44px;z-index:5}
}
.fo-notif-layer--pop{position:fixed;inset:0;z-index:2050}
.fo-notif-layer--pop .fo-notif{position:fixed;width:min(380px,calc(100vw - 16px));max-height:min(70vh,560px);background:var(--tblr-bg-surface);border:1px solid var(--tblr-border-color);border-radius:16px;box-shadow:0 18px 48px rgba(0,0,0,.18);display:flex;flex-direction:column;overflow:hidden}
.fo-sheet.fo-notif{display:flex;flex-direction:column;max-height:calc(100dvh - 48px - env(safe-area-inset-top));padding-bottom:env(safe-area-inset-bottom)}
.fo-notif__head{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--tblr-border-color)}
.fo-notif__head b{flex:1;font-size:1rem}
.fo-notif__list{overflow-y:auto;overscroll-behavior:contain;flex:1 1 auto;min-height:120px}
.fo-notif__item{display:flex;gap:12px;width:100%;text-align:left;border:0;background:transparent;padding:12px 14px;border-bottom:1px solid var(--tblr-border-color-translucent,rgba(0,0,0,.06));color:inherit;min-height:44px}
.fo-notif__item>.ti{font-size:1.25rem;color:#00AEEF;flex:none;margin-top:2px}
.fo-notif__item.is-new{background:color-mix(in srgb,#00AEEF 8%,transparent)}
.fo-notif__item.is-new .fo-notif__t::after{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:#F1592A;margin-left:6px;vertical-align:middle}
.fo-notif__t{display:block;font-weight:600}
.fo-notif__m{display:block;color:var(--tblr-secondary);font-size:.85rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fo-notif__d{display:block;color:var(--tblr-secondary);font-size:.75rem;margin-top:2px}
.fo-notif__foot{padding:10px 14px;border-top:1px solid var(--tblr-border-color);display:grid;gap:4px}
