/* ==========================================================================
   BE Rise — "Studio" look

   An optional look for the staff dashboard, chosen from the "Look" dropdown in the top bar (saved per browser as ber_look). It
   only restyles: a soft grey stage, floating black sidebar, large rounded white cards, lavender highlights and black pill
   buttons. Nothing is rearranged, so every page keeps working as it does in the classic look. Every rule is under
   html[data-look="studio"], so with the classic look chosen this file does nothing.
   Colours change in light mode; in dark mode the shapes change and the dark palette stays.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---- palette (light) ---- */
html[data-look="studio"][data-theme="light"] {
  --bg: #ececef; --bg-alt: #f4f4f6; --surface: #ffffff; --surface-veil: rgba(255, 255, 255, 0.94);
  --line: #e6e6eb; --heading: #141416; --body: #4a4a52; --muted: #7a7a85;
  --blue: #6e52cf; --blue-dark: #5a40b5; --blue-deep: #3b2a8c; --blue-btn: #141416;
  --blue-soft: #ece5fb; --blue-line: #cdbef1; --blue-ink: #3b2a8c;
}
@media (prefers-color-scheme: light) {
  html[data-look="studio"]:not([data-theme="dark"]) {
    --bg: #ececef; --bg-alt: #f4f4f6; --surface: #ffffff; --surface-veil: rgba(255, 255, 255, 0.94);
    --line: #e6e6eb; --heading: #141416; --body: #4a4a52; --muted: #7a7a85;
    --blue: #6e52cf; --blue-dark: #5a40b5; --blue-deep: #3b2a8c; --blue-btn: #141416;
    --blue-soft: #ece5fb; --blue-line: #cdbef1; --blue-ink: #3b2a8c;
  }
}

/* ---- type and stage ---- */
html[data-look="studio"] body { font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
html[data-look="studio"][data-theme="light"] body { background: #ececef; }
@media (prefers-color-scheme: light) { html[data-look="studio"]:not([data-theme="dark"]) body { background: #ececef; } }
html[data-look="studio"] h1, html[data-look="studio"] h2, html[data-look="studio"] h3 { letter-spacing: -0.02em; }

/* ---- cards ---- */
html[data-look="studio"] .card,
html[data-look="studio"] .stat { border-radius: 24px; border-color: transparent; box-shadow: none; }
html[data-look="studio"] .card__head { padding-top: 6px; }
html[data-look="studio"] .card__head h2 { font-size: 1.3125rem; font-weight: 600; }
html[data-look="studio"] .pill { border-radius: 999px; }
html[data-look="studio"] .notice { border-radius: 18px; }
html[data-look="studio"] input, html[data-look="studio"] select, html[data-look="studio"] textarea { border-radius: 14px; }

/* ---- buttons: black pills, lavender when quiet ---- */
html[data-look="studio"] .btn { border-radius: 999px; }
html[data-look="studio"] .btn--primary { background: var(--blue-btn); color: #fff; }
html[data-look="studio"][data-theme="light"] .btn--primary:hover { background: #2b2b31; }
html[data-look="studio"] .btn--ghost { background: var(--surface); }
html[data-look="studio"] .icon-btn { border-radius: 50%; }

/* ---- top bar: sits on the stage, not as a white strip ---- */
html[data-look="studio"] .topbar { background: transparent; border-bottom: 0; padding-top: 8px; backdrop-filter: none; position: static; }
html[data-look="studio"] .topbar h1 { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; }

/* ---- the Look dropdown itself (all looks) ---- */
.look-select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--heading);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 30px 8px 14px; cursor: pointer; min-height: 38px;
}
.look-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- hero banner (dashboard): lavender, big headline, black pill button ---- */
.studio-hero { display: none; }
html[data-look="studio"] .studio-hero {
  display: block; position: relative; overflow: hidden; margin: 0 0 26px; padding: 26px 28px 30px;
  background: #cdbef1; color: #141416; border-radius: 24px; min-height: 150px;
}
html[data-look="studio"] .studio-hero h2 { margin: 0; font-size: 2.0625rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; max-width: min(430px, 62%); }
html[data-look="studio"] .studio-hero p { margin: 12px 0 0; font-size: 0.9063rem; line-height: 1.55; color: #3c3848; max-width: min(400px, 56%); }
html[data-look="studio"] .studio-hero__btn {
  position: absolute; left: 62%; top: 76px; display: inline-flex; align-items: center; gap: 10px;
  background: #141416; color: #fff; border-radius: 999px; padding: 11px 20px; font-weight: 500; font-size: 0.9375rem; text-decoration: none;
}
html[data-look="studio"] .studio-hero__btn:hover { background: #2b2b31; }
html[data-look="studio"] .studio-hero::after {
  content: ""; position: absolute; right: -40px; top: -50px; width: 230px; height: 230px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e6dcfa 0 38%, #d9cdf6 39% 62%, #b9a3ec 63% 100%); opacity: 0.85; pointer-events: none;
}

/* ---- stat tiles and the board ---- */
html[data-look="studio"] .stat { padding: 20px 20px 18px; }
html[data-look="studio"] .stat__num { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.05em; line-height: 1.05; font-variant-numeric: tabular-nums; }
html[data-look="studio"] .grid--main { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 30px; }
html[data-look="studio"] .content { padding-top: 6px; }

/* ---- the icon rail (desktop; on a phone it stays the slide-in drawer) ---- */
@media (min-width: 901px) {
  html[data-look="studio"] { --sidebar-w: 68px; }
  html[data-look="studio"] .shell { padding: 16px 20px 16px 16px; gap: 32px; }
  html[data-look="studio"] .sidebar {
    top: 16px; height: auto; min-height: min(804px, calc(100dvh - 32px)); overflow: visible; align-self: start; z-index: 60;
    background: #141416; border-radius: 36px; padding: 26px 0 26px; align-items: center; color: #fff;
  }
  html[data-look="studio"] .sidebar__brand { padding: 0; margin-bottom: 34px; font-size: 0; gap: 0; justify-content: center; }
  html[data-look="studio"] .sidebar__brand > span:not(.brand-mark) { display: none; }
  html[data-look="studio"] .brand-mark { width: 42px; height: 42px; border-radius: 50%; background: #d9cdf6; color: #141416; font-size: 1.05rem; }
  html[data-look="studio"] .sidebar__org,
  html[data-look="studio"] .sidebar__label { display: none; }
  html[data-look="studio"] .sidebar__nav { padding: 0; gap: 14px; justify-items: center; flex: 1; }
  html[data-look="studio"] .sidebar__nav a {
    position: relative; width: 50px; height: 50px; padding: 0; border-radius: 50%; display: grid; place-items: center;
    font-size: 0; color: #f2f2f4; gap: 0;
  }
  html[data-look="studio"] .sidebar__nav a svg { width: 21px; height: 21px; }
  html[data-look="studio"] .sidebar__nav a:hover { background: #26262b; color: #fff; }
  html[data-look="studio"] .sidebar__nav a.is-active { background: #d9cdf6; color: #141416; }
  html[data-look="studio"] .sidebar__nav a .count {
    position: absolute; right: 4px; top: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: #b9a3ec; color: #141416; font-size: 10px; line-height: 16px; text-align: center;
  }
  html[data-look="studio"] .sidebar__nav a[data-tip]::before {
    content: attr(data-tip); position: absolute; left: 62px; top: 50%; transform: translateY(-50%); background: #141416; color: #fff;
    font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 9px; white-space: nowrap; opacity: 0; pointer-events: none; z-index: 5;
  }
  html[data-look="studio"] .sidebar__nav a[data-tip]:hover::before,
  html[data-look="studio"] .sidebar__nav a[data-tip]:focus-visible::before { opacity: 1; }
  html[data-look="studio"] .sidebar__foot { border: 0; padding: 12px 0 0; margin-top: auto; display: grid; justify-items: center; gap: 10px; }
  html[data-look="studio"] .sidebar__foot [data-change-pw],
  html[data-look="studio"] .user-chip__who { display: none; }
  html[data-look="studio"] .user-chip { flex-direction: column; gap: 10px; }
  html[data-look="studio"] .user-chip__av { background: #d9cdf6; color: #141416; }
  html[data-look="studio"] .signout { color: #f2f2f4; }
}

/* ---- narrow phones: keep the top-bar actions on screen ---- */
@media (max-width: 560px) {
  .look-select { padding: 8px 24px 8px 10px; font-size: 0.75rem; background-position: right 8px center; }
  html[data-look="studio"] .topbar { gap: 8px; padding-left: 14px; padding-right: 14px; }
  .topbar__actions:has(.look-select) { gap: 6px; }
  html[data-look="studio"] .studio-hero h2 { max-width: 100%; font-size: 1.6rem; }
  html[data-look="studio"] .studio-hero p { max-width: 100%; }
  html[data-look="studio"] .studio-hero__btn { position: static; margin-top: 16px; }
  html[data-look="studio"] .studio-hero::after { display: none; }
}
