/* latin-ext */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(font/pxiEyp8kv8JHgFVrJJnecmNE.woff2) format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(font/pxiEyp8kv8JHgFVrJJfecg.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Light Theme */
    --scrollbar-thumb: #c1c1c1;
    --scrollbar-thumb-hover: #a8a8a8;
    --scrollbar-track: #f1f1f1;
    /* Shared hover/focus tokens - keep every interactive element's transition and
       focus indicator consistent instead of each rule picking its own value. */
    --transition-hover: 0.2s ease; /* most prominent duration */
    --focus-ring-color: #0d6efd;

    /* ---- Typography -------------------------------------------------------
       Use these tokens instead of literal values for every font family, weight
       and size. Sizes come in two flavours: --font-size-* resolve against the
       root (rem) and are the default choice, --font-size-rel-* against the
       parent (em) for text that has to scale with whatever surrounds it.
       Only weight 400 has a registered @font-face (see the two blocks at the
       top of this file), so browsers synthesise 600 and 700 from it until the
       matching font files are added.
       ---------------------------------------------------------------------- */

    /* Family */
    --font-family-base: 'Poppins', sans-serif;
    --font-family-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Weight */
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Size scale, 16px root */
    --font-size-2xs: 0.625rem;  /* 10 */
    --font-size-xs: 0.75rem;    /* 12 */
    --font-size-sm: 0.875rem;   /* 14 */
    --font-size-base: 1rem;     /* 16 */
    --font-size-md: 1.125rem;   /* 18 */
    --font-size-lg: 1.25rem;    /* 20 */
    --font-size-xl: 1.375rem;   /* 22 */
    --font-size-2xl: 1.5rem;    /* 24 */
    --font-size-3xl: 2rem;      /* 32 */
    --font-size-4xl: 3rem;      /* 48 */
    --font-size-5xl: 4rem;      /* 64 */

    /* Relative steps, resolved against the parent instead of the root */
    --font-size-rel-xs: 0.7em;  /* markedly smaller than its context */
    --font-size-rel-sm: 0.9em;  /* slightly smaller than its context */
    --font-size-rel-lg: 1.1em;  /* slightly larger than its context */

    /* Hook Bootstrap's own chain at its root: it derives --bs-body-font-family
       from --bs-font-sans-serif, and .tooltip / .popover read that variable
       directly, so overriding it here is what puts them in the app font too.
       This file loads after bootstrap.min.css, so the override wins on source
       order. */
    --bs-font-sans-serif: var(--font-family-base);
    --bs-font-monospace: var(--font-family-mono);
    --bs-body-font-size: var(--font-size-base);
    --bs-body-font-weight: var(--font-weight-normal);
}

html[data-bs-theme="dark"] {
    /* Dark Theme */
    --scrollbar-thumb: #6b6b6b;
    --scrollbar-thumb-hover: #888;
    --scrollbar-track: #2d2d2d;
}

body {
    --sidebar: #022257;
    --sidebar-hover: #102b57;
    --background: #ffffff;
    --text: black;
    --button: #007bff;
    --button-hover: #2639ff;
    --button-disabled: #999999;
    --button-secondary: #6c757d;
    --button-secondary-hover: #5c636a;
    --sidebar-text: white;
    --border-footer: #dee2e6;
    --user-message: #FAFCFF;
    --border-user-chat: #E0E0E0;
    --assist-message: #FFFFFF;
    --border-assist-chat: #E0E0E0;
    --chat-input-text: #212529;
    --chat-input-background: #ffffff;
    --chat-hover-button: #bebebe;
    --chat-input-placeholder: #313539;
    --chat-background-disabled: #999999;
    --tooltip-bg: #f5f5f5;
    font-family: var(--font-family-base);
    margin: 0;
}

html[data-bs-theme="dark"] body {
    --sidebar: #1b233a;
    --sidebar-hover: #20283e;
    --text: #f3f3f3;
    --background: #212529;
    --button: #14569b;
    --button-hover: #2639ff;
    --button-disabled: #55595c;
    --sidebar-text: #f3f3f3;
    --border-footer: #3b3d43;
    --user-message: #2e3439;
    --border-user-chat: #454c54;
    --assist-message: #565d63;
    --border-assist-chat: #6e757c;
    --chat-input-text: var(--text);
    --chat-input-background: var(--user-message);
    --chat-input-placeholder: #9aa0a6;
    --button-secondary: #3e454b;
    --button-secondary-hover: #4e555b;
    --tooltip-bg: #2c3136;
}

*,
::after,
::before {
    box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
    *,
    ::after,
    ::before {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Baseline keyboard-focus indicator for every focusable element. Components with their
   own hover treatment (background/transform change, not just an outline) additionally
   pair a :focus-visible rule with their :hover rule so keyboard users get the same
   feedback as mouse users - this rule is the fallback for everything else.
   Negative offset keeps the ring inside the element's own box - tightly packed
   neighbours (sidebar rows, cards with no gap) sit flush with no gap for an outward
   ring to bleed into, which was causing visual overlap with adjacent divs. */
:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: -2px;
}

/* Bootstrap's font-weight utilities hardcode their numbers, so templates using
   them would bypass the tokens above. Re-point the three the app actually uses.
   The !important matches Bootstrap's own declaration; this file loads after
   bootstrap.min.css, so equal specificity resolves in our favour. */
.fw-normal {
    font-weight: var(--font-weight-normal) !important;
}

.fw-semibold {
    font-weight: var(--font-weight-semibold) !important;
}

.fw-bold {
    font-weight: var(--font-weight-bold) !important;
}

a:not(.chat-message, .chat-message a) {
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-family-base);
}

li {
    list-style: none;
}

h4 {
    font-family: var(--font-family-base);
    font-size: var(--font-size-lg);
}

.wrapper {
    align-items: stretch;
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    min-width: 0;
    /* Body-scroll mode: let content grow the page and the window scroll.
       The viewport-locked exception is scoped to body.app-fixed (see style.css). */
    overflow: visible;
    transition: all 0.35s ease-in-out;
    background-color: var(--background);
    color: var(--text);
    width: 100%;
}

html[data-bs-theme="dark"]