/* ********** */
/* CSS VARIABLES */
/* ********** */

:root {
    --white: #ffffff;
    --sys-blue: #6699cc;
    --sys-blue2: #99ccff;
    --sys-blue-grad: #4a7bb8;
    --icon-filter-blue: brightness(0) saturate(100%) invert(40%) sepia(100%) saturate(10000%) hue-rotate(200deg) brightness(0.8);
    --font-family-base: 'Open Sans', arial, sans-serif;
    --font-family-h1: arial, sans-serif;
    --font-family-chart: 'Open Sans', arial, sans-serif;
    --font-family-table: 'Inconsolata', monospace;
    --font-size-base: 15px;
    font-size: var(--font-size-base);
    --font-size-h1: 20px;
    --font-size-nav: 13px;
    --font-size-table: 14px;
    --font-size-small: 12px;
    --font-color-base: #333333;
    --font-color-h1: #f2f2f2;
    --font-color-nav: #808080;
    --font-color-nav-active: #ffffff;
    --font-color-red: #cc0000;
    --font-color-button-disabled: #999999;
    --font-color-ad-ai-line2: #ffffffcc;
    --font-weight-base: 600;
    --back-primary: #eeeeee;
    --back-nav: #ededef;
    --back-nav-active: #4d565d;
    --back-bdr-grey: #f2f2f2;
    --back-section-title: #f8f8f8;
    --back-red: #ffe6e6;
    --back-button-disabled: #e0e0e0;
    --bdr-button-disabled: #999999;
    --shadow-base: 0 4px 16px #0000004D;
    --table-cell-padding: 7px 10px 7px 10px;
    --border-table: #ececec;
    --snackbar-green: #E7F5E6;
    --snackbar-amber: #FEF3C7;
    --snackbar-red: #ffe6e6;
    --yellow: #ffcc00;
    --rag-red: #dc2626;
    --rag-amber: #f59e0b;
    --rag-green: #16a34a;
    --rag-grey: #6b7280;
    --rag-red-bg: #fef2f2;
    --rag-amber-bg: #fffbeb;
    --rag-green-bg: #f0fdf4;
    --rag-grey-bg: #f9fafb;
    --rag-red-border: #fecaca;
    --rag-amber-border: #fed7aa;
    --rag-green-border: #bbf7d0;
    --rag-grey-border: #e5e7eb;
    /* Table-specific border colors */
    --bdr-table-light: rgba(236, 236, 236, 0.5); /* tr.rowOdd td, tr.rowEven td border-right */
    --bdr-table-white-light: rgba(255, 255, 255, 0.3); /* tr.rowTitle th border-right */
    --bdr-table-white-lighter: rgba(255, 255, 255, 0.2); /* tr.rowOn td, tr.rowTotal td border-right */
    --bdr-table-blue-light: #90caf9; /* tr.rowSubTotal td border-bottom */
    --bdr-table-blue-light-alpha: rgba(144, 202, 249, 0.3); /* tr.rowSubTotal td border-right */
    /* Table-specific background colors */
    --table-row-even-bg: #fafbfc; /* tr.rowEven background */
    --table-header-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); /* tr.rowTitle background */
    /* Table-specific border widths */
    --bdr-table-thin: 1px; /* Most table borders */
    /* to sort */
    --border-light: #ccc;
    --border-medium: #ddd;
    --border-hover: #bbb;
}

/* ********** */
/* BASE STYLES */
/* ********** */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: url(../images/sky_r.jpg) no-repeat top right, url(../images/sky_l.jpg) no-repeat top left, url(../images/sky_c.jpg) repeat-x top left;
    background-color: var(--back-primary);
    font-family: var(--font-family-base);
    font-weight: normal;
    color: var(--font-color-base);
}

@media (max-width: 955px) {
    body {
        background: url(../images/sky_r.jpg) no-repeat top right, url(../images/sky_c.jpg) repeat-x top left;
        background-color: var(--back-primary);
    }
}

.txt-small {
    font-size: var(--font-size-small) !important;
}

form {
    padding: 0;
    margin: 0;
}


.hide {
	display: none;
}

/* ********** */
/* LOADING INDICATORS */
/* ********** */

div#load1 {
    display: none;
    position: fixed;
    top: 0;
    right: 0%;
    bottom: 0%;
    left: 0;
    background: url(../images/load_alpha.png);
    z-index: 10001;
}

div#load2 {
    display: none;
    position: fixed;
    top: 0;
    right: 0%;
    bottom: 0%;
    left: 0;
    z-index: 10001;
}

div.load3 {
    position: fixed;
    top: 0;
    right: 0%;
    bottom: 0%;
    left: 0;
    background: url(../images/load.png) no-repeat center center;
    z-index: 10001;
}

div.load4 {
    position: fixed;
    top: 0;
    right: 0%;
    bottom: 0%;
    left: 0;
    background: url(../images/load.gif) no-repeat center center;
    z-index: 10001;
}

/* ********** */
/* LAYOUT CONTAINERS */
/* ********** */

div.container {
    position: relative;
    padding: 10px;
    margin: 0 auto 20px auto;
    width: 90%;
    min-width: 275px; /* 15px wider than this, scroll at 290 - not sure why */
    text-align: left;
    background: url(../images/alpha_1.png);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: var(--shadow-base);
}

main {
    min-height: 150px;
    padding: 10px;
    margin-top: 10px;
    background: var(--white);
    border-radius: 5px;
    box-shadow: var(--shadow-base);
}

footer {
    padding: 20px 0 10px 0;
}

/* ********** */
/* HEADER STYLES */
/* ********** */
header {
    position: relative;
    display: block;
}

.site-title {
    position: absolute;
    top: 50%;
    left: 0;
    right: 60px;
    padding: 0 0 0 60px;
    margin: 0;
    transform: translateY(-50%);
    font-family: var(--font-family-h1);
    font-size: var(--font-size-h1);
    font-weight: bold;
    color: var(--font-color-h1);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 360px) {
    .site-title {
        font-size: inherit;
    }
}

div.logo {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 10px;
}

div.bar {
    min-height: 38px;
    background: url(../images/back_bar_sys.png) repeat-x top left;
    background-size: 1px 100%;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

    div.bar div.blue {
        height: 38px;
        background: url(../images/back_bar_blue_sys.png) no-repeat top right;
        border-radius: 5px;
    }

    div.bar.bar-uat {
        background: linear-gradient(135deg, var(--yellow) 0%, #e6b800 100%);
    }

    div.bar div.yellow {
        height: 38px;
        border-radius: 5px;
    }

/* ********** */
/* NAVIGATION STYLES */
/* ********** */
.nav-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

nav {
    display: flex;
    flex-direction: row;
    align-self: flex-end;
}

@media (max-width: 965px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    nav {
        flex-direction: column;
        align-self: stretch;
    }

        nav a.nav {
            margin: 0 0 1px 0;
        }

    .button-group {
        align-self: stretch;
        justify-content: center;
    }

    .button-group.pagination-layout {
        justify-content: flex-end;
    }
}

a.nav, a:visited.nav, a:active.nav {
    font-family: var(--font-family-h1);
    font-size: var(--font-size-nav);
    color: var(--font-color-nav);
    line-height: 30px;
    background: var(--back-nav);
    border-radius: 5px;
    padding: 0 10px 0 10px;
    margin: 0 1px 0 0;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover.nav {
    color: var(--font-color-nav-active);
    background: var(--back-nav-active);
    text-decoration: none;
}

a.nav-on, a:visited.nav-on, a:active.nav-on, a:hover.nav-on {
    font-family: var(--font-family-h1);
    font-size: var(--font-size-nav);
    color: var(--font-color-nav-active);
    line-height: 30px;
    background: var(--back-nav-active);
    border-radius: 5px;
    padding: 0 10px 0 10px;
    margin: 0 1px 0 0;
    text-decoration: none;
}

/* ********** */
/* POPOVER SYSTEM */
/* ********** */
.popover-container {
    position: relative;
    display: inline-block;
}

    .popover-container.popover-absolute {
        position: absolute;
    }

    .popover-container.popover-absolute-top-right {
        position: relative;
    }

.popover-trigger {
    cursor: pointer;
}

    .popover-trigger.popover-icon {
        background: none;
        border: none;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        transition: opacity 0.3s ease;
    }

        .popover-trigger.popover-icon:hover {
            opacity: 0.8;
        }

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sys-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-h1);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px #6699CC4D;
    border: 2px solid #FFFFFF33;
}

    .user-avatar:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px #6699CC66;
        border-color: #FFFFFF66;
    }

.popover-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: 5px;
    box-shadow: var(--shadow-base);
    min-width: 150px;
    padding: 10px;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

    .popover-menu.popover-above {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 5px;
        transform: translateY(10px);
    }

    .popover-menu.popover-left {
        right: auto;
        left: 0;
    }

    .popover-menu.popover-center {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }

        .popover-menu.popover-center.popover-above {
            transform: translateX(-50%) translateY(10px);
        }

    .popover-menu.popover-left.popover-above {
        transform: translateY(10px);
    }

    .popover-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .popover-menu.popover-above.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .popover-menu.popover-center.show {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    .popover-menu.popover-center.popover-above.show {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    .popover-menu.popover-left.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .popover-menu.popover-left.popover-above.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .popover-menu.popover-menu-form {
        min-width: 234px;
        max-width: 234px;
    }

.popover-header {
    padding: 8px 15px;
    font-weight: var(--font-weight-base);
    border-bottom: 1px solid var(--back-bdr-grey);
    margin-bottom: 5px;
}

.popover-link {
    display: block;
    padding: 8px 15px;
    color: var(--main-text);
    text-decoration: none;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

    .popover-link:hover {
        background-color: var(--back-bdr-grey);
        text-decoration: none;
    }

.logout-link {
    color: var(--font-color-red) !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
}

    .logout-link:hover {
        background-color: var(--back-red) !important;
        color: var(--font-color-red) !important;
    }

.logout-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(20%) sepia(100%) saturate(10000%) hue-rotate(0deg) brightness(0.8);
}

/* ********** */
/* CONTENT SECTIONS */
/* ********** */
section.frame {
    margin-top: 10px;
    border: 1px solid var(--back-bdr-grey);
    border-radius: 5px;
}

section.frame-style {
    margin-top: 10px;
}

.section-title {
    display: block;
    line-height: 45px;
    padding-left: 10px;
    font-weight: var(--font-weight-base);
    background: var(--back-section-title);
    border-bottom: 1px solid var(--back-bdr-grey);
}

.section-foot {
    display: block;
    padding: 10px 0 10px 10px;
}

/* ********** */
/* BUTTONS */
/* ********** */
.blue-button {
    background: linear-gradient(135deg, var(--sys-blue) 0%, var(--sys-blue-grad) 100%);
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family-h1);
    color: var(--white);
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

    .blue-button:hover {
        background: var(--white);
        border-color: var(--sys-blue);
        color: var(--sys-blue);
    }

    .blue-button .button-icon {
        width: 16px;
        height: 16px;
        filter: brightness(0) invert(1);
        transition: filter 0.3s ease;
    }

    .blue-button:hover .button-icon {
        filter: var(--icon-filter-blue);
    }

    /* Disabled state for blue-button */
    .blue-button:disabled,
    .blue-button.disabled {
        background: var(--back-button-disabled) !important;
        border: 2px dotted var(--bdr-button-disabled) !important;
        color: var(--font-color-button-disabled) !important;
        cursor: not-allowed !important;
        opacity: 0.6;
        pointer-events: none;
    }

        .blue-button:disabled .button-icon,
        .blue-button.disabled .button-icon {
            filter: grayscale(100%) brightness(0.7) !important;
        }

        .blue-button:disabled:hover,
        .blue-button.disabled:hover {
            background: var(--back-button-disabled) !important;
            border-color: var(--bdr-button-disabled) !important;
            color: var(--font-color-button-disabled) !important;
        }

            .blue-button:disabled:hover .button-icon,
            .blue-button.disabled:hover .button-icon {
                filter: grayscale(100%) brightness(0.7) !important;
            }

/* Keep trigger button in hover state when popover is open */
.popover-container:hover > .blue-button {
    background: var(--white);
    border-color: var(--sys-blue);
    color: var(--sys-blue);
}

    .popover-container:hover > .blue-button .button-icon {
        filter: var(--icon-filter-blue);
    }

.secondary-button {
    flex: 1;
    background: var(--white);
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    padding: 8px 12px;
    font-family: var(--font-family-h1);
    color: var(--font-color-base);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .secondary-button:hover {
        border-color: var(--border-hover);
        background-color: var(--back-bdr-grey);
    }

    .secondary-button,
    a.secondary-button {
        text-decoration: none;
    }

.white-button {
    background: var(--white);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: var(--font-family-h1);
    color: var(--font-color-base);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .white-button:hover {
        background-color: var(--back-bdr-grey);
    }

    .white-button,
    a.white-button {
        text-decoration: none;
    }

    .white-button.small {
        padding: 4px 8px;
        font-size: var(--font-size-small);
    }

.red-button {
    background: var(--font-color-red);
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family-h1);
    color: var(--white);
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

    .red-button:hover {
        background: var(--white);
        border-color: var(--font-color-red);
        color: var(--font-color-red);
    }

    .red-button .button-icon {
        width: 16px;
        height: 16px;
        filter: brightness(0) invert(1);
        transition: filter 0.3s ease;
    }

    .red-button:hover .button-icon {
        filter: brightness(0) saturate(100%) invert(20%) sepia(100%) saturate(10000%) hue-rotate(0deg) brightness(0.8);
    }

/* Button active indicator */
.button-indicator {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #15803d; /* Darker green color */
    border: 2px solid var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

    .button-indicator img {
        width: 8px;
        height: 8px;
        filter: brightness(0) invert(1); /* Make icon white */
    }

.button-group {
    display: flex;
    gap: 10px;
    margin: 0;
    align-self: flex-end;
}

@media (max-width: 590px) {
    .button-group .blue-button .button-text {
        display: none;
    }

    .button-group .red-button .button-text {
        display: none;
    }
}

/* ********** */
/* FORM STYLES */
/* ********** */
.form-group {
    margin-bottom: 15px;
}

    .form-group:last-of-type {
        margin-bottom: 0;
    }

.form-label {
    display: block;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-base);
    color: var(--font-color-base);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
    transition: background-color 0.3s ease;
    border-radius: 3px;
}

    .form-radio:hover {
        background-color: var(--back-bdr-grey);
    }

.form-radio-input {
    display: none;
}

.form-radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.form-radio-input:checked + .form-radio-custom {
    border-color: var(--sys-blue);
    background-color: var(--sys-blue);
}

    .form-radio-input:checked + .form-radio-custom::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 6px;
        height: 6px;
        background-color: var(--white);
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }

.form-radio-label {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--font-color-base);
    user-select: none;
}

.form-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 4px;
    transition: background-color 0.3s ease;
    border-radius: 3px;
}

    .form-checkbox:hover {
        background-color: var(--back-bdr-grey);
    }

.form-checkbox-input {
    margin-right: 16px;
    accent-color: var(--sys-blue);
    transform: scale(1.5);
    transform-origin: left center;
}

.form-checkbox-label {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--font-color-base);
    user-select: none;
}

.form-info-text {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    font-size: var(--font-size-small);
    color: var(--font-color-nav);
}

    .form-info-text img {
        width: 16px;
        height: 16px;
        margin-top: 1px;
    }

    .edit-form .form-info-text img {
        margin-left: 5px;
    }

/* Small link style - similar to blue-button hover state but link-like */
a.link-small, a.link-small:visited {
    font-size: var(--font-size-small);
    color: var(--sys-blue);
    text-decoration: none;
    font-family: var(--font-family-base);
}

    a.link-small:hover,
    a.link-small:focus {
        text-decoration: underline;
        color: var(--sys-blue);
    }

.form-select-container {
    position: relative;
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    background-color: var(--white);
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--font-color-base);
    cursor: pointer;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

    .form-select:focus {
        outline: none;
        border-color: var(--sys-blue);
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
    }

    .form-select:hover {
        border-color: var(--border-hover);
    }

.form-date-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-date-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-date-label {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--font-color-base);
}

.form-input {
    padding: 8px 12px;
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    background-color: var(--white);
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--font-color-base);
    transition: border-color 0.3s ease;
}

    .form-input:focus {
        outline: none;
        border-color: var(--sys-blue);
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
    }

    .form-input:hover {
        border-color: var(--border-hover);
    }

.form-textarea {
    padding: 8px 12px;
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    background-color: var(--white);
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--font-color-base);
    transition: border-color 0.3s ease;
    resize: vertical;
    min-height: 80px;
}

    .form-textarea:focus {
        outline: none;
        border-color: var(--sys-blue);
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
    }

    .form-textarea:hover {
        border-color: var(--border-hover);
    }

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--back-bdr-grey);
}

.blue-button-no-icon {
    flex: 1;
    justify-content: center;
}

    .blue-button-no-icon .button-icon {
        display: none;
    }


/* ********** */
/* HORIZONTAL SCROLL CONTAINER */
/* ********** */
.horizontal-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

    .horizontal-scroll-container table {
        min-width: 100%;
        width: max-content;
    }

/* ********** */
/* TABLE */
/* ********** */
.ar {
    text-align: right;
}

th, td {
    font-family: var(--font-family-base);
    padding: var(--table-cell-padding);
    text-align: left;
    border: none;
}

th {
    font-size: var(--font-size-nav);
    font-weight: var(--font-weight-base);
    padding-right: 20px;
}

td {
    font-size: var(--font-size-table);
    vertical-align: middle;
}

table th:last-child,
table td:last-child {
    border-right: none !important;
}

th.asc,
th.dsc {
    position: relative;
    border-left: 3px solid var(--sys-blue);
}

th.asc::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    color: var(--sys-blue);
    font-size: var(--font-size-small);
    opacity: 0.8;
    pointer-events: none;
}

th.dsc::after {
    content: '▲';
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    color: var(--sys-blue);
    font-size: var(--font-size-small);
    opacity: 0.8;
    pointer-events: none;
}

tr.rowTitle {
    background: var(--table-header-gradient);
    border-bottom: var(--bdr-table-thin) solid var(--border-table);
}

    tr.rowTitle th {
        background: transparent;
        font-weight: var(--font-weight-base);
        border-right: var(--bdr-table-thin) solid var(--bdr-table-white-light);
    }

        tr.rowTitle th:last-child {
            border-right: none;
        }

tr.rowOdd {
    background: var(--white);
}

    tr.rowOdd td {
        border-bottom: var(--bdr-table-thin) solid var(--border-table);
        border-right: var(--bdr-table-thin) solid var(--bdr-table-light);
    }

        tr.rowOdd td:last-child {
            border-right: none;
        }

tr.rowEven {
    background: var(--table-row-even-bg);
}

    tr.rowEven td {
        color: var(--font-color-base);
        border-bottom: var(--bdr-table-thin) solid var(--border-table);
        border-right: var(--bdr-table-thin) solid var(--bdr-table-light);
    }

        tr.rowEven td:last-child {
            border-right: none;
        }

tr.rowOn {
    background: linear-gradient(135deg, var(--sys-blue) 0%, var(--sys-blue-grad) 100%);
    cursor: pointer;
}

    tr.rowOn td {
        color: var(--white);
        border-bottom: var(--bdr-table-thin) solid var(--bdr-table-white-lighter);
        border-right: var(--bdr-table-thin) solid var(--bdr-table-white-lighter);
    }

        tr.rowOn td:last-child {
            border-right: none;
        }

tr.rowTotal {
    background: linear-gradient(135deg, var(--sys-blue) 0%, var(--sys-blue-grad) 100%);
    border-top: 1px solid var(--sys-blue);
}

    tr.rowTotal td {
        color: var(--white);
        font-weight: var(--font-weight-base);
        border-bottom: none;
        border-right: var(--bdr-table-thin) solid var(--bdr-table-white-lighter);
    }

        tr.rowTotal td:last-child {
            border-right: none;
        }

tr.rowSubTotal {
    background: var(--sys-blue2);
    border-top: 1px solid var(--sys-blue2);
}

    tr.rowSubTotal td {
        font-weight: var(--font-weight-base);
        border-bottom: none;
        border-right: var(--bdr-table-thin) solid var(--bdr-table-white-lighter);
    }

        tr.rowSubTotal td:last-child {
            border-right: none;
        }

/*
tr.rowTitle {
    background: #cccccc;
}

    tr.rowTitle th {
        border-right: 1px solid var(--white);
        border-bottom: 1px solid var(--white);
        font-weight: var(--font-weight-base);
    }

tr.rowOdd {
    background: var(--white);
}

    tr.rowOdd td {
        border-right: 1px solid var(--border-table);
        border-bottom: 1px solid var(--border-table);
        color: var(--font-color-base);
    }

tr.rowEven {
    background: var(--back-bdr-grey);
}

    tr.rowEven td {
        border-right: 1px solid var(--border-table);
        border-bottom: 1px solid var(--border-table);
        color: var(--font-color-base);
    }

tr.rowOn {
    background: linear-gradient(135deg, var(--sys-blue) 0%, var(--sys-blue-grad) 100%);
    cursor: pointer;
}

    tr.rowOn td {
        border-right: 1px solid var(--sys-blue);
        border-bottom: 1px solid var(--sys-blue);
        color: var(--white);
    }

tr.rowTotal {
    background: linear-gradient(135deg, var(--sys-blue) 0%, var(--sys-blue-grad) 100%);
}

    tr.rowTotal td {
        border-right: 1px solid var(--white);
        border-bottom: 1px solid var(--white);
        font-weight: var(--font-weight-base);
        color: var(--white);
    }

tr.rowSubTotal {
    background: var(--sys-blue2);
    border-top: 1px solid var(--sys-blue2);
}

    tr.rowSubTotal td {
        font-weight: var(--font-weight-base);
        border-bottom: none;
        border-right: var(--bdr-table-thin) solid var(--bdr-table-white-lighter);
    }
*/

/* ********** */
/* PAGINATION STYLES */
/* ********** */
.pagination-layout {
    justify-content: space-between;
    align-items: center;
}

.pagination-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--white);
}

.pagination-info {
    white-space: nowrap;
    font-size: var(--font-size-nav);
}

.pagination-controls {
    display: flex;
    gap: 8px;
}

@media (max-width: 380px) {
    .pagination-info {
        display: none;
    }
}

/* ********** */
/* ERROR MESSAGES */
/* ********** */
div.error {
    text-align: center;
    color: var(--font-color-red);
    background-color: var(--back-red);
    border: 1px solid var(--font-color-red);
    border-radius: 5px;
    padding: 15px;
    margin: 10px;
    font-weight: var(--font-weight-base);
}

/* ********** */
/* SNACKBAR NOTIFICATION */
/* ********** */

/* Snackbar container */
.snackbar-container {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    padding: 16px;
    align-items: flex-start;
    border-radius: 4px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.10);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    max-width: 80%;
    min-width: 290px;
}

    /* Snackbar color variants */
    .snackbar-container.green {
        background: var(--snackbar-green);
    }

    .snackbar-container.amber {
        background: var(--snackbar-amber);
    }

    .snackbar-container.red {
        background: var(--snackbar-red);
    }

/* All snackbar icons */
.snackbar-icon, .snackbar-right-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Snackbar text */
.snackbar-text {
    flex-grow: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 400px;
    margin: 0 32px 0 16px;
    color: #3D3D3A;
    line-height: 1.4;
}

/* Right icon container */
.snackbar-right-icon {
    position: relative;
    cursor: pointer;
}

/* Overlay icons */
.snackbar-loader, .snackbar-cross {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.2s ease-in-out;
}

.snackbar-cross {
    opacity: 0;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.snackbar-loader.rotating {
    animation: spin 1s linear infinite;
}

.snackbar-container.show {
    opacity: 1;
}

/* ********** */
/* MODAL SYSTEM */
/* ********** */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .modal-overlay.show {
        opacity: 1;
        visibility: visible;
    }

.modal-container {
    background: var(--white);
    border-radius: 5px;
    box-shadow: var(--shadow-base);
    min-width: 250px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: scale(1) translateY(0);
}

.modal-content {
    padding: 20px;
}

/* ********** */
/* COOKIE CONSENT */
/* ********** */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .cookie-consent-overlay.show {
        opacity: 1;
        visibility: visible;
    }

.cookie-consent-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 700px;
    padding: 20px;
    border-radius: 8px;
    background: var(--sys-blue);
    box-shadow: var(--shadow-base);
}

.cookie-consent-text {
    flex: 1;
    min-width: 220px;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--white);
    line-height: 1.5;
}

    .cookie-consent-text a, .cookie-consent-text a:visited {
        color: var(--white);
        text-decoration: underline;
    }

.cookie-consent-accept, .cookie-consent-accept:visited {
    display: inline-block;
    flex-shrink: 0;
    background: var(--white);
    padding: 10px 18px;
    border-radius: 4px;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-base);
    color: var(--sys-blue-grad);
    text-decoration: none;
    white-space: nowrap;
    text-align: center;
    transition: all 0.2s ease;
}

    .cookie-consent-accept:hover {
        background: var(--sys-blue-grad);
        color: var(--white);
    }

@media (max-width: 600px) {
    .cookie-consent-box {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-accept {
        width: 100%;
    }
}

.footer-link, .footer-link:visited {
    color: inherit;
    text-decoration: underline;
}

.modal-text {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--font-color-base);
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--back-bdr-grey);
}

    .modal-actions .blue-button {
        flex: 0 0 auto;
    }

    .modal-actions .secondary-button {
        flex: 0 0 auto;
    }

/* ********** */
/* ROW HIGHLIGHTING ANIMATIONS */
/* ********** */
@keyframes pulseHighlight {
    0% {
        background-color: var(--sys-blue);
        color: var(--white);
    }
    50% {
        background-color: rgba(var(--sys-blue-rgb), 0.3);
        color: var(--font-color-base);
    }
    100% {
        background-color: var(--sys-blue);
        color: var(--white);
    }
}

.row-highlight-pulse {
    animation: pulseHighlight 2s ease-in-out 2;
}

/* ********** */
/* GENERIC INFO BOX STYLES */
/* ********** */
.info-box {
    background: linear-gradient(135deg, var(--sys-blue) 0%, var(--sys-blue-grad) 100%);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}


.info-line1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: var(--font-weight-base);
    color: var(--white);
    text-align: left;
}

.info-line2 {
    color: var(--font-color-ad-ai-line2);
    text-align: left;
}

/* ********** */
/* GENERIC STATISTICS GRID STYLES */
/* ********** */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stat-card {
    flex: 1 1 150px;
    min-width: 150px;
    background: var(--back-section-title);
    border: 1px solid var(--back-bdr-grey);
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 2.5rem;
    color: var(--sys-blue);
    white-space: nowrap;
}

    .stat-value.text {
        font-size: 1.4rem;
    }

.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ********** */
/* INFO BOX ICON STYLES */
/* ********** */
.info-icon {
    flex-shrink: 0;
    color: var(--white);
    width: 24px;
    height: 24px;
}

.info-coordinates {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-family: var(--font-family-table);
}

.info-globe-icon {
    width: 16px;
    height: 16px;
    color: var(--white);
}

/* Mobile responsive styles for info box */
@media (max-width: 768px) {
    .info-box {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .info-content {
        align-items: center;
    }

    .info-icon {
        margin-top: 0;
    }

    .info-line1 {
        font-size: 1.2rem;
        text-align: center;
    }

    .info-line2 {
        text-align: center;
    }

    .info-coordinates {
        justify-content: center;
    }
}

/* Desktop: Position icon at top with 5px offset */
@media (min-width: 769px) {
    .info-box {
        align-items: flex-start;
    }

    .info-icon {
        margin-top: 5px;
    }
}
