/* Colour (0.8): the organisation's colour (ASUDI indigo by default) as the second colour of the app.
   A deep band of it frames the page (top bar and footer), the page itself is a pale tint of it, cards stay white,
   and the one main action on each screen is filled with it. Loaded after minimal.css; high contrast (a11y.css) still wins.
   Every shade is mixed from --accent, so an organisation that picks another colour gets the same look in its own colour. */
html:not(.public) {
  --brand: var(--accent);
  --brand-deep: color-mix(in srgb, var(--accent) 55%, #07071f);
  --brand-ink: color-mix(in srgb, var(--accent) 80%, #000);
  --bg: color-mix(in srgb, var(--accent) 5%, #fff);
  --soft: color-mix(in srgb, var(--accent) 7%, #fff);
  --soft-2: color-mix(in srgb, var(--accent) 12%, #fff);
  --line: color-mix(in srgb, var(--accent) 13%, #fff);
  --ink-btn: var(--accent); --on-ink: #fff;
  --shadow-card: 0 1px 2px rgba(20, 18, 70, .05), 0 10px 26px -18px color-mix(in srgb, var(--accent) 60%, transparent);
}
html:not(.public) body { background: var(--bg); }

/* the top bar: a band of the colour, white text, the current page on a white pill */
html:not(.public) .topbar {
  background: linear-gradient(120deg, var(--brand-deep) 0%, color-mix(in srgb, var(--accent) 85%, #07071f) 100%);
  border: 0;
  box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--accent) 75%, transparent);
}
html:not(.public) .topbar .brand span { color: #fff; }
html:not(.public) .topbar .brand img { background: #fff; border-radius: 10px; padding: 3px; box-sizing: border-box; }
html:not(.public) .navpill { color: rgba(255, 255, 255, .82); }
html:not(.public) .navpill:hover { background: rgba(255, 255, 255, .12); color: #fff; }
html:not(.public) .navpill[aria-current='page'] { background: #fff; color: var(--brand-deep); font-weight: 600; }
html:not(.public) .topbar .me .avatar, html:not(.public) .topbar .me > * { box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); border-radius: 50%; }
html:not(.public) .topbar :focus-visible { outline-color: #fff; }

/* cards: white on the tinted page, with a soft shadow in the colour */
html:not(.public) .cm:not(.cm-today), html:not(.public) .card, html:not(.public) .panel { background: #fff; border-color: var(--line); box-shadow: var(--shadow-card); }

/* the main action and anything selected: filled with the colour */
html:not(.public) .btn:hover, html:not(.public) .btn-pill:hover, html:not(.public) .icon-btn--accent:hover { opacity: 1; background: var(--brand-ink); }
html:not(.public) progress::-webkit-progress-value { background: var(--accent); }
html:not(.public) progress::-moz-progress-bar { background: var(--accent); }
html:not(.public) input[type="checkbox"], html:not(.public) input[type="radio"] { accent-color: var(--accent); }
html:not(.public) :focus-visible { outline-color: var(--accent); }
html:not(.public) .home-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
html:not(.public) .home-search svg { color: var(--accent); }
html:not(.public) .greet h1 span { color: var(--accent); }

/* number tiles get their own colours back */
html:not(.public) .tile.t-indigo { background: var(--t-indigo) !important; color: var(--ink-indigo) !important; }
html:not(.public) .tile.t-green { background: var(--t-green) !important; color: var(--ink-green) !important; }
html:not(.public) .tile.t-rose { background: var(--t-rose) !important; color: var(--ink-rose) !important; }
html:not(.public) .tile.t-peach { background: var(--t-peach) !important; color: var(--ink-peach) !important; }
html:not(.public) .tile.t-amber { background: var(--t-amber) !important; color: var(--ink-amber) !important; }

/* phones: the current tab and the add button in the colour */
@media (max-width: 899px) {
  /* a slim band at the top with the logo and your picture, so phones get the same frame (the pages are in the bottom bar) */
  html:not(.public) .shell > .topbar { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 40; width: 100%; margin: 0; padding: 10px 16px calc(10px); padding-top: calc(10px + env(safe-area-inset-top)); border-radius: 0 0 20px 20px; box-sizing: border-box; }
  html:not(.public) .shell > .topbar .navpills { display: none; }
  html:not(.public) .shell > .topbar .brand span { font-size: 1rem; }
  html:not(.public) .tab[aria-current='page'] { color: var(--accent); }
  html:not(.public) .tab[aria-current='page']::after { background: var(--accent); }
  html:not(.public) .tab-add-c { background: var(--accent); box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
}

/* the footer: the same deep band, closing the page */
html:not(.public) .app-foot { background: var(--brand-deep); color: rgba(255, 255, 255, .78); padding-top: 22px; margin-top: 28px; }
html:not(.public) .app-foot a { color: rgba(255, 255, 255, .85); }
html:not(.public) .app-foot a:hover { color: #fff; }
html:not(.public) .app-foot #app-version { background: rgba(255, 255, 255, .14); color: #fff; }
