/* ============================================================
   App shell — "Mission Control"
   Sidebar as a dotted flight strip with a gold plane marking the current
   page, a glass top bar with a live Kampala clock, and the sign-in screen's
   Great Circle sky behind everything. Markup: js/components/layout.js.
   Dawn tokens are the default; html.dark switches to night, matching the
   rest of the app. app-theme.css / dark-theme.css style #app-sidebar and
   every <header> with !important, so the overrides here carry ids/classes
   plus !important where they must win.
   ============================================================ */

:root {
  --mc-ink: #0C2340;
  --mc-muted: #3C5A76;
  --mc-faint: #4C6884;
  --mc-line: #B4C8DA;
  --mc-line-hi: #8FA9C2;
  --mc-hair: rgba(12, 35, 64, .11);
  --mc-hair-2: rgba(12, 35, 64, .18);
  --mc-accent: #0369A1;
  --mc-accent-soft: rgba(3, 105, 161, .10);
  --mc-gold: #D9A650;
  --mc-gold-hi: #E2B568;
  --mc-gold-text: #8A5418;
  --mc-gold-soft: rgba(217, 166, 80, .18);
  --mc-on-gold: #1A1206;
  --mc-warn: #C2410C;
  --mc-on-warn: #FFFFFF;
  --mc-panel: rgba(255, 255, 255, .58);
  --mc-panel-solid: #F4F8FB;
  --mc-board: rgba(255, 255, 255, .5);
  --mc-pin-bg: #EAF1F7;
  --mc-tint: rgba(12, 35, 64, .035);
  --mc-tint-2: rgba(12, 35, 64, .065);
  --mc-topbar: rgba(228, 238, 246, .66);
  --mc-sidebar: linear-gradient(180deg, rgba(255, 255, 255, .74) 0%, rgba(239, 244, 248, .66) 70%, rgba(242, 228, 214, .6) 100%);
  --mc-drawer: #F3F7FA;
  --mc-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 24px 48px -30px rgba(12, 35, 64, .35);
  --mc-plane: #B57F2A;

  --g-sea-hi: #DDEBF6; --g-sea-lo: #A3C4E0; --g-land-rgb: 12,35,64; --g-land-alpha: 0.42;
  --g-grid: rgba(12,35,64,.07); --g-atm-rgb: 2,132,199; --g-arc: #0369A1; --g-arc-faint: rgba(3,105,161,.16);
  --g-head-rgb: 2,132,199; --g-city: #B27135; --g-hub: #9C5F24; --g-label: #0C2340;

  --mc-ease-out: cubic-bezier(.16, 1, .3, 1);
  --mc-ease-io: cubic-bezier(.65, 0, .35, 1);
  --mc-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --mc-ease-drawer: cubic-bezier(.32, .72, 0, 1);
}
html.dark {
  --mc-ink: #EAF0F6;
  --mc-muted: #A3B6C9;
  --mc-faint: #8197AE;
  --mc-line: #2B4466;
  --mc-line-hi: #43648F;
  --mc-hair: rgba(163, 182, 201, .14);
  --mc-hair-2: rgba(163, 182, 201, .22);
  --mc-accent: #38BDF8;
  --mc-accent-soft: rgba(56, 189, 248, .14);
  --mc-gold: #E2B568;
  --mc-gold-hi: #EBC585;
  --mc-gold-text: #E2B568;
  --mc-gold-soft: rgba(226, 181, 104, .14);
  --mc-warn: #FF8A65;
  --mc-on-warn: #1A0E08;
  --mc-panel: rgba(11, 27, 53, .62);
  --mc-panel-solid: #0B1B35;
  --mc-board: rgba(4, 12, 26, .58);
  --mc-pin-bg: #0A1A33;
  --mc-tint: rgba(163, 182, 201, .05);
  --mc-tint-2: rgba(163, 182, 201, .09);
  --mc-topbar: rgba(4, 12, 26, .58);
  --mc-sidebar: linear-gradient(180deg, rgba(4, 12, 26, .8) 0%, rgba(10, 29, 58, .66) 70%, rgba(21, 40, 74, .6) 100%);
  --mc-drawer: #0B1B35;
  --mc-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 48px -28px rgba(0, 0, 0, .7);
  --mc-plane: #E2B568;

  --g-sea-hi: #12375F; --g-sea-lo: #061329; --g-land-rgb: 128,190,235; --g-land-alpha: 0.62;
  --g-grid: rgba(163,182,201,.08); --g-atm-rgb: 56,189,248; --g-arc: #38BDF8; --g-arc-faint: rgba(56,189,248,.14);
  --g-head-rgb: 186,230,253; --g-city: #F5E1A1; --g-hub: #E2B568; --g-label: #EAF0F6;
}

.mc-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.mc-i-s { width: 16px; height: 16px; }

/* ── Sky ─────────────────────────────────────────────────── */
/* The old dot grid and colour blobs (body::before/::after) give way to the sky. */
body:has(.mc-sky)::before, body:has(.mc-sky)::after { display: none !important; }
html:has(.mc-sky), html:has(.mc-sky) body { background: #E4EEF6 !important; }
html.dark:has(.mc-sky), html.dark:has(.mc-sky) body { background: #040C1A !important; }
.mc-sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.mc-sky > div { position: absolute; inset: 0; transition: opacity .7s var(--mc-ease-io); }
.mc-sky-n { background: linear-gradient(180deg, #040C1A 0%, #0A1D3A 58%, #15284A 80%, #3A3748 92%, #7E5541 100%); opacity: 0; }
.mc-sky-d { background: linear-gradient(180deg, #D3E4F2 0%, #E4EEF6 55%, #EFEBE6 84%, #F2D8BE 100%); }
html.dark .mc-sky-n { opacity: 1; }
html.dark .mc-sky-d { opacity: 0; }
.mc-stars { position: absolute; left: 0; top: 0; width: 1px; height: 1px; border-radius: 50%; background: transparent; opacity: 0; transition: opacity .7s ease; }
html.dark .mc-stars { opacity: 1; }
html.dark .mc-stars.b { animation: mc-twinkle 5.5s ease-in-out infinite alternate; }
html.dark .mc-stars.a { animation: mc-twinkle 7s ease-in-out -3s infinite alternate-reverse; }
@keyframes mc-twinkle { from { opacity: .35; } to { opacity: 1; } }

/* ── Sidebar: flight strip ───────────────────────────────── */
#app-sidebar.mc-sidebar {
  display: flex; flex-direction: column; overflow: hidden;
  font-family: 'Sora', system-ui, sans-serif; color: var(--mc-ink);
  background: var(--mc-sidebar) !important;
  border-right: 1px solid var(--mc-hair) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) saturate(1.15) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.15) !important;
}
.mc-sb-head { display: flex; align-items: center; gap: 6px; height: 64px; padding: 0 10px; flex: none; }
.mc-brand { display: flex; align-items: center; gap: 11px; min-width: 0; height: 44px; padding: 0 7px; border-radius: 12px; color: inherit; text-decoration: none !important; transition: background-color .2s; }
.mc-brand:hover { background: var(--mc-tint-2); }
.mc-brand:active img { transform: scale(.92) rotate(-6deg); }
.mc-brand img { width: 30px; height: 30px; flex: none; object-fit: contain; border-radius: 6px; transition: transform .35s var(--mc-ease-spring); }
.mc-brand-text { font-weight: 600; font-size: 14.5px; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-close { display: none !important; margin-left: auto; }

.mc-who { margin: 2px 10px 6px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; min-height: 54px; border-radius: 14px; border: 1px solid var(--mc-hair); background: var(--mc-tint); color: inherit; text-decoration: none !important; overflow: hidden; flex: none; transition: border-color .2s, background-color .2s, transform .18s var(--mc-ease-out); }
.mc-who:hover { border-color: var(--mc-hair-2); background: var(--mc-tint-2); }
.mc-who:active { transform: scale(.985); }
.mc-avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; font-weight: 600; font-size: 15px; background: linear-gradient(140deg, var(--mc-gold-hi), #B9853A); color: var(--mc-on-gold); flex: none; }
.mc-who-text { display: grid; min-width: 0; line-height: 1.25; }
.mc-who-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-who-meta { display: flex; gap: 6px; align-items: center; min-width: 0; font-size: 12px; color: var(--mc-muted); white-space: nowrap; }
.mc-who-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.mc-role { display: inline-flex; align-items: center; flex: none; height: 18px; padding: 0 7px; border-radius: 6px; background: var(--mc-gold-soft); color: var(--mc-gold-text); font-size: 11px; font-weight: 600; text-transform: capitalize; }
.mc-who > .mc-i { color: var(--mc-faint); }

.mc-strip { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--mc-line) transparent; }
.mc-strip-inner { position: relative; min-height: 100%; display: flex; flex-direction: column; padding: 4px 10px 14px; overflow: clip; } /* a plane leaving for the footer must not extend the scroll area */
.mc-route { position: absolute; left: 21px; top: 14px; bottom: 22px; width: 2px; transform-origin: 50% 0; background-image: radial-gradient(circle at 1px 1px, var(--mc-line-hi) .9px, transparent 1.3px); background-size: 2px 7px; background-repeat: repeat-y; opacity: .9; }
.mc-lit { position: absolute; left: 21.25px; top: 0; width: 1.5px; height: 100px; transform-origin: 50% 0; background: var(--mc-gold); box-shadow: 0 0 8px var(--mc-gold); border-radius: 1px; opacity: 0; pointer-events: none; }
.mc-trail { position: absolute; left: 20.5px; top: 0; width: 3px; height: 100px; transform-origin: 50% 0; border-radius: 2px; background: linear-gradient(180deg, rgba(226,181,104,0), var(--mc-gold-hi)); opacity: 0; pointer-events: none; filter: blur(.4px); }
.mc-trail.up { background: linear-gradient(0deg, rgba(226,181,104,0), var(--mc-gold-hi)); }
.mc-plane { position: absolute; left: 12px; top: -10px; width: 20px; height: 20px; z-index: 3; pointer-events: none; will-change: transform; opacity: 0; filter: drop-shadow(0 0 6px rgba(226, 181, 104, .55)); }
.mc-plane.on { opacity: 1; }
.mc-plane svg { display: block; width: 20px; height: 20px; fill: var(--mc-plane); transform: rotate(180deg); }
/* styles.css gives every element `transition: transform .3s` (a landing-page rule).
   The plane, trail and lit segment are positioned per frame by script; a transition
   makes a freshly rendered plane slide in from the top of the strip instead of
   starting on the previous page's waypoint. (.mc-lit's opacity fade is set inline.) */
#app-sidebar .mc-plane, #app-sidebar .mc-plane svg, #app-sidebar .mc-trail { transition: none !important; }
#app-sidebar .mc-lit { transition: none; }
.mc-ghost { position: absolute; left: 14px; top: -8px; width: 16px; height: 16px; z-index: 2; pointer-events: none; opacity: 0; transition: transform .38s var(--mc-ease-out), opacity .2s ease; }
.mc-ghost svg { display: block; width: 16px; height: 16px; fill: none; stroke: var(--mc-gold); stroke-width: 1.5; transform: rotate(180deg); }

.mc-grp { margin-top: 8px; position: relative; }
.mc-grp-label { position: relative; height: 30px; margin: 0; display: flex; align-items: center; padding-left: 68px; font-size: 11.5px; font-weight: 600; color: var(--mc-faint); letter-spacing: .01em; white-space: nowrap; }
.mc-grp-label::before { content: ''; position: absolute; left: 7px; top: 50%; width: 10px; height: 1px; background: var(--mc-line-hi); }
.mc-grp-label::after { content: ''; position: absolute; left: 27px; top: 50%; width: 30px; height: 1px; background: linear-gradient(90deg, var(--mc-line), transparent); }
.mc-grp ul { list-style: none; margin: 0; padding: 0; }
/* Settings + Logout: fixed at the bottom of the sidebar, below the scrolling strip. */
.mc-foot-bar { position: relative; flex: none; padding: 8px 10px 12px; border-top: 1px solid var(--mc-hair); }
.mc-foot-bar ul { list-style: none; margin: 0; padding: 0; }
.mc-foot-route { top: 14px; bottom: 18px; }
.mc-foot-plane { top: -10px; }

/* .nav-item is kept on waypoints for other code; reset its old theme look. */
#app-sidebar .mc-wp {
  position: relative; display: grid; grid-template-columns: 24px 20px minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  width: 100%; height: 40px; min-height: 40px; margin: 0; padding: 0 10px 0 0; border: 0; border-radius: 11px;
  background: none !important; box-shadow: none !important; transform: none !important;
  color: var(--mc-muted); font: 400 13.5px/1 'Sora', system-ui, sans-serif; text-decoration: none !important; text-align: left; white-space: nowrap;
  cursor: pointer; transition: color .2s; -webkit-tap-highlight-color: transparent;
}
#app-sidebar .mc-wp::before {
  content: ''; position: absolute; inset: 1px 0 1px 30px; left: 30px; top: 1px; width: auto; height: auto; transform: scaleX(.97); transform-origin: left;
  border-radius: 11px; background: var(--mc-tint-2) !important; box-shadow: none !important; opacity: 0;
  transition: opacity .2s ease, transform .3s var(--mc-ease-out);
}
#app-sidebar .mc-wp:hover { color: var(--mc-ink); }
#app-sidebar .mc-wp:hover::before { opacity: 1; transform: none; }
#app-sidebar .mc-wp:active::before { transform: scale(.985); }
#app-sidebar .mc-wp > * { position: relative; }
#app-sidebar .mc-wp .mc-i { width: 20px; height: 20px; opacity: 1; stroke: currentColor; transition: transform .35s var(--mc-ease-spring), color .2s; }
#app-sidebar .mc-wp:hover .mc-i { transform: translateX(1px); }
#app-sidebar .mc-wp:active .mc-i { transform: scale(.9); }
#app-sidebar .mc-wp .mc-label { overflow: hidden; text-overflow: ellipsis; }
#app-sidebar .mc-wp[aria-current="page"] { color: var(--mc-ink); font-weight: 600; }
#app-sidebar .mc-wp[aria-current="page"]::before { opacity: 1; transform: none; background: linear-gradient(90deg, var(--mc-gold-soft), rgba(226, 181, 104, .02)) !important; box-shadow: inset 0 0 0 1px rgba(226, 181, 104, .18) !important; }
#app-sidebar .mc-wp[aria-current="page"] .mc-i { color: var(--mc-gold-text); }
#app-sidebar .mc-wp:focus-visible { outline: 2px solid var(--mc-accent); outline-offset: -2px; }
.mc-pin { position: relative; justify-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--mc-pin-bg); border: 1.5px solid var(--mc-line-hi); transition: transform .35s var(--mc-ease-spring), border-color .2s, opacity .2s; }
.mc-pin::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--mc-gold); opacity: 0; }
#app-sidebar .mc-wp:hover .mc-pin { border-color: var(--mc-gold); transform: scale(1.2); }
#app-sidebar .mc-wp[aria-current="page"] .mc-pin { opacity: 0; transform: scale(.4); }
#app-sidebar .mc-wp.landed .mc-pin::after { animation: mc-touchdown .9s var(--mc-ease-out); }
@keyframes mc-touchdown { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(2.2); } }
#app-sidebar .mc-wp .badge-gold { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin: 0; padding: 0 6px; border-radius: 10px; background: var(--mc-warn) !important; color: var(--mc-on-warn) !important; font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: none !important; }
#app-sidebar .mc-wp.mc-out:hover { color: var(--mc-warn); }
#app-sidebar .mc-wp.mc-out:hover .mc-pin { border-color: var(--mc-warn); }

/* Collapsed: icons only; group labels keep their height so waypoints don't jump. */
#app-sidebar.mc-collapsed .mc-label,
#app-sidebar.mc-collapsed .mc-grp-label,
#app-sidebar.mc-collapsed .mc-brand-text { opacity: 0; pointer-events: none; }
#app-sidebar.mc-collapsed .mc-grp-label { font-size: 0; }
#app-sidebar.mc-collapsed .mc-who { grid-template-columns: 36px; padding: 8px; justify-content: center; }
#app-sidebar.mc-collapsed .mc-who-text, #app-sidebar.mc-collapsed .mc-who > .mc-i { display: none; }
#app-sidebar.mc-collapsed .mc-wp .badge-gold { position: absolute; left: 50px; top: 5px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }

/* ── Top bar ─────────────────────────────────────────────── */
header.mc-topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 6px; height: 64px; padding: 0 18px 0 12px;
  font-family: 'Sora', system-ui, sans-serif; color: var(--mc-ink);
  background: var(--mc-topbar) !important;
  border-bottom: 1px solid var(--mc-hair) !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.2) !important;
}
.mc-topbar .mc-icon-btn,
html.dark .mc-topbar .mc-icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--mc-muted);
  cursor: pointer; transition: background-color .2s, color .2s, transform .18s var(--mc-ease-out);
}
.mc-topbar .mc-icon-btn:hover, html.dark .mc-topbar .mc-icon-btn:hover { background: var(--mc-tint-2) !important; color: var(--mc-ink); }
.mc-topbar .mc-icon-btn:active { transform: scale(.92); }
.mc-topbar .mc-icon-btn:focus-visible, .mc-org-btn:focus-visible { outline: 2px solid var(--mc-accent); outline-offset: 2px; }
.mc-topbar .mc-icon-btn svg { color: currentColor; }
.mc-title-wrap { margin-left: 8px; min-width: 0; display: grid; }
.mc-page-title { height: 28px; margin: 0; overflow: hidden; font-size: 17px; line-height: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--mc-ink); }
.mc-page-title span { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.mc-page-desc { margin: -2px 0 0; font-size: 12px; line-height: 1.3; color: var(--mc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-tb-right { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }

.mc-search { position: relative; flex: 1; max-width: 360px; margin: 0 12px 0 auto; display: flex; }
.mc-search .mc-i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--mc-faint); pointer-events: none; }
.mc-search input { width: 100%; height: 40px; padding: 0 34px 0 38px; border-radius: 12px; border: 1px solid var(--mc-hair) !important; background: var(--mc-tint) !important; color: var(--mc-ink) !important; font: 13px 'Sora', system-ui, sans-serif; outline: none; transition: border-color .2s, background-color .2s; }
.mc-search input::placeholder { color: var(--mc-faint); }
.mc-search input:hover { border-color: var(--mc-hair-2) !important; }
.mc-search input:focus { border-color: var(--mc-accent) !important; background: var(--mc-panel) !important; box-shadow: 0 0 0 3px var(--mc-accent-soft) !important; }
.mc-search + .mc-tb-right { margin-left: 0; }

.mc-sync { display: none; align-items: center; gap: 6px; height: 28px; padding: 0 10px; margin-left: 8px; border-radius: 999px; background: var(--mc-accent-soft); color: var(--mc-accent); font-size: 11px; font-weight: 600; }

.mc-clock { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 13px; margin-right: 6px; border-radius: 12px; border: 1px solid var(--mc-hair); background: var(--mc-tint); font-variant-numeric: tabular-nums; }
.mc-clock-city { font-size: 12px; color: var(--mc-muted); }
.mc-clock-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mc-gold); box-shadow: 0 0 0 3px var(--mc-gold-soft); }
.mc-clock-time { display: flex; align-items: baseline; font-weight: 600; font-size: 15px; letter-spacing: -.01em; color: var(--mc-ink); }
.mc-clock-sec { display: flex; margin-left: 1px; font-size: 12px; font-weight: 400; color: var(--mc-muted); }
.mc-clock-tz { font-size: 11px; font-weight: 600; color: var(--mc-faint); }
.mc-slot { position: relative; display: inline-block; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.mc-slot .sz { visibility: hidden; }
.mc-slot .d { position: absolute; left: 0; right: 0; top: 0; text-align: center; }
.mc-sep { opacity: .55; padding: 0 1px; }

#header-notifications-bell:hover .mc-i { animation: mc-ring .7s var(--mc-ease-out); }
@keyframes mc-ring { 0%,100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 45% { transform: rotate(-10deg); } 70% { transform: rotate(5deg); } }
#header-notifications-bell .absolute.bg-primary { top: 4px !important; right: 4px !important; min-width: 18px; height: 18px; padding: 0 5px !important; display: grid !important; place-items: center; border-radius: 9px; background: var(--mc-warn) !important; color: var(--mc-on-warn) !important; font-size: 10px !important; box-shadow: 0 0 0 2px var(--mc-panel-solid) !important; }

.mc-org-btn { display: flex; align-items: center; gap: 8px; height: 40px; margin-left: 4px; padding: 0 10px 0 0; border: 0; border-radius: 12px; background: transparent; color: var(--mc-ink); font: 600 13px 'Sora', system-ui, sans-serif; cursor: pointer; transition: background-color .2s; }
.mc-org-btn:hover { background: var(--mc-tint-2); }
.mc-org-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 600; font-size: 15px; background: linear-gradient(140deg, var(--mc-gold-hi), #B9853A); color: var(--mc-on-gold); box-shadow: 0 0 0 1px rgba(226, 181, 104, .35), 0 6px 18px -8px rgba(226, 181, 104, .6); transition: transform .2s var(--mc-ease-out), box-shadow .2s; }
.mc-org-btn:hover .mc-org-mark { box-shadow: 0 0 0 3px var(--mc-gold-soft), 0 8px 22px -8px rgba(226, 181, 104, .8); }
.mc-org-btn:active .mc-org-mark { transform: scale(.94); }
.mc-org-btn .mc-i { width: 16px; height: 16px; color: var(--mc-faint); }

/* app-theme.css / dark-theme.css style these buttons by id with !important;
   html + header.mc-topbar + id outranks html.dark + id. */
html header.mc-topbar #sidebar-toggle-btn,
html header.mc-topbar #header-notifications-bell,
html header.mc-topbar #theme-toggle-btn,
html header.mc-topbar #mc-back-btn {
  width: 40px !important; height: 40px !important; border: 0 !important; border-radius: 12px !important;
  background: transparent !important; box-shadow: none !important; color: var(--mc-muted) !important;
}
html header.mc-topbar #sidebar-toggle-btn:hover,
html header.mc-topbar #header-notifications-bell:hover,
html header.mc-topbar #theme-toggle-btn:hover,
html header.mc-topbar #mc-back-btn:hover { background: var(--mc-tint-2) !important; color: var(--mc-ink) !important; }
html header.mc-topbar #org-switcher-btn { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 10px 0 0 !important; }
html header.mc-topbar #org-switcher-btn:hover { background: var(--mc-tint-2) !important; }
html header.mc-topbar .mc-search #global-search-input {
  height: 40px !important; padding: 0 34px 0 38px !important; border-radius: 12px !important;
  border: 1px solid var(--mc-hair) !important; background: var(--mc-tint) !important; color: var(--mc-ink) !important; box-shadow: none !important;
}
html header.mc-topbar .mc-search #global-search-input::placeholder { color: var(--mc-faint) !important; }
html header.mc-topbar .mc-search #global-search-input:focus { border-color: var(--mc-accent) !important; background: var(--mc-panel) !important; box-shadow: 0 0 0 3px var(--mc-accent-soft) !important; }
html header.mc-topbar #header-notifications-bell .absolute.bg-primary {
  top: 4px !important; right: 4px !important; min-width: 18px; height: 18px; padding: 0 5px !important; display: grid !important; place-items: center;
  border-radius: 9px !important; background: var(--mc-warn) !important; color: var(--mc-on-warn) !important; font-size: 10px !important; font-weight: 700;
  box-shadow: 0 0 0 2px var(--mc-panel-solid) !important;
}

/* Dropdowns opened from the top bar */
.mc-topbar #header-notifications-dropdown,
.mc-topbar #org-dropdown {
  border: 1px solid var(--mc-hair-2) !important; border-radius: 16px !important;
  background: var(--mc-panel-solid) !important; color: var(--mc-ink);
  box-shadow: 0 24px 60px -24px rgba(4, 12, 26, .55) !important;
}
.mc-topbar #org-dropdown { top: calc(100% + 10px); }

/* ── Content column ──────────────────────────────────────── */
#app-shell-content.mc-shell { min-height: 100vh; min-height: 100dvh; }

/* ── Drawer under 1024px (mobile.css slides #app-sidebar) ─ */
@media (max-width: 1023px) {
  /* Above the sticky top bar (z 50) and its backdrop while the drawer is open. */
  #app-sidebar.mc-sidebar { z-index: 60 !important; background: var(--mc-drawer) !important; transition: transform .5s var(--mc-ease-drawer) !important; }
  body:has(.mc-sky) #mobile-sidebar-backdrop { z-index: 55 !important; }
  #app-sidebar.mc-sidebar.mobile-open { box-shadow: 24px 0 60px -20px rgba(0, 0, 0, .55) !important; }
  #app-sidebar .mc-close { display: grid !important; }
  #app-sidebar.mc-collapsed .mc-label, #app-sidebar.mc-collapsed .mc-grp-label, #app-sidebar.mc-collapsed .mc-brand-text { opacity: 1; pointer-events: auto; }
  #app-sidebar.mc-collapsed .mc-grp-label { font-size: 11.5px; }
  #app-sidebar.mc-collapsed .mc-who { grid-template-columns: 36px minmax(0, 1fr) 16px; padding: 8px 10px 8px 8px; justify-content: stretch; }
  #app-sidebar.mc-collapsed .mc-who-text, #app-sidebar.mc-collapsed .mc-who > .mc-i { display: revert; }
  #app-sidebar.mc-collapsed .mc-wp .badge-gold { position: static; min-width: 20px; height: 20px; padding: 0 6px; font-size: 11px; }
  header.mc-topbar { padding: 0 12px 0 8px; }
  .mc-search { display: none !important; }
}
@media (max-width: 640px) {
  .mc-clock-city, .mc-clock-tz, .mc-clock-sec, .mc-page-desc, .mc-org-btn .mc-org-name, .mc-org-btn .mc-i { display: none; }
  .mc-clock { padding: 0 10px; margin-right: 2px; }
  .mc-back { display: none !important; }
  .mc-page-title { font-size: 16px; }
  .mc-title-wrap { margin-left: 4px; }
}
@media (max-width: 400px) {
  .mc-tb-right { gap: 0; }
  .mc-clock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.dark .mc-stars { animation: none !important; }
  #app-sidebar .mc-wp .mc-i, .mc-ghost, .mc-brand img { transition: none !important; }
  #app-sidebar .mc-wp.landed .mc-pin::after, #header-notifications-bell:hover .mc-i { animation: none !important; }
  #app-sidebar.mc-sidebar { transition: none !important; }
}
