/* ============================================================
   Dashboard Global Styles
   ============================================================ */

:root {
    --bg-color: #121212;
    --panel-color: #1e1e1e;
    --panel-light: #2a2a2a;
    --border-color: #3a3a3a;

    --text-color: #e6e6e6;
    --text-muted: #aaaaaa;

    --accent-color: #4da3ff;
    --accent-hover: #76b9ff;

    --thumbnail-size: 110px;

    --sidebar-width: 280px;

    --radius: 8px;
}


/* ============================================================
   Base
   ============================================================ */

* {
    box-sizing: border-box;
}


body {
    margin: 0;
    height: 100vh;
    overflow: hidden;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: var(--bg-color);
    color: var(--text-color);
}


/* ============================================================
   Dashboard Layout
   ============================================================ */

.dashboard {
    display: flex;

    width: 100%;
    height: 100vh;
}


/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);

    height: 100%;

    background: var(--panel-color);

    border-right: 1px solid var(--border-color);

    display: flex;
    flex-direction: column;

    overflow: hidden;
}


.sidebar-header {
    padding: 1rem;

    border-bottom: 1px solid var(--border-color);

    font-size: 1.2rem;
    font-weight: 600;
}


.sidebar-content {
    flex: 1;

    overflow-y: auto;

    padding: 0.75rem;
}



/* ============================================================
   Main Content
   ============================================================ */

.main-content {

    flex: 1;

    height: 100%;

    display: flex;

    flex-direction: column;

    overflow: hidden;

}



/* ============================================================
   Tabs
   ============================================================ */

.tabs {

    display: flex;

    background: var(--panel-color);

    border-bottom:
        1px solid var(--border-color);

}


.tab-button {

    padding:
        0.8rem 1.4rem;

    cursor: pointer;

    background: transparent;

    border: none;

    color: var(--text-muted);

    font-size: 0.95rem;

}


.tab-button:hover {

    color: var(--text-color);

    background: var(--panel-light);

}


.tab-button.active {

    color: var(--accent-color);

    border-bottom:
        2px solid var(--accent-color);

}



/* ============================================================
   Tab Panels
   ============================================================ */

.tab-panel {

    flex: 1;

    display: none;

    overflow: hidden;

}


.tab-panel.active {

    display: flex;

}



/* ============================================================
   Image Viewer
   ============================================================ */

.image-viewer {

    flex: 1;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 1rem;

}


.image-viewer img {

    max-width: 100%;

    max-height: 100%;

    object-fit: contain;

    border-radius: var(--radius);

}



/* ============================================================
   Thumbnail Grid
   ============================================================ */

.thumbnail-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fill, var(--thumbnail-size));

    gap: 0.75rem;

}



.thumbnail {

    width: var(--thumbnail-size);

    height: var(--thumbnail-size);

    object-fit: cover;

    cursor: pointer;

    border-radius: var(--radius);

    border:
        2px solid transparent;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease;

}


.thumbnail:hover {

    transform: scale(1.05);

}


.thumbnail.selected {

    border-color:
        var(--accent-color);

}



/* ============================================================
   Case Slider Panel
   ============================================================ */

.case-panel {

    flex: 1;

    display: flex;

    flex-direction: column;

    padding: 1rem;

}


.slider-container {

    padding: 1rem;

}


input[type="range"] {

    width: 100%;

}



/* ============================================================
   Mosaic Viewer
   ============================================================ */

.mosaic-container {

    flex: 1;

    display: flex;

    flex-direction: column;

    padding: 1rem;

    overflow: hidden;

}


.mosaic-grid {

    flex: 1;

    display: grid;

    gap: 1rem;

    overflow: auto;

}



.mosaic-item {

    background:
        var(--panel-color);

    border:
        1px solid var(--border-color);

    border-radius:
        var(--radius);

    padding:
        0.5rem;

}


.mosaic-item img {

    width: 100%;

    height: auto;

    display: block;

}



.mosaic-item h3 {

    margin:
        0.25rem 0;

    font-size:
        1rem;

}



.mosaic-category {

    margin:
        0 0 0.5rem 0;

    color:
        var(--text-muted);

    font-size:
        0.85rem;

}



.mosaic-item img {

    width:
        100%;

    border-radius:
        var(--radius);

}



/* ============================================================
   Controls / Buttons
   ============================================================ */

button {

    font-family: inherit;

}


.control-button {

    background:
        var(--panel-light);

    border:
        1px solid var(--border-color);

    color:
        var(--text-color);

    padding:
        0.5rem 1rem;

    border-radius:
        var(--radius);

    cursor: pointer;

}


.control-button:hover {

    border-color:
        var(--accent-color);

    color:
        var(--accent-color);

}



/* ============================================================
   Scrollbars
   ============================================================ */

::-webkit-scrollbar {

    width: 10px;

}


::-webkit-scrollbar-track {

    background:
        var(--panel-color);

}


::-webkit-scrollbar-thumb {

    background:
        var(--border-color);

    border-radius:
        10px;

}


::-webkit-scrollbar-thumb:hover {

    background:
        #555;

}



/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {

    :root {

        --sidebar-width: 220px;

    }


    .thumbnail-grid {

        grid-template-columns:
            repeat(auto-fill, 90px);

    }

}
