/*
    The one compiled stylesheet behind every Bindu product surface — BCP admin,
    the customer portal, BinduHost, and whatever ships next. There is
    deliberately no second entry point: products differ in their Blade layouts
    and components, not in their build.

    This file replaces what used to be resources/views/partials/bcp-theme.blade.php,
    where the palette lived as a `tailwind.config` object read by the Tailwind
    Play CDN at runtime. The colour decisions below are that file's decisions,
    unchanged; only the mechanism moved from a runtime script to a build step.
*/
@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';

@theme {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';

    /* ------------------------------------------------------------------
       The Bindu brand ramp. 600 is the brand itself, #A312C7 — taken from the
       palette the product owner supplied, whose vivid band matches the
       brighter half of the BCP logo gradient.
       ------------------------------------------------------------------ */
    --color-brand-50:  #fbf0fe;
    --color-brand-100: #f3dcfd;
    --color-brand-200: #e8bef8;
    --color-brand-300: #d08cfa;
    --color-brand-400: #c55bee;
    --color-brand-500: #b92ae0;
    --color-brand-600: #a312c7;
    --color-brand-700: #8b0a8b;
    --color-brand-800: #7a0578;
    --color-brand-900: #660066;
    --color-brand-950: #4a0049;

    /* A second, pinker purple. Kept distinct from the violet primary so
       informational states still read as their own thing rather than
       dissolving into the brand colour. */
    --color-orchid-50:  #faf5ff;
    --color-orchid-100: #f3e8ff;
    --color-orchid-200: #e9d5ff;
    --color-orchid-300: #d8b4fe;
    --color-orchid-400: #c084fc;
    --color-orchid-500: #a855f7;
    --color-orchid-600: #9333ea;
    --color-orchid-700: #7e22ce;
    --color-orchid-800: #6b21a8;
    --color-orchid-900: #581c87;
    --color-orchid-950: #3b0764;

    /* The neutral the whole panel is built on: a purple-tinted charcoal that
       keeps slate's lightness steps — so every existing contrast relationship
       survives — and swings the hue from ~215 (blue) to ~265 (violet).
       500 is lifted off the literal slate equivalent to clear AA at 4.75:1,
       because that step carries placeholders and metadata.

       The dark end was lifted again on the owner's instruction: the panel
       read as black rather than as the purple it is meant to be, so ground
       and surface both moved up a step and further into violet. 500 moved
       with them, since lifting the ground it sits on would otherwise have
       spent the AA margin the line above promises. */
    --color-shade-50:  #f9f7fd;
    --color-shade-100: #f2eef9;
    --color-shade-200: #e2dfeb;
    --color-shade-300: #cec6e2;
    --color-shade-400: #a79cc4;
    --color-shade-500: #9182bb;
    --color-shade-600: #6a5c90;
    --color-shade-700: #4a4066;
    --color-shade-800: #3a3157;
    --color-shade-900: #271f45; /* cards, sidebar */
    --color-shade-950: #1a1430; /* page ground    */

    /* ------------------------------------------------------------------
       The remaps, and the whole reason this palette works.

       These views carry roughly 2,000 hard-coded colour utilities — 1,640 of
       them slate. Rewriting each one would have been a week of edits and
       would have left the next person a fresh hard-coded colour to hunt down.
       Moving what the existing tokens point at re-themes every page at once.

           indigo, blue, sky        -> brand    (the #A312C7 accent)
           cyan                     -> orchid   (informational, still purple)
           slate, gray, zinc, neutral -> shade  (the neutral everything sits on)

       Written as literal values rather than var() references to the ramps
       above: Tailwind v4 only emits theme variables it sees used, so a
       var(--color-brand-500) here would dangle if nothing referenced the
       brand ramp directly.
       ------------------------------------------------------------------ */

    /* Accents -> brand violet. */
    --color-indigo-50:  #fbf0fe;
    --color-indigo-100: #f3dcfd;
    --color-indigo-200: #e8bef8;
    --color-indigo-300: #d08cfa;
    --color-indigo-400: #c55bee;
    --color-indigo-500: #b92ae0;
    --color-indigo-600: #a312c7;
    --color-indigo-700: #8b0a8b;
    --color-indigo-800: #7a0578;
    --color-indigo-900: #660066;
    --color-indigo-950: #4a0049;

    --color-blue-50:  #fbf0fe;
    --color-blue-100: #f3dcfd;
    --color-blue-200: #e8bef8;
    --color-blue-300: #d08cfa;
    --color-blue-400: #c55bee;
    --color-blue-500: #b92ae0;
    --color-blue-600: #a312c7;
    --color-blue-700: #8b0a8b;
    --color-blue-800: #7a0578;
    --color-blue-900: #660066;
    --color-blue-950: #4a0049;

    --color-sky-50:  #fbf0fe;
    --color-sky-100: #f3dcfd;
    --color-sky-200: #e8bef8;
    --color-sky-300: #d08cfa;
    --color-sky-400: #c55bee;
    --color-sky-500: #b92ae0;
    --color-sky-600: #a312c7;
    --color-sky-700: #8b0a8b;
    --color-sky-800: #7a0578;
    --color-sky-900: #660066;
    --color-sky-950: #4a0049;

    /* Informational -> the pinker purple, so "trialing" stays
       distinguishable from a brand accent. */
    --color-cyan-50:  #faf5ff;
    --color-cyan-100: #f3e8ff;
    --color-cyan-200: #e9d5ff;
    --color-cyan-300: #d8b4fe;
    --color-cyan-400: #c084fc;
    --color-cyan-500: #a855f7;
    --color-cyan-600: #9333ea;
    --color-cyan-700: #7e22ce;
    --color-cyan-800: #6b21a8;
    --color-cyan-900: #581c87;
    --color-cyan-950: #3b0764;

    /* Neutrals -> purple-tinted charcoal.

       The dark end is deliberately not near-black. Stock slate-950 is
       #020617 and the first version of this ramp went darker still at
       #080511, which on a full-screen panel reads as a hole rather than
       a surface: a card at #191231 barely separated from it, so the
       whole interface looked like one flat void with text on it. The
       second version answered that at #120f1d over #201a33 — enough
       separation, but still read as black in the room: on a real monitor
       the violet in it was invisible and the panel simply looked unlit.

       Ground is now #1a1430 and cards are #271f45. One step lighter again
       and further into violet, so the panel reads as the purple product it
       belongs to rather than as a black one, while a card still sits ON
       something and the borders at 800 are visible without being bright.

       Lightness steps keep slate's own relationships, so contrast the
       views already relied on survives -- against this ground, 400
       measures 6.9:1 and 500 measures 5.2:1, both comfortably past AA. */
    --color-slate-50:  #f9f7fd;
    --color-slate-100: #f2eef9;
    --color-slate-200: #e2dfeb;
    --color-slate-300: #cec6e2;
    --color-slate-400: #a79cc4;
    --color-slate-500: #9182bb;
    --color-slate-600: #6a5c90;
    --color-slate-700: #4a4066;
    --color-slate-800: #3a3157;
    --color-slate-900: #271f45;
    --color-slate-950: #1a1430;

    --color-gray-50:  #f9f7fd;
    --color-gray-100: #f2eef9;
    --color-gray-200: #e2dfeb;
    --color-gray-300: #cec6e2;
    --color-gray-400: #a79cc4;
    --color-gray-500: #9182bb;
    --color-gray-600: #6a5c90;
    --color-gray-700: #4a4066;
    --color-gray-800: #3a3157;
    --color-gray-900: #271f45;
    --color-gray-950: #1a1430;

    --color-zinc-50:  #f9f7fd;
    --color-zinc-100: #f2eef9;
    --color-zinc-200: #e4dff0;
    --color-zinc-300: #cec6e2;
    --color-zinc-400: #a094c4;
    --color-zinc-500: #9182bb;
    --color-zinc-600: #544477;
    --color-zinc-700: #3b2e5d;
    --color-zinc-800: #2f2554;
    --color-zinc-900: #221a3e;
    --color-zinc-950: #120d24;

    --color-neutral-50:  #f9f7fd;
    --color-neutral-100: #f2eef9;
    --color-neutral-200: #e4dff0;
    --color-neutral-300: #cec6e2;
    --color-neutral-400: #a094c4;
    --color-neutral-500: #9182bb;
    --color-neutral-600: #544477;
    --color-neutral-700: #3b2e5d;
    --color-neutral-800: #2f2554;
    --color-neutral-900: #221a3e;
    --color-neutral-950: #120d24;

    /* Named roles, for markup written from here on. Prefer these over
       reaching for a number. */
    --color-primary:       #a312c7;
    --color-primary-hover: #8b0a8b;
    --color-primary-light: #b92ae0;
    --color-primary-soft:  #c55bee;
    --color-primary-dark:  #7a0578;
    --color-primary-deep:  #4a0049;

    /*
        Semantic colour is deliberately NOT remapped, and this is load-bearing:
        emerald still means success, rose still means failure, amber still
        means waiting, orange still means attention. Purple is the brand, not
        a status, and it never stands in for one. Do not add emerald/rose/
        amber/orange overrides above.
    */
}

/*
    ======================================================================
    Per-product theme scopes.

    The remaps above are the Bindu house style and apply everywhere by
    default, so a new product surface inherits the brand without doing
    anything.

    BinduHost has its own purple, on the owner's instruction. Its screens
    were built against stock Tailwind — navy slate, indigo buttons — and
    the owner supplied a palette to build the client area from, leaving
    where each shade goes to judgement. The five swatches, sampled from the
    image they sent:

        #EFD4FF  lavender    the "you are here" pill in the menu
        #C791E0  orchid      links and focus inside the frame
        #66308B  purple      the active icon tile, the frame's glow
        #48166B  deep        borders inside the frame
        #21013E  deepest     the frame itself, and the ink of every heading

    ── A bright workspace inside a purple frame ───────────────────────────

    The first version was purple throughout, page and all. The owner kept
    the frame and asked for the body in white: a whole screen of deep purple
    was hard on the eyes. So the client area is now the shape the admin
    panel already has — a dark rail and top bar around a bright page — and
    it is built the same way, with two scopes rather than sixty edited views:

        .theme-binduhost         on <html>: the bright workspace
        .theme-binduhost-frame   on the rail and the top bar: the purple

    Every BinduHost screen was written dark-first — bg-slate-900 for a
    card, text-white for its heading, text-slate-400 under it — and every
    one of those utilities resolves a variable at the point of use. Turning
    the ramp over on an ancestor turns the whole page over; putting the
    dark values back on the frame keeps its markup working unchanged.

    The same thing this breaks in the admin panel breaks here, and is
    handled the same way: `text-white` was both a heading and the label on
    a purple button. A heading must darken; a label must not. The labels
    are a literal white in the markup — search these views for text-[#fff].

    Measured on a white card: metadata (500) 6.0:1, secondary text (400)
    7.9:1, a link 7.7:1, a white label on a button 18.4:1 and 13.1:1 on its
    hover. 700 is the input edge and the disabled button, grey enough that
    a disabled button does not pass for a purple one you can press.

    ── The buttons are the frame's own purple ─────────────────────────────

    They were a mid purple (#8a3cc4, lifting to #9a4ed4). The owner asked for
    them as deep as the rail beside them, so a button is now the palette's
    deepest shade, the one the frame is painted in, and lifts on hover to the
    next one up. The frame puts the old pair back for itself: a button the
    colour of the rail would vanish on the rail.

    ── Status colours ─────────────────────────────────────────────────────

    Green still means done, red still means wrong, amber still means
    waiting; that is not touched. But the views say it in tints chosen for a
    dark surface — text-emerald-300, text-rose-400 — and a pale green word
    on a white card cannot be read. So inside the workspace the TEXT steps
    of each status colour (200–400) are the same hue, dark enough to read,
    and the two deep steps the views use at 20–30% as a tinted box
    (900, 950) are light ones, so the box is a clean pale tint rather than
    a grey smudge. Nothing changes colour; each only moves to the end of
    its own ramp that suits a bright page.
    ======================================================================
*/
.theme-binduhost {
    /* Headings: the palette's deepest purple as ink, not pure black. */
    --color-white: #21013e;

    --color-slate-50:  #21013e;
    --color-slate-100: #2b0e47; /* text typed into an input  */
    --color-slate-200: #382052; /* body text                 */
    --color-slate-300: #4b3566;
    --color-slate-400: #5b4974; /* secondary text            */
    --color-slate-500: #6c5a87; /* metadata, placeholders    */
    --color-slate-600: #7d6d94;
    --color-slate-700: #d2c7e0; /* input edges, disabled     */
    --color-slate-800: #e7dff0; /* hairlines, dividers, hover */
    --color-slate-900: #ffffff; /* cards                     */
    --color-slate-950: #f8f5fc; /* the page, inputs          */

    --color-indigo-50:  #fbf4ff;
    --color-indigo-100: #f6e7ff;
    --color-indigo-200: #efd4ff;
    --color-indigo-300: #7430a6; /* links on a card           */
    --color-indigo-400: #8a3cc4;
    --color-indigo-500: #48166b; /* button hover, selection   */
    --color-indigo-600: #21013e; /* the buttons               */
    --color-indigo-700: #7430a6;
    --color-indigo-800: #5e2389;
    --color-indigo-900: #48166b;
    --color-indigo-950: #2e0a4c;

    /* Status text, dark enough for a white card. Same hues. */
    --color-emerald-200: #005f44;
    --color-emerald-300: #006b4a;
    --color-emerald-400: #007a55;
    --color-rose-200:    #7a0020;
    --color-rose-300:    #8a0025;
    --color-rose-400:    #b0002e;
    --color-amber-200:   #6f2e05;
    --color-amber-300:   #7f3400;
    --color-amber-400:   #8f3b00;
    --color-orange-400:  #9f2d00;
    --color-cyan-400:    #7e22ce;
    --color-purple-400:  #8200db;

    /* A white label sits on these two; deepened a little so it reads. */
    --color-emerald-500: #00875d;
    --color-emerald-600: #007a55;

    /* The steps used only as a 20–30% tinted box: light, so the tint is clean. */
    --color-emerald-900: #5ee9b5;
    --color-rose-900:    #ffa1ad;
    --color-rose-950:    #ffa1ad;
    --color-rose-800:    #f08ea0; /* the edge of that box */

    /* The shared rules that are not utilities — the input focus ring, the
       selection colour, the paginator — follow the same palette. */
    --bcp-primary:        #8a3cc4;
    --bcp-primary-light:  #8a3cc4;
    --bcp-primary-ring:   rgb(138 60 196 / 0.25);
    --bcp-surface:        #ffffff;
    --bcp-surface-raised: #f3ecfa;
    --bcp-border-lit:     #d2c7e0;
    --bcp-text:           #382052;
    --bcp-text-dim:       #5b4974;
    --bcp-text-faint:     #6c5a87;

    /* The focus ring the layout draws on links and buttons. */
    --bh-focus: #8a3cc4;
}

/*
    The frame: the rail and the top bar keep the purple, and the values
    their markup was written against.
*/
.theme-binduhost-frame {
    --color-white: #ffffff;

    --color-slate-50:  #fbf7fe;
    --color-slate-100: #f5eefb;
    --color-slate-200: #eadcf6;
    --color-slate-300: #dcc8ec;
    --color-slate-400: #c6abdc; /* secondary text: 9.0:1 on the rail */
    --color-slate-500: #ad8cc8; /* the breadcrumb: 6.5:1             */
    --color-slate-600: #8d63ae;
    --color-slate-700: #603a80;
    --color-slate-800: #48166b;
    --color-slate-900: #33105a;
    --color-slate-950: #1f0239;

    --color-indigo-300: #dcb6f2;
    --color-indigo-400: #c791e0;
    --color-indigo-500: #9a4ed4; /* a button on the rail must show on it */
    --color-indigo-600: #8a3cc4;

    --bh-focus: #c791e0;
}

/*
    ======================================================================
    The bright workspace.

    The admin panel was written dark-first: across 66 views there are some
    2,200 hard-coded utilities that all assume a dark surface — bg-slate-900
    for a card, text-white for its heading, text-slate-400 for the metadata
    under it, border-slate-800 around the whole thing. Making the workspace
    light by editing those would be sixty-six files of find-and-replace, and
    the sixty-seventh view somebody adds next month would be dark again.

    So the ramp is turned over instead, in one place. Every one of those
    utilities resolves a variable at the point of use, so redefining the
    variables on an ancestor re-themes the entire subtree:

        bg-slate-900   card       ->  white
        bg-slate-950   ground     ->  a pale lavender the card sits on
        border-slate-800          ->  a light hairline
        text-white     heading    ->  near-black ink
        text-slate-400 metadata   ->  a mid grey that still reads

    The lightness order is reversed, but every RELATIONSHIP the views rely on
    survives: a card is still distinct from the ground, a heading is still
    stronger than its metadata, a border is still quieter than both. That is
    why this works at all — the panel was written consistently.

    Accents are untouched. brand, emerald, rose and amber mean exactly what
    they meant, so success is still green, danger still red, and the purple
    is still the purple in the logo.

    ONE THING THIS BREAKS, and it is handled in the markup rather than here:
    `text-white` had two jobs. On a dark card it was a heading, and it should
    darken. On a purple button it was the label, and it must stay white. The
    sixty-one label cases were changed to a literal white so they no longer
    ask this variable — search the views for text-[#fff] to find them.
    ====================================================================== */
.theme-bcp-light {
    /* Headings. Not pure black: a near-black violet keeps the panel's hue
       and is easier to read for long stretches than #000 on white. */
    --color-white: #14102a;

    --color-slate-50:  #1a1430;
    --color-slate-100: #241c40;
    --color-slate-200: #322851;
    --color-slate-300: #453a68;
    --color-slate-400: #5f5680; /* secondary text — 6.7:1 on a white card */
    --color-slate-500: #736a8d; /* metadata      — 5.0:1 on a white card */
    --color-slate-600: #a99fc2;
    --color-slate-700: #cfc7e2; /* input borders */
    --color-slate-800: #e7e2f3; /* hairlines, chips */
    --color-slate-900: #ffffff; /* cards, topbar */
    --color-slate-950: #f7f5fc; /* the ground a card sits on */

    --color-gray-50:  #1a1430;
    --color-gray-100: #241c40;
    --color-gray-200: #322851;
    --color-gray-300: #453a68;
    --color-gray-400: #5f5680;
    --color-gray-500: #736a8d;
    --color-gray-600: #a99fc2;
    --color-gray-700: #cfc7e2;
    --color-gray-800: #e7e2f3;
    --color-gray-900: #ffffff;
    --color-gray-950: #f7f5fc;

    --color-zinc-50:  #1a1430;
    --color-zinc-100: #241c40;
    --color-zinc-200: #322851;
    --color-zinc-300: #453a68;
    --color-zinc-400: #5f5680;
    --color-zinc-500: #736a8d;
    --color-zinc-600: #a99fc2;
    --color-zinc-700: #cfc7e2;
    --color-zinc-800: #e7e2f3;
    --color-zinc-900: #ffffff;
    --color-zinc-950: #f7f5fc;

    --color-neutral-50:  #1a1430;
    --color-neutral-100: #241c40;
    --color-neutral-200: #322851;
    --color-neutral-300: #453a68;
    --color-neutral-400: #5f5680;
    --color-neutral-500: #736a8d;
    --color-neutral-600: #a99fc2;
    --color-neutral-700: #cfc7e2;
    --color-neutral-800: #e7e2f3;
    --color-neutral-900: #ffffff;
    --color-neutral-950: #f7f5fc;

    --color-shade-50:  #1a1430;
    --color-shade-100: #241c40;
    --color-shade-200: #322851;
    --color-shade-300: #453a68;
    --color-shade-400: #5f5680;
    --color-shade-500: #736a8d;
    --color-shade-600: #a99fc2;
    --color-shade-700: #cfc7e2;
    --color-shade-800: #e7e2f3;
    --color-shade-900: #ffffff;
    --color-shade-950: #f7f5fc;

    /* The hand-written .bcp-* components resolve these rather than the
       utility ramp, and some of them — the icon button, the scrollbar, the
       search field — appear in the light half of the page. */
    --bcp-surface:        #ffffff;
    --bcp-surface-raised: #f2eefb;
    --bcp-surface-sunken: #f7f5fc;
    --bcp-border:         #e7e2f3;
    --bcp-border-lit:     #cfc7e2;
    --bcp-text:           #14102a;
    --bcp-text-dim:       #5f5680;
    --bcp-text-faint:     #736a8d;
}

/*
    And the exception inside the exception: the sidebar stays dark.

    A dark rail against a bright workspace is the whole shape of the layout —
    it is what tells you at a glance which part of the screen is navigation
    and which part is the thing you came to read. So the aside puts the
    original ramp back for its own subtree, and its markup keeps working
    unchanged, because the values below are the ones it was written against.
*/
.theme-bcp-dark {
    --color-white: #ffffff;

    --color-slate-50:  #f9f7fd;
    --color-slate-100: #f2eef9;
    --color-slate-200: #e2dfeb;
    --color-slate-300: #cec6e2;
    --color-slate-400: #a79cc4;
    --color-slate-500: #9182bb;
    --color-slate-600: #6a5c90;
    --color-slate-700: #4a4066;
    --color-slate-800: #3a3157;
    --color-slate-900: #241c44;
    --color-slate-950: #1a1430;

    --color-gray-400: #a79cc4;
    --color-gray-500: #9182bb;
    --color-gray-800: #3a3157;
    --color-gray-900: #241c44;
    --color-gray-950: #1a1430;

    --color-shade-800: #3a3157;
    --color-shade-900: #241c44;
    --color-shade-950: #1a1430;

    --bcp-surface:        #241c44;
    --bcp-surface-raised: #2f2554;
    --bcp-surface-sunken: #1a1430;
    --bcp-border:         #3a3157;
    --bcp-border-lit:     #4a4066;
    --bcp-text:           #f2eef9;
    --bcp-text-dim:       #c3b9dc;
    --bcp-text-faint:     #9182bb;
}

/*
    The same ramp again as custom properties, for the hand-written rules
    below and for anything that needs a colour outside a utility class.
*/
:root {
    --bcp-brand-300: #d08cfa;
    --bcp-brand-400: #c55bee;
    --bcp-brand-500: #b92ae0;
    --bcp-brand-600: #a312c7;
    --bcp-brand-700: #8b0a8b;
    --bcp-brand-800: #7a0578;
    --bcp-brand-900: #660066;
    --bcp-brand-950: #4a0049;

    /* ---- Roles ---- */
    --bcp-primary:        #a312c7;
    --bcp-primary-hover:  #8b0a8b;
    --bcp-primary-light:  #b92ae0;
    --bcp-primary-soft:   #c55bee;
    --bcp-primary-dark:   #7a0578;
    /* Brightest step, for small text on a dark ground where the mid
       shades would not clear AA. */
    --bcp-primary-text:   #d08cfa;

    /* ---- Purple surfaces, edges and light ----
       Translucent so they tint whatever they sit on rather than punching
       a flat block of colour through the page. */
    --bcp-purple-background: rgb(163 18 199 / 0.07);
    --bcp-purple-muted:      rgb(185 42 224 / 0.12);
    --bcp-purple-muted-lit:  rgb(185 42 224 / 0.20);
    --bcp-purple-border:     rgb(185 42 224 / 0.30);
    --bcp-purple-border-lit: rgb(185 42 224 / 0.55);
    --bcp-purple-ring:       rgb(185 42 224 / 0.45);
    --bcp-purple-glow:       rgb(163 18 199 / 0.35);

    /* Older names kept as aliases so nothing written against them breaks. */
    --bcp-primary-muted:        var(--bcp-purple-muted);
    --bcp-primary-muted-strong: var(--bcp-purple-muted-lit);
    --bcp-primary-border:       var(--bcp-purple-border);
    --bcp-primary-border-lit:   var(--bcp-purple-border-lit);
    --bcp-primary-ring:         var(--bcp-purple-ring);
    --bcp-primary-glow:         var(--bcp-purple-glow);

    /* ---- Neutrals ---- */
    --bcp-surface:        #221a3e; /* cards, sidebar, topbar   */
    --bcp-surface-raised: #2f2554; /* hovered / raised surface */
    --bcp-surface-sunken: #120d24; /* page ground, inputs      */
    --bcp-border:         #2f2554;
    --bcp-border-lit:     #3b2e5d;
    --bcp-text:           #e4dff0;
    --bcp-text-dim:       #a094c4;
    --bcp-text-faint:     #9182bb;

    --bcp-sidebar-width:           16rem;
    --bcp-sidebar-width-collapsed: 4.5rem;
}

/*
    Focus. One visible, purple, consistent ring everywhere — the panel had
    no focus styling of its own, so keyboard users were following the
    browser default over a dark background.

    Left unlayered on purpose. Tailwind v4 puts every utility in the
    `utilities` cascade layer, and unlayered rules beat layered ones outright
    regardless of specificity, so these now win over .border-slate-700
    without depending on the source-order accident they used to rely on
    under the Play CDN.
*/
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--bcp-primary-light);
    outline-offset: 2px;
    border-radius: 0.5rem;
}

input:focus,
select:focus,
textarea:focus,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--bcp-primary);
    box-shadow: 0 0 0 3px var(--bcp-primary-ring);
}

/* Text selection picks up the brand too. */
::selection {
    background: var(--bcp-primary);
    color: #fff;
}

/*
    Pagination. Laravel's stock Tailwind paginator is written for a light
    page — bg-white, gray borders — and looked pasted on. Restyled here so
    every ->links() call in the panel matches without publishing the vendor
    view or touching the pages that render it.
*/
nav[role="navigation"][aria-label*="Pagination"] span,
nav[role="navigation"][aria-label*="Pagination"] a {
    background-color: var(--bcp-surface-raised) !important;
    border-color: var(--bcp-border-lit) !important;
    color: var(--bcp-text-dim) !important;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

nav[role="navigation"][aria-label*="Pagination"] a:hover {
    background-color: var(--bcp-primary-muted-strong) !important;
    border-color: var(--bcp-primary-border) !important;
    color: var(--bcp-primary-soft) !important;
}

/* The page you are on. */
nav[role="navigation"][aria-label*="Pagination"] [aria-current="page"] span {
    background-color: var(--bcp-primary) !important;
    border-color: var(--bcp-primary-hover) !important;
    color: #fff !important;
    font-weight: 600;
}

/* Disabled prev/next. */
nav[role="navigation"][aria-label*="Pagination"] [aria-disabled="true"] span {
    color: var(--bcp-text-faint) !important;
    background-color: var(--bcp-surface) !important;
}

nav[role="navigation"][aria-label*="Pagination"] p,
nav[role="navigation"][aria-label*="Pagination"] p span {
    background: none !important;
    border: 0 !important;
    color: var(--bcp-text-faint) !important;
}

/*
    ======================================================================
    Sidebar and chrome components.

    These live in `@layer components` rather than unlayered, and the reason
    is a real bug rather than tidiness. Under the Play CDN the utility sheet
    was injected after this CSS, so at equal specificity a utility won:
    class="bcp-icon-btn hidden md:inline-flex" collapsed to display:none on
    mobile because `hidden` came last. Unlayered in v4 these rules would beat
    every utility instead, and that button — plus the collapsed-sidebar nav
    link carrying `hidden` — would become permanently visible.

    A components layer restores the old precedence exactly: utilities still
    override components, which is what the markup already assumes.
    ======================================================================
*/
@layer components {
    /*
        No transition on width or transform, deliberately. The panel used to
        be styled by the Tailwind Play CDN, which regenerated its stylesheet
        on every DOM mutation and cancelled any transition driven by a class
        or attribute swap — which is how both the collapse and the mobile
        drawer work. The layout therefore moves instantly and the motion
        lives where it is cheap and reliable: hover and focus.

        The CDN is gone, so that constraint has technically lifted, but
        animating width is layout-thrash on every frame in any case and the
        instant behaviour is what everyone has been using. Left as-is
        deliberately; this is an asset migration, not a redesign.
    */
    .bcp-sidebar {
        width: var(--bcp-sidebar-width);
    }

    /* Navigation rows. One definition, used by every item, instead of the
       same conditional class string repeated down the file. */
    .bcp-nav-link {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.875rem;
        padding: 0.625rem 0.875rem;
        border-radius: 0.625rem;
        border: 1px solid transparent;
        font-size: 0.9375rem;
        font-weight: 500;
        color: var(--bcp-text-dim);
        transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    }

    .bcp-nav-link:hover {
        background-color: var(--bcp-purple-muted);
        color: var(--bcp-text);
    }

    /* The page you are on: a solid brand pill.

       It used to be a tint with a rail on the leading edge, which is a fine
       way to mark a row but reads as "slightly warmer" on a screen holding
       twenty of them. Filled, it is the one thing in the rail your eye lands
       on first, which is the entire job of an active state. The white label
       is set as a literal rather than through the white variable, because the
       ramp is turned over in the workspace and this pill must stay white in
       both halves of the panel. */
    .bcp-nav-link.is-active {
        background-color: var(--bcp-primary);
        border-color: var(--bcp-primary);
        color: #fff;
        font-weight: 600;
        box-shadow: 0 6px 16px -6px var(--bcp-purple-glow);
    }

    .bcp-nav-link.is-active:hover {
        background-color: var(--bcp-primary-hover);
        color: #fff;
    }

    .bcp-nav-link.is-active .bcp-nav-icon { color: #fff; }

    /* Rows that are not links — the "Phase 4" placeholders. */
    .bcp-nav-muted {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.5rem 0.75rem;
        border-radius: 0.5rem;
        font-size: 0.875rem;
        color: var(--bcp-text-faint);
    }

    .bcp-nav-icon { width: 1.125rem; height: 1.125rem; flex: none; }

    /* Section headers, which double as collapse handles.

       They now do two different jobs depending on whether their section is
       open, which is the arrangement in the reference design and the reason
       it reads so cleanly:

         open   — a quiet caption above the rows it introduces. The rows are
                  the thing you are choosing between; a loud heading over
                  them competes with the choice.
         closed — a row in its own right, because that is what it behaves
                  like: the section's items are folded away and this is the
                  only thing left to press.

       One rule with an override rather than two components, so the label,
       the chevron and the collapsed-rail flyout all keep working unchanged. */
    .bcp-group-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 0.5rem;
        padding: 0.5rem 0.875rem;
        margin-top: 1rem;
        border-radius: 0.625rem;
        font-size: 0.6875rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--bcp-text-faint);
        background-color: transparent;
        transition: color .15s ease, background-color .15s ease;
    }

    /* Folded away: the heading is the row now, so it takes a row's size and
       a row's weight of colour. */
    .bcp-group[data-open="false"] > .bcp-group-toggle {
        font-size: 0.8125rem;
        letter-spacing: 0.04em;
        color: var(--bcp-text-dim);
    }

    .bcp-group-toggle:hover { color: var(--bcp-text); background-color: var(--bcp-purple-muted); }

    /* A section holding the current page gets a quiet brand tint, so the
       active area is obvious even when its items are folded away. Now that
       every header carries a resting tint, this one needs a stronger fill
       and a leading rail to still be the one that stands out — the same
       two marks an active nav row uses, so "you are here" looks the same
       whether you read the section or the row inside it. */
    .bcp-group.has-active > .bcp-group-toggle {
        color: var(--bcp-primary-light);
        background-color: var(--bcp-primary-muted-strong);
        box-shadow: inset 2px 0 0 0 var(--bcp-primary);
    }

    .bcp-group-chevron { width: 0.75rem; height: 0.75rem; flex: none; transition: transform .18s ease; }
    .bcp-group[data-open="false"] .bcp-group-chevron { transform: rotate(-90deg); }

    /* Search field. */
    .bcp-search-input {
        width: 100%;
        padding: 0.5rem 2rem 0.5rem 2.25rem;
        border-radius: 0.5rem;
        border: 1px solid var(--bcp-border);
        background-color: var(--bcp-surface-sunken);
        color: var(--bcp-text);
        font-size: 0.8125rem;
        transition: border-color .15s ease, box-shadow .15s ease;
    }

    .bcp-search-input::placeholder { color: var(--bcp-text-faint); }

    .bcp-kbd {
        font-size: 10px;
        font-weight: 600;
        padding: 0.0625rem 0.25rem;
        border-radius: 0.25rem;
        border: 1px solid var(--bcp-border-lit);
        background: var(--bcp-surface-raised);
        color: var(--bcp-text-faint);
    }

    /* Collapse / expand control. */
    .bcp-icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        border-radius: 0.5rem;
        border: 1px solid transparent;
        color: var(--bcp-text-dim);
        transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    }

    .bcp-icon-btn:hover {
        background-color: var(--bcp-primary-muted);
        border-color: var(--bcp-primary-border);
        color: var(--bcp-primary-soft);
    }

    /* Scrollbars, in the panel's own colours rather than the OS default. */
    .bcp-scroll { scrollbar-width: thin; scrollbar-color: var(--bcp-purple-border-lit) transparent; }
    .bcp-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
    .bcp-scroll::-webkit-scrollbar-track { background: transparent; }
    .bcp-scroll::-webkit-scrollbar-thumb { background: var(--bcp-purple-border); border-radius: 9999px; }
    .bcp-scroll:hover::-webkit-scrollbar-thumb { background: var(--bcp-primary-border-lit); }

    /*
        Tooltips and flyouts. Both are positioned fixed and measured from the
        hovered row, because the nav scrolls: anything absolutely positioned
        inside it gets clipped at the sidebar edge, which is exactly where a
        tooltip needs to be.
    */
    .bcp-tooltip {
        position: fixed;
        z-index: 80;
        padding: 0.3125rem 0.5rem;
        border-radius: 0.375rem;
        border: 1px solid var(--bcp-primary-border);
        background: var(--bcp-surface-raised);
        color: var(--bcp-text);
        font-size: 0.75rem;
        font-weight: 600;
        white-space: nowrap;
        pointer-events: none;
        box-shadow: 0 8px 24px rgb(10 6 19 / 0.65);
    }

    .bcp-flyout {
        position: fixed;
        z-index: 80;
        min-width: 13rem;
        padding: 0.375rem;
        border-radius: 0.625rem;
        border: 1px solid var(--bcp-primary-border);
        background: var(--bcp-surface);
        box-shadow: 0 18px 40px rgb(10 6 19 / 0.75), 0 0 24px -6px var(--bcp-purple-glow);
    }

    .bcp-flyout-title {
        padding: 0.375rem 0.5rem 0.5rem;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--bcp-primary-light);
        border-bottom: 1px solid var(--bcp-border);
        margin-bottom: 0.25rem;
    }

    /* Empty search result. */
    .bcp-empty {
        margin: 0.5rem 0.25rem;
        padding: 0.875rem 0.75rem;
        border-radius: 0.5rem;
        border: 1px dashed var(--bcp-primary-border);
        background: var(--bcp-primary-muted);
        color: var(--bcp-text-dim);
        font-size: 0.75rem;
        text-align: center;
    }
}

/*
    The sidebar's own search field keeps its styling over the generic
    input:focus rule above. Unlayered so it stays ahead of the utilities
    layer, and after the generic rule so it wins on source order.
*/
.bcp-search-input:focus {
    border-color: var(--bcp-primary);
    box-shadow: 0 0 0 3px var(--bcp-primary-ring);
    outline: none;
}

/* ------------------------------------------------------------------
   Collapsed sidebar — desktop only. Below md the sidebar is an overlay
   that slides in, and collapsing it there would leave a useless strip.

   Unlayered: these must beat both the components layer above and the
   `hidden` utility that the collapsed-only rows carry in their markup.
   ------------------------------------------------------------------ */
@media (min-width: 768px) {
    [data-bcp-collapsed="true"] .bcp-sidebar {
        width: var(--bcp-sidebar-width-collapsed);
    }

    /* Anything that is words rather than a symbol. */
    [data-bcp-collapsed="true"] .bcp-hide-collapsed { display: none !important; }

    [data-bcp-collapsed="true"] .bcp-nav-link,
    [data-bcp-collapsed="true"] .bcp-nav-muted {
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    [data-bcp-collapsed="true"] .bcp-brand { justify-content: center; padding-left: 0; padding-right: 0; }
    [data-bcp-collapsed="true"] .bcp-nav { padding-left: 0.625rem; padding-right: 0.625rem; }
    [data-bcp-collapsed="true"] .bcp-footer { justify-content: center; }
}

/* Shown only while collapsed. */
.bcp-only-collapsed { display: none; }
@media (min-width: 768px) {
    [data-bcp-collapsed="true"] .bcp-only-collapsed { display: flex; }
}

/*
    Anything that should be invisible until JavaScript says otherwise.

    Alpine's x-show alone left a window where a flyout was uncloaked but not
    yet hidden, and it painted at its default top:0/left:0 as a dark rounded
    box across the header. Making display:none the resting state removes the
    failure mode instead of racing it: with no JavaScript at all these stay
    invisible, which is what an unpositioned overlay should be.
*/
.bcp-reveal { display: none; }
.bcp-reveal.is-visible { display: block; }

/*
    The mobile scrim needs its own breakpoint rule rather than Tailwind's
    md:hidden. Media queries add no specificity, so .bcp-reveal.is-visible
    would outrank .md\:hidden and leave a full-screen blur over the desktop
    layout for anyone who opened the drawer on a phone and then widened the
    window.
*/
@media (min-width: 768px) {
    .bcp-scrim,
    .bcp-scrim.is-visible { display: none; }
}

/*
    ======================================================================
    BinduHost: the page ground, the frame and the menu.

    The frame — the rail down the side and the bar across the top — is the
    palette's deepest purple, running a shade deeper towards the foot, with
    an orchid hairline for an edge. The page inside it is bright: a white
    that carries the faintest lavender, so a white card has something to
    sit on, and a little more of it at the very top where it meets the bar.

    In the components layer, like the .bcp-* rules and for the same reason:
    a utility written on the same element still wins.
    ======================================================================
*/
@layer components {
    .bh-ground {
        background-color: #f8f5fc;
        background-image: linear-gradient(180deg, #f1e9fa 0, #f8f5fc 14rem);
        background-repeat: no-repeat;
    }

    .bh-frame {
        background-color: #1b0134;
        background-image: linear-gradient(180deg, #21013e 0%, #1b0134 60%, #16012a 100%);
        border-right: 1px solid rgb(199 145 224 / 0.14);
    }

    .bh-frame-rule     { border-bottom: 1px solid rgb(199 145 224 / 0.12); }
    .bh-frame-rule-top { border-top: 1px solid rgb(199 145 224 / 0.12); }

    /* Solid, where the rail's own first shade begins: over a white page a
       see-through purple would be a washed-out one. */
    .bh-topbar {
        background-color: #21013e;
        border-bottom: 1px solid rgb(199 145 224 / 0.14);
    }

    /* Behind the menu when it is a drawer. Dark on purpose: the workspace's
       own neutrals are light now, and a white veil would hide nothing. */
    .bh-scrim { background-color: rgb(33 1 62 / 0.55); }

    .bh-mark { box-shadow: 0 6px 18px -6px rgb(199 145 224 / 0.55); }

    /* A quiet caption over the rows it introduces: 5.3:1 on the rail. */
    .bh-nav-heading {
        padding: 0 0.75rem 0.375rem;
        font-size: 0.6875rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #9d7bbb;
    }

    /* Sized so all ten rows, their four captions, the logo and the account
       strip fit a 734px-tall laptop window without the menu scrolling. */
    .bh-nav-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.25rem 0.625rem 0.25rem 0.25rem;
        border-radius: 0.75rem;
        font-size: 0.875rem;
        font-weight: 500;
        color: #dcc8ec;
        transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
    }

    /* Every row's icon sits on its own small tile, so the rail reads as a
       column of places rather than a column of words. */
    .bh-nav-tile {
        display: grid;
        place-items: center;
        width: 1.75rem;
        height: 1.75rem;
        flex: none;
        border-radius: 0.5rem;
        background-color: rgb(102 48 139 / 0.32);
        color: #c9a8e2;
        transition: background-color .15s ease, color .15s ease;
    }

    .bh-nav-tile svg { width: 1rem; height: 1rem; }

    .bh-nav-link:hover { background-color: rgb(102 48 139 / 0.38); color: #fff; }
    .bh-nav-link:hover .bh-nav-tile { background-color: rgb(154 78 212 / 0.5); color: #fff; }

    /* The page you are on: a pill in the palette's lightest swatch, its icon
       tile in the palette's purple. The one light thing in a dark rail, so
       it is where the eye lands — 10.6:1 for the label at its darker end. */
    .bh-nav-link[aria-current="page"] {
        background-image: linear-gradient(135deg, #efd4ff 0%, #dcb6f2 100%);
        color: #21013e;
        font-weight: 700;
        box-shadow: 0 10px 24px -12px rgb(199 145 224 / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.55);
    }

    .bh-nav-link[aria-current="page"] .bh-nav-tile { background-color: #66308b; color: #efd4ff; }

    /* Initials in a ring, at the foot of the rail. */
    .bh-avatar {
        display: grid;
        place-items: center;
        width: 2.25rem;
        height: 2.25rem;
        flex: none;
        border-radius: 9999px;
        /* Starts a shade down from the orchid and is at the button purple
           before the letters begin, so white reads across their whole width. */
        background-color: #8a3cc4;
        background-image: linear-gradient(135deg, #a866d6 0%, #8a3cc4 40%, #66308b 100%);
        color: #fff;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        box-shadow: 0 0 0 2px #1b0134, 0 0 0 3px rgb(199 145 224 / 0.45);
    }

    /* A visitor's Sign in, at the foot of the rail. */
    .bh-account-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.4375rem 0.75rem;
        border-radius: 0.625rem;
        border: 1px solid rgb(199 145 224 / 0.22);
        background-color: rgb(102 48 139 / 0.22);
        color: #dcc8ec;
        font-size: 0.8125rem;
        font-weight: 600;
        transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    }

    .bh-account-btn:hover { background-color: rgb(154 78 212 / 0.4); border-color: rgb(199 145 224 / 0.45); color: #fff; }

    .bh-icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        flex: none;
        border-radius: 0.625rem;
        border: 1px solid rgb(199 145 224 / 0.22);
        color: #dcc8ec;
        transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    }

    .bh-icon-btn:hover { background-color: rgb(102 48 139 / 0.4); border-color: rgb(199 145 224 / 0.45); color: #fff; }

    .bh-scroll { scrollbar-width: thin; scrollbar-color: rgb(199 145 224 / 0.3) transparent; }
}

/*
    Alpine holds the first paint until it has read localStorage, so the
    sidebar never flashes expanded and then snaps shut.

    This now covers BinduHost too. That layout uses x-cloak on its mobile
    scrim but never included the old bcp-theme partial, so the rule simply
    did not exist there and the scrim flashed on every load. One shared
    stylesheet fixes it for every surface at once.
*/
[x-cloak] { display: none !important; }

/* Anyone who has asked their system to stop moving things. */
@media (prefers-reduced-motion: reduce) {
    .bcp-sidebar,
    .bcp-nav-link,
    .bcp-group-chevron,
    .bcp-icon-btn,
    .bh-nav-link,
    .bh-nav-tile,
    .bh-account-btn,
    .bh-icon-btn { transition: none !important; }
}
