/* Existing full-page layout and contrast fixes, using shared theme tokens. */
html.flozo-interface body{background:var(--color-background);color:var(--color-text);color-scheme:inherit}
html.flozo-interface .theme-preview.theme-premium{background:var(--color-background)}
html.flozo-interface .theme-preview.theme-premium i{background:var(--color-surface-soft)}
html.flozo-interface .theme-preview.theme-premium b{background:var(--color-primary)}
html.flozo-interface .theme-preview.theme-premium em{background:var(--color-warm)}

/* App chrome */
html.flozo-interface .v24-sidebar,
html.flozo-interface .sidebar{background:var(--color-sidebar)!important;border-color:var(--color-border)!important}
html.flozo-interface .cp7-topbar,
html.flozo-interface .v24-topbar,
html.flozo-interface .topbar{background:var(--color-background)!important;border-color:var(--color-border)!important;box-shadow:0 10px 28px rgb(0 0 0 / 3%)!important}

html.flozo-interface .workspace-label{color:var(--color-primary)!important}
html.flozo-interface .nav-link{color:var(--color-secondary)!important}
html.flozo-interface .nav-link:hover{background:var(--color-surface-soft)!important;color:var(--color-text)!important}
html.flozo-interface .nav-link.active{background:var(--color-border)!important;color:var(--color-text)!important;box-shadow:inset 3px 0 0 var(--color-primary)!important}
html.flozo-interface .nav-link.active svg{color:var(--color-secondary)!important}
html.flozo-interface .nav-count{background:var(--color-surface-strong)!important;color:var(--color-text)!important}
html.flozo-interface .profile{border-color:var(--color-border)!important}
html.flozo-interface .avatar{background:var(--color-text)!important;color:var(--color-surface-strong)!important}
html.flozo-interface .online-dot{background:var(--color-success)!important}
html.flozo-interface .sidebar-ask{background:linear-gradient(135deg,var(--color-surface-strong),var(--color-surface-strong))!important;border-color:var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .sidebar-ask>svg{color:var(--color-warm)!important}
html.flozo-interface .sidebar-ask small{color:var(--color-secondary)!important}
html.flozo-interface .search-trigger,
html.flozo-interface .quick-top,
html.flozo-interface .focus-chip{background:var(--color-surface-soft)!important;border-color:var(--color-border)!important;color:var(--color-secondary)!important}
html.flozo-interface .key{background:var(--color-surface-strong)!important;border-color:var(--color-border)!important;color:var(--color-secondary)!important}
html.flozo-interface .icon-btn{color:var(--color-secondary)!important}
html.flozo-interface .icon-btn:hover{background:var(--color-surface-strong)!important;color:var(--color-text)!important}
html.flozo-interface .sync-chip{background:var(--color-surface-strong)!important;color:var(--color-secondary)!important;border:1px solid var(--color-border)}

/* Core surfaces + forms */
html.flozo-interface .card,
html.flozo-interface .desk-panel,
html.flozo-interface .cp6-panel,
html.flozo-interface .settings-section,
html.flozo-interface .settings-nav,
html.flozo-interface .workspace-cockpit,
html.flozo-interface .capacity-strip,
html.flozo-interface .flow-overview,
html.flozo-interface .triage-strip{background:var(--color-surface)!important;border-color:var(--color-border)!important;box-shadow:0 14px 38px rgb(0 0 0 / 3%)!important}
html.flozo-interface .card h1,
html.flozo-interface .card h2,
html.flozo-interface .card h3,
html.flozo-interface .cp6-panel h2,
html.flozo-interface .settings-section h3{color:var(--color-text)!important}
html.flozo-interface .page-heading h1{color:var(--color-text)!important}
html.flozo-interface .page-heading p,
html.flozo-interface .muted,
html.flozo-interface .small.muted{color:var(--color-secondary)!important}
html.flozo-interface .eyebrow,
html.flozo-interface .desk-kicker{color:var(--color-primary)!important}
html.flozo-interface input,
html.flozo-interface textarea,
html.flozo-interface select,
html.flozo-interface .search-field,
html.flozo-interface .select-sm{background:var(--color-surface)!important;border-color:var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface input::placeholder,
html.flozo-interface textarea::placeholder{color:var(--color-primary)!important}
html.flozo-interface .btn{background:var(--color-surface-soft)!important;border-color:var(--color-border)!important;color:var(--color-text)!important;box-shadow:none!important}
html.flozo-interface .btn:hover{background:var(--color-surface-strong)!important}
html.flozo-interface .btn.primary{background:var(--color-warm)!important;color:var(--color-surface)!important;border-color:var(--color-warm)!important;font-weight:650}
html.flozo-interface .btn.primary:hover{background:var(--color-warm)!important}
html.flozo-interface .btn.soft{background:var(--color-surface-strong)!important;color:var(--color-secondary)!important;border-color:var(--color-border)!important}
html.flozo-interface .btn.link{background:transparent!important;border:0!important;color:var(--color-primary)!important}
html.flozo-interface .btn.danger{background:var(--color-surface-soft)!important;border-color:var(--color-danger-soft)!important;color:var(--color-danger)!important}
html.flozo-interface .badge{background:var(--color-surface-strong)!important;color:var(--color-secondary)!important;border-color:var(--color-border)!important}
html.flozo-interface .badge.outline{background:var(--color-surface-soft)!important;color:var(--color-secondary)!important}
html.flozo-interface .badge.green{background:var(--color-success-soft)!important;color:var(--color-success)!important}
html.flozo-interface .badge.orange{background:var(--color-danger-soft)!important;color:var(--color-danger)!important}
html.flozo-interface .badge.red{background:var(--color-surface-soft)!important;color:var(--color-danger)!important}
html.flozo-interface .badge.blue{background:var(--color-surface-strong)!important;color:var(--color-primary)!important}

/* Premium hero: calm navy/charcoal, no neon green. */
html.flozo-interface .rc2-hero,
html.flozo-interface .desk-hero,
html.flozo-interface .cp5-glance-hero{background:
  radial-gradient(circle at 88% 12%,var(--color-primary-soft),transparent 31%),
  radial-gradient(circle at 18% 105%,var(--color-warm-soft),transparent 28%),
  linear-gradient(138deg,var(--color-surface-soft) 0%,var(--color-surface-strong) 56%,var(--color-surface-soft) 100%)!important;
  color:var(--color-text)!important;border:1px solid var(--color-border)!important;box-shadow:0 24px 60px rgb(0 0 0 / 3%)!important}
html.flozo-interface .rc2-hero:before{opacity:.22!important}
html.flozo-interface .rc2-hero h1,
html.flozo-interface .cp5-glance-hero h1{color:var(--color-text)!important}
html.flozo-interface .rc2-hero .rc1-hero-main>p,
html.flozo-interface .cp5-glance-hero p{color:var(--color-secondary)!important}
html.flozo-interface .rc2-hero .rc1-hero-actions button:not(.primary),
html.flozo-interface .cp5-glance-actions button{background:var(--color-surface-strong)!important;border-color:var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .rc2-hero .rc1-hero-actions .primary,
html.flozo-interface .cp5-glance-actions button:first-child{background:var(--color-text)!important;color:var(--color-surface-soft)!important;border-color:var(--color-text)!important}
html.flozo-interface .rc1-nudge-item,
html.flozo-interface .rc2-hero-side>*{background:var(--color-surface-soft)!important;border-color:var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .rc1-nudge-item p,
html.flozo-interface .rc2-hero-side p{color:var(--color-secondary)!important}
html.flozo-interface .fc-desk-signal{background:var(--color-surface)!important;border:1px solid var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .fc-desk-signal small{color:var(--color-primary)!important}
html.flozo-interface .fc-desk-signal strong{color:var(--color-text)!important}
html.flozo-interface .fc-desk-signal em{color:var(--color-secondary)!important}
html.flozo-interface .rc2-status-strip{border-color:var(--color-border)!important;background:var(--color-surface)!important}
html.flozo-interface .rc2-status-strip button{color:var(--color-text)!important;border-color:var(--color-border)!important}

/* Home widgets / empty states */
html.flozo-interface .cp6-empty-inline,
html.flozo-interface .cp6-flow-row,
html.flozo-interface .cp6-subrow,
html.flozo-interface .cp6-note-row,
html.flozo-interface .cp6-quick-tile,
html.flozo-interface .cp6-personal-metrics>div,
html.flozo-interface .rc1-personal-metrics>div,
html.flozo-interface .cp6-surface-stat,
html.flozo-interface .rc1-calm-state{background:var(--color-surface-soft)!important;border-color:var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .cp6-empty-inline strong,
html.flozo-interface .cp6-flow-row strong,
html.flozo-interface .cp6-subrow strong,
html.flozo-interface .cp6-note-row strong,
html.flozo-interface .cp6-quick-tile strong{color:var(--color-text)!important}
html.flozo-interface .cp6-empty-inline p,
html.flozo-interface .cp6-flow-row small,
html.flozo-interface .cp6-subrow small,
html.flozo-interface .cp6-note-row small,
html.flozo-interface .cp6-quick-tile small{color:var(--color-secondary)!important}
html.flozo-interface .cp6-empty-inline>span,
html.flozo-interface .cp6-quick-tile>span,
html.flozo-interface .cp6-surface-icon{background:var(--color-border)!important;color:var(--color-primary)!important}
html.flozo-interface .cp6-personal-tone{background:linear-gradient(125deg,var(--color-surface-soft),var(--color-surface-soft))!important;border-color:var(--color-danger-soft)!important}
html.flozo-interface .cp6-personal-tone>span{background:var(--color-warm-soft)!important;color:var(--color-danger)!important}
html.flozo-interface .cp6-personal-tone p{color:var(--color-secondary)!important}
html.flozo-interface .cp5-glance-spotify,
html.flozo-interface .spotify-card{background:linear-gradient(135deg,var(--color-surface),var(--color-surface-soft))!important;border-color:var(--color-border)!important;color:var(--color-text)!important}

/* Personal space: warmer dark taupe instead of mint/green. */
html.flozo-interface .cp5-personal-deck{background:
  radial-gradient(circle at 90% 5%,var(--color-warm-soft),transparent 27%),
  linear-gradient(135deg,var(--color-surface-soft),var(--color-surface-soft) 68%,var(--color-warm-soft))!important;
  color:var(--color-text)!important;border:1px solid var(--color-border)!important;box-shadow:0 20px 50px rgb(0 0 0 / 3%)!important}
html.flozo-interface .cp5-personal-main .desk-kicker{color:var(--color-warm)!important}
html.flozo-interface .cp5-personal-main p{color:var(--color-secondary)!important}
html.flozo-interface .cp5-personal-actions .btn:not(.primary){background:var(--color-surface-strong)!important;border-color:var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .cp5-personal-actions .btn.primary{background:var(--color-text)!important;color:var(--color-surface)!important}
html.flozo-interface .cp5-personal-cards article{background:var(--color-surface-soft)!important;border-color:var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .cp5-personal-cards small,
html.flozo-interface .cp5-personal-cards em{color:var(--color-muted)!important}
html.flozo-interface .cp5-personal-footer{background:var(--color-surface-soft)!important;border-color:var(--color-border)!important;color:var(--color-secondary)!important}
html.flozo-interface .rc2-life-board{background:linear-gradient(142deg,var(--color-surface-soft),var(--color-surface-soft) 58%,var(--color-warm-soft))!important;color:var(--color-text)!important;border-color:var(--color-border)!important;box-shadow:0 18px 45px rgb(0 0 0 / 3%)!important}
html.flozo-interface .rc2-life-board .rc1-life-columns{background:var(--color-surface-strong)!important}
html.flozo-interface .rc2-life-board .rc1-life-columns>article{background:var(--color-surface-soft)!important}
html.flozo-interface .rc2-life-board .rc1-life-list>button{background:var(--color-surface-soft)!important;border-color:var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .rc2-life-board .rc1-life-list small,
html.flozo-interface .rc2-life-board .rc1-life-list em{color:var(--color-secondary)!important}
html.flozo-interface .personal-snapshot{background:linear-gradient(135deg,var(--color-surface-soft),var(--color-surface-soft))!important;border-color:var(--color-border)!important}
html.flozo-interface .snapshot-head{background:var(--color-surface-soft)!important}
html.flozo-interface .snapshot-grid{background:var(--color-border)!important;border-color:var(--color-border)!important}
html.flozo-interface .snapshot-grid>div,
html.flozo-interface .snapshot-context>div{background:var(--color-surface-soft)!important;color:var(--color-text)!important}
html.flozo-interface .snapshot-grid span,
html.flozo-interface .snapshot-grid small,
html.flozo-interface .snapshot-context small{color:var(--color-muted)!important}
html.flozo-interface .snapshot-grid strong,
html.flozo-interface .snapshot-context strong{color:var(--color-text)!important}
html.flozo-interface .personal-hero{background:linear-gradient(135deg,var(--color-surface-soft),var(--color-surface-soft))!important;border:1px solid var(--color-border)!important}
html.flozo-interface .personal-hero blockquote{color:var(--color-secondary)!important;border-color:var(--color-danger)!important}

/* Filters, tasks and boards: never pale-on-pale. */
html.flozo-interface .filters{background:var(--color-surface-soft)!important;border:1px solid var(--color-border)!important}
html.flozo-interface .filter{color:var(--color-secondary)!important}
html.flozo-interface .filter.active{background:var(--color-text)!important;color:var(--color-surface-strong)!important;border-color:var(--color-text)!important;box-shadow:none!important}
html.flozo-interface .flow-overview button,
html.flozo-interface .triage-strip>div{background:var(--color-surface-soft)!important;color:var(--color-text)!important;border-color:var(--color-border)!important}
html.flozo-interface .flow-icon,
html.flozo-interface .triage-icon{background:var(--color-border)!important;color:var(--color-primary)!important}
html.flozo-interface .flow-icon.waiting{background:var(--color-danger-soft)!important;color:var(--color-danger)!important}
html.flozo-interface .flow-icon.later{background:var(--color-surface-strong)!important;color:var(--color-primary)!important}
html.flozo-interface .flow-icon.done{background:var(--color-success-soft)!important;color:var(--color-success)!important}
html.flozo-interface .task-row{border-color:var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .task-row:hover{background:var(--color-surface-soft)!important}
html.flozo-interface .task-row p,
html.flozo-interface .task-row .due{color:var(--color-secondary)!important}
html.flozo-interface .empty{color:var(--color-secondary)!important;background:transparent!important}
html.flozo-interface .empty h3{color:var(--color-text)!important}
html.flozo-interface .empty>.icon{color:var(--color-primary)!important}

/* Content Studio: wrap on iPad; no pale columns. */
html.flozo-interface .board-col{background:var(--color-surface-soft)!important;border:1px solid var(--color-border)!important;color:var(--color-text)!important}
html.flozo-interface .board-col-head{color:var(--color-secondary)!important}
html.flozo-interface .board-col-head small{background:var(--color-surface-strong)!important;color:var(--color-secondary)!important}
html.flozo-interface .post-card{background:var(--color-surface-strong)!important;border-color:var(--color-border)!important;box-shadow:none!important;color:var(--color-text)!important}
html.flozo-interface .post-card:hover{border-color:var(--color-primary)!important}
html.flozo-interface .post-card small{color:var(--color-secondary)!important}
html.flozo-interface .post-card .post-foot{border-color:var(--color-border)!important}
html.flozo-interface .post-card select{background:var(--color-surface)!important;color:var(--color-text)!important}
html.flozo-interface .post-add{color:var(--color-primary)!important}
html.flozo-interface .idea-card{background:var(--color-surface-soft)!important;border-color:var(--color-border)!important}
html.flozo-interface .idea-card p{color:var(--color-secondary)!important}
html.flozo-interface th{background:var(--color-surface-soft)!important;color:var(--color-secondary)!important}
html.flozo-interface td{border-color:var(--color-border)!important}
html.flozo-interface .bar-row .bar{background:var(--color-surface-strong)!important}
html.flozo-interface .bar-row .bar span{background:var(--color-primary)!important}

/* Modals / toasts / Spotlight */
html.flozo-interface .modal{background:var(--color-surface)!important;border-color:var(--color-border)!important;color:var(--color-text)!important;box-shadow:0 28px 90px var(--overlay)!important}
html.flozo-interface .modal-head,
html.flozo-interface .modal-footer{border-color:var(--color-border)!important;background:var(--color-surface)!important}
html.flozo-interface .modal-head p{color:var(--color-secondary)!important}
html.flozo-interface .modal-body pre.report{background:var(--color-surface-soft)!important;border-color:var(--color-border)!important;color:var(--color-secondary)!important}
html.flozo-interface .search-result:hover{background:var(--color-surface-strong)!important}
html.flozo-interface .toast{background:var(--color-surface-strong)!important;color:var(--color-text)!important;border:1px solid var(--color-border)!important}
html.flozo-interface .toast.error{background:var(--color-danger-soft)!important;border-color:var(--color-danger-soft)!important}

/* Strict width safety. Fixes the cropped right-hand content seen on real iPad. */
html,body,#app{max-width:100%;overflow-x:hidden}
.main-shell,.v24-main,.main-content,.fix3-home,.fix3-desk-grid,.fix3-desk-left,.fix3-desk-right,
.personal-layout,.personal-snapshot,.snapshot-grid,.snapshot-context,.rc1-life-board,.rc1-life-columns,
.toolbar,.filters,.board,.ideas-grid,.capacity-strip,.flow-overview,.settings-shell{min-width:0;max-width:100%}
.main-content>*{min-width:0}
.snapshot-grid>div,.snapshot-context>div,.rc1-life-columns>article,.board-col,.post-card{min-width:0}

/* iPad landscape is the reference layout. */
@media (min-width:900px) and (max-width:1366px) and (orientation:landscape){
  .cp7-topbar,.v24-topbar{height:calc(66px + env(safe-area-inset-top))!important;min-height:calc(66px + env(safe-area-inset-top))!important;padding-top:env(safe-area-inset-top)!important}
  .v24-main{padding-top:18px!important;padding-left:20px!important;padding-right:20px!important}
  .main-content{padding-left:0!important;padding-right:0!important;max-width:100%!important}
  .page-heading{margin-bottom:20px!important}
  .page-heading h1{font-size:34px!important;line-height:1.08!important}
  .page-heading p{font-size:12px!important;line-height:1.6!important;max-width:760px}
  .toolbar{gap:10px!important}
  .filters{flex-wrap:wrap!important;max-width:100%!important}
  .filter{font-size:10.5px!important;padding:8px 10px!important}
  .board{grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:visible!important;gap:12px!important;padding-bottom:6px!important}
  .board-col{min-height:240px!important}
  .ideas-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .personal-layout{grid-template-columns:minmax(0,1.55fr) minmax(250px,.76fr)!important;gap:14px!important}
  .snapshot-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .snapshot-context{grid-template-columns:1fr 1.25fr 1fr!important}
  .snapshot-grid>div{padding:14px 15px!important}
  .snapshot-grid strong{font-size:21px!important}
  .rc1-life-columns{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .rc1-life-columns>article{padding:15px!important}
  .capacity-strip{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important}
  .flow-overview{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .flow-overview button{min-width:0!important;padding:10px!important}
  .flow-overview strong{font-size:15px!important}
  .fix3-desk-grid{grid-template-columns:minmax(0,1.58fr) minmax(300px,.92fr)!important;gap:14px!important}
  .fix3-desk-left,.fix3-desk-right{gap:14px!important}
  .fix3-widget .cp6-panel{padding:15px!important}
}

@media (min-width:900px) and (max-width:1100px) and (orientation:landscape){
  .board{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .snapshot-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .snapshot-context{grid-template-columns:1fr 1fr!important}
  .snapshot-context>div:last-child{grid-column:1/-1}
  .rc1-life-columns{grid-template-columns:1fr!important}
  .personal-layout{grid-template-columns:1fr!important}
  .personal-layout>aside{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}
}

@media (max-width:820px){
  html.flozo-interface .cp5-glance-home{background:var(--color-background)!important}
  html.flozo-interface .cp5-glance-next,
  html.flozo-interface .cp5-glance-personal,
  html.flozo-interface .cp5-quick-deck{background:var(--color-surface)!important;border-color:var(--color-border)!important}
}

/* FIX4 final color cleanup: remove residual olive/green hard-coded form accents. */
html.flozo-interface .field label,
html.flozo-interface .label,
html.flozo-interface .check-label{color:var(--color-warm)!important}
html.flozo-interface .field .help{color:var(--color-muted)!important}
html.flozo-interface .field input:focus,
html.flozo-interface .field select:focus,
html.flozo-interface .field textarea:focus{border-color:var(--color-primary)!important;box-shadow:0 0 0 3px var(--color-primary-soft)!important}
html.flozo-interface .check-label input{accent-color:var(--color-primary)!important}
html.flozo-interface .sidebar-ask{background:linear-gradient(135deg,var(--color-surface-strong),var(--color-surface-strong))!important;border-color:var(--color-border)!important}
html.flozo-interface .sidebar-ask>svg{color:var(--color-warm)!important}
html.flozo-interface .settings-nav button.active{background:var(--color-border)!important;color:var(--color-warm)!important}
html.flozo-interface .settings-icon{background:var(--color-surface-strong)!important;color:var(--color-warm)!important}
html.flozo-interface .theme-card.selected,
html.flozo-interface .theme-card:has(input:checked){border-color:var(--color-warm)!important;box-shadow:0 0 0 1px var(--color-warm)!important}
