:root {
    --sidenav-width: 280px;
    --bg-blue: rgb(13, 130, 208);
    --bg-light-blue: rgb(200, 225, 242);
    --rk-blue: #2D2E83;
    --rk-blue-rgb: 45, 46, 131;
    --rk-darkblue: #0E0E31;
    --rk-darkblue-rgb: 14, 14, 50;
    --rk-white: #FFFFFF;
    --rk-white-rgb: 255, 255, 255;
    --rk-darkblue: #0E0E31;
    --rk-darkblue-rgb: 14, 14, 50;
    --rk-glitch-red: #E7343D;
    --rk-glitch-red-rgb: 231, 52, 61;
    --rk-glitch-yellow: #EFE12E;
    --rk-glitch-yellow-rgb: 239, 225, 46;
    --rk-glitch-teal: #45BDD3;
    --rk-glitch-teal-rgb: 69, 189, 211;
    --rk-glitch-green: #5CB45F;
    --rk-glitch-green-rgb: 92, 180, 95;
}

/** LINKS **/
a {
    color: rgba(var(--rk-darkblue-rgb), 1);
    text-decoration: none;
    transition: all ease .4s;
}

a:hover {
    color: rgba(var(--rk-blue-rgb), 1);
    text-decoration: none;
    transition: all ease .4s;
}

/** TEXT **/
.text-rk-blue {
    color: rgba(var(--rk-blue-rgb), 1);
}

.text-rk-darkblue {
    color: rgba(var(--rk-darkblue-rgb), 1);
}

/** BUTTONS **/
.btn.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--rk-blue);
    --bs-btn-border-color: var(--rk-darkblue);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--rk-darkblue);
    --bs-btn-hover-border-color: var(--rk-blue);
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--bg-blue);
    --bs-btn-active-border-color: var(--bg-blue);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: rgba(var(--rk-blue-rgb), .8);
    --bs-btn-disabled-border-color: rgba(var(--rk-blue-rgb), .2);
}

.btn-outline-primary {
    --bs-btn-color: var(--rk-blue);
    --bs-btn-border-color: var(--rk-blue);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--rk-blue);
    --bs-btn-hover-border-color: var(--rk-blue);
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--rk-blue);
    --bs-btn-active-border-color: var(--rk-blue);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--rk-blue);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--rk-blue);
    --bs-gradient: none;
}

#wrapper {
    overflow-x: hidden;
}

#sidebar-wrapper {
    width: var(--sidenav-width);
    overflow-y: auto;
    z-index: 1030;
    border-right: 1px solid rgba(0, 0, 0, .08);
    min-height: 100vh;
    margin-left: -15rem;
}


#page-content-wrapper {
    min-width: 100vw;
}

body.sb-sidenav-toggled #wrapper #sidebar-wrapper {
    margin-left: 0;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }
}

body.has-sidenav {
    padding-left: var(--sidenav-width);
}

@media (max-width: 991.98px) {
    body.has-sidenav {
        padding-left: 0;
    }

    .app-sidenav-fixed {
        display: none;
    }
}

.app-sidenav-fixed .nav {
    align-items: stretch;
}

.app-sidenav-fixed .nav-link {
    color: rgba(14, 14, 50, 1);
    border-radius: .375rem;
    padding: .55rem .7rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, .045);
    border: 1px solid rgba(0, 0, 0, .12);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.app-sidenav-fixed .nav-link:hover {
    background: rgba(0, 0, 0, .085);
    border-color: rgba(0, 0, 0, .16);
}

.app-sidenav-fixed .nav .nav .nav-link {
    padding: .4rem .7rem;
    font-size: .95rem;
    opacity: .9;
}

.app-sidenav-fixed .nav-caret::before {
    content: "▸";
    display: inline-block;
    transition: transform .15s ease;
    color: rgba(14, 14, 50, .55);
    margin-left: auto;
}

.app-sidenav-fixed a[aria-expanded="true"] .nav-caret::before {
    transform: rotate(90deg);
}

.app-sidenav-fixed .nav-link.open-tree {
    background: var(--bg-blue);
    color: #fff;
    font-weight: 600;
    border-color: rgba(0, 0, 0, .18);
}

.app-sidenav-fixed .nav-link.open-tree:hover {
    background: rgb(9, 98, 156);
    color: #fff;
    border-color: rgba(0, 0, 0, .22);
}

.app-sidenav-fixed .nav-link.open-tree .nav-caret::before {
    color: rgba(255, 255, 255, .9);
}

.bg-blue {
    font-weight: 600;
    background: var(--bg-blue);
    color: white;
    border-color: rgba(0, 0, 0, .12);
}

.bg-blue:hover {
    background: rgb(9, 98, 156);
    color: white;
    border-color: rgba(0, 0, 0, .25);
}

.bg-blue.btn:first-child:active {
    background: rgb(9, 98, 156);
    color: white;
    border-color: rgba(0, 0, 0, .25);
}

.bg-darkblue {
    font-weight: 600;
    background: rgba(var(--rk-darkblue-rgb), 1);
    color: white;
    border-color: rgba(0, 0, 0, .12);
}

.bg-darkblue:hover {
    background: rgba(var(--rk-darkblue-rgb), .8);
    color: white;
    border-color: rgba(0, 0, 0, .25);
}


.hr-thick {
    border: none;
    height: 2px;
    opacity: 1;
}

.border-05 {
    --bs-border-opacity: .5;
    border-width: .5px !important;
    border-color: rgba(var(--bs-dark-rgb), var(--bs-border-opacity)) !important;
}

.app-sidenav-fixed .nav-link.bg-blue {
    background: var(--bg-light-blue);
    color: rgb(7, 63, 110);
    font-weight: 600;
    border-color: rgba(0, 0, 0, .12);
}

.app-sidenav-fixed .nav-link.bg-blue:hover {
    background: rgb(180, 212, 234);
    color: rgb(7, 63, 110);
    border-color: rgba(0, 0, 0, .25);
}

.clickable-row:hover {
    cursor: pointer;
}

input:required {
    border-color: var(--bg-blue);
    padding-right: 2.25rem !important;
    background-image: url("/images/asterisk-solid.svg");
    background-repeat: no-repeat;
    background-position: right calc(.28em + .09rem) center;
    background-size: calc(.5em + .28rem) calc(.5em + .28rem);
}

textarea:required {
    border-color: var(--bg-blue);
    padding-right: 2.25rem !important;
    background-image: url("/images/asterisk-solid.svg");
    background-repeat: no-repeat;
    background-position: right calc(.28em + .09rem) top .4em;
    background-size: calc(.5em + .28rem) calc(.5em + .28rem);
}

.choices__inner:has(> select:required) {
    border-color: var(--bg-blue);
    padding-right: 2.25rem !important;
    background-image: url("/images/asterisk-solid.svg");
    background-repeat: no-repeat;
    background-position: right calc(2em + .09rem) center;
    background-size: calc(.5em + .28rem) calc(.5em + .28rem);
}

.choices__list--multiple .choices__item {
    background-color: var(--bg-blue) !important;
    border: 1px solid var(--bg-blue) !important;
}


@media (min-width: 1200px) {

    .modal-dialog {
        max-width: 50vw !important;
    }

    .modal-lg {
        max-width: 80vw !important;
    }

    .modal-xl {
        max-width: 90vw !important;
    }

}

@media (min-width: 992px) {

    .modal-lg,
    .modal-xl {
        max-width: 800px;
    }
}


/** helper **/
.ms--2 {
    margin-left: -2em !important;
}



.shadow-rk-sm {
    box-shadow:
        0 2px 6px rgba(var(--rk-darkblue-rgb), .08),
        0 1px 2px rgba(var(--rk-blue-rgb), .10) !important;
}

.legend-box {
    border: 1px solid rgba(var(--rk-blue-rgb), .08);
}


.readonly-form {
    pointer-events: none;
    opacity: .8;
}


/* POOL CALCULATOR */
.pool-card {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 1rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, .04);
}

.pool-result-box {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .75rem;
    padding: 1rem;
}

.pool-result-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.pool-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
}

.pool-badge-ok {
    background: #dcfce7;
    color: #166534;
}

.pool-badge-warn {
    background: #fef9c3;
    color: #854d0e;
}

.pool-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.pool-help {
    color: #64748b;
    font-size: .875rem;
}

.pool-muted {
    color: #64748b;
}

.pool-scale-card {
    background: #f8fafc;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .75rem;
    padding: 1rem;
}

.pool-scale {
    position: relative;
    display: flex;
    height: 74px;
    overflow: visible;
    border-radius: .25rem;
}

.pool-scale-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem;
    text-align: center;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.25;
}

.pool-scale-low {
    background: #ef3340;
    color: #fff;
}

.pool-scale-mid {
    background: #eff727;
    color: #111827;
}

.pool-scale-good {
    background: #19945c;
    color: #fff;
}

.pool-scale-high {
    background: #337edb;
    color: #fff;
}

.pool-scale-marker {
    position: absolute;
    top: -8px;
    bottom: -8px;
    width: 4px;
    background: #111827;
    border-radius: 999px;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0,0,0,.45);
    z-index: 5;
}

.pool-scale-marker::after {
    content: attr(data-label);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .2rem .45rem;
    border-radius: .35rem;
    white-space: nowrap;
}

.pool-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: .4rem;
    color: #64748b;
    font-size: .8rem;
}