﻿#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

:root {
    font-size: var(--rz-root-font-size);
}

body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background-color: var(--rz-body-background-color);
}

.rz-body {
    --rz-body-padding: 0;
}

a {
    color: var(--rz-link-color);
}

    a:hover,
    a:focus {
        color: var(--rz-link-hover-color);
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.overlay {
    position: fixed; /* full screen */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6); /* dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* in front of layout */
}

.dialog {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    width: 80%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto; /* scroll if content too tall */
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}


/*aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa*/

.hidden {
    display: none !important;
}

/* Overlay background */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
    z-index: 1000;
}

/* Overlay content box */
.overlay-content {
    background: rgba(245,245,245,1);
    border-radius: 1rem;
    padding: 2rem;
    width: 60%;
    max-width: 70%;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    animation: popIn 0.3s ease;
    margin-bottom: 100px;
}

@media (max-width: 768px) {
    .overlay {
        padding: 0;
    }
    .overlay-content {
        max-width: 90%;
        width: 90%;
    }
}

.error-overlay-content {
    background: rgba(245,245,245,1);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 70%;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    animation: popIn 0.3s ease;
    margin-top: 10%;
    position: absolute;
    display: block;
}

.error-overlay-buttons {
    margin-top: 15%;
    display: flex;
    position: relative;
    gap: 15px;
    justify-content: flex-end;
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Header */
.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    position: relative;
}

ur-overlay-header {
    display: block;
    align-items: center;
    border-bottom: 2px solid #eee;
    margin-bottom: 1rem;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    top: 5px;
    right: 5px;
    position: absolute;
}

.cute-buttons {
    display: grid;
    justify-content: flex-end;
    justify-items: end;
    gap: 1rem;
    margin-top: 1.5rem;
}

button.save-btn, button.cancel-btn, button.edit-btn, button.compare-btn, button.compare-btn-2, button.add-class-btn {
    font-family: "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

button.save-btn {
    background: rgba(214, 255, 146, 0.69);
    color: #444;
    width: 120px;
}

    button.save-btn:hover {
        background: rgba(214, 255, 146, 0.69);
        color: rgba(65, 172, 0, 0.75);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(206, 255, 99, 0.20);
    }

button.cancel-btn {
    background: #ffe4ec;
    color: #444;
    width: 120px;
}

    button.cancel-btn:hover {
        background: #ffe4ec;
        color: #ff6584;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(255,101,132,0.2);
    }

.button.edit-btn:hover {

}

    .toggled {
        background: rgb(195, 195, 195);
    }
        .toggled:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(255,255,255,1); 
        }

    .untoggled {
        background: rgb(255, 255, 255);
    }
        .untoggled:hover {
            background:rgb(195, 195, 195) ;
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(255,255,255,1);
        }

button.compare-btn {
    background: lavender;
    width: 130px;
}

    button.compare-btn:hover {
        background: lavender;
        color: mediumpurple;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(255,255,255,1);
    }

button.compare-btn-2 {
    background: white;
    position: relative;
    right: 30px;
    top: 15px;
    background: lavender;
}

    button.compare-btn-2:hover {
        background: lavender;
        color: mediumpurple;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(255,255,255,1);
    }

button.error-confirm-btn, button.error-cancel-btn {
    font-family: "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

button.error-confirm-btn {
    background: white;
    color: #444;
}

    button.error-confirm-btn:hover {
        background: rgba(214, 255, 146, 0.69);
        color: rgba(65, 172, 0, 0.75);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(206, 255, 99, 0.20);
    }

button.error-cancel-btn {
    background: white;
    color: #444;
}

    button.error-cancel-btn:hover {
        background: #ffe4ec;
        color: #ff6584;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(255,101,132,0.2);
    }

.error-message {
    color: red;
    white-space: pre;
}

.cute-select {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #e0e4f0;
    background: linear-gradient(180deg, #fff, #f8f9ff);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 14px;
    color: #333;
}

    .cute-select:hover {
        box-shadow: 0 0 0 2px #d6ccff;
    }


/* Tabs */
.result-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    width: 100%;
}

.tab {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid #ccc;
    background: #f8f8f8;
    cursor: pointer;
}

    .tab.active {
        background: #0078d7;
        color: #fff;
        border-color: #0078d7;
    }

/* Section overview*/
.overview {
    background: white;
    padding-left: 20px;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-bottom: 10px;
    border-radius: 20px;
    box-shadow: 1px 1px 10px #7d7d7d26;
}

.result-input {
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    width: 90%;
}

    .result-input:active {
        border: 0px solid rgba(0, 0, 0, 0.2);
        border-radius: 5px;
    }


/* Meta grid */
.grid-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Canvas */
.chart-tabs {
    display: inline-flex;
    margin: 10px;
    border-radius: 10px;
    margin-bottom: -10px;
}

    .chart-tabs option {
        font-weight: 600;
        background: lavender;
        border-radius: 10px;
        padding: 5px;
        cursor: pointer;
        margin-right: 10px;
        user-select: none;
    }

    .chart-tabs > option.option-active {
        background: #cccced;
    }

summary {
    max-width: fit-content;
    cursor: pointer;
    user-select: none;
    font-size: large;
    line-height: 3rem;
}

canvas {
    background: white;
    border-radius: 15px;
    box-shadow: 1px 1px 10px #7d7d7d26;
}

/* Sortable tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    padding-left: 20px;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-bottom: 10px;
    box-shadow: 1px 1px 10px #7d7d7d26;
    position: relative;
}

th, td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: left;
}

th {
    background: lavender;
}

.table-btn-container {
    position: absolute;
    padding: 5px;
    border-radius: 5px;
    bottom: -30px;
    right: 0px;
    cursor: default;
}

button.add-btn {
    border-radius: 5px;
    font-size: 1rem;
    background: rgba(214, 255, 146, 0.69);
    border: aliceblue;
    box-shadow: 1px 1px 10px #7d7d7d26;
    cursor: pointer;
}

button.minus-btn {
    border-radius: 5px;
    background: #ffe4ec;
    font-size: 1rem;
    border: blue;
    box-shadow: 1px 1px 10px #7d7d7d26;
    cursor: pointer;
}

/* Result Save Message */
.success-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(214, 255, 146, 0.69);
    font-weight: 600;
    font-family: "Segoe UI", sans-serif;
    border-radius: 10px;
    padding: 0.8rem 1.4rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

    .success-banner.fade-out {
        opacity: 0;
        transform: translateY(-10px);
    }



/* File Uploader */
.fuf-main {
    display: inline-flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-content: center;
    align-items: flex-start;
    flex-direction: row-reverse;
    gap: 1.25rem;
    background: rgba(230, 240, 240, 0.7);
    box-shadow: 0 14px 40px rgba(0,0,0,0.2);
    border-radius: 20px;
    max-width: 1250px;
    position: absolute;
}

.fuf-container {
    min-width: 0;
    max-width: 40%;
    width: 40%;
    height: fit-content;
    margin: 2.5rem auto;
    padding: 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.06);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    position: relative;
    overflow: hidden;
}

.fuf-title {
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    color: #111;
}

.fuf-row {
    display: grid;
}

select.fuf-select {
    width: fit-content;
    border-radius: 10px;
    background: white;
    padding: 2px;
}

.fuf-dropzone {
    border: 2px dashed #e4e7eb;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: all .18s ease;
    background: linear-gradient(180deg, rgba(250,250,252,1), rgba(255,255,255,0.98));
    margin-top: 2rem;

}

    .fuf-dropzone.fuf-dragging {
        border-color: #ff91a4;
        box-shadow: 0 6px 18px rgba(255,145,148,0.12);
        background: #fff7f9;
    }

.fuf-drop-inner p {
    margin: 0.25rem 0;
    color: #444;
}

.fuf-choose {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    background: linear-gradient(90deg,#ff91a4,#ff7aa1);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

    .fuf-choose input {
        display: none;
    }
/* InputFile renders a real input - it's hidden by default */

.fuf-hint {
    font-size: 0.85rem;
    color: #7b7f86;
    margin-top: 0.5rem;
}

.fuf-preview-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fuf-preview-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f0f0f2;
    background: #fbfbfc;
}

.fuf-thumb {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
}

    .fuf-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.fuf-pdf-icon {
    font-size: 28px;
}

.fuf-file-meta {
    min-width: 0;
    overflow: hidden;
    flex: 1;
    text-align: left;
}

.fuf-file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fuf-file-size {
    font-size: 0.85rem;
    color: #666;
}

.fuf-actions {
    width: 40px;
    display: flex;
    justify-content: center;
}

.fuf-remove {
    background: none;
    border: 0;
    color: #e25757;
    font-size: 1.1rem;
    cursor: pointer;
}

.fuf-submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.fuf-note {
    color: #444;
    font-size: 0.95rem;
}

.fuf-submit {
    background: rgb(228 245 247 / 51%);
    border: none;
    color: #114;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

    .fuf-submit:hover {
        background: lavender;
        color: mediumpurple;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(255,255,255,1);
    }

    .fuf-submit[disabled] {
        opacity: 0.6;
        cursor: not-allowed;
    }

.fuf-submit-s {
    background: rgba(250, 250, 250, 1);
    border: none;
    color: #114;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

    .fuf-submit-s:hover {
        background: rgba(200, 200, 200, 1);
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(255,255,255,1);
    }

    .fuf-submit-s[disabled] {
        opacity: 0.6;
        cursor: not-allowed;
    }

.fuf-drop-inner {
    display: block;
    position: relative;
    padding: 2rem;
    border: 2px dashed #e4e7eb;
    border-radius: 10px;
    background: linear-gradient(180deg,rgba(250,250,252,1),rgba(255,255,255,0.98));
    text-align: center;
    cursor: pointer;
}

    .fuf-drop-inner:hover {
        border-color: #ff91a4;
        background: #fff7f9;
    }

.fuf-hidden-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.fuf-dropzone {
    position: relative;
    border: 2px dashed #cfcfcf;
    border-radius: 12px;
    padding: 20px;
    transition: .2s;
}

.fuf-dragging {
    border-color: #5aa3ff;
    background: rgba(90,163,255,.06);
}

.fuf-drop-inner {
    position: relative;
    display: block;
}

.fuf-drop-input {
    position: absolute;
    inset: 0; /* top/right/bottom/left: 0 */
    width: 100%;
    height: 100%;
    opacity: 0; /* fully transparent */
    cursor: pointer;
}


/* Main Layout */
/* layout root */
html {
    background: url("/Images/blurry.jpg");
}

.layout-root {
    display: flex;
    flex-direction: row;
    min-height: 98.4vh;
    color: #222;
    font-family: Inter, "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial;
}

/* sidebar */
.sidebar {
    background: #ffffff;
    border-right: 1px solid #e6e9ee;
    padding: 1rem;
    width: 240px;
    flex-shrink: 0;
    transition: transform 220ms ease, box-shadow 220ms ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 40;
}

/* main area now flexes to fill the rest of the space */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 3rem;
    box-sizing: border-box;
}


.main-inner {
    flex: 1;
    width: 100%;
    max-width: 1400px; /* limit for very wide monitors */
    margin: 0 auto;
}

/* topbar hidden on desktop */
.topbar {
    display: none;
}

/* sidebar contents */
.sidebar .sidebar-top {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 450px;
}

.logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 14px;
    display: block;
    margin: 0 auto 0.5rem auto;
    background: linear-gradient(180deg,#fff,#f6f9ff);
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.app-name {
    font-weight: 700;
    color: #1f3d70;
    font-size: 1.05rem;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    bottom: 40%;
}

    .nav-list li a {
        display: block;
        padding: 0.65rem 0.75rem;
        border-radius: 8px;
        color: #223;
        text-decoration: none;
        font-weight: 600;
        transition: background 160ms ease, color 160ms ease, transform 120ms ease;
    }

        .nav-list li a:hover {
            background: rgba(21,101,192,0.06);
            color: #0b4ea2;
            transform: translateX(3px);
        }

        .nav-list li a.active {
            background: #0b63c8;
            color: #fff;
            box-shadow: 0 6px 18px rgba(11,99,200,0.12);
        }

/* sidebar footer */
.sidebar-foot {
    padding-top: 0.8rem;
    text-align: center;
}

.btn-compact {
    border: 0;
    background: #f2f6fb;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* 📱 mobile adjustments */
@media (max-width: 768px) {
    .layout-root {
        flex-direction: column;
    }

    .logo {
        margin-top: 0;
    }

    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        width: 82%;
        max-width: 320px;
        left: 0;
        top: 0;
        bottom: 0;
        box-shadow: 0 12px 40px rgba(7,18,30,0.18);
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .topbar {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.6rem 1rem;
        background: linear-gradient(90deg,#0b63c8,#1666c6);
        color: white;
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .menu-toggle {
        background: transparent;
        border: none;
        color: white;
        font-size: 1.25rem;
        cursor: pointer;
    }

    .main-area {
        padding: 1rem;
    }

    .fuf-main {
        display: inline-flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        align-content: center;
        align-items: flex-start;
        flex-direction: row-reverse;
        gap: 1.25rem;
        background: rgba(240,240,240,0.5);
        border-radius: 20px;
    }

    .fuf-container {
        max-width: 980px;
        width: 80%;
        margin: 2.5rem auto;
        padding: 1.25rem;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 14px 40px rgba(0,0,0,0.06);
        font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    }
}

/* top header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2a6ebb;
    color: white;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* left section with logo + toggle */
.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* the app title */
.app-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* the toggle button */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    border-radius: 9999px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    color: #2a6ebb;
    font-size: 1.4rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

    .sidebar-toggle:hover {
        background: #f2f5ff;
        transform: scale(1.05);
    }

    .sidebar-toggle:active {
        transform: scale(0.95);
    }

/* hide the toggle button on large screens if sidebar is always visible */
@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
}



/* Results view */
.table-main {
    background: rgba(230, 240, 240, 0.7);
    border-radius: 20px;
    padding: 20px;
    position: relative;
}

.page-title {
    margin: 0 0 2rem 0;
    font-weight: 700;
    color: #133c78;
    background: rgba(230, 240, 240, 0.7);
    box-shadow: 0 14px 40px rgba(0,0,0,0.2);
    border-radius: 20px;
    padding: 5px;
    padding-left: 20px;
    padding-right: 30px;
    width: fit-content;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.controls-left {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.controls-right {
    display: flex;
    gap: 0.5rem;
}

.txt-search {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    border: 1px solid #dcdfe6;
    min-width: 220px;
}

.sel-filter {
    padding: 0.45rem;
    border-radius: 8px;
    border: 1px solid #dcdfe6;
}

.btn {
    background: lavender;
    border: none;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

    .btn.ghost {
        background: #f3f6f8;
        color: #333;
        box-shadow: none;
    }

    .btn.small {
        padding: 0.25rem 0.4rem;
        font-size: 0.9rem;
    }

.table-wrap {
    overflow: auto;
    background: transparent;
    border-radius: 10px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

    .results-table th, .results-table td {
        padding: 0.6rem 0.8rem;
        border-bottom: 1px solid #eef0f3;
        text-align: left;
    }

    .results-table th {
        background: #f7f9fb;
        font-weight: 700;
        color: #334;
    }

    .results-table tbody tr:hover {
        background: #fbfdff;
    }

.actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.empty {
    text-align: center;
    padding: 1.2rem;
    color: #777;
}

.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.8rem;
}

.sel-small {
    padding: 0.3rem;
    border-radius: 6px;
}

.overlay-backdrop {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.35);
    z-index: 9998;
}

.overlay-content2 {
    background: rgba(245,245,245,1);
    border-radius: 1rem;
    padding: 1.25rem;
    max-width: 80%;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    animation: popIn 0.22s ease;
}

.overlay-header2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    position: relative;
}

.close-btn {
    background: transparent;
    border: 0;
    font-size: 1.2rem;
    cursor: pointer;
    position: absolute;
    right: 8px;
    top: 6px;
}

.grid-meta2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

@media(min-width:900px) {
    .grid-meta2 {
        grid-template-columns: 1fr 2fr;
    }
}

.overview2 {
    background: white;
    padding: 0.6rem;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.04);
}

.tab2 {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #f8f8f8;
    margin-right: 0.5rem;
    cursor: pointer;
}

    .tab2.active {
        background: #0078d7;
        color: #fff;
        border-color: #0078d7;
    }

.result-tabs2 {
    margin-bottom: 0.8rem;
}

table.mini {
    width: 100%;
    border-collapse: collapse;
}

    table.mini th, table.mini td, table th, table td {
        border: 1px solid #e6e9ee;
        padding: 0.45rem;
    }

    table.mini th {
        background: #fafcfe;
        font-weight: 700;
    }


/* Detail view charts */
/* chip for selected compares */
.chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg,#fff,#f8fbff);
    padding: 6px 10px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(20,40,80,0.06);
    border: 1px solid rgba(200,210,230,0.6);
}

.chip-label {
    font-weight: 600;
    color: #333;
}

.chip-x {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    color: #ff6b82;
}

/* compare modal small meta */
.small-meta {
    color: #666;
    font-size: 0.9rem;
}

/* overlay backdrop for modal (already had overlay/backdrop styles but ensure visibility) */
.overlay-backdrop {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.35);
    z-index: 12000;
}

/* some small button variants */
.btn.ghost {
    background: #f3f6f8;
    color: #333;
    border: 1px solid #e7eef8;
}

.btn.small {
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-weight: 700;
}

/* Add school class component */
.add-school-class-list {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
}

    .add-school-class-list:hover {
        background: rgba(245, 245, 255, 0.78);
        border-radius: 10px;
    }

button.add-class-btn {
    background: white;
    font-size: 0.8rem;
    padding: 10px;
    margin-left: 15px;
}

    button.add-class-btn:hover {
        background: lavender;
        color: mediumpurple;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(255,255,255,1);
    }

/* Loading screen */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(100,100,100,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-box {
    background: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 30px 50px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,.1);
}

.spinner {
    width: 32px;
    height: 32px;
    margin: 10px auto;
    border: 3px solid #ccc;
    border-top-color: #5aa3ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Login */
/* Overlay shell */
.login-overlay {
    position: fixed; inset: 0;
    background: url("/Images/blurry.jpg");  
    display: grid; place-items: center;
    z-index: 1000;
}

/* Card */
.login-overlay-content.login-card {
    width: min(480px, 92vw);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Header */
.login-header {
    display: flex; align-items: center; justify-content: space-between;
}
.login-title {
    font-size: 1.25rem; font-weight: 700;
}
.login-close {
    border: 0; background: transparent; font-size: 1.1rem; cursor: pointer;
}

/* Body */
.login-body { 
    display: grid;
    gap: 12px; 
    position: relative;
}

.login-field { 
    display: grid;
    gap: 6px; 
}

.login-field label { 
    font-size: .9rem; 
    color: #374151; 
}

.login-field input {
    border-radius: 12px;
    border: 1px solid #d1d5db;
    outline: none;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 8px;
}
.login-field input:focus {
    border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.login-submit {
    width: fit-content;
    border: 0;
    background: #6366f1;
    color: white;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    left: 80%;
}
.login-submit[disabled] {
    opacity: .6; cursor: default;
}

/* Error + footer */
.login-error {
    background: #fef2f2; color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 10px 12px;
}
.login-footer { 
    margin-top: 4px; 
    color: #6b7280; 
}

.login-loading {
    background: url("/Images/blurry.jpg");
}



/* Admin page */
.m-admin-title {
    font-size: 1.5rem;
    margin: 0 0 12px
}

.m-admin-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 12px
}

.m-tab {
    padding: .5rem .75rem;
    border: 1px solid #ddd;
    background: #f7f7f7;
    border-radius: .5rem;
    cursor: pointer
}

    .m-tab.active {
        background: #fff;
        border-color: #bbb
    }

.m-admin-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 12px
}

.m-admin-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px
}

.m-toolbar {
    display: flex;
    gap: .5rem;
    margin: 8px 0
}

.m-admin-table {
    width: 100%;
    border-collapse: collapse
}

    .m-admin-table th, .m-admin-table td {
        border-top: 1px solid #eee;
        padding: 8px
    }

.m-row-actions {
    vertical-align: middle;
    text-align: center !important;
}

.m-btn {
    padding: .35rem .6rem;
    border: 1px solid #ddd;
    background: #fafafa;
    border-radius: .5rem;
    cursor: pointer
}

    .m-btn.m-primary {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff
    }

    .m-btn.m-danger {
        background: #dc2626;
        border-color: #dc2626;
        color: #fff
    }

.m-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center
}

.m-overlay-content {
    background: #fff;
    min-width: 320px;
    max-width: 520px;
    padding: 16px;
    border-radius: 14px
}

.m-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0
}

.m-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: 40px
}

/* Test definition editor */
.l-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50
}

.l-overlay-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    padding: 14px;
    max-height: 90vh;
    overflow: auto;
    min-width: 320px
}

    .overlay-content.l-wide {
        width: 80%;
        max-width: 90%;
        position: relative;
    }

.l-editor-head, .l-editor-foot {
    display: flex;
    gap: .5rem;
    align-items: center
}

.l-editor-head {
    margin-bottom: 8px
}

.l-editor-foot {
    margin-top: 12px
}

.l-spacer {
    flex: 1
}

.l-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    background: #fff
}

.l-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.l-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0
}

    .l-form-row.l-inline {
        flex-direction: row;
        align-items: center;
        gap: 8px
    }

    .l-form-row .l-w-auto {
        width: auto
    }

.l-table-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 6px
}

.l-table-scroll {
    max-height: 72vh;
    overflow: auto;
    border: 1px solid #eee;
    border-radius: 10px
}

.l-admin-table {
    width: 100%;
    border-collapse: collapse
}

    .l-admin-table th, .l-admin-table td {
        border-top: 1px solid #f0f0f0;
        padding: 6px 8px;
        vertical-align: top
    }

    .l-admin-table.tight th, .l-admin-table.tight td {
        padding: 5px 6px
    }

.l-row-actions {

}

.l-btn-td {
    text-align: center;
    vertical-align: middle !important;
}

button.l-btn-table {
    background: #ffe4ec;
    border-radius: 6px;
    border: 1px solid #ccc;
    position: relative;
    padding-left: 9px;
    padding-right: 9px;
    cursor: pointer;
}

.l-ow-move {
    white-space: nowrap
}

.l-row-header {
    background: #fafbff
}

.l-stack {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.l-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

    .l-flags l-label {
        display: flex;
        align-items: center;
        gap: 6px
    }

.l-btn {
    padding: .4rem .7rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer
}
    .l-btn:hover {
        background: rgba(230, 230, 230, 1);
        transform: translateY(-2px);
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.07);
    }
    .l-btn.l-primary {
        background: #2563eb;
        color: #fff;
        border-color: #2563eb
    }

    .l-btn.l-danger {
        background: #dc2626;
        color: #fff;
        border-color: #dc2626
    }

.l-icon {
    padding: .1rem .4rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.l-muted {
    color: #777
}

.l-section-list {
    margin: 0 0 8px 1.2rem
}

.l-validation {
    margin-top: 10px;
    border-left: 4px solid #dc2626;
    background: #fff5f5;
    padding: 8px 10px;
    border-radius: 8px
}

.l-mini {
    margin-left: 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    padding: .1rem .4rem
}

.l-result-input {
    max-width: 200px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
}


select {
    max-width: 200px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
}

option {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

input[type="text"], textarea {
    word-break: break-all;
    white-space: normal;
}



/* Generic icon-before utility using Material Symbols */
.icon-before {
    position: relative;
    padding-left: 2.5rem; /* space for icon */
    line-height: 1.35;
}

    .icon-before::before {
        content: attr(data-mi); /* the icon name sits in data-mi */
        font-family: "Material Symbols Rounded";
        font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
        font-size: 1.5rem; /* tweak per target size */
        line-height: 1; /* tight so it centers nicely */
        position: absolute;
        left: 0.1rem; /* inset from the left edge */
        top: 50%;
        transform: translateY(-50%);
        user-select: none;
        -webkit-font-smoothing: antialiased;
        speak: none; /* don’t let screen readers read the glyph name */
    }


.page-title.icon-before::before {
    padding-left: 0.5rem;
}

.nav-list li a.icon-before {
    padding-left: 0; /* no fake left padding */
    display: inline-flex; /* line up icon + text */
    align-items: center;
    gap: .6rem; /* space between icon and text */
    padding-left: 6px;
    width: 70%;
}

    .nav-list li a.icon-before::before {
        position: static; /* <-- critical: no absolute */
        transform: none;
        margin: 0; /* gap handles spacing */
        line-height: 1;
        font-size: 1.5rem;
    }

/* Help boxes */
.l-spacer {
    flex: 1;
    display: flex;
    justify-content: space-between;
}

button.info-btn {
    background: rgba(230, 240, 240, 0.7);
    border-radius: 20px;
    border: 0;
    width: 60px;
    margin-bottom: 20px;
    line-height: 1.35;
    position: absolute;
    cursor: pointer;
    top: -74px;
}
    button.info-btn:hover {
        background: rgba(148, 215, 197, 0.7);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(206, 206, 206, 0.4);
    }

button.info-btn-2 {
    background: rgba(230, 240, 240, 0.7);
    border-radius: 20px;
    border: 0;
    width: 60px;
    margin-bottom: 20px;
    line-height: 1.35;
    position: absolute;
    cursor: pointer;
    right: 0px;
    top: -74px;
}

    button.info-btn-2:hover {
        background: rgba(148, 215, 197, 0.7);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(206, 206, 206, 0.4);
    }

button.info-btn-3 {
    background: rgba(230, 240, 240, 0.7);
    border-radius: 20px;
    border: 0;
    width: 60px;
    line-height: 1.35;
    position: relative;
    cursor: pointer;
    margin-left: 1rem;
}

    button.info-btn-3:hover {
        background: rgba(148, 215, 197, 0.7);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(206, 206, 206, 0.4);
    }

.overlay-content.help-container {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
}


.overlay-header.help-header {
    font-size: 1.1rem;
    -webkit-text-stroke: thin;
    margin-right: 10px;
    max-width: 35%;
}

.help-title {
    display: contents;
}


ul.help-list {
    display: grid;
    background: white;
    border-radius: 20px;
    padding: 15px;
}

.help-list {
    list-style: none;
    padding-left: 0;
}

    .help-list li {
        position: relative;
        margin: 1em 0;
        padding-left: 3em;
        line-height: 1.5;
    }

        .help-list li::before {
            font-family: "Material Symbols Rounded"; /* 👈 your loaded font */
            font-weight: normal;
            font-style: normal;
            position: absolute;
            left: 0;
            top: 0.2em;
            font-size: 1.6em;
            color: #4a90e2;
            width: 1.8em;
            text-align: center;
            line-height: 1;
        }

/* same icons, rounded style */
.icon-single::before {
    content: "looks_one";
}
.icon-multiimg::before {
    content: "collections";
}
.icon-pdf::before {
    content: "picture_as_pdf";
}
.icon-auto::before {
    content: "auto_awesome";
}
.icon-wait::before {
    content: "hourglass_bottom";
}
.icon-list::before {
    content: "list_alt";
}
.icon-detail::before {
    content: "insights";
}
.icon-edit::before {
    content: "edit";
}
.icon-compare::before {
    content: "compare_arrows";
}
.icon-sync::before {
    content: "sync";
}
.icon-manage::before {
    content: "settings";
}
.icon-definition::before {
    content: "description";
}
.icon-class::before {
    content: "school";
}
.icon-users::before {
    content: "group";
}
.icon-roles::before {
    content: "admin_panel_settings";
}
.icon-structure::before {
    content: "view_timeline";
}
.icon-section::before {
    content: "article";
}
.icon-layout::before {
    content: "view_quilt";
}
.icon-flags::before {
    content: "flag";
}
.icon-headers::before {
    content: "table_chart";
}  

.icon-info::before {
    font-family: "Material Symbols Rounded"; /* 👈 your loaded font */
    font-weight: normal;
    font-style: normal;
    position: relative;
    left: 0;
    bottom: 1.6em;
    font-size: 1.6em;
    color: #4a90e2;
    width: 1.8em;
    text-align: center;
    line-height: 1;
    content: "info";
}

.icon-close::before {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 1.6em;
    content: "close";
}

.icon-help::before {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 3em;
    content: "help";
}