/* ============================================================================
   Oceanus — Polish, round 4.
   ----------------------------------------------------------------------------
   Four more surgical tweaks:
     7.  Empty states — consistent friendly treatment across the .*-empty
         classes scattered through the app (dashboard, IM, watchlist, chart,
         calendar, pipeline, news). Pads + centers + adds a subtle prefix
         glyph so empty surfaces look intentional, not broken.
     8.  Skeleton loaders — generic .sk-line / .sk-card classes producing a
         soft shimmer. Apply per-surface as we touch each page; the helper
         lives here so any future template can opt in.
     9.  Sidebar nav active state — replace flat accent-muted background
         with a softer gradient sliver, no bg fill (more "rail" than "tag").
     10. Custom scrollbars — thin, accent-tinted on hover only. App-wide.

   To revert: delete the <link> in base.html.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   #7 — Empty states. Every existing `.*-empty` class in the app gets the
   same calm treatment: muted color, centered, generous padding, and a tiny
   "◌" glyph prefix that signals "intentionally empty, not broken." Each
   surface's specific empty CSS continues to apply on top.
   -------------------------------------------------------------------------- */
.dash-empty,
.im-empty,
.wl-empty,
.cal-empty,
.t-empty,
.news-empty,
.earn-empty,
.fund-empty,
.chart-empty,
.pp-empty,
.finder-empty,
.th-empty,
.sb-search-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  padding: 18px 14px;
  line-height: 1.5;
}
.dash-empty::before,
.im-empty::before,
.wl-empty::before,
.cal-empty::before,
.t-empty::before,
.news-empty::before,
.earn-empty::before,
.fund-empty::before,
.pp-empty::before,
.finder-empty::before,
.th-empty::before {
  content: "◌";
  display: block;
  font-size: 18px;
  color: color-mix(in srgb, var(--text-muted) 60%, transparent);
  margin-bottom: 4px;
  letter-spacing: 0;
}
/* Empty-hint paragraph (e.g. "Ask an admin to add you.") sits below the
   main empty line — slightly dimmer. */
.im-empty-hint,
.wl-empty-hint,
.finder-empty-hint {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-xs);
  opacity: 0.7;
}

/* ----------------------------------------------------------------------------
   #8 — Skeleton loaders. Generic helpers; pages that want them can replace
   their "Loading…" text with `<div class="sk-line"></div>` etc.
   -------------------------------------------------------------------------- */
@keyframes oc-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.sk-line,
.sk-card,
.sk-circle,
.sk-block {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--bg-elevated-2) 0%,
    color-mix(in srgb, var(--accent) 8%, var(--bg-elevated-2)) 50%,
    var(--bg-elevated-2) 100%
  );
  background-size: 200% 100%;
  animation: oc-shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
}
.sk-line {
  height: 10px;
  width: 100%;
  margin: 6px 0;
}
.sk-line.sk-short { width: 40%; }
.sk-line.sk-mid   { width: 70%; }
.sk-circle {
  width: 24px; height: 24px;
  border-radius: 50%;
}
.sk-block {
  height: 80px;
  width: 100%;
}
.sk-card {
  height: 60px;
  width: 100%;
  margin: 4px 0;
}
/* Stack of three lines for a "loading row" pattern. */
.sk-row {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 14px;
}

/* Reduced motion: keep skeletons present, kill the shimmer. */
@media (prefers-reduced-motion: reduce) {
  .sk-line, .sk-card, .sk-circle, .sk-block { animation: none; }
}

/* ----------------------------------------------------------------------------
   #9 — Sidebar nav active state. Soft gradient sliver instead of flat
   accent-muted background. Reads as a left-edge "rail indicator" rather
   than a tag. Plus the icon picks up a subtle gradient fill via background-
   clip: text.
   -------------------------------------------------------------------------- */
.nav-item.active {
  background: transparent !important;
  border-left: 3px solid transparent !important;
  border-image:
    linear-gradient(180deg, var(--accent) 0%,
                            color-mix(in srgb, var(--accent) 70%, var(--clr-purple, #8250df)) 100%) 1
    !important;
  color: var(--text-primary) !important;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 10%, transparent) 0%,
    transparent 60%
  );
  pointer-events: none;
}
.nav-item { position: relative; }
.nav-item.active .icon {
  color: var(--accent) !important;
}
.nav-item.active .label {
  color: var(--text-primary) !important;
  font-weight: var(--fw-semibold);
}

/* ----------------------------------------------------------------------------
   #10 — Custom scrollbars. Thin rail; thumb only visible at rest in muted
   form, brightens on hover. Both WebKit and Firefox supported.
   -------------------------------------------------------------------------- */
:root {
  --scrollbar-thumb:        color-mix(in srgb, var(--text-muted) 50%, transparent);
  --scrollbar-thumb-hover:  color-mix(in srgb, var(--accent) 70%, transparent);
  --scrollbar-track:        transparent;
}

*::-webkit-scrollbar         { width: 10px; height: 10px; }
*::-webkit-scrollbar-track   { background: var(--scrollbar-track); }
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
  transition: background-color var(--tr-fast);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner  { background: transparent; }

/* Firefox: scrollbar-width + scrollbar-color. The thumb color is the
   "active/hover" tone; Firefox doesn't yet support per-state styling. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
