/* ============================================================================
   TMS additions on top of the shared LEAP CSS: layout.css / theme.css /
   login.css, and the Shared.Responsive files (sidebar, responsive, quicknav,
   grid, report). Only what is TMS's own lives here. Everything uses the
   theme variables, so it follows light/dark mode and the accent colour.
   ========================================================================== */

/* ── Login: RTL fixes ─────────────────────────────────────────────────────── */
[dir="rtl"] .bg-panel .tagline {
    left: auto;
    right: 48px;
    text-align: right;
}

/* ── Sidebar: pages not migrated yet ─────────────────────────────────────── */
.soon-pill {
    margin-inline-start: auto;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(0,0,0,.08);
    color: var(--ink-light);
    white-space: nowrap;
}

html[data-mode="dark"] .soon-pill { background: rgba(255,255,255,.10); }

.submenu-link.is-soon { opacity: .78; }
.submenu-link.is-soon:hover { opacity: 1; }

/* ── Quick Navigation ─────────────────────────────────────────────────────
   The card, tiles, Clear and ✕ are Shared.Responsive/quicknav.css. What
   TMS keeps is its LOOK, through the --qn-* variables the shared file
   reads, so the card follows dark mode and the accent. */
:root {
    --qn-card-bg: var(--surface, #fff);
    --qn-border: var(--border-clr, #dde2f0);
    --qn-header-bg: var(--accent-dark, #1B2F6E);
    --qn-accent: var(--accent, #1B2F6E);
    --qn-tile-bg: var(--surface-2, #f8f9ff);
    --qn-tile-hover-bg: var(--row-hover, #eef1ff);
    --qn-empty-fg: var(--text-muted, #9aa3bd);
}

/* The accent navy is too dark to read on the dark surface; lift it. */
html[data-mode="dark"] {
    --qn-accent: var(--accent-light, #4A5FAD);
}

/* ── "Being rebuilt" page ────────────────────────────────────────────────── */
.soon-wrap {
    text-align: center;
    padding: 48px 20px 40px;
}

    .soon-wrap .soon-icon {
        width: 84px; height: 84px;
        margin: 0 auto 18px;
        border-radius: 22px;
        display: flex; align-items: center; justify-content: center;
        background: var(--surface-2);
        color: var(--accent);
        font-size: 2.2rem;
    }

    html[data-mode="dark"] .soon-wrap .soon-icon { color: var(--accent-light, #4A5FAD); }

    .soon-wrap h2 { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
    .soon-wrap p  { color: var(--text-muted); max-width: 520px; margin: 0 auto 18px; font-size: .9rem; }

    .soon-wrap code {
        display: inline-block;
        font-size: .78rem;
        padding: 4px 10px;
        border-radius: 6px;
        background: var(--surface-2);
        color: var(--text-muted);
        direction: ltr;
    }

/* ── Grid filter row: multi-select (TMS.grid filterMulti) ───────────────────
   The button wears .col-filter (Shared.Responsive grid.css), so it has the same
   border, size and colours as the text filters; this only adds the arrow and
   keeps long selections on one line. The panel is fixed on <body>. */
.col-filter-multi {
    display: block;
    text-align: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    padding-inline-end: 22px !important;
    color: var(--text-muted) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238a93a6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 6px center !important;
    background-size: 10px 10px !important;
}

    .col-filter-multi.has-value { color: var(--text) !important; }

[dir="rtl"] .col-filter-multi { background-position: left 6px center !important; }

.tms-multi-panel {
    position: fixed;
    z-index: 1060;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    background: var(--surface, #fff);
    color: var(--text);
    border: 1.5px solid var(--border-clr, #dde2f0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.tms-multi-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: .82rem;
    cursor: pointer;
    white-space: nowrap;
}

    .tms-multi-option:hover { background: var(--row-hover, #eef1ff); }
    .tms-multi-option .form-check-input { margin: 0; flex-shrink: 0; }

/* ── Toasts (TMS.toast) ─────────────────────────────────────────────────── */
/* Always top-right, in both languages; above Bootstrap modals (1055) and the topbar. */
.tms-toasts {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.tms-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #fff;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
    pointer-events: auto;
    cursor: pointer;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity .2s, transform .2s;
}

    .tms-toast i    { margin-top: 2px; flex-shrink: 0; }
    .tms-toast.ok   { background: var(--accent-dark, #1B2F6E); }
    .tms-toast.warn { background: #c0392b; }
    .tms-toast.show { opacity: 1; transform: none; }
