/* Shared LifeOS Studio surfaces */
.independent-app {
  --studio-navy: #102641;
  --studio-ink: #152d48;
  --studio-edge: #cdb782;
  --studio-elevation: 0 1px 2px #182f4910, 0 8px 24px -10px #16325030;
  --theme-gold-button: linear-gradient(138deg, #f8ead0 5%, #e9ce95 58%, #d0aa65);
}
#root .independent-app {
  background-image: radial-gradient(ellipse at 90% 0%, #e0eaf6, #e8eff700 46%),
    linear-gradient(132deg, #fffdf8 1%, #f7f6f1 35%, #eaf0f8 79%, #f4f0e7);
}
#root .independent-app .independent-main::before { opacity: .13; right: -4rem; }
#root .independent-content :is(.independent-panel, .independent-module-card) {
  --theme-card-fill: linear-gradient(142deg, #fffefbea, #fdfbf4e8 49%, #eef3fae3);
}
#root .independent-content :where(.independent-panel, .independent-metric, .independent-order-row) {
  border-color: var(--studio-edge);
  box-shadow: inset 0 1px #ffffffcf, var(--studio-elevation);
}
#root .independent-topbar {
  background: linear-gradient(112deg, #fffefaf5 20%, #f7f9fdf5 73%, #f5e8cdee);
  border-bottom-color: var(--studio-edge);
  box-shadow: 0 5px 18px -8px #142b4a38;
}
#root .independent-topbar strong { color: var(--studio-ink); font-weight: 700; }
#root .independent-sidebar {
  background: radial-gradient(ellipse at 18% 0%, #34567972, transparent 43%),
    linear-gradient(165deg, #192f4d, #10233b 48%, #0b192d);
  border-right-color: #8e794f;
}
#root .independent-sidebar-content { scrollbar-color: #6f8399 transparent; scrollbar-width: thin; }
#root .independent-sidebar .independent-nav-heading { color: #ebcc91; }
#root .independent-sidebar .independent-nav-item { color: #e4edf8; }
#root .independent-sidebar .independent-nav-item:not(.active) svg { color: var(--studio-nav-accent, #a9bfd8); }
#root .independent-sidebar .independent-nav-item:not(.active):hover {
  border-color: #b5cae64d;
  background: #b5cae61b;
  color: white;
}
#root .independent-sidebar .independent-nav-item.active {
  color: #fff5e1;
  border-color: #c3a369;
  background: linear-gradient(102deg, #b3894263, #6b6655aa 42%, #3153789c);
  box-shadow: inset 3px 0 #e5c47d, 0 4px 10px #07162838;
}
#root .independent-sidebar .independent-nav-item.active svg { color: #f3d99c; }
#root .lifeos-mobile-tabbar {
  background: linear-gradient(125deg, #fffdf5f5, #eff5fced);
  border-color: #bda274;
  box-shadow: 0 6px 24px #10264133, inset 0 1px white;
}
#root .lifeos-mobile-tabbar .lifeos-tab-item,
#root .lifeos-mobile-tabbar .lifeos-tab-item svg { color: #284966; }
#root .lifeos-mobile-tabbar .lifeos-tab-item:is([data-current], [aria-current="page"], [aria-expanded="true"]) {
  color: #142b47;
  background: linear-gradient(140deg, #f9eacb, #e6c993);
}
#root .lifeos-more-sheet { border-color: #c2a76b; }
#root .lifeos-nav-sort-mobile .lifeos-nav-sortable-row > a svg { color: var(--studio-accent-dark, #34546f); }
#root .lifeos-nav-sort-mobile .lifeos-nav-sortable-row > a[aria-current="page"] {
  background: linear-gradient(110deg, #f7e6bd, #eaf1fc);
  box-shadow: inset 2px 0 #b69450;
}

#root .independent-content .independent-primary-btn {
  border-color: #b49253;
  box-shadow: inset 0 1px #fff6df, 0 4px 12px -5px #74532366;
}
#root .independent-content .independent-primary-btn:not(:disabled):hover { filter: brightness(1.04); }
#root .independent-content :is(.independent-small-btn, .independent-outline-btn):not(.independent-hero *, .lifeos-focus-panel *) {
  border-color: #a7b7cc;
}
#root .independent-content :is(.independent-small-btn, .independent-outline-btn):not(.independent-hero *, .lifeos-focus-panel *, :disabled):hover {
  border-color: #a88d5c;
}
#root .independent-content :is(a,button,input,select,textarea,summary):focus-visible {
  outline: 2px solid #416e9c;
  outline-offset: 3px;
}
#root .independent-content :is(.independent-hero, .lifeos-today-entry, .lifeos-calendar-header) :is(a,button):focus-visible {
  outline-color: #f2d79e;
}
#root .independent-content .lifeos-overview-switch { background: #ecf1f7; border-color: #c1cfdf; }
#root .independent-content .lifeos-overview-switch button[aria-pressed="true"] {
  border-color: #a58755;
  color: #fff7e8;
  background: linear-gradient(145deg, #2d537b, #152f50);
  box-shadow: inset 0 1px #ebd39e42, 0 2px 6px #132a4726;
}
#root .independent-content .lifeos-context-bar {
  border-color: #d3bd8e;
  background: linear-gradient(110deg, #fffdf6f2, #edf3fae8);
  box-shadow: inset 0 1px #fff, var(--studio-elevation);
  padding: .42rem .68rem;
}
#root .independent-content .lifeos-context-options :is(button,select):not([aria-pressed="true"],[data-active="true"]) {
  background: #fffdfa;
  border-color: #bfcbd8;
}

/* Module accents follow the navigation and Overview cards. */
:where([data-lifeos-module="calendar"],[data-lifeos-nav-module="calendar"],
  [data-lifeos-module="timeline"],[data-lifeos-nav-module="timeline"],
  [data-lifeos-module="travel"],[data-lifeos-nav-module="travel"]) {
  --studio-tint: #d6e7fb;
  --studio-accent: #416e9e;
  --studio-accent-dark: #234b78;
  --studio-nav-accent: #9fc5f3;
}
:where([data-lifeos-module="money"],[data-lifeos-nav-module="money"],
  [data-lifeos-module="household"],[data-lifeos-nav-module="household"],
  [data-lifeos-module="fitness"],[data-lifeos-nav-module="fitness"]) {
  --studio-tint: #d5eae1;
  --studio-accent: #427f71;
  --studio-accent-dark: #245b50;
  --studio-nav-accent: #a3d5be;
}
:where([data-lifeos-module="orders"],[data-lifeos-nav-module="orders"],
  [data-lifeos-module="meals"],[data-lifeos-nav-module="meals"]) {
  --studio-tint: #fae9ce;
  --studio-accent: #ac742e;
  --studio-accent-dark: #79501e;
  --studio-nav-accent: #f2c284;
}
:where([data-lifeos-module="daily-briefing"],[data-lifeos-nav-module="daily-briefing"],
  [data-lifeos-module="ask"],[data-lifeos-nav-module="ask"],
  [data-lifeos-module="wardrobe"],[data-lifeos-nav-module="wardrobe"]) {
  --studio-tint: #ede1f5;
  --studio-accent: #886398;
  --studio-accent-dark: #624570;
  --studio-nav-accent: #dfbdeb;
}
:where([data-lifeos-module="weather"],[data-lifeos-nav-module="weather"]) {
  --studio-tint: #d8eef3;
  --studio-accent: #387d94;
  --studio-accent-dark: #235469;
  --studio-nav-accent: #9fdbef;
}
:where([data-lifeos-module="action-center"],[data-lifeos-nav-module="action-center"],
  [data-lifeos-module="today"],[data-lifeos-nav-module="today"],
  [data-lifeos-module="projects"],[data-lifeos-nav-module="projects"]) {
  --studio-tint: #f4e5bf;
  --studio-accent: #ab8347;
  --studio-accent-dark: #725122;
  --studio-nav-accent: #efd091;
}

/* Overview and Today */
#root [data-lifeos-path="/overview"] .independent-hero {
  --lifeos-hero-veil: linear-gradient(93deg,#10223b 8%,#10223bf0 34%,#132d4b81 63%,#07172919);
  border-color: #d3b373;
  box-shadow: inset 0 1px #f9e5ae62, 0 17px 40px -24px #112f52a6;
}
#root [data-lifeos-path="/overview"] .independent-hero .independent-hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.45rem;
  padding: .3rem .68rem;
  border: 1px solid #e6ca8a6b;
  border-radius: .62rem;
  color: #f7e4ba;
  background: #26476aa1;
  text-decoration: none;
}
#root [data-lifeos-path="/overview"] .independent-hero .independent-hero-link:hover { background: #355c83; color: #fff7e6; }
#root [data-lifeos-path="/overview"] .lifeos-today-entry {
  background: radial-gradient(95% 105% at 88% 0%, #315c88, transparent 66%),
    linear-gradient(135deg, #193856, #10233d 90%);
  border-color: #cfb476;
  box-shadow: inset 0 1px #f7dca840, 0 15px 28px -21px #0c233da8;
}
#root #lifeos-coming-title { color: var(--studio-ink); }
#root [aria-labelledby="lifeos-coming-title"] {
  background: linear-gradient(140deg, #fffdf5f9, #f8efdbea 61%, #f3f5fae9);
  border-color: #caaf77;
}
#root [aria-labelledby="lifeos-coming-title"] .lifeos-overview-day-group h3 {
  color: #614519;
  background: linear-gradient(95deg, #f0dfb6, #f9f1dc 84%);
  border-inline-start: 2px solid #bc934e;
  padding-inline-start: .55rem;
}
#root [aria-labelledby="overview-spaces"] > .independent-section-heading {
  display: flex;
  align-items: center;
  gap: .9rem;
}
#root [aria-labelledby="overview-spaces"] > .independent-section-heading::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, #ba965b, #9bb1cb9c 75%, transparent);
}
#root #overview-spaces { color: var(--studio-ink); font-size: clamp(1.8rem, 2.8vw, 2.4rem); }
#root .independent-content .independent-module-grid .independent-module-card[data-lifeos-module] {
  min-height: 9.5rem;
  background: radial-gradient(110% 120% at 100% 0%, var(--studio-tint, #f2e4c9), transparent 76%),
    linear-gradient(141deg, #fffefbef, #fafbfeea);
  border-color: #c3ad81;
  box-shadow: inset 0 1px #fff, 0 7px 24px -13px #1432574a;
}
#root .independent-content .independent-module-card :is(h3,p) { padding-inline-end: 1.1rem; }
#root .independent-content .independent-module-card h3 { font-size: clamp(1.48rem, 2vw, 1.85rem); }
#root .independent-content .independent-module-card p { font-size: .85rem; line-height: 1.35; color: #263f57; }
#root .independent-content .independent-module-card[data-lifeos-module] .independent-module-icon {
  width: 2.65rem;
  height: 2.65rem;
  color: #fff2d5;
  border: 1px solid #bd9a5f;
  background: linear-gradient(145deg, var(--studio-accent, #a58450), var(--studio-accent-dark, #725421) 88%);
  box-shadow: inset 0 1px #f7e8b957, 0 4px 9px -5px #13284280;
}
#root .independent-content .independent-module-card[data-lifeos-module] .independent-card-next {
  color: var(--studio-accent-dark, #725421);
  background: #fffdfa;
  border: 1px solid #c5af84;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
}
#root .independent-content .independent-module-card[data-lifeos-module]:hover {
  border-color: var(--studio-accent, #a58450);
  box-shadow: inset 0 1px white, 0 12px 30px -15px #172f5a75;
}
#root .lifeos-today-grid :is(#lifeos-day,#lifeos-attention,#lifeos-waiting,#lifeos-decisions) {
  --panel-tint: #e2eefb;
  --panel-edge: #9db8d5;
  border-color: var(--panel-edge);
  background: linear-gradient(128deg, #fffdf7f5, var(--panel-tint));
  box-shadow: inset 0 2px var(--panel-edge), var(--studio-elevation);
}
#root .lifeos-today-grid #lifeos-attention { --panel-tint: #faedcf; --panel-edge: #c7a15f; }
#root .lifeos-today-grid #lifeos-waiting { --panel-tint: #e2f1e9; --panel-edge: #8db7a9; }
#root .lifeos-today-grid #lifeos-decisions { --panel-tint: #efe6f5; --panel-edge: #b6a2c4; }
#root .lifeos-today-grid .lifeos-overview-panel-heading h2 { color: var(--studio-ink); }

/* Module surfaces */
#root .lifeos-timeline .lifeos-timeline-marker {
  color: #25446a;
  background: linear-gradient(145deg, #fbfcff, #e0edfc);
  border-color: #8ba9cb;
}
#root .lifeos-timeline [data-today="true"] .lifeos-timeline-marker {
  color: #fff2d4;
  background: linear-gradient(135deg, #3b6792, #142f52);
  border-color: #bb9b60;
}
#root .lifeos-timeline .lifeos-timeline-row-source { color: #214a77; background: #e4effc; }
#root .lifeos-timeline a[href^="/money"] .lifeos-timeline-row-source { color: #245e54; background: #e2f3ea; }
#root .lifeos-timeline :is(a[href^="/tasks"], a[href^="/action-center"]) .lifeos-timeline-row-source {
  color: #6a4b21;
  background: #f9edce;
}
#root .lifeos-timeline .lifeos-timeline-row:hover { background: #e5effbbd; }

#root [data-lifeos-path="/calendar"] [data-testid="calendar-view-frame"] {
  border: 1px solid #c1aa79;
  box-shadow: var(--studio-elevation);
  background: #f4f7fc;
}
#root [data-lifeos-path="/calendar"] .lifeos-calendar-toolbar {
  border-color: #b6c7dc;
  background: linear-gradient(125deg, #fffdf7ed, #e3edfae8);
}
#root [data-lifeos-path="/calendar"] .lifeos-calendar-toolbar > div:first-child { gap: .6rem; }
#root [data-lifeos-path="/calendar"] [data-lifeos-calendar-range] { background: #e9f0fa; border: 1px solid #b4c6de; }
#root [data-lifeos-path="/calendar"] [data-lifeos-calendar-range] button[aria-pressed="true"] {
  color: #fff8e9 !important;
  background: linear-gradient(145deg, #315e8c, #193756) !important;
  box-shadow: inset 0 1px #efce8b57, 0 2px 6px #21385d3d;
}
#root [data-lifeos-path="/calendar"] .lifeos-calendar-header button.ot-chip {
  color: #fff5de;
  border-color: #d8b77b;
  background: linear-gradient(145deg, #365c83, #142d49);
}
#root [data-lifeos-path="/calendar"] [data-testid="calendar-view"] > p[role="note"],
#root [data-lifeos-path^="/travel"] [data-testid="travel-owner-ui"] > p[role="note"] {
  background: #edf3fbd9;
  border: 1px solid #b8c9df;
  border-inline-start: 3px solid #7695b8;
  box-shadow: none;
  padding-block: .55rem;
}
#root :is([data-lifeos-path^="/travel"],[data-lifeos-path^="/shared-trips"]) [role="tablist"][aria-label="Trip sections"] [aria-selected="true"] {
  color: #fff3d7 !important;
  background: linear-gradient(140deg, #315981, #173654);
  border-color: #c5a666;
}
#root :is([data-lifeos-path^="/travel"],[data-lifeos-path^="/shared-trips"]) :is([data-testid="itinerary-entry"],[data-testid="shared-entry"]) {
  background: linear-gradient(122deg, #fffdf8ed, #ecf3fceb);
  border-color: #c5b387;
}
#root :is([data-lifeos-path^="/travel"],[data-lifeos-path^="/shared-trips"]) [data-testid="itinerary-booking"] {
  background: linear-gradient(124deg, #fffdfaeb, #e2eff9ed);
  border-color: #a5bdd6;
}
#root [data-lifeos-path="/money"] .lifeos-net-position {
  background: radial-gradient(100% 135% at 97% 0%, #306677, transparent 66%), linear-gradient(120deg, #112d43, #143c53);
}
#root [data-lifeos-path="/money"] .lifeos-money-rows { box-shadow: var(--studio-elevation); }
#root [data-lifeos-path="/household"] .household-area-icon {
  background: linear-gradient(145deg, #3a678e, #1a3758);
  border-color: #c6a56c;
  color: #ffedc9;
}
#root [data-lifeos-path="/household"] .household-view-panel { background: linear-gradient(146deg, #fffdf4f0 20%, #edf3fbea 78%); }
#root .independent-content :is(.lifeos-outfit-controls,.lifeos-brief-schedule) {
  background: linear-gradient(141deg, #fffdf7ec, #ece6f3de 68%, #eaf0faec);
  border-color: #c7b393;
}
#root .independent-content :is(.lifeos-outfit-day,.lifeos-wardrobe-card) { box-shadow: var(--studio-elevation); }
#root .independent-content :is(.lifeos-meals,.lifeos-lists):not(.lifeos-fitness) .independent-panel {
  --theme-card-fill: linear-gradient(132deg,#fffdfaee,#fff6e5e9 57%,#edf4fbed);
}
#root [data-lifeos-path="/ask"] .lifeos-orbit-answer:not(:empty) {
  padding: .72rem .9rem;
  border: 1px solid #bbadd1;
  border-inline-start: 3px solid #87679e;
  border-radius: .65rem;
  background: linear-gradient(112deg, #f3ecf7, #ecf3fa);
  color: #223955;
}
#root .lifeos-orders-page .independent-orders-toolbar {
  background: linear-gradient(126deg, #fffdf5ec, #f4e8d2eb 61%, #ecf3fbe8);
  border-color: #ccb17f;
}
#root .lifeos-orders-page .lifeos-orders-sort { border-color: #bca372; }
#root .lifeos-lists-grid .lifeos-list-detail {
  border-color: #adbfda;
  --theme-card-fill: linear-gradient(130deg, #fffef8f1, #e9f1fcec);
}
#root .lifeos-meals:not(.lifeos-fitness) .lifeos-meals-day {
  background: linear-gradient(138deg, #fffef9f1, #f6eddbe8);
  border-color: #cab181;
}
#root .lifeos-brief .lifeos-brief-tomorrow { border-color: #c6b4d4; }
#root .lifeos-brief .lifeos-brief-event time { color: #274d77; }
#root .lifeos-receipt-shell :is(.lifeos-receipt-ledger,.lifeos-receipt-panel) { box-shadow: var(--studio-elevation); }
#root [data-lifeos-path="/weather"] .wx-stats { background: linear-gradient(135deg, #f9fcffe8, #dceef5e6); }
#root .lifeos-fitness-dashboard .lifeos-fitness-section-head h2 { color: #20455e; }

@media (max-width: 760px) {
  #root .independent-app .independent-main::before { right: -6rem; opacity: .11; }
  #root [data-lifeos-path="/overview"] .independent-hero {
    --lifeos-hero-veil: linear-gradient(97deg,#10223bee 8%,#10223bd1 56%,#132d4b82 99%);
  }
  #root [data-lifeos-path="/overview"] .independent-hero h1 { font-size: clamp(1.95rem, 8vw, 2.35rem); }
  #root [data-lifeos-path="/overview"] .lifeos-overview-hero-actions { gap: .5rem; }
  #root [data-lifeos-path="/overview"] .independent-hero .independent-hero-link { min-height: 2.75rem; }
  #root .independent-content .independent-module-grid .independent-module-card[data-lifeos-module] {
    min-height: 8.2rem;
    padding: .8rem;
  }
  #root .independent-content .independent-module-card h3 { font-size: 1.45rem; }
  #root .independent-content .independent-module-card[data-lifeos-module] .independent-module-icon { width: 2.3rem; height: 2.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  #root .independent-module-card[data-lifeos-module] { transition: none; }
  #root .independent-module-card[data-lifeos-module]:hover { transform: none; }
}
@media (forced-colors: active) {
  #root .independent-content :is(a,button,input,select,textarea,summary):focus-visible { outline-color: Highlight; }
  #root .independent-content .lifeos-overview-switch button[aria-pressed="true"] { border-color: Highlight; }
}
