@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f7faf8 0%, #eef3ef 100%);
}

.app-shell-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.app-shell-main {
    min-height: calc(100vh - 64px);
}

.app-shell-userpanel {
    background: linear-gradient(145deg, rgba(44, 95, 45, 0.92), rgba(30, 58, 36, 0.9));
    color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

/* MudBlazor typography defaults can override panel color; keep name + project white */
.app-shell-userpanel .mud-typography,
.app-shell-userpanel-text {
    color: #ffffff !important;
}

.app-shell-userpanel .mud-icon-root,
.app-shell-userpanel-icon {
    color: #ffffff !important;
    font-size: 16px !important;
}

.app-shell-footer {
    background-color: rgba(255, 255, 255, 0.72);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.table {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Default .NET font */
    font-size: 16px; /* Adjust font size */
}

    /* Change font specifically for the header row */
    .table thead th {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Default .NET font */
        font-size: 18px;
    }

.nav {
    list-style: none;
    padding-left: 0;
}
.drawer-background {
    position: relative;
    background-image: url('/img/drawer.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: white;
}

    /*.drawer-background::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);*/ /* dark overlay */
        /*z-index: 0;
    }*/

    .drawer-background * {
        position: relative;
        z-index: 1; /* ensure content stays above the overlay */
    }


@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.85;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}


.nav-item {
    margin-bottom: 0.5rem;
}

.navbar-overlay {
    height: 80px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/building.jpg') no-repeat center center;
    background-size: cover;
    color: white;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #1f2937;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

    .nav-link:hover {
        background-color: #e3f2fd;
        color: #004080;
    }

    .nav-link.active {
        background-color: #004080;
        color: white;
    }


.navbar-brand img {
    max-height: 50px;
}

.nav-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    margin: 1rem 0 0.5rem 1rem;
    color: #6b7280; /* muted section label */
    font-weight: 600;
}



.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;
    border-radius: 10px;
    overflow: hidden;
}

.mud-table thead th {
    background-color: #1E3A24 !important;
    color: white !important;
    font-weight: bold;
    font-size: 1.05rem;
}


/* Links */
a, .btn-link {
    color: #2C5F2D; /* Dark green */
    text-decoration: none;
}

    a:hover, .btn-link:hover {
        color: #A7C957; /* Light green accent on hover */
    }

/* Primary Button */
.btn-primary {
    color: #fff; /* White text for contrast */
    background-color: #2C5F2D; /* Dark green primary color */
    border-color: #265A24; /* Slightly darker shade for border */
}

    .btn-primary:hover {
        background-color: #247423; /* Darker green on hover */
        border-color: #1E5D1D; /* Match hover border color */
    }

.header-icon {
    background-color: #2C5F2D;
    color: white;
    padding: 8px;
    border-radius: 6px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}


/* Custom Card Header */
.card-header-custom {
    background-color: #1E3A24; /* Dark green instead of purple */
    color: #F5F5F5; /* Light text for readability */
}

.mud-paper {
    border-radius: 12px;
}



.cta-button {
    color: white !important; /* Makes the text white */
    background-color: #007bff; /* Optional: Ensures the button has a background color */
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}

.mud-popover .mud-list-item:hover {
    background-color: #e6f0ff !important;
}



.top-row.navbar {
    background-color: #1E3A24; /* Dark Green */
    height: 80px;
    display: flex;
    align-items: center;
}

.filter-label {
    color: #1E3A24; /* Replace with your brand color */
    font-weight: 500;
}


/* Change Grid Header Row Background */
.GridView thead tr {
    background-color: #1E3A24; /* Dark Green */
    color: white; /* Light text */
}

/* Optional: Change text alignment and padding */
.GridView thead th {
    padding: 10px;
    text-align: left;
    font-weight: bold;
}

/* Change Header Row Background */
.table thead {
    background-color: #1E3A24 !important; /* Dark Green */
    color: white !important;
}

    /* Ensure header text is visible and formatted */
    .table thead th {
        padding: 10px;
        font-weight: bold;
        text-align: left;
    }



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;
        }

.sidebar {
    background-image: linear-gradient(180deg, #4e967e 0%, #1E3A24 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;
    }

.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type {
        padding-top: 1rem;
    }

    .nav-item:last-of-type {
        padding-bottom: 1rem;
    }

    .nav-item a {
        color: #d7d7d7;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
    }

        .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.1);
            color: white;
        }

.content {
    padding-top: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu-animated {
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    max-height: 0;
}

    .nav-menu-animated.show {
        max-height: 1000px; /* Adjust based on content size */
    }


.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
    }


@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 {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}

.my-custom-scrollbar {
    position: relative;
    height: 400px;
    overflow: auto;
}

.table-wrapper-scroll-y {
    display: block;
}

.table th {
    color: white;
    font-weight: bold; /* Optional: Make the titles bold */
}

.table tbody tr {
    background-color: white;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dim background */
    z-index: 999; /* Ensure it's below the modal */
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the modal */
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* Ensure it appears above the overlay */
    width: 50%; /* Adjust width */
    max-height: 80%; /* Prevent modal from taking too much vertical space */
    overflow-y: auto; /* Scroll if content overflows */
    display: block; /* Ensure the modal is visible */
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


.highlight-container {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.text-monospace {
    font-family: monospace;
    font-size: 0.95rem;
}

.card-body p {
    margin-bottom: 0.5rem;
}

.report-msg-cell {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(100%, 44ch);
}

.report-table table {
    table-layout: fixed;
    width: 100%;
}

.report-table .mud-table-cell {
    padding: 0.4rem 0.65rem;
    line-height: 1.2rem;
    vertical-align: top;
    font-size: 0.82rem;
}

.report-table .mud-table-head .mud-table-cell {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.82rem;
}

.report-table .mud-chip {
    min-height: 1.35rem;
}

.report-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Backward-compatible aliases */
.audit-msg-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.audit-table table {
    table-layout: fixed;
    width: 100%;
}

.audit-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
