:root{
    /* Business Game 5.0 identity system */
    --brand-blue-deep: #1E2939;   /* BleuProfond */
    --brand-blue: #4C76AA;        /* Bleu        */
    --brand-beige: #F6F1EA;       /* Beige       */
    --brand-beige-grey: #EEEBE5;  /* Beige Grise */

    --primary: var(--brand-blue);
    --card: var(--brand-beige);

    /* Metronic's default --info is a saturated violet (#8E51FF) that belongs to
       no part of this identity and reads as a bug next to everything else. */
    --info: var(--brand-blue);

    /* Secondary surfaces were a cool grey (#F3F4F6) sitting inside beige cards,
       so the two never quite belonged together. */
    --secondary: var(--brand-beige-grey);
    --accent: var(--brand-beige-grey);
    --muted: var(--brand-beige-grey);
}

#app{
    width: 100%;
    min-height: 100vh;
}
.kt-skeleton {
    background: linear-gradient(90deg, var(--accent) 25%, var(--border) 50%, var(--accent) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.select2{
  width: 100% !important;
}

.select2-selection--single{
    display: flex !important;
}

.select2-container .select2-selection--single .select2-selection__rendered{
    padding-left: 0 !important;
}

.select2-container .select2-selection--single .select2-selection__clear{
    cursor: pointer !important;
}

.dark .select2-container .select2-selection--single{
  background-color: #000 !important;
}

.dark .select2-container--default .select2-selection--single .select2-selection__clear{
  color: #fff !important;
}

.dark .select2-dropdown{
  background-color: #000 !important;
}

.note-editable{
  background-color: #fff
} 

.sortable-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sortable-list .list-group-item {
    cursor: move;
    margin: 5px 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    border-radius: 8px;
    position: relative;
    transition: all 0.2s ease;
}
.sortable-list .list-group-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}
.handle {
    margin-right: 15px;
    cursor: move;
    color: #6c757d;
    font-size: 18px;
}
.sortable-ghost {
    opacity: 0.4;
}
.sortable-chosen {
    background-color: #e3f2fd !important;
    border-color: #2196f3 !important;
}
.sortable-drag {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.w-fit{
  width: fit-content;
}

.header{
    background-color: var(--brand-blue);
}

.bg-company-technology-completed-level{
    background-color: var(--brand-beige-grey);
}

.bg-company-technology-current-level{
    background-color: color-mix(in srgb, var(--brand-blue) 6%, transparent);
}

/* ---------------------------------------------------------------
   Navbar
   --------------------------------------------------------------- */

.navbar {
    background: var(--brand-blue-deep) !important;
    padding: 10px 0;
}

/* Horizontal scroll is the fallback for narrow viewports; the spacing below is
   tuned so the full menu fits a 1024px viewport without it. */
.navbar .navbar-scroll {
    overflow-x: auto;
    scrollbar-width: none;
}
.navbar .navbar-scroll::-webkit-scrollbar { display: none; }

.navbar .kt-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* In the drawer the menu is a vertical list, where centred rows read as
   mis-aligned. Centring is only right for the horizontal bar. */
@media (max-width: 1023.98px) {
    .navbar .kt-menu {
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
    }

    .navbar .nav-link {
        justify-content: space-between;
        width: 100%;
    }

    .navbar .nav-dropdown {
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 2px 0 2px 10px;
    }

    .navbar .nav-dropdown-item {
        color: #FFFFFF;
    }

    .navbar .nav-dropdown-item:hover {
        background: rgba(255, 255, 255, .12);
    }

    .navbar .nav-dropdown-item.is-active .nav-dropdown-label {
        color: #FFFFFF;
    }
}

.navbar .nav-item {
    flex-shrink: 0;
    border-radius: 999px;
    transition: background-color .18s ease;
}

.navbar .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    color: #FFFFFF !important;
    background: transparent !important;
    border: 0 !important;
    white-space: nowrap;
}

.navbar .nav-label {
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    color: inherit;
}

.navbar .nav-caret {
    font-size: 9px;
    opacity: .6;
    transition: transform .18s ease;
}

.navbar .nav-item:hover {
    background: rgba(255, 255, 255, .12);
}

.navbar .nav-item.has-children:hover .nav-caret,
.navbar .nav-item.has-children.show .nav-caret {
    transform: rotate(180deg);
}

/* Current section. No min-width here: a fixed 138px made every active item jump
   to a different size than its neighbours and pushed the menu into overflow. */
.navbar .nav-item.active {
    background: var(--brand-beige);
}

.navbar .nav-item.active .nav-link,
.navbar .nav-item.active .nav-label {
    color: var(--brand-blue-deep) !important;
}

.navbar .nav-item.active .nav-label {
    font-weight: 700;
}

.navbar .nav-item.active .nav-caret {
    opacity: .75;
}

/* ---------------------------------------------------------------
   Navbar dropdown
   --------------------------------------------------------------- */

.navbar .nav-dropdown {
    min-width: 232px;
    padding: 6px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid var(--brand-beige-grey);
    box-shadow: 0 12px 28px -12px rgba(30, 41, 57, .35);
}

.navbar .nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--brand-blue-deep);
    text-decoration: none;
    transition: background-color .15s ease;
}

.navbar .nav-dropdown-item:hover {
    background: var(--brand-beige);
}

.navbar .nav-dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--brand-beige-grey);
    color: var(--brand-blue);
    font-size: 12px;
    transition: background-color .15s ease, color .15s ease;
}

.navbar .nav-dropdown-label {
    font-family: 'Lexend', sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

/* The row you are on: tinted, with the icon tile inverted to solid brand blue. */
.navbar .nav-dropdown-item.is-active {
    background: color-mix(in srgb, var(--brand-blue) 12%, transparent);
}

.navbar .nav-dropdown-item.is-active .nav-dropdown-label {
    font-weight: 700;
}

.navbar .nav-dropdown-item.is-active .nav-dropdown-icon {
    background: var(--brand-blue);
    color: #FFFFFF;
}

/* ---------------------------------------------------------------
   Language menu
   ---------------------------------------------------------------
   Written as real CSS rather than utility classes: this project has no
   Tailwind build over the Svelte files, so anything Metronic's prebuilt
   stylesheet does not already ship is silently inert. z-50 and shadow-lg
   were both no-ops, which is why the navbar's chevrons showed through the
   panel and it had no shadow. */

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 200px;
    padding: 8px;
    border-radius: 12px;
    background: #FFFFFF;
    border: 1px solid var(--brand-beige-grey);
    box-shadow: 0 12px 28px -12px rgba(30, 41, 57, .35);

    /* Above the navbar, which otherwise paints over it. */
    z-index: 60;
}

.dark .language-menu {
    background: var(--brand-blue-deep);
    border-color: rgba(255, 255, 255, .12);
}

/* ---------------------------------------------------------------
   Index filter bar
   ---------------------------------------------------------------
   Filters and the search/sort controls shared one centred column, which left
   two stacked centred rows and a lot of dead space. They now sit on one line —
   filters leading, controls trailing — and stack only when there is no room.
   Colours come from the palette rather than Tailwind's default blue/grey. */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: var(--brand-blue-deep);
    background: var(--brand-beige-grey);
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

.filter-pill:hover {
    background: color-mix(in srgb, var(--brand-blue) 14%, var(--brand-beige-grey));
}

.filter-pill.is-active {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #FFFFFF;
    font-weight: 600;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-field {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-input,
.filter-select {
    height: 40px;
    font-size: 14px;
    color: var(--brand-blue-deep);
    background: #FFFFFF;
    border: 1px solid var(--brand-beige-grey);
    border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.filter-input {
    padding: 0 34px 0 36px;
    /* Sized so the pills and controls share one row at the common 1024px
       viewport; they wrapped by three pixels at 260px. */
    width: 210px;
    max-width: 100%;
}

.filter-select {
    padding: 0 32px 0 12px;
    cursor: pointer;
    appearance: none;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 18%, transparent);
}

.filter-field .filter-icon {
    position: absolute;
    left: 14px;
    font-size: 13px;
    color: var(--brand-blue);
    opacity: .55;
    pointer-events: none;
}

.filter-field .filter-clear {
    position: absolute;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-beige-grey);
    color: var(--brand-blue-deep);
    font-size: 10px;
    cursor: pointer;
}

@media (max-width: 640px) {
    .filter-bar { justify-content: flex-start; }
    .filter-controls { width: 100%; }
    .filter-input { flex: 1; width: auto; }
}

/* Level separator inside a research tier.
   Spanning every column forces the next technology onto a new row, so each
   research level reads as its own line even when a tier holds several. */
.tech-level-break {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-family: 'Lexend', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--brand-blue);
}

.tech-level-break::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--brand-beige-grey);
}

.tech-level-break:first-child {
    margin-top: 0;
}

/* A technology currently being researched.
   This was the same green as the tier's "unlocked" state, so one colour meant
   two unrelated things on the same screen. In progress is a brand-blue edge;
   green is left to the status badges, where it actually reads as status. */
.tech-card-researching {
    border: 2px solid var(--brand-blue);
}
