﻿/* ==========================================================================
   BASE & ACCESSIBILITY
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: #f4f7f9;
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

    .skip-link:focus {
        position: fixed;
        background: white;
        padding: 10px;
        z-index: 9999;
    }

/* ==========================================================================
   UNIVERSAL CONTENT CLASSES (The Core Architecture)
   ========================================================================== */
.content-title {
    /*color: #212529;*/
    color: #465d81;
    font-weight: 700;
}

.content-subtitle {
    color: #495057;
    
}

.content-highlight {
    color: #0d6efd;
    font-weight: 500 !important;
}

.content-label {
    color: #303439;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.content-panel {
    background-color: #fff;
}

/* ==========================================================================
   TOAST MESSAGES 
   ========================================================================== */
/* Error Messages */
.custom-toast-container {
    z-index: 1055;
}

.toast-custom-text {
    color: white;
    font-weight: 500;
    font-size: 1rem;
}

/* ==========================================================================
   THEME HEADERS (Modals & Tables)
   ========================================================================== */
.theme-header,
.theme-header th {
    background-color: #5a759f !important;
    color: #ffffff !important;
}

    /* Auto-convert text to white when inside a Theme Header */
    .theme-header .content-title,
    .theme-header .content-label,
    .theme-header i,
    .theme-header .btn-link {
        color: #ffffff !important;
    }

.theme-header {
    border-bottom: none;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

    .theme-header th.sortable:hover {
        background-color: #465d81 !important;
    }

    .theme-header .btn-close {
        filter: brightness(0) invert(1);
        opacity: 0.8;
    }

        .theme-header .btn-close:hover {
            opacity: 1;
        }

/* ==========================================================================
   CORE COMPONENTS (Cards, Avatars, Pills, Buttons)
   ========================================================================== */
.card {
    border-radius: 12px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

/* Form specific overrides */
.badge-type {
    font-weight: 400;
    background-color: #fff;
    color: #212529;
}

/* ==========================================================================
   GLOBAL BUTTONS & FORMS
   ========================================================================== */
.btn-success, .btn-export, .btn-print, .btn-archive {
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-success:hover {
        background-color: #0d5835 !important;
        border-color: #0d5835 !important;
    }

.btn-export, .btn-print {
    background-color: #6941f6;
    color: white !important;
    font-weight: 600;
}

    .btn-export:hover, .btn-print:hover {
        background-color: #5531d4;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

.btn-archive {
    background-color: #d31313;
    color: white !important;
}

    .btn-archive:hover {
        background-color: #a80f0f;
        color: white !important;
    }

.btn-primary {
    background-color: #10426a;
    border-color: #0f3c60;
}

    .btn-primary:hover {
        background-color: #198754 !important;
        border-color: #198754 !important;
    }

.btn-search {
    background-color: #5a759f;
    border-color: #5a759f;
    color: white;
}

    .btn-search:hover {
        background-color: #4a6184;
        color: white;
    }

/* Previous & Next Buttons */
.btn-pagination-nav {
    background-color: #5a759f;
    color: #ffffff;
    border: none;
    transition: all 0.2s;
}

    .btn-pagination-nav:hover,
    .btn-pagination-nav:focus {
        background-color: #486389;
        color: #ffffff;
    }

    .btn-pagination-nav:disabled {
        background-color: #8da4c5;
        color: #ffffff;
        opacity: 0.8;
    }

.btn-page-active {
    background-color: #5a759f !important;
    border-color: #5a759f !important;
    color: #ffffff !important;
}

    .btn-page-active:hover {
        background-color: #486389 !important;
        border-color: #486389 !important;
        color: #ffffff !important;
    }

.btn-page-inactive {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    color: #5a759f;
    transition: all 0.2s;
}

    .btn-page-inactive:hover {
        background-color: #f1f3f5;
        color: #486389;
    }

.field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* ================== Status Pills ================== */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    min-width: 85px;
    padding: 0 12px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-transform: capitalize;
    border-radius: 50px;
}

.pill-red {
    color: #842029;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
}

.pill-blue {
    color: #055160;
    background-color: #cff4fc;
    border: 1px solid #b6effb;
}

.pill-yellow {
    color: #664d03;
    background-color: #fff3cd;
    border: 1px solid #ffecb5;
}

.pill-green {
    color: #0f5132;
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
}

/* ==========================================================================
   TABLES & FUNCTIONALITY
   ========================================================================== */
.table thead th {
    font-size: 0.75rem;
    cursor: pointer;
    padding: 12px 15px;
    border: none;
    vertical-align: middle;
    transition: background 0.2s;
}

.table-hover tbody tr:hover {
    background-color: rgba(90, 117, 159, 0.05) !important;
    transition: background-color 0.2s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Sorting Arrows */
th.sortable {
    position: relative;
}

.sortable-header::after {
    content: '\25B2';
    opacity: 0;
    width: 15px;
    display: inline-block;
    text-align: center;
    margin-left: 8px;
    font-size: 0.8em;
    color: #ffffff;
}

th.sortable[data-order="asc"] .sortable-header::after {
    opacity: 1;
}

th.sortable[data-order="desc"] .sortable-header::after {
    content: "\25BC";
    opacity: 1;
}

th[data-filter-value] .stop-sort, th[data-filter-value] .stop-sort i {
    color: orangered !important;
    opacity: 1 !important;
    filter: drop-shadow(0 0 4px rgba(255, 69, 0, 0.5));
}
.filter-popup {
    position: absolute;
    top: 100%; /* Right below the header */
    left: 0;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 1000; /* Float above everything else */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    gap: 5px;
}

    .filter-popup input {
        padding: 4px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

/* Forces the table to obey our column widths */
.table-fixed {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 1000px !important;
}

/* Pagination Components */
.hidden-by-pagination {
    display: none !important;
}

/* Ghost Row Lines are invisible */
tr.ghost-row,
tr.ghost-row td,
tr.ghost-row th {
    border-bottom-color: transparent !important;
    background-color: transparent !important;
}

tfoot.content-panel td {
    border-top: 2px solid #dee2e6 !important;
}

/* Custom Pagination Dropdown Styling */
.pagination-select {
    border: 1px solid #ced4da;
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    border-radius: 6px;
    padding-left: 12px;
    transition: all 0.2s ease-in-out;
}

    .pagination-select:hover {
        border-color: #5a759f;
        background-color: #ffffff;
    }

    .pagination-select:focus {
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
        border-color: #5a759f;
    }

/* ==========================================================================
   Error Message Styling
   ========================================================================== */

span.text-danger {
    display: block;
    color: #B00020 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
}
