﻿/* === GENERAL LAYOUT === */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* === TOAST === */

.toast-custom-above-footer {
    bottom: 70px !important; /* Adjust depending on your footer height */
    right: 20px;
}

/* === FOOTER === */
footer.footer {
    flex-shrink: 0;
    height: 60px;
    background-color: #f8f9fa;
    padding: 10px 0;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.footer {
    position: sticky;
    bottom: 0;
    width: 100%;
    background: #fff;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.footer .container {
    width: 100%;
}

.footer .theme-toggle-container {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

/* === Log Files === */
body.vs-dark .log-content pre {
    background-color: #1e1e1e !important; /* Force override inline style */
    color: #d4d4d4;
    border: 1px solid #3c3c3c;
    border-radius: 5px;
    max-height: 600px;
    overflow-y: auto;
    font-family: Consolas, 'Courier New', monospace;
    white-space: pre-wrap;
    box-shadow: inset 0 0 5px #000;
}

/* === DATATABLES LAYOUT === */

/* Flex container for dropdown + search */
.dt-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Page length dropdown */
.dataTables_length {
    flex: 1 1 auto;
    min-width: 160px;
    margin-bottom: 0;
}

/* Search box alignment */
.dataTables_filter {
    flex: 1 1 auto;
    min-width: 160px;
    margin-bottom: 0;
    text-align: right;
}

.dataTables_filter input {
    width: auto;
    display: inline-block;
}

/* Buttons (like page length) */
.buttons-page-length {
    margin-left: 8px;
}

/* Table scrollability on smaller screens */
.table-responsive {
    overflow-x: auto;
}

/* === PAGINATION STYLING === */
.dataTables_paginate {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

/* === RESPONSIVE TWEAKS === */
@media (max-width: 576px) {
    .dt-controls {
        flex-direction: column;
    }

    .dataTables_filter,
    .dataTables_length {
        flex: 100%;
        text-align: left;
    }

    .dataTables_filter input {
        width: 100%;
    }
}

/* === CUSTOM BUTTONS === */
.btn-view {
    background-color: #0d6efd;
    color: white;
}

.btn-download {
    background-color: #198754;
    color: white;
}

/* === VISUAL STUDIO DARK MODE === */
body.vs-dark {
    background-color: #1e1e1e;
    color: #d4d4d4;
}

body.vs-dark #themeToggle {
    background-color: #2d2d2d;
    color: #d4d4d4;
    border-color: #444;
}

body.vs-dark a {
    color: #569cd6;
}

body.vs-dark .btn,
body.vs-dark .btn-primary,
body.vs-dark .btn-outline-secondary {
    color: #d4d4d4;
    background-color: #2d2d2d;
    border-color: #444;
}

body.vs-dark .btn:hover {
    background-color: #3c3c3c;
    border-color: #555;
}


/* Light theme default */
footer.footer {
    background-color: #f8f9fa;
    color: #6c757d;
    padding: 10px 0;
    text-align: center;
    width: 100%;
    border-top: 1px solid #dee2e6;
}

/* VS Dark theme override */
body.vs-dark footer,
body.vs-dark footer.footer {
    background-color: #252526;
    color: #999999;
    border-top: 1px solid #3c3c3c;
}

body.vs-dark footer a {
    color: #9cdcfe;
}

body.vs-dark footer a:hover {
    text-decoration: underline;
}

/* DataTables - Table styling */
body.vs-dark table.dataTable,
body.vs-dark table.dataTable td,
body.vs-dark table.dataTable th {
    background-color: #1e1e1e !important;
    color: #d4d4d4 !important;
    border-color: #3c3c3c !important;
}

body.vs-dark table.dataTable thead {
    background-color: #2d2d30 !important;
    border-bottom: 1px solid #444 !important;
}

body.vs-dark table.dataTable thead th {
    border-bottom: 1px solid #444444 !important;
}

body.vs-dark table.dataTable tbody tr:nth-child(even),
body.vs-dark table.dataTable tbody tr:nth-child(odd) {
    background-color: #252526 !important;
}

body.vs-dark table.dataTable tbody tr:hover {
    background-color: #2a2a2a !important;
}

body.vs-dark table.dataTable tbody td {
    border-top: 1px solid #2a2a2a;
}

body.vs-dark .dataTables_wrapper {
    color: #d4d4d4;
    background-color: #1e1e1e !important;
}

/* DataTables - Filter/Length controls */
body.vs-dark .dataTables_wrapper .dataTables_filter input,
body.vs-dark .dataTables_wrapper .dataTables_length select,
body.vs-dark .dataTables_paginate .paginate_button {
    background-color: #2d2d30 !important;
    color: #d4d4d4 !important;
    border: 1px solid #444 !important;
}

body.vs-dark .dataTables_filter input:focus,
body.vs-dark .dataTables_length select:focus {
    outline: none;
    border-color: #569cd6;
    box-shadow: 0 0 0 2px rgba(86, 156, 214, 0.2);
}

/* DataTables - Buttons */
body.vs-dark .dt-button,
body.vs-dark .buttons-page-length {
    background-color: #2d2d2d;
    color: #d4d4d4;
    border: 1px solid #444444;
}

body.vs-dark .dt-button:hover {
    background-color: #3a3a3a;
    color: white;
}

/* DataTables - Pagination */
body.vs-dark .dataTables_paginate .paginate_button.current,
body.vs-dark .dataTables_paginate .paginate_button:hover {
    background-color: #3d3d3d !important;
    color: #ffffff !important;
    border-color: #555555;
}

/* === VS DARK: Modals === */
body.vs-dark .modal-content {
    background-color: #2d2d2d;
    color: #d4d4d4;
    border: 1px solid #3c3c3c;
}

body.vs-dark .modal-header,
body.vs-dark .modal-footer {
    border-color: #3c3c3c;
}

body.vs-dark .modal-title {
    color: #d4d4d4;
}

body.vs-dark .btn-close {
    filter: invert(1);  
    make: close button visible 
}

/* === VS DARK: Forms === */
body.vs-dark input,
body.vs-dark select,
body.vs-dark textarea {
    background-color: #2d2d2d !important;
    color: #d4d4d4 !important;
    border: 1px solid #444 !important;
}

body.vs-dark input::placeholder,
body.vs-dark textarea::placeholder {
    color: #888888;
}

body.vs-dark label {
    color: #cccccc;
}

/* === VS DARK: Cards === */
body.vs-dark .card {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    color: #d4d4d4;
}

/* === VS DARK: Alerts === */
body.vs-dark .alert {
    background-color: #3d3d3d;
    color: #f5f5f5;
    border-color: #555;
}

:root {
    --chip-bg: #14161a;
    --chip-border: #2a2f38;
    --chip-hover: #1a1d23;
    --chip-text: #e6e9ef;
    --sep: #6b7280;
    --bar-bg: #0f1115;
    --accent: #2563eb; /* tweak to your brand */
}

.breadcrumb-modern {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: .5rem .75rem;
    border-radius: .75rem;
    background: var(--bar-bg);
    border: 1px solid var(--chip-border);
}

.bread-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .375rem .65rem;
    border-radius: 999px;
    text-decoration: none;
    background: var(--chip-bg);
    color: var(--chip-text);
    border: 1px solid var(--chip-border);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .15s, border-color .15s, transform .05s;
}

    .bread-chip:hover {
        background: var(--chip-hover);
        border-color: #3a4150;
        transform: translateY(-1px);
    }

    .bread-chip.active, .day-chip.active {
        background: var(--accent);
        border-color: var(--accent);
        color: white;
    }

.bread-sep {
    color: var(--sep);
    opacity: .9;
    display: inline-flex;
}

.days-bar {
    margin-top: .6rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: .5rem .75rem;
    border-radius: .75rem;
    background: var(--bar-bg);
    border: 1px solid var(--chip-border);
    margin-bottom: 1.25rem;
}

.day-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    text-decoration: none;
    background: var(--chip-bg);
    color: var(--chip-text);
    border: 1px solid var(--chip-border);
}

.day-count {
    font-size: .75rem;
    padding: .1rem .4rem;
    border-radius: 999px;
    background: #2a2f38;
}

.days-clear {
    margin-left: auto;
}

.sticky-subnav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(6px);
    margin-bottom: 1.25rem;
}

.folder-grid {
    display: grid;
    gap: .6rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    margin: .75rem 0 1rem 0;
    margin-bottom: .75rem;
}

.folder-tile {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .70rem;
    border-radius: .9rem;
    background: var(--bar-bg, #0f1115);
    border: 1px solid var(--chip-border, #2a2f38);
    text-decoration: none;
    color: var(--chip-text, #e6e9ef);
    transition: transform .06s ease, background .15s ease, border-color .15s ease;
}

.folder-tile:hover {
    transform: translateY(-1px);
    background: var(--chip-hover, #1a1d23);
    border-color: #3a4150;
}

.folder-ico {
    width: 28px;
    height: 28px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: .55rem;
    background: rgba(37,99,235,.12);
    color: var(--accent, #2563eb);
}

.folder-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.folder-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .95rem;
    line-height: 1.1;
}

.folder-sub {
    font-size: .78rem;
    line-height: 1.1;
    gap: .4rem;
    color: #a3aab6;
    display: flex;
    align-items: center;
}

.badge-dot {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .05rem .45rem;
    border-radius: 999px;
    background: #2a2f38;
    color: #d5d9e1;
    font-size: .75rem;
}

#tblAreas {
    table-layout: fixed;
}

#tblAreas td:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === VS DARK: Bootstrap Button Styles === */
body.vs-dark .btn-primary {
    background-color: #0d3a5c;
    color: #d4d4d4;
    border-color: #217dbb;
}
body.vs-dark .btn-primary:hover,
body.vs-dark .btn-primary:focus {
    background-color: #155a8a;
    color: #fff;
    border-color: #217dbb;
}

body.vs-dark .btn-secondary {
    background-color: #2d2d2d;
    color: #d4d4d4;
    border-color: #6c757d;
}
body.vs-dark .btn-secondary:hover,
body.vs-dark .btn-secondary:focus {
    background-color: #444;
    color: #fff;
    border-color: #888;
}

body.vs-dark .btn-success {
    background-color: #146c43;
    color: #d4d4d4;
    border-color: #198754;
}
body.vs-dark .btn-success:hover,
body.vs-dark .btn-success:focus {
    background-color: #198754;
    color: #fff;
    border-color: #198754;
}

body.vs-dark .btn-warning {
    background-color: #b8860b;
    color: #222;
    border-color: #ffc107;
}
body.vs-dark .btn-warning:hover,
body.vs-dark .btn-warning:focus {
    background-color: #ffc107;
    color: #222;
    border-color: #ffc107;
}

body.vs-dark .btn-danger {
    background-color: #a42626;
    color: #fff;
    border-color: #dc3545;
}
body.vs-dark .btn-danger:hover,
body.vs-dark .btn-danger:focus {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

body.vs-dark .btn-info {
    background-color: #0a6374;
    color: #d4d4d4;
    border-color: #0dcaf0;
}
body.vs-dark .btn-info:hover,
body.vs-dark .btn-info:focus {
    background-color: #0dcaf0;
    color: #222;
    border-color: #0dcaf0;
}

/* === VS DARK: Outline Button Styles === */
body.vs-dark .btn-outline-primary {
    color: #217dbb;
    background-color: transparent;
    border-color: #217dbb;
}
body.vs-dark .btn-outline-primary:hover,
body.vs-dark .btn-outline-primary:focus {
    background-color: #217dbb;
    color: #fff;
    border-color: #217dbb;
}

body.vs-dark .btn-outline-secondary {
    color: #d4d4d4;
    background-color: transparent;
    border-color: #6c757d;
}
body.vs-dark .btn-outline-secondary:hover,
body.vs-dark .btn-outline-secondary:focus {
    background-color: #444;
    color: #fff;
    border-color: #888;
}

body.vs-dark .btn-outline-success {
    color: #198754;
    background-color: transparent;
    border-color: #198754;
}
body.vs-dark .btn-outline-success:hover,
body.vs-dark .btn-outline-success:focus {
    background-color: #198754;
    color: #fff;
    border-color: #198754;
}

body.vs-dark .btn-outline-warning {
    color: #ffc107;
    background-color: transparent;
    border-color: #ffc107;
}
body.vs-dark .btn-outline-warning:hover,
body.vs-dark .btn-outline-warning:focus {
    background-color: #ffc107;
    color: #222;
    border-color: #ffc107;
}

body.vs-dark .btn-outline-danger {
    color: #dc3545;
    background-color: transparent;
    border-color: #dc3545;
}
body.vs-dark .btn-outline-danger:hover,
body.vs-dark .btn-outline-danger:focus {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

body.vs-dark .btn-outline-info {
    color: #0dcaf0;
    background-color: transparent;
    border-color: #0dcaf0;
}
body.vs-dark .btn-outline-info:hover,
body.vs-dark .btn-outline-info:focus {
    background-color: #0dcaf0;
    color: #222;
    border-color: #0dcaf0;
}
