/* V19.1 — Cross-module visual polish. Color improves hierarchy without changing data or behavior. */
:root{
  --ui-violet:#7563e8;--ui-blue:#4f91e8;--ui-teal:#32b49a;--ui-green:#36b97e;
  --ui-amber:#e4a33a;--ui-orange:#ef8550;--ui-rose:#dc4f96;--ui-red:#db6472;
  --ui-ink:#262a37;--ui-soft:#f6f7fb;
}
.page:not(#strategy){--page-accent:var(--ui-violet);--page-soft:#f2efff;--page-soft-2:#faf9ff}
#overview{--page-accent:#7563e8;--page-soft:#f0edff;--page-soft-2:#faf9ff}
#company{--page-accent:#4f91e8;--page-soft:#edf6ff;--page-soft-2:#f8fbff}
#governance{--page-accent:#32b49a;--page-soft:#eaf9f5;--page-soft-2:#f7fcfa}
#legal{--page-accent:#dc4f96;--page-soft:#fff0f7;--page-soft-2:#fff9fc}
#finance{--page-accent:#36b97e;--page-soft:#ebf9f2;--page-soft-2:#f8fcfa}
#curriculum{--page-accent:#e4a33a;--page-soft:#fff7e7;--page-soft-2:#fffcf7}
#marketing{--page-accent:#ef8550;--page-soft:#fff1e9;--page-soft-2:#fffaf7}
#franchise{--page-accent:#5d67dc;--page-soft:#eef0ff;--page-soft-2:#fafaff}
#launch{--page-accent:#7563e8;--page-soft:#f0edff;--page-soft-2:#faf9ff}
#timeline{--page-accent:#ef8550;--page-soft:#fff1e9;--page-soft-2:#fffaf7}
#decisions{--page-accent:#dc4f96;--page-soft:#fff0f7;--page-soft-2:#fff9fc}
#documents{--page-accent:#5d67dc;--page-soft:#eef0ff;--page-soft-2:#fafaff}
#meetings{--page-accent:#36b97e;--page-soft:#ebf9f2;--page-soft-2:#f8fcfa}
#settings{--page-accent:#32b49a;--page-soft:#eaf9f5;--page-soft-2:#f7fcfa}
#operatingManual{--page-accent:#ef8550;--page-soft:#fff1e9;--page-soft-2:#fffaf7}

/* Page canvas and section identity */
.page:not(#strategy){background:linear-gradient(180deg,var(--page-soft-2) 0,#f7f8fb 220px);border-radius:18px;padding:16px}
.page:not(#strategy)>.section-title{position:relative;margin:-2px 0 16px;padding:16px 18px 16px 20px;border:1px solid color-mix(in srgb,var(--page-accent) 18%,#e4e7ee);border-radius:15px;background:linear-gradient(135deg,var(--page-soft),#fff 72%);overflow:hidden}
.page:not(#strategy)>.section-title:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--page-accent)}
.page:not(#strategy)>.section-title h2{color:var(--ui-ink)}
.page:not(#strategy)>.section-title p{color:#747b8b}

/* Shared panels */
.page:not(#strategy) .widget,.page:not(#strategy) .hq-panel,.page:not(#strategy) .marketing-panel{
  border-color:#e4e7ee;background:rgba(255,255,255,.96);box-shadow:0 5px 18px rgba(37,42,58,.045)
}
.page:not(#strategy) .widget:hover,.page:not(#strategy) .hq-panel:hover{border-color:color-mix(in srgb,var(--page-accent) 24%,#dfe3eb)}
.page:not(#strategy) .widget-head,.page:not(#strategy) .hq-panel-head{position:relative}
.page:not(#strategy) .widget-head:before,.page:not(#strategy) .hq-panel-head:before{content:"";position:absolute;left:0;top:2px;bottom:2px;width:3px;border-radius:99px;background:var(--page-accent)}
.page:not(#strategy) .widget-head>div:first-child,.page:not(#strategy) .hq-panel-head>div:first-child{padding-left:11px}
.page:not(#strategy) .score{background:var(--page-soft);color:var(--page-accent);border-color:color-mix(in srgb,var(--page-accent) 20%,#ddd)}

/* Summary cards gain varied semantic accents */
.page:not(#strategy) .module-summary-row>*,
#overview .home-shortcuts button,
#overview .overall-progress-card,
#timeline .timeline-summary>*{
  position:relative;overflow:hidden;background:#fff;border-color:#e1e5ed;box-shadow:0 5px 16px rgba(34,40,59,.045)
}
.page:not(#strategy) .module-summary-row>*:before,
#overview .home-shortcuts button:before,
#timeline .timeline-summary>*:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--page-accent)}
.page:not(#strategy) .module-summary-row>*:nth-child(2):before,#overview .home-shortcuts button:nth-child(2):before,#timeline .timeline-summary>*:nth-child(2):before{background:var(--ui-blue)}
.page:not(#strategy) .module-summary-row>*:nth-child(3):before,#overview .home-shortcuts button:nth-child(3):before,#timeline .timeline-summary>*:nth-child(3):before{background:var(--ui-rose)}
.page:not(#strategy) .module-summary-row>*:nth-child(4):before,#overview .home-shortcuts button:nth-child(4):before,#timeline .timeline-summary>*:nth-child(4):before{background:var(--ui-amber)}
.page:not(#strategy) .module-summary-row>*:nth-child(5):before,#timeline .timeline-summary>*:nth-child(5):before{background:var(--ui-green)}
.page:not(#strategy) .module-summary-row strong,#overview .home-shortcuts strong,#timeline .timeline-summary strong{color:var(--ui-ink)}

/* Lists and cards: light tint, clearer status */
.page:not(#strategy) .checklist>*,
.page:not(#strategy) .details-list>*,
.page:not(#strategy) .governance-list>*,
.page:not(#strategy) .crm-project-list>*{transition:.16s;border-color:#e3e7ee}
.page:not(#strategy) .checklist>*:hover,
.page:not(#strategy) .details-list>*:hover,
.page:not(#strategy) .governance-list>*:hover,
.page:not(#strategy) .crm-project-list>*:hover{background:var(--page-soft-2);border-color:color-mix(in srgb,var(--page-accent) 25%,#dfe3ea)}
.page:not(#strategy) .mini-btn{border-color:color-mix(in srgb,var(--page-accent) 24%,#dfe3ea);color:var(--page-accent);background:var(--page-soft-2)}
.page:not(#strategy) .mini-btn:hover{background:var(--page-soft)}

/* Tables */
#decisions table thead,#documents table thead{background:linear-gradient(90deg,var(--page-soft),#fbfcff)}
#decisions table th,#documents table th{color:#62697a}
#decisions tbody tr:hover,#documents tbody tr:hover{background:var(--page-soft-2)}

/* Governance */
#governance .partner-responsibility-section,#governance .governance-health,#governance .authority-matrix-wrap{border-color:#dcece7}
#governance .partner-responsibility-section{background:linear-gradient(145deg,#f4fcf9,#fff 58%)}
#governance .partner-responsibility-section h3{color:#225e52}

/* Legal lifecycle */
#legal .legal-overview>*:nth-child(1),#legal .legal-lifecycle-groups>*:nth-child(1){border-top:3px solid var(--ui-rose)}
#legal .legal-overview>*:nth-child(2),#legal .legal-lifecycle-groups>*:nth-child(2){border-top:3px solid var(--ui-violet)}
#legal .legal-overview>*:nth-child(3),#legal .legal-lifecycle-groups>*:nth-child(3){border-top:3px solid var(--ui-blue)}
#legal .legal-overview>*:nth-child(4),#legal .legal-lifecycle-groups>*:nth-child(4){border-top:3px solid var(--ui-green)}

/* Curriculum */
#curriculum .curriculum-grid>*{position:relative;background:linear-gradient(145deg,#fffdf8,#fff);border-color:#efe4cf}
#curriculum .curriculum-grid>*:nth-child(3n+1){border-top:3px solid var(--ui-amber)}
#curriculum .curriculum-grid>*:nth-child(3n+2){border-top:3px solid var(--ui-blue)}
#curriculum .curriculum-grid>*:nth-child(3n){border-top:3px solid var(--ui-green)}

/* Franchise and meetings command centres */
#franchise .hq-command-centre,#meetings .hq-command-centre{background:linear-gradient(145deg,var(--page-soft-2),#f7f8fb);border:1px solid color-mix(in srgb,var(--page-accent) 15%,#e2e6ed);border-radius:17px;padding:14px}
#franchise .hq-kpi-grid>*,#meetings .meeting-brief-metrics>*{background:#fff;box-shadow:0 5px 16px rgba(38,43,61,.045)}
#franchise .hq-kpi-grid>*:nth-child(4n+1),#meetings .meeting-brief-metrics>*:nth-child(4n+1){border-top:3px solid var(--ui-violet)}
#franchise .hq-kpi-grid>*:nth-child(4n+2),#meetings .meeting-brief-metrics>*:nth-child(4n+2){border-top:3px solid var(--ui-blue)}
#franchise .hq-kpi-grid>*:nth-child(4n+3),#meetings .meeting-brief-metrics>*:nth-child(4n+3){border-top:3px solid var(--ui-rose)}
#franchise .hq-kpi-grid>*:nth-child(4n),#meetings .meeting-brief-metrics>*:nth-child(4n){border-top:3px solid var(--ui-green)}

/* Timeline already has useful colors; make its controls and cards consistent */
#timeline .timeline-view-tabs{background:#fff;border-color:#e4e7ee;box-shadow:0 4px 14px rgba(35,40,57,.04)}
#timeline .timeline-view-tabs button.active{background:var(--page-accent);color:#fff;border-color:var(--page-accent)}
#timeline .timeline-phase-strip>*{background:#fff;box-shadow:0 4px 14px rgba(35,40,57,.04)}

/* Mobile: preserve compactness, no decorative overflow */
@media(max-width:768px){
  .page:not(#strategy){padding:10px;border-radius:0;background:linear-gradient(180deg,var(--page-soft-2),#f7f8fb 180px)}
  .page:not(#strategy)>.section-title{padding:13px 13px 13px 16px;margin-bottom:12px;border-radius:13px}
  .page:not(#strategy) .widget,.page:not(#strategy) .hq-panel{box-shadow:0 3px 12px rgba(35,40,57,.04)}
  #franchise .hq-command-centre,#meetings .hq-command-centre{padding:9px;border-radius:14px}
}
