/* Remove bullets from sidebar navigation */

/* =========================================================
   Perfect Intelligence – style.css (consolidated)
   Includes: app layout (sidebar/content), dashboard embed,
   chat (25/75), markdown styling (accent rgb(255,95,0)),
   landing + centered container, value cards/grid, login page
========================================================= */

/* ===============================
   Variables
================================ */

:root {
    --bg-main: #121212;
    --bg-elevated: #1a1a1a;
    --bg-elevated-soft: #181818;

    /* glass variants */
    --bg-alpha-main: rgba(18,18,18,0.65);
    --bg-alpha-transparent: rgba(18,18,18,0);
    --bg-alpha-card: rgba(26,26,26,0.55);

    --border-subtle: #2a2a2a;

    --text-main: #ffffff;
    --text-muted: #b0b0b0;

    --accent: rgb(255,85,0);
    --accent-light: rgb(255, 150, 25);
    --accent-strong: rgb(255,95,0);
    --accent-hover: rgb(230,90,0);

    --font-ui: "Segoe UI Light", "Roboto","Verdana";

    /* centered container */
    --container-max: 1280px;
    --container-pad: 20px;

    /* illustration sizing (landing value cards) */
    --value-illustration-height: 360px;
    --value-illustration-max-img: 360px;
}

/* ===============================
   Reset / Base
================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: var(--font-ui);
    font-weight: 400;
    background: var(--bg-main);
    color: var(--text-main);
}

body.dashboard-page {
    height: 100%;
    overflow: hidden;
}

/* links */
a {
    color: var(--accent);
    text-decoration: underline;
}
a:hover {
    color: var(--accent-hover);
/* Verplaatst naar SharedAssets/static/style.css */

/* typography */
h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 16px;
    font-family: var(--font-ui);
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 1.6rem;
}

h3 {
    font-size: 1.2rem;
}


.page-actions {
    display: flex;
    justify-content: flex-end;

    padding-left: 24px;
    padding-right: 24px;
    margin-bottom: 12px;
}

.page-actions .btn {
    height: 44px;
    margin-left: 20px;
    padding:  20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;

    font-size: 0.95rem;
    font-weight: 600;

    background: var(--accent);
    color: #fff;
    text-decoration: none;

    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}



/* 
****************************************************************************
****************************************************************************
********************************Login pagina********************************
****************************************************************************
****************************************************************************
 */

/* Logo */

.app-header-logo {
    height: 10vw;
    width: auto;
    object-fit: contain;
}
.app-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.app-header-brand .btn--right {
    margin-left: auto;
    align-self: center; /* optioneel, voor uitlijning bovenaan */
}


.landing-main {
    margin-top: 8px;
    padding: 24px;
    background: var(--bg-alpha-transparent);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(14px);
}

.landing-section {
    margin-top: 28px;
    background: --bg-alpha-transparent;
}

.section-title {
    margin-bottom: 18px;
}

.hero-lead {
    margin: 0;
    color: #ffffff;
}

/* value cards grid */
.value-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    background: --bg-alpha-transparent;

    width: 100%;
    max-width: 1200px;
    margin: 16px auto 0;
}
@media (max-width: 960px) {
    .value-grid {
        grid-template-columns: 1fr;
    }
}



.value-card {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 14px;

    padding: 18px;
    border-radius: 14px;

    background: var(--bg-alpha-transparent);
    border: 1px solid rgba(255,255,255,0.08);

    text-align: center;
}

.value-card h3 {
    margin: 0;
}

.value-illustration {
    min-height: var(--value-illustration-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.value-illustration img {
    max-width: 100%;
    max-height: var(--value-illustration-max-img);
    object-fit: contain;
    display: block;
}

.value-illustration--hover {
    position: relative;
    cursor: help;
}

.value-illustration--hover:focus {
    outline: 2px solid rgba(255, 255, 255, 0.25);
    outline-offset: 6px;
}

.value-illustration-tooltip {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    background: rgba(8, 8, 8, 0.9);
    color: var(--text-main);
    border-radius: 12px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.value-illustration--hover:hover .value-illustration-tooltip,
.value-illustration--hover:focus .value-illustration-tooltip,
.value-illustration--hover:focus-within .value-illustration-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.value-illustration-tooltip p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.5;
}

.value-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.landing-container {
    width: 100%;
    max-width: var(--container-max, 1280px);
    margin-left: auto;
    margin-right: auto;
    background: var(--bg-alpha-transparent);

    padding-left: var(--container-pad, 20px);
    padding-right: var(--container-pad, 20px);
}


/* 
****************************************************************************
****************************************************************************
********************************Sidebar ********************************
****************************************************************************
****************************************************************************
 */

 .sidebar-nav,
.sidebar-nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}
 
 .sidebar {
    width: 240px;
    padding: 16px;

    background: #141414;
    border-right: 1px solid var(--border-subtle);

    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0 14px;
}

.sidebar-logo img {
    width: 100%;
    display: block;
    /* object-fit: contain; */
}
.sidebar-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;

    color: var(--text-main);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav a:hover {
    background: #232323;
    color: #ffffff;
}

.sidebar-nav a.active {
    background: var(--accent);
    color: #ffffff;
}

.disabled-link {
    opacity: 0.55;
}
.disabled-link:hover {
    background: transparent;
}

/* sidebar footer */
.sidebar-footer {
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sidebar-footer strong {
    color: var(--text-main);
    font-weight: 600;
}

.logout-link {
    margin-top: 10px;
}

.logout-link a {
    color: var(--accent);
    text-decoration: none;
}
.logout-link a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
    }
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0;
    }
    .sidebar-footer {
        display: none;
    }
    .sidebar-logo img {
    max-width: 20vw;
    height: auto;
    /* object-fit: contain; */
}
}
.app-content {
    flex: 1;
    padding: 16px 24px;
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1;
    min-height: 0;

    background: var(--bg-elevated-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 18px;
}

body.dashboard-page .app-content {
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

body.dashboard-page .app-main {
    padding: 0;
    border-radius: 0;
    display: flex;
    height: 100%;
    overflow: hidden;
}

body.dashboard-page .app-layout {
    height: 100%;
}

body.dashboard-page .sidebar {
    height: 100%;
    overflow: hidden;
    padding: 12px;
}

/* body.dashboard-page .sidebar-logo img {
    max-height: 72px;
    width: auto;
    object-fit: contain;
} */

body.dashboard-page .sidebar-nav a {
    padding: 8px 10px;
}

body.dashboard-page .sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 6px;
    margin-bottom: 8px;
}

body.dashboard-page .sidebar-footer {
    flex: 0 0 auto;
}

/* ===============================
   Chat page
================================ */

/* 25% input / 75% answer, no html wrapper required */
.app-main:has(.chat-input-panel):has(.chat-answer-panel):not(:has(.chat-top)) {
    display: grid;
    grid-template-columns: 0.25fr 0.75fr;
    gap: 18px;
    align-items: start;
}

.app-main:has(.chat-top) {
    display: block !important;
}

@media (max-width: 900px) {
    .app-main:has(.chat-input-panel):has(.chat-answer-panel) {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .chat-top {
        flex-direction: column;
    }
}

.chat-top {
    display: flex;
    gap: 16px;
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.chat-left {
    flex: 1 1 35%;
}

.chat-right {
    flex: 1 1 40%;
    height: auto;
    min-height: 0;
    display: flex;
}

.chat-answer-full {
    width: 100%;
    margin-top: 0;
}

.chat-right .chat-answer-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.chat-right .box {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.chat-right #recentQuestionsDetails {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chat-right #recentQuestionsDetails > .box {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

#questionsTable {
    width: 100%;
    table-layout: fixed;
}

#questionsTable th,
#questionsTable td {
    vertical-align: top;
}

#questionsTable th:nth-child(1),
#questionsTable td:nth-child(1) {
    width: 18%;
    white-space: nowrap;
}

#questionsTable th:nth-child(2),
#questionsTable td:nth-child(2) {
    word-break: break-word;
    overflow-wrap: anywhere;
}

#questionsTable th:nth-child(3),
#questionsTable td:nth-child(3) {
    width: 28%;
    white-space: nowrap;
    text-align: right;
}

.questions-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    width: 100%;
    flex-wrap: wrap;
}

.questions-actions .btn {
    height: auto;
    min-height: 1.375rem;
    padding: 0.25rem 0.625rem;
    line-height: 1.1;
    font-size: 0.85rem;
}

@media (min-width: 901px) and (max-width: 1280px) {
    #questionsTable {
        table-layout: auto;
        width: 100% !important;
    }

    #questionsTable tbody {
        width: 100%;
    }

    #questionsTable thead {
        display: none;
    }

    #questionsTable tbody,
    #questionsTable tr,
    #questionsTable td {
        display: block;
        width: 100%;
    }

    #questionsTable tr {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid var(--border-subtle);
        border-radius: 0.75rem;
        padding: 0.625rem 0.75rem;
        margin-bottom: 0.625rem;
        background: rgba(255, 255, 255, 0.015);
    }

    #questionsTable td {
        border: 0 !important;
        padding: 0.25rem 0 !important;
        white-space: normal !important;
        text-align: left !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    #questionsTable td > * {
        width: 100%;
    }

    #questionsTable td:nth-child(1) {
        display: none;
    }

    .questions-actions {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: nowrap;
    }

    .questions-actions .btn {
        width: auto;
        flex: 0 0 auto;
    }
}

/* panels */
.chat-input-panel,
.chat-answer-panel {
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    min-height: 20rem;
    padding: 1rem 1.125rem;
    margin: 0;
}

.chat-input-panel {
    max-height: 45vh;
    overflow: auto;
}

@media (min-width: 901px) {
    .chat-top {
        align-items: flex-start;
    }

    .chat-right {
        height: auto;
        min-height: 0;
    }

    .chat-left .chat-input-panel {
        height: auto;
        min-height: 0;
        max-height: none;
        padding-bottom: 0.5rem;
    }
}

.chat-input-panel h2,
.chat-answer-panel h2 {
    margin: 0 0 8px 0;
    font-weight: 600;
}

.chat-input-panel p {
    margin: 0 0 12px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* textarea */
.chat-textarea {
    width: 100%;
    min-height: 160px;

    border-radius: 12px;
    border: 1px solid #333;

    background: #0e0e0e;
    color: #f5f5f5;

    padding: 12px;
    resize: vertical;

    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(255, 85, 0, 0.35);
}

#askBtn {
    margin-top: 0px;
}

/* answer box */
#answerBox {
    min-height: 15rem;
    background: rgba(0,0,0,0.18);
}




/* ===============================
   Markdown styling (answer)
================================ */

.markdown-answer {
    white-space: normal;
    line-height: 1.6;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Force emphasis + headings to accent-strong (rgb(255,95,0)) */
#answerBox.markdown-answer strong,
#answerBox.markdown-answer b,
#answerBox.markdown-answer h1,
#answerBox.markdown-answer h2,
#answerBox.markdown-answer h3,
#answerBox.markdown-answer h4,
#answerBox.markdown-answer thead th {
    color: var(--accent-strong) !important;
    font-weight: 700;
}

.markdown-answer p {
    margin: 0 0 0.7rem 0;
}

.markdown-answer ul,
.markdown-answer ol {
    margin: 0 0 0.7rem 1.4rem;
}

.markdown-answer li {
    margin: 0.2rem 0;
}

/* tables */
.markdown-answer table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin: 0.8rem 0;
    font-size: 0.92rem;
}

.markdown-answer th,
.markdown-answer td {
    border: 1px solid var(--border-subtle);
    padding: 6px 8px;
    text-align: left;
}

.markdown-answer thead {
    background: rgba(255,255,255,0.04);
}

/* code */
.markdown-answer code {
    font-family: Consolas, "Fira Code", monospace;
    font-size: 0.9em;
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 6px;
}

.markdown-answer pre {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px 14px;
    overflow: auto;
}

.markdown-answer pre code {
    background: transparent;
    padding: 0;
}

/* Keep wide chart outputs inside panel width; allow horizontal scroll when needed */
.markdown-answer .js-plotly-plot,
.markdown-answer .plotly,
.markdown-answer .plotly-graph-div {
    max-width: 100%;
}

.markdown-answer canvas,
.markdown-answer svg,
.markdown-answer img,
.markdown-answer iframe {
    max-width: 100%;
}

.chat-left,
.chat-right,
.chat-input-panel,
.chat-answer-panel,
.chat-right .box,
#answerBox {
    min-width: 0;
}

/* ===============================
   Dashboard / Power BI Embed
================================ */

.dashboard-container {
    width: 100%;
    height: 100%;
    flex: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}

.dashboard-ratio-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    background: #0e0e0e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 0;
}

#reportContainer {
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
}

#reportContainer iframe,
#reportContainer .powerbi-frame,
.dashboard-ratio-wrapper iframe,
.dashboard-ratio-wrapper .powerbi-frame {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* ===============================
   Mobile Top Menubar (<900px)
================================ */
@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
        min-height: 100vh;
    }

    .sidebar {
        width: 100%;
        max-width: 100%;
        min-height: 0;
        padding: 8px 12px;
        border-right: 0;
        border-bottom: 1px solid var(--border-subtle);
        flex-direction: row;
        align-items: center;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #141414;
    }

    .sidebar-logo {
        padding: 0;
        margin: 0;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }

    .sidebar-logo img {
        width: auto;
        max-height: 10vw;
        height: auto;
        object-fit: contain;
    }

    .sidebar-nav {
        margin: 0;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        flex: 1 1 auto;
        min-width: 0;
    }

    .sidebar-nav li {
        margin: 0;
    }

    .sidebar-nav a {
        padding: 8px 10px;
        font-size: 0.92rem;
        white-space: nowrap;
    }

    .sidebar-footer {
        margin: 0 0 0 auto;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0;
        white-space: nowrap;
    }

    .sidebar-footer strong {
        display: none;
    }

    .sidebar-footer br {
        display: none;
    }

    .sidebar-footer > :not(.logout-link) {
        display: none;
    }

    .logout-link {
        margin: 0;
        font-size: 0.9rem;
    }

    .app-content {
        padding: 12px;
        min-height: 0;
    }

    /* Chat: keep both columns full-width, but make collapsed history compact */
    .chat-top {
        align-items: stretch;
    }

    .chat-left,
    .chat-right {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }

    .chat-right {
        height: auto;
    }

    .chat-right .chat-answer-panel {
        min-height: 0;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    /* Ingeklapt: veel kleinere hoogte, zelfde breedte */
    .chat-right .chat-answer-panel:has(#recentQuestionsDetails:not([open])) {
        min-height: 64px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .chat-right #recentQuestionsDetails:not([open]) summary {
        margin: 0;
    }
}
