@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* =====================================================
   DARK BLUE THEME - GLOBAL STYLES
   Color Palette:
   - Primary: #1e3a5f (Dark Blue)
   - Secondary: #2c5364 (Medium Blue)
   - Accent: #203a43 (Blue-Gray)
   - Dark: #0f2027 (Very Dark Blue)
   ===================================================== */

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.table {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
}

    /* Change font specifically for the header row */
    .table thead th {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 18px;
    }

.nav {
    list-style: none;
    padding-left: 0;
}

/* =====================================================
   DRAWER & SIDEBAR - Dark Blue
   ===================================================== */
.drawer-background {
    position: relative;
    background: linear-gradient(180deg, #1e3a5f 0%, #152d47 50%, #0d1f30 100%);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: white;
}

    .drawer-background * {
        position: relative;
        z-index: 1;
    }

.sidebar {
    background: linear-gradient(180deg, #1e3a5f 0%, #0d1f30 70%);
}

    .sidebar .top-row {
        background-color: rgba(0,0,0,0.4);
    }

    .sidebar .navbar-brand {
        font-size: 1.1rem;
    }

    .sidebar .oi {
        width: 2rem;
        font-size: 1.1rem;
        vertical-align: text-top;
        top: -2px;
    }

/* =====================================================
   NAVBAR & TOP ROW - Dark Blue
   ===================================================== */
.navbar-overlay {
    height: 80px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(15, 32, 39, 0.9), rgba(30, 58, 95, 0.9)), url('/img/building.jpg') no-repeat center center;
    background-size: cover;
    color: white;
}

.top-row.navbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5364 100%);
    height: 80px;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    max-height: 50px;
}

.nav-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    margin: 1rem 0 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* =====================================================
   NAV ITEMS & LINKS - Dark Blue Theme
   ===================================================== */
.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

    .nav-item:first-of-type {
        padding-top: 1rem;
    }

    .nav-item:last-of-type {
        padding-bottom: 1rem;
    }

    .nav-item a {
        color: rgba(255, 255, 255, 0.85);
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
        transition: all 0.3s ease;
    }

        .nav-item a.active {
            background-color: rgba(255,255,255,0.25);
            color: white;
        }

        .nav-item a:hover {
            background-color: rgba(255,255,255,0.15);
            color: white;
        }

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #1e3a5f;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

    .nav-link:hover {
        background-color: rgba(30, 58, 95, 0.1);
        color: #0f2027;
    }

    .nav-link.active {
        background-color: #1e3a5f;
        color: white;
    }

/* =====================================================
   BUTTONS - Dark Blue Theme
   ===================================================== */
/* Links */
a, .btn-link {
    color: #1e3a5f;
    text-decoration: none;
}

    a:hover, .btn-link:hover {
        color: #2c5364;
    }

/* Primary Button */
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5364 100%);
    border: none;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #2c5282 0%, #355a6e 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
    }

.cta-button {
    color: white !important;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5364 100%);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

    .cta-button:hover {
        background: linear-gradient(135deg, #2c5282 0%, #355a6e 100%);
        transform: translateY(-2px);
    }

/* =====================================================
   TABLES & GRIDS - Dark Blue Theme
   ===================================================== */
.mud-table thead th {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2027 100%) !important;
    color: white !important;
    font-weight: bold;
    font-size: 1.05rem;
}

.table thead {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2027 100%) !important;
    color: white !important;
}

    .table thead th {
        padding: 10px;
        font-weight: bold;
        text-align: left;
        color: white !important;
    }

.table th {
    color: white;
    font-weight: bold;
}

.table tbody tr {
    background-color: white;
}

.GridView thead tr {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2027 100%);
    color: white;
}

.GridView thead th {
    padding: 10px;
    text-align: left;
    font-weight: bold;
}

.table-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-container {
    position: relative;
}

/* =====================================================
   CARDS & HEADERS - Dark Blue Theme
   ===================================================== */
.header-icon {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5364 100%);
    color: white;
    padding: 8px;
    border-radius: 6px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.3);
}

.card-header-custom {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2027 100%);
    color: #F5F5F5;
}

.highlight-container {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #1e3a5f;
}

/* =====================================================
   FILTERS & LABELS - Dark Blue Theme
   ===================================================== */
.filter-label {
    color: #1e3a5f;
    font-weight: 500;
}

/* =====================================================
   POPOVER & DROPDOWNS
   ===================================================== */
.mud-popover .mud-list-item:hover {
    background-color: rgba(30, 58, 95, 0.1) !important;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.85;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.nav-menu-animated {
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    max-height: 0;
}

    .nav-menu-animated.show {
        max-height: 1000px;
    }

/* =====================================================
   LAYOUT & STRUCTURE
   ===================================================== */
app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.main {
    flex: 1;
}

    .main .top-row {
        background-color: #f7f7f7;
        border-bottom: 1px solid #d6d5d5;
        justify-content: flex-end;
    }

        .main .top-row > a {
            margin-left: 1.5rem;
        }

.content {
    padding-top: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

/* =====================================================
   MODALS
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 32, 39, 0.6);
    z-index: 999;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 32, 39, 0.4);
    z-index: 1000;
    width: 50%;
    max-height: 80%;
    overflow-y: auto;
    display: block;
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* =====================================================
   FORMS & VALIDATION
   ===================================================== */
/* MudTextField and form controls - Dark Blue Theme */
.mud-input-control:hover .mud-input-slot,
.mud-input-control.mud-input-focused .mud-input-slot {
    border-color: #1e3a5f !important;
}

.mud-input-control .mud-input-slot:hover,
.mud-input-control .mud-input-slot:focus-within {
    border-color: #1e3a5f !important;
}

.mud-input-label.mud-input-label-animated.mud-input-label-inputcontrol.mud-focused {
    color: #1e3a5f !important;
}

.mud-input-root-outlined:hover .mud-input-outlined-border,
.mud-input-root-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: #1e3a5f !important;
}

.mud-input-label-animated.mud-input-label-inputcontrol.mud-input-focused {
    color: #1e3a5f !important;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #2c5364;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* =====================================================
   SCROLLBARS
   ===================================================== */
.my-custom-scrollbar {
    position: relative;
    height: 400px;
    overflow: auto;
}

.table-wrapper-scroll-y {
    display: block;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-monospace {
    font-family: monospace;
    font-size: 0.95rem;
}

.card-body p {
    margin-bottom: 0.5rem;
}

/* =====================================================
   ERROR UI
   ===================================================== */
#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;
    }

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 767.98px) {
    .main .top-row {
        display: none;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        display: block;
    }
}
