/* Global dark scrollbar for entire sspanel */
html.sspanel-page,
body.sspanel-page,
.sspanel-page,
.sspanel-page * {
    scrollbar-width: thin;
    scrollbar-color: #555 #2a2a2a;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.sspanel-page::-webkit-scrollbar,
.sspanel-page *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.sspanel-page::-webkit-scrollbar-track,
.sspanel-page *::-webkit-scrollbar-track {
    background: #2a2a2a;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.sspanel-page::-webkit-scrollbar-thumb,
.sspanel-page *::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.sspanel-page::-webkit-scrollbar-thumb:hover,
.sspanel-page *::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* amCharts scrollbar dark theme */
.sspanel-page .amcharts-scrollbar-background {
    fill: #222 !important;
}
.sspanel-page .amcharts-scrollbar-selection {
    fill: #444 !important;
}
.sspanel-page .amcharts-scrollbar-grip {
    fill: #555 !important;
}
.sspanel-page .amChartsScrollbar {
    background-color: #222 !important;
}
.sspanel-page .amChartsScrollbar .scroll-bg {
    fill: #222 !important;
    stroke: #333 !important;
}
.sspanel-page .amChartsScrollbar .scroll-bar {
    fill: #444 !important;
    stroke: #555 !important;
}
.sspanel-page .amChartsScrollbar .scroll-dragger {
    fill: #555 !important;
}
/* Target amCharts SVG scrollbar elements directly */
.sspanel-page #chartdiv .amcharts-graph-scrollbar-background {
    fill: #222 !important;
}
.sspanel-page #chartdiv .amcharts-graph-scrollbar-selected-background {
    fill: #333 !important;
}
.sspanel-page svg[class*="amcharts"] rect[fill="#DADADA"],
.sspanel-page svg rect[fill="#DADADA"] {
    fill: #333 !important;
}
.sspanel-page svg[class*="amcharts"] rect[fill="#D4D4D4"],
.sspanel-page svg rect[fill="#D4D4D4"] {
    fill: #444 !important;
}
.sspanel-page svg[class*="amcharts"] rect[fill="#E8E8E8"],
.sspanel-page svg rect[fill="#E8E8E8"],
.sspanel-page svg rect[fill="#ebebeb"],
.sspanel-page svg rect[fill="#EBEBEB"] {
    fill: #222 !important;
}

/* Bootstrap Select dropdown dark theme */
.sspanel-page .bootstrap-select .dropdown-menu {
    background-color: #2a2a2a !important;
    border: 1px solid #444 !important;
}
.sspanel-page .bootstrap-select .dropdown-menu li a {
    color: #ccc !important;
}
.sspanel-page .bootstrap-select .dropdown-menu li a:hover,
.sspanel-page .bootstrap-select .dropdown-menu li a:focus {
    background-color: #3a3a3a !important;
    color: #fff !important;
}
.sspanel-page .bootstrap-select .dropdown-menu li.selected a,
.sspanel-page .bootstrap-select .dropdown-menu li.active a,
.sspanel-page .bootstrap-select .dropdown-menu li.selected a:hover,
.sspanel-page .bootstrap-select .dropdown-menu li.active a:hover {
    background-color: #444 !important;
    color: #fff !important;
}
.sspanel-page .bootstrap-select .dropdown-menu .divider {
    background-color: #444 !important;
}

/* SSPanel form controls - normalize input sizes to match modal styling */
/* Inputs only - not selects */
.sspanel-page .panel input.form-control,
.sspanel-page .panel input.form-control.input-sm {
    height: 42px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
}

/* Selects - match input styling */
.sspanel-page .panel select.form-control,
.sspanel-page .panel select.form-control.input-sm {
    font-size: 14px !important;
    height: 42px !important;
    padding: 10px 12px !important;
    color: #fff !important;
    background-color: #333 !important;
    border-color: #444 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23888' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px !important;
}

/* Select focus state - golden border */
.sspanel-page .panel select.form-control:focus,
.sspanel-page .panel select.form-control.input-sm:focus {
    border-color: #d5a84a !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Reset option styling - use browser defaults for selection */
.sspanel-page .panel select.form-control option {
    background-color: #333;
    color: #fff;
}
.sspanel-page .panel select.form-control option:checked {
    background: linear-gradient(0deg, #4a90d9 0%, #4a90d9 100%);
    color: #fff;
}
.sspanel-page .panel select.form-control option[selected]:not(:checked) {
    background-color: #333;
    color: #fff;
}

/* Select2 dropdowns - match input height and font size */
.sspanel-page .panel .select2-container--default .select2-selection--single {
    height: 42px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    border-radius: 4px !important;
}

.sspanel-page .panel .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
    font-size: 14px !important;
    padding-left: 0 !important;
}

.sspanel-page .panel .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

.sspanel-page .select2-container--default .select2-results__option {
    font-size: 14px !important;
    padding: 10px 12px !important;
}

/* Select2 location dropdown with flags */
.sspanel-page .select2-results__option img.flag-icon,
.sspanel-page .select2-container--default .select2-selection--single .select2-selection__rendered img.flag-icon {
    margin-right: 8px;
    vertical-align: middle;
}

/* Dark scrollbar for select elements, textareas, and Select2 dropdowns */
.sspanel-page .panel select.form-control,
.sspanel-page .panel select.form-control[multiple],
.sspanel-page .panel select.form-control[size],
.sspanel-page select.form-control,
.sspanel-page select.form-control[multiple],
.sspanel-page select.form-control[size],
.sspanel-page textarea,
.sspanel-page textarea.form-control,
.sspanel-page .panel textarea,
.sspanel-page .panel textarea.form-control,
.sspanel-page pre,
.select2-dropdown,
.select2-results,
.select2-results__options {
    scrollbar-width: thin !important;
    scrollbar-color: #444 #222 !important;
}
.sspanel-page .panel select.form-control::-webkit-scrollbar,
.sspanel-page .panel select.form-control[multiple]::-webkit-scrollbar,
.sspanel-page .panel select.form-control[size]::-webkit-scrollbar,
.sspanel-page select.form-control::-webkit-scrollbar,
.sspanel-page select.form-control[multiple]::-webkit-scrollbar,
.sspanel-page select.form-control[size]::-webkit-scrollbar,
.sspanel-page textarea::-webkit-scrollbar,
.sspanel-page textarea.form-control::-webkit-scrollbar,
.sspanel-page .panel textarea::-webkit-scrollbar,
.sspanel-page .panel textarea.form-control::-webkit-scrollbar,
.sspanel-page pre::-webkit-scrollbar,
.select2-dropdown::-webkit-scrollbar,
.select2-results::-webkit-scrollbar,
.select2-results__options::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}
.sspanel-page .panel select.form-control::-webkit-scrollbar-track,
.sspanel-page .panel select.form-control[multiple]::-webkit-scrollbar-track,
.sspanel-page .panel select.form-control[size]::-webkit-scrollbar-track,
.sspanel-page select.form-control::-webkit-scrollbar-track,
.sspanel-page select.form-control[multiple]::-webkit-scrollbar-track,
.sspanel-page select.form-control[size]::-webkit-scrollbar-track,
.sspanel-page textarea::-webkit-scrollbar-track,
.sspanel-page textarea.form-control::-webkit-scrollbar-track,
.sspanel-page .panel textarea::-webkit-scrollbar-track,
.sspanel-page .panel textarea.form-control::-webkit-scrollbar-track,
.sspanel-page pre::-webkit-scrollbar-track,
.select2-dropdown::-webkit-scrollbar-track,
.select2-results::-webkit-scrollbar-track,
.select2-results__options::-webkit-scrollbar-track {
    background: #222 !important;
}
.sspanel-page .panel select.form-control::-webkit-scrollbar-thumb,
.sspanel-page .panel select.form-control[multiple]::-webkit-scrollbar-thumb,
.sspanel-page .panel select.form-control[size]::-webkit-scrollbar-thumb,
.sspanel-page select.form-control::-webkit-scrollbar-thumb,
.sspanel-page select.form-control[multiple]::-webkit-scrollbar-thumb,
.sspanel-page select.form-control[size]::-webkit-scrollbar-thumb,
.sspanel-page textarea::-webkit-scrollbar-thumb,
.sspanel-page textarea.form-control::-webkit-scrollbar-thumb,
.sspanel-page .panel textarea::-webkit-scrollbar-thumb,
.sspanel-page .panel textarea.form-control::-webkit-scrollbar-thumb,
.sspanel-page pre::-webkit-scrollbar-thumb,
.select2-dropdown::-webkit-scrollbar-thumb,
.select2-results::-webkit-scrollbar-thumb,
.select2-results__options::-webkit-scrollbar-thumb {
    background: #444 !important;
    border-radius: 3px !important;
}
.sspanel-page .panel select.form-control::-webkit-scrollbar-thumb:hover,
.sspanel-page .panel select.form-control[multiple]::-webkit-scrollbar-thumb:hover,
.sspanel-page .panel select.form-control[size]::-webkit-scrollbar-thumb:hover,
.sspanel-page select.form-control::-webkit-scrollbar-thumb:hover,
.sspanel-page select.form-control[multiple]::-webkit-scrollbar-thumb:hover,
.sspanel-page select.form-control[size]::-webkit-scrollbar-thumb:hover,
.sspanel-page textarea::-webkit-scrollbar-thumb:hover,
.sspanel-page textarea.form-control::-webkit-scrollbar-thumb:hover,
.sspanel-page .panel textarea::-webkit-scrollbar-thumb:hover,
.sspanel-page .panel textarea.form-control::-webkit-scrollbar-thumb:hover,
.sspanel-page pre::-webkit-scrollbar-thumb:hover,
.select2-dropdown::-webkit-scrollbar-thumb:hover,
.select2-results::-webkit-scrollbar-thumb:hover,
.select2-results__options::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

.sspanel-page .panel textarea.form-control {
    height: auto;
    min-height: 80px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
}

/* Control labels - slightly larger for readability */
.sspanel-page .panel .control-label {
    font-size: 13px;
}

/* Help text under inputs */
.sspanel-page .panel .help-block {
    font-size: 12px;
    margin-top: 5px;
}

/* SSPanel navbar styling - Option E: Bold Segments */
.sspanel-page .navbar-inverse {
    min-height: 40px;
    margin-bottom: 20px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #1a1a1a;
}

.sspanel-page .navbar-inverse .navbar-nav {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
}

/* Force no scrollbars anywhere in navbar */
.sspanel-page .navbar-inverse,
.sspanel-page .navbar-inverse *,
.sspanel-page .navbar-inverse .container-fluid,
.sspanel-page .navbar-inverse .navbar-collapse,
.sspanel-page .navbar-inverse .navbar-nav {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.sspanel-page .navbar-inverse::-webkit-scrollbar,
.sspanel-page .navbar-inverse *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Bootstrap override - navbar-collapse has overflow-y: auto by default */
.sspanel-page .navbar-inverse .navbar-collapse.collapse {
    overflow: visible !important;
}

/* Desktop: show navbar-collapse */
@media (min-width: 991px) {
    .sspanel-page .navbar-inverse .navbar-collapse {
        display: block !important;
        overflow: visible !important;
        max-height: none !important;
    }
}

.sspanel-page .navbar-inverse .navbar-nav > li {
    position: relative;
    border-right: 1px solid #333;
}

.sspanel-page .navbar-inverse .navbar-nav > li:last-child {
    border-right: none;
}

.sspanel-page .navbar-inverse .navbar-nav > li > a {
    position: relative;
    padding: 14px 12px;
    line-height: 20px;
    color: #999;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.15s ease;
    white-space: nowrap;
    border-top: 2px solid transparent;
}

.sspanel-page .navbar-inverse .navbar-nav > li > a .nav-icon {
    margin-right: 6px;
    font-size: 12px;
}

/* Ensure avatar thumbnails in SSPanel navbar are perfectly square on all sizes */
.sspanel-page .navbar-inverse .navbar-nav > li > a > img.avatarCirclefy,
.sspanel-page .navbar-inverse .dropdown-toggle img.avatarCirclefy {
    width: 20px;
    height: 20px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: top;
    border-radius: 4px;
}

/* Text visibility - always show full text in horizontal mode */
.sspanel-page .navbar-inverse .nav-short {
    display: inline;
}
.sspanel-page .navbar-inverse .nav-full {
    display: inline;
}

.sspanel-page .navbar-inverse .navbar-nav > li > a:hover,
.sspanel-page .navbar-inverse .navbar-nav > li > a:focus {
    color: #fff;
    background: #252525;
    border-top-color: #666;
}

.sspanel-page .navbar-inverse .navbar-nav > li.active > a,
.sspanel-page .navbar-inverse .navbar-nav > li.active > a:hover,
.sspanel-page .navbar-inverse .navbar-nav > li.active > a:focus {
    color: #fff;
    background: #252525;
    border-top-color: #EAA824;
}

/* Badge styling */
.sspanel-page .navbar-inverse .badge-nav {
    /* 11px floor: this was 9px, which is under the readable minimum */
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: middle;
}

.sspanel-page .navbar-inverse .badge-nav-info {
    background: #EAA824;
    color: #000;
}

.sspanel-page .navbar-inverse .badge-nav-danger {
    background: #e74c3c;
    color: #fff;
}

/* SSPanel dropdown menu styling */
.sspanel-page .navbar-inverse .dropdown-menu {
    padding: 5px 0;
    margin: 0;
    border-radius: 0;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-top: 2px solid #333;
}

.sspanel-page .navbar-inverse .dropdown-menu > li > a {
    padding: 10px 20px;
    color: #999;
    white-space: nowrap;
    font-size: 12px;
}

.sspanel-page .navbar-inverse .dropdown-menu > li > a:hover,
.sspanel-page .navbar-inverse .dropdown-menu > li > a:focus {
    background-color: #252525;
    color: #fff;
}

.sspanel-page .navbar-inverse .dropdown-menu > li.active > a,
.sspanel-page .navbar-inverse .dropdown-menu > li.active > a:hover,
.sspanel-page .navbar-inverse .dropdown-menu > li.active > a:focus {
    background-color: #4a4a4a;
    color: #fff;
}

.sspanel-page .navbar-inverse .dropdown-menu .divider {
    background-color: #333;
    margin: 5px 0;
}

/* Desktop: show dropdown on hover - only above mobile breakpoint */
@media (min-width: 991px) {
    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown:hover > .dropdown-menu {
        display: block;
    }
}

/* SSPanel mobile navbar - vertical menu when width constrained (matches main nav at 990px) */
@media (max-width: 990px) {
    .sspanel-page .navbar-inverse {
        position: relative;
        border-radius: 6px;
        /* Add slight horizontal padding so brand isn't flush left on mobile */
        padding-left: 10px;
        /* Reduce right padding so hamburger can sit closer to edge */
        padding-right: 5px;
        overflow: hidden !important;
    }

    .sspanel-page .navbar-inverse .container-fluid {
        overflow: hidden !important;
        position: relative;
    }

    /* Contain everything within the navbar - use clip-path for true containment */
    /* Only apply clip-path when navbar is truly collapsed (not expanded via toggle) */
    .sspanel-page .navbar-inverse.navbar-collapsed-state {
        clip-path: inset(0) !important;
        -webkit-clip-path: inset(0) !important;
    }

    /* Show avatars in navbar - override any conflicting rules */
    /* At 768-990px, Bootstrap shows navbar-collapse without .in class, so we must ensure avatars show */
    .sspanel-page .navbar-inverse .navbar-nav img,
    .sspanel-page .navbar-inverse .navbar-nav img.avatarCirclefy,
    .sspanel-page .navbar-inverse .navbar-collapse .navbar-nav img,
    .sspanel-page .navbar-inverse .navbar-collapse .navbar-nav img.avatarCirclefy,
    .sspanel-page .navbar-inverse .navbar-nav > li > a > img,
    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown > a > img {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Show navbar header with hamburger toggle */
    .sspanel-page .navbar-inverse .navbar-header {
        display: block !important;
        width: 100%;
        height: 44px;
        padding: 0 !important;
        position: relative;
        overflow: hidden;
    }

    .sspanel-page .navbar-inverse .navbar-header .navbar-brand,
    .sspanel-page .navbar-inverse .navbar-header .navbar-brand.visible-xs {
        display: block !important;
        float: none !important;
        position: absolute !important;
        /* Nudge brand right to create breathing room on mobile */
        left: 25px !important;
        top: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 13px;
        font-weight: 600;
        color: #999;
        line-height: 44px;
        height: 44px;
        text-align: left !important;
    }

    .sspanel-page .navbar-inverse .navbar-header .navbar-toggle,
    .sspanel-page .navbar-inverse .navbar-header .navbar-toggle.collapsed {
        display: block !important;
        float: none !important;
        position: absolute !important;
        /* Align hamburger nearest to the right edge on mobile */
        right: 4px !important;
        left: auto !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        margin-top: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        padding: 6px 10px;
        background: #252525;
        border: 1px solid #444;
        border-radius: 4px;
    }

    .sspanel-page .navbar-inverse .navbar-header .navbar-toggle .icon-bar {
        width: 18px;
        height: 2px;
        background-color: #999;
    }

    .sspanel-page .navbar-inverse .navbar-header .navbar-toggle:hover,
    .sspanel-page .navbar-inverse .navbar-header .navbar-toggle:focus {
        background: #333;
    }

    .sspanel-page .navbar-inverse .navbar-header .navbar-toggle:hover .icon-bar,
    .sspanel-page .navbar-inverse .navbar-header .navbar-toggle:focus .icon-bar {
        background-color: #fff;
    }

    /* Hide collapsed menu by default */
    .sspanel-page .navbar-inverse .navbar-collapse.collapse:not(.in) {
        display: none !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        border: none !important;
        clip: rect(0, 0, 0, 0) !important;
    }

    /* Show expanded menu */
    .sspanel-page .navbar-inverse .navbar-collapse.collapse.in,
    .sspanel-page .navbar-inverse .navbar-collapse.in {
        display: block !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        visibility: visible !important;
        opacity: 1 !important;
        clip: auto !important;
    }

    /* Show dropdown menu when parent has .open class */
    .sspanel-page .navbar-inverse .navbar-collapse.in .dropdown.open > .dropdown-menu {
        display: block !important;
    }

    .sspanel-page .navbar-inverse .navbar-collapse.collapse.in,
    .sspanel-page .navbar-inverse .navbar-collapse.in {
        display: block !important;
        height: auto !important;
        padding: 0 !important;
        overflow: visible !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* Show all content when menu is expanded */
    .sspanel-page .navbar-inverse .navbar-collapse.collapse.in *,
    .sspanel-page .navbar-inverse .navbar-collapse.in * {
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .sspanel-page .navbar-inverse .container-fluid {
        padding: 0 !important;
    }

    .sspanel-page .navbar-inverse .navbar-nav {
        flex-direction: column;
        margin: 0;
        display: block !important;
        width: 100%;
    }

    .sspanel-page .navbar-inverse .navbar-nav > li {
        border-right: none;
        border-bottom: 1px solid #252525;
        display: block;
        width: 100%;
    }

    .sspanel-page .navbar-inverse .navbar-nav > li:last-child {
        border-bottom: none;
    }

    .sspanel-page .navbar-inverse .navbar-nav > li > a {
        padding: 14px 20px;
        border-top: none;
        border-left: 3px solid transparent;
        display: block;
    }

    .sspanel-page .navbar-inverse .navbar-nav > li > a:hover,
    .sspanel-page .navbar-inverse .navbar-nav > li > a:focus {
        border-top: none;
        border-left-color: #666;
    }

    .sspanel-page .navbar-inverse .navbar-nav > li.active > a,
    .sspanel-page .navbar-inverse .navbar-nav > li.active > a:hover,
    .sspanel-page .navbar-inverse .navbar-nav > li.active > a:focus {
        border-top: none;
        border-left-color: #EAA824;
        background: #252525;
    }

    /* Hide dropdown menu by default in mobile */
    .sspanel-page .navbar-inverse .dropdown-menu {
        display: none !important;
        position: static !important;
        float: none;
        width: auto;
        border: none;
        border-top: none;
        background: #151515;
        box-shadow: none;
        padding-left: 20px;
        padding-top: 0;
        padding-bottom: 0;
        margin: 0;
        left: 0 !important;
    }

    .sspanel-page .navbar-inverse .dropdown-menu .divider {
        display: none;
    }

    .sspanel-page .navbar-inverse .dropdown-menu > li > a {
        padding: 8px 20px;
    }

    .sspanel-page .navbar-inverse .dropdown-menu > li:last-child > a {
        padding-bottom: 12px;
    }

    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown {
        margin-bottom: 0;
        padding-bottom: 0;
        display: block !important;
        visibility: visible !important;
        position: relative;
    }

    /* User account dropdown - first item in nav - MUST be visible */
    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown:first-child {
        display: block !important;
        visibility: visible !important;
        border-bottom: 1px solid #252525;
        min-height: 48px;
        opacity: 1 !important;
        overflow: visible !important;
        clip: auto !important;
        clip-path: none !important;
    }

    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown:first-child > a {
        display: flex !important;
        align-items: center !important;
        visibility: visible !important;
        padding: 14px 20px;
        color: #999 !important;
        opacity: 1 !important;
        overflow: visible !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        line-height: 20px !important;
    }

    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown:first-child > a > * {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Ensure username text is visible - fix for responsive range */
    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown:first-child > a .caret {
        display: inline-block !important;
        visibility: visible !important;
        margin-left: 5px !important;
        border-top-color: #999 !important;
    }

    /* Ensure caret/span elements in first dropdown are visible */
    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown:first-child > a span {
        display: inline-block !important;
        visibility: visible !important;
        color: #999 !important;
    }

    /* Keep avatar contained and SQUARE - mobile menu - FORCE 24x24 */
    .sspanel-page .navbar-inverse img.avatarCirclefy,
    .sspanel-page .navbar-inverse .navbar-nav img.avatarCirclefy,
    .sspanel-page .navbar-inverse .navbar-nav img,
    .sspanel-page .navbar-inverse .dropdown-toggle img,
    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown > a > img,
    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown:first-child > a > img {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
        aspect-ratio: 1 / 1 !important;
        display: inline-block !important;
        vertical-align: middle !important;
        position: static !important;
        float: none !important;
        object-fit: cover !important;
        object-position: top !important;
        border-radius: 4px !important;
        margin-right: 8px !important;
        margin-left: 0 !important;
    }

    /* Ensure dropdown opens properly in mobile */
    .sspanel-page .navbar-inverse .navbar-nav > li.dropdown.open > .dropdown-menu {
        display: block;
    }
}

/* Z-INDEX HIERARCHY (unified across site) - DO NOT CHANGE WITHOUT UNDERSTANDING FULL IMPACT
   Footer: 100
   Navbar dropdowns: 1050
   Modal backdrop: 2000
   Modal: 2001-2010

   NOTE: Do NOT set z-index on .navbar itself - it creates a stacking context
   that traps dropdown menus. Only the dropdown-menu needs z-index.
*/

/* Navbar dropdown menus must appear above all page content */
.sspanel-page .navbar .dropdown-menu,
.sspanel-page .navbar-inverse .dropdown-menu,
.sspanel-page .navbar-nav > li.dropdown.open > .dropdown-menu {
    z-index: 1050 !important;
}

/* Modals must be on top of everything */
.modal-backdrop {
    z-index: 2000 !important;
}

.modal {
    z-index: 2001 !important;
}

.modal-dialog {
    z-index: 2002 !important;
}

.modal-content {
    z-index: 2003 !important;
    pointer-events: auto !important;
}

#ticketPanel img { max-width: 100%; height: auto }
.avatarUpload {display: flex;flex-direction: row;justify-content: center;align-items: center;margin-bottom: 0px;}
.ticketHeaderFont {font-size: 12px !important;}
.ticketFooterFont {font-size: 12px !important;}
.avatarCirclefy {border-radius: 4px !important;}
.sspanel-page .navbar-inverse .navbar-nav > li > a > img.avatarCirclefy,
.sspanel-page .navbar .dropdown-toggle img.avatarCirclefy,
img.avatarCirclefy {
    border-radius: 4px !important;
}
.sspanel-page .navbar .dropdown-toggle img.avatarCirclefy {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    object-fit: cover;
    object-position: top;
}

/* News filter row vertical alignment */
.sspanel-page .news-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.sspanel-page .news-filter-row > [class*="col-"] {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.sspanel-page .news-filter {
    display: inline-flex;
    align-items: center;
}
.sspanel-page #newsSearch,
.sspanel-page #newsYear {
    height: 34px;
    width: 100%;
}

/* File Manager modal shell */
#dialogfilemanager .modal-dialog {
    width: min(96vw, 1280px) !important;
    max-width: 1280px;
    margin: 22px auto;
}
#dialogfilemanager .modal-content {
    overflow: hidden;
    background: #373737 !important;
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58);
}
#dialogfilemanager .modal-header {
    min-height: 56px;
    padding: 14px 18px;
    color: #fff;
    background: #252525 !important;
    border-bottom: 1px solid #333;
}
#dialogfilemanager .modal-header .modal-title {
    color: #fff;
    line-height: 24px;
    font-size: 16px;
    font-weight: 600;
}
#dialogfilemanager .modal-header .fa-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #fff;
    opacity: 0.82;
    border-radius: 6px;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}
#dialogfilemanager .modal-header .fa-close:hover,
#dialogfilemanager .modal-header .fa-close:focus {
    background: rgba(255,255,255,0.08);
    opacity: 1;
}
#dialogfilemanager .modal-body {
    padding: 0 !important;
    background: #343434 !important;
}
#dialogfilemanager iframe {
    display: block;
}

/* File Manager modal dark scrollbar - targets the Bootstrap modal wrapper */
#dialogfilemanager.modal,
#dialogfilemanager,
#dialogfilemanager .modal-dialog,
#dialogfilemanager .modal-content,
#dialogfilemanager .modal-body {
    scrollbar-width: thin !important;
    scrollbar-color: #444 #222 !important;
}
#dialogfilemanager.modal::-webkit-scrollbar,
#dialogfilemanager::-webkit-scrollbar,
#dialogfilemanager .modal-dialog::-webkit-scrollbar,
#dialogfilemanager .modal-content::-webkit-scrollbar,
#dialogfilemanager .modal-body::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}
#dialogfilemanager.modal::-webkit-scrollbar-track,
#dialogfilemanager::-webkit-scrollbar-track,
#dialogfilemanager .modal-dialog::-webkit-scrollbar-track,
#dialogfilemanager .modal-content::-webkit-scrollbar-track,
#dialogfilemanager .modal-body::-webkit-scrollbar-track {
    background: #222 !important;
}
#dialogfilemanager.modal::-webkit-scrollbar-thumb,
#dialogfilemanager::-webkit-scrollbar-thumb,
#dialogfilemanager .modal-dialog::-webkit-scrollbar-thumb,
#dialogfilemanager .modal-content::-webkit-scrollbar-thumb,
#dialogfilemanager .modal-body::-webkit-scrollbar-thumb {
    background: #444 !important;
    border-radius: 3px !important;
}
#dialogfilemanager.modal::-webkit-scrollbar-thumb:hover,
#dialogfilemanager::-webkit-scrollbar-thumb:hover,
#dialogfilemanager .modal-dialog::-webkit-scrollbar-thumb:hover,
#dialogfilemanager .modal-content::-webkit-scrollbar-thumb:hover,
#dialogfilemanager .modal-body::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

/* File Manager modal - responsive full width on mobile/tablet */
@media (max-width: 992px) {
    #dialogfilemanager .modal-dialog {
        width: 100% !important;
        margin: 0 !important;
        height: 100% !important;
        max-width: 100% !important;
    }
    #dialogfilemanager .modal-content {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        border-radius: 0 !important;
        border: none !important;
        background: #434343 !important;
    }
    #dialogfilemanager .modal-body {
        flex: 1 1 auto !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    #dialogfilemanager iframe {
        display: block !important;
        height: 100% !important;
    }
    #dialogfilemanager .modal-header {
        flex: 0 0 auto !important;
        padding: 10px 15px !important;
    }
}

/* RedactorX editor dark theme - matches form-control colors (#333 bg, #444 border, #fff text) */
.rx-editor,
.rx-container,
.rx-content,
.rx-frame,
.rx-editor-box,
.rx-body,
.rx-in,
.rx-wrapper,
.rx-main,
.rx-box,
.rx-editable,
.rx-element,
.rx-editor-wrapper,
.rx-editor-frame {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #444 !important;
}
/* Force editor area background */
.rx-editor .rx-frame,
.rx-editor .rx-content,
.rx-container .rx-content,
.rx-editor > div,
.rx-frame > div {
    background-color: #333 !important;
    color: #fff !important;
}
.rx-content[contenteditable="true"],
.rx-body[contenteditable="true"] {
    background-color: #333 !important;
    color: #fff !important;
    caret-color: #fff !important;
}
.rx-content p,
.rx-content div,
.rx-content span,
.rx-content b,
.rx-content i,
.rx-content u,
.rx-content strong,
.rx-content em,
.rx-content a,
.rx-content li,
.rx-content ul,
.rx-content ol,
.rx-content h1,
.rx-content h2,
.rx-content h3,
.rx-content h4,
.rx-content h5,
.rx-content h6,
.rx-content blockquote,
.rx-content pre,
.rx-content code,
.rx-body p,
.rx-body div,
.rx-body span,
.rx-body b,
.rx-body i,
.rx-body u,
.rx-body strong,
.rx-body em,
.rx-body a,
.rx-body li,
.rx-body *,
.rx-content *,
.rx-in * {
    color: #fff !important;
}
.rx-toolbar {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
}
.rx-toolbar .rx-button {
    color: #ccc !important;
}
.rx-toolbar .rx-button:hover {
    background-color: #444 !important;
}
/* Toolbar icons - make them visible on dark background */
.rx-toolbar .rx-button-icon,
.rx-toolbar .rx-button svg,
.rx-toolbar svg,
.rx-button-icon {
    opacity: 1 !important;
    fill: #ccc !important;
    color: #ccc !important;
}
/* Active/pressed button states */
.rx-toolbar .rx-button.active,
.rx-toolbar .rx-button.toggled,
.rx-toolbar .rx-button.rx-in-modal,
.rx-toolbar .rx-button:active,
.rx-toolbar .rx-button[aria-pressed="true"] {
    background-color: #444 !important;
    color: #fff !important;
}
.rx-toolbar .rx-button.active .rx-button-icon,
.rx-toolbar .rx-button.active svg,
.rx-toolbar .rx-button.toggled .rx-button-icon,
.rx-toolbar .rx-button.toggled svg {
    fill: #fff !important;
    color: #fff !important;
}
.rx-placeholder,
.rx-placeholder * {
    color: #888 !important;
    opacity: 1 !important;
}
.rx-placeholder:before,
.rx-editor [data-placeholder]:empty:before,
.rx-content[data-placeholder]:empty:before,
.rx-body[data-placeholder]:empty:before {
    color: #888 !important;
    opacity: 1 !important;
}
.rx-statusbar {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
    color: #888 !important;
}
/* RedactorX popups/dropdowns dark theme */
.rx-popup,
.rx-popup-body,
.rx-popup-items,
.rx-popup-item,
.rx-popup-header,
.rx-popup-footer,
.rx-dropdown,
.rx-dropdown-body,
.rx-dropdown-item,
.rx-panel,
.rx-panel-body,
.rx-context,
.rx-context-item,
.rx-tooltip,
.rx-control,
.rx-control-item {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #444 !important;
}
.rx-popup-item:hover,
.rx-dropdown-item:hover,
.rx-context-item:hover,
.rx-control-item:hover {
    background-color: #444 !important;
}
.rx-popup-item.active,
.rx-dropdown-item.active,
.rx-context-item.active {
    background-color: #444 !important;
    color: #fff !important;
}
.rx-popup-item-title,
.rx-popup-item-shortcut,
.rx-dropdown-item-title,
.rx-dropdown-item span,
.rx-dropdown-item,
.rx-popup-item span {
    color: #fff !important;
}
.rx-popup-header-item-link {
    color: #ccc !important;
}
.rx-popup-header-item-link:hover,
.rx-popup-header-item-link.active {
    color: #fff !important;
}
/* Dropdown/popup icons */
.rx-popup-item svg,
.rx-popup-item .rx-button-icon,
.rx-dropdown-item svg,
.rx-dropdown-item .rx-button-icon {
    fill: #ccc !important;
    color: #ccc !important;
}
/* Form elements in popups */
.rx-form-item,
.rx-form-input,
.rx-form-textarea,
.rx-form-select {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #444 !important;
}
.rx-form-label {
    color: #fff !important;
}
.rx-form-button {
    background-color: #444 !important;
    color: #fff !important;
    border-color: #555 !important;
}
.rx-form-button:hover {
    background-color: #555 !important;
}
/* Modal dialogs */
.rx-modal,
.rx-modal-body,
.rx-modal-header,
.rx-modal-footer {
    background-color: #333 !important;
    color: #fff !important;
}
/* Source code view */
.rx-source-container,
.rx-source {
    background-color: #333 !important;
    color: #fff !important;
}
/* Upload/dropzone dark theme */
.rx-form-upload-box {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
}
.rx-form-upload-box.rx-form-upload-hover {
    background-color: rgba(213, 168, 74, 0.1) !important;
    border-color: rgba(213, 168, 74, 0.5) !important;
}
.rx-form-upload-placeholder {
    color: #888 !important;
}
.rx-form-upload-placeholder svg {
    fill: #888 !important;
}
/* Popup header "Add Image" title dark theme */
.rx-popup-header {
    color: #fff !important;
}
.rx-popup-header-item {
    color: #fff !important;
}
.rx-popup-header-item-link {
    color: #aaa !important;
}
.rx-popup-header-item-link:hover {
    color: #fff !important;
}
.rx-popup-header-item-link.active {
    color: #fff !important;
}
.rx-popup-header-item:after {
    background-color: rgba(255, 255, 255, 0.2) !important;
}
/* "OR" text between URL input and upload box */
.rx-popup-image-section-or {
    color: #888 !important;
}
/* Shortcut popup dark theme */
.rx-popup-shortcut-title {
    color: #fff !important;
}
.rx-popup-shortcut-kbd {
    color: #888 !important;
}
.rx-popup-shortcut-kbd span {
    background-color: #444 !important;
    color: #ccc !important;
}
.rx-popup-shortcut-item {
    border-color: #444 !important;
}
/* Segment items dark theme */
.rx-form-segment-item {
    background-color: #333 !important;
    color: #ccc !important;
}
.rx-form-segment-item.active {
    background-color: #444 !important;
    color: #fff !important;
}
/* Staff reply panel - gold theme instead of blue */
.panel-primary {
    border-color: #d5a84a;
}
.panel-primary > .panel-heading {
    background-color: #d5a84a;
    border-color: #d5a84a;
    color: #000;
}
.panel-primary > .panel-heading a {
    color: #000;
}

.news-item.news-unread {
	-webkit-animation: newsHighlight 4s ease-out 1;
	animation: newsHighlight 4s ease-out 1;
	background-color: rgba(234, 168, 36, 0);
}@-webkit-keyframes newsHighlight {
	0% { background-color: rgba(234, 168, 36, 0.15); border-left: 3px solid #eaa824; }
	100% { background-color: rgba(234, 168, 36, 0); border-left-color: transparent; }
}
@keyframes newsHighlight {
	0% { background-color: rgba(234, 168, 36, 0.15); border-left: 3px solid #eaa824; }
	100% { background-color: rgba(234, 168, 36, 0); border-left-color: transparent; }
}

/* ------------ */
/* Global modal skin - one look for every panel modal, matching the Workshop Mods browser.
   !important is required to beat the legacy inline style="background-color: #434343"
   baked into thousands of modal headers/bodies across the game include files.
   ID-scoped skins with !important (Windrose dashboard, config-modal sidebar columns,
   File Manager shell) still out-rank these rules, which is intentional. */
.modal-content {
	background-color: #2a2a2a !important;
	border: 1px solid #333 !important;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.modal-header {
	background-color: #252525 !important;
	border-bottom: 1px solid #333 !important;
	padding: 15px 18px !important;
}
.modal-header .modal-title {
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 22px;
	margin: 0;
}
.modal-body {
	background-color: #2a2a2a !important;
}
.modal-footer {
	background-color: #252525 !important;
	border-top: 1px solid #333 !important;
	padding: 12px 18px !important;
}
/* Header icon buttons (scroll-to-top arrows) - match the close X.
   Hidden by default; only the Modify Server Config editors keep the arrow. */
.modal-header button.m-r {
	display: none;
	float: right;
	width: 30px;
	height: 30px;
	margin: -4px 2px 0 0;
	padding: 0;
	background: transparent;
	border: 0;
	color: #fff;
	opacity: 0.85;
	font-size: 16px !important;
	line-height: 30px;
	text-align: center;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}
.modal-header button.m-r:hover,
.modal-header button.m-r:focus {
	background: rgba(255,255,255,0.08);
	opacity: 1;
	outline: none;
}
/* Modify Server Config editors - the only modals that keep the scroll-to-top arrow */
#dialogtoolsettingstop,
#dialogtoolserversettingstop,
#assettocorsaconfigtop {
	display: block;
}
/* Standard close X - covers both the fa-close icon buttons and Bootstrap .close (&times;) buttons */
.modal-header .fa-close,
.modal-header .close {
	float: right;
	width: 30px;
	height: 30px;
	margin: -4px -6px 0 10px;
	padding: 0;
	background: transparent !important;
	border: 0;
	color: #fff !important;
	opacity: 0.85;
	font-size: 18px !important;
	line-height: 30px !important;
	text-align: center;
	text-shadow: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}
.modal-header .close {
	font-size: 24px !important;
	font-weight: 700;
}
.modal-header .fa-close:hover,
.modal-header .fa-close:focus,
.modal-header .close:hover,
.modal-header .close:focus {
	background: rgba(255,255,255,0.08) !important;
	opacity: 1;
	outline: none;
}

/* ------------ */
/* Alerts - approved 2026-07-08: translucent black body, severity accent stripe, FA icon on colored variants
   (alert-default keeps its gold stripe and no icon; body texture stays subtly visible per Ryan) */
.alert {
	background-color: rgba(0,0,0,0.30);
	border: 0;
	border-left: 3px solid rgb(219,155,21);
	color: #d2d2d2;
}
.alert strong, .alert h4 {
	color: #fff;
}
.alert .close {
	color: #fff;
	opacity: 0.5;
	text-shadow: none;
}
.alert.alert-default {
	background-color: rgba(0,0,0,0.30);
	border-left-color: rgb(219,155,21);
	color: #d2d2d2;
}
.alert.alert-success {
	background-color: rgba(0,0,0,0.30);
	border-left-color: #58b368;
	color: #d2d2d2;
}
.alert.alert-info {
	background-color: rgba(0,0,0,0.30);
	border-left-color: #4aa3df;
	color: #d2d2d2;
}
.alert.alert-warning {
	background-color: rgba(0,0,0,0.30);
	border-left-color: #eaa824;
	color: #d2d2d2;
}
.alert.alert-danger {
	background-color: rgba(0,0,0,0.30);
	border-left-color: #e05252;
	color: #d2d2d2;
}
.alert.alert-success::before, .alert.alert-info::before, .alert.alert-warning::before, .alert.alert-danger::before {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 17px;
	margin-right: 11px;
	vertical-align: -1px;
}
.alert.alert-success::before { content: "\f058"; color: #58b368; }
.alert.alert-info::before { content: "\f05a"; color: #4aa3df; }
.alert.alert-warning::before { content: "\f071"; color: #eaa824; }
.alert.alert-danger::before { content: "\f06a"; color: #e05252; }

/* Condensed notice boxes above a server card (Valheim help / 1.0 launch / affiliate,
   2026-09-08, Ryan: "i want our notification style. just more condensed", then "the get your
   link is way over to the right now, which looks stupid" and "the margin still looks like
   shit"). The same alert component - stripe, glyph, dark box, colors and its own left/right
   padding untouched - with an even 10px top/bottom, the content vertically centered, 6px between
   boxes, and the buttons at the 26px small size with body-size (13px) text sitting inline right
   after their sentence with the panel's usual 8px gap. A box that ships its own leading glyph
   shows that one instead of the injected ::before, at the injected glyph's size and color, so a
   translated segment keeps its token shape. Margins are !important because panel-v2 sets the
   alert gap at 14px with a heavier selector. */
.alert.ss-alert-condensed { padding-top: 10px !important; padding-bottom: 10px !important; margin-bottom: 6px !important; }
.alert.ss-alert-condensed.ss-alert-last { margin-bottom: 14px !important; }
/* the last notice before the server card keeps the page's 14px however the stack ends (2026-11-16: the Valheim
   affiliate box that carried ss-alert-last is gone, so a condensed box can now be the last one) */
.alert.ss-alert-condensed:not(:has(+ .alert)) { margin-bottom: 14px !important; }
.alert.ss-alert-condensed:has(> i.fa:first-child)::before { content: none; }
.alert.ss-alert-condensed > i.fa:first-child { font-size: 17px; margin-right: 11px; vertical-align: -1px; }
.alert.alert-warning.ss-alert-condensed > i.fa:first-child { color: #eaa824; }
.alert.alert-info.ss-alert-condensed > i.fa:first-child { color: #4aa3df; }
/* one flex row: glyph, sentence, then the button 8px after it; the button wraps under the text on phones */
.alert.ss-alert-row { display: flex; flex-wrap: wrap; align-items: center; row-gap: 6px; }
/* panel-v2 sizes .btn-success.btn-xs at 11.5px, below the 13px body size this box uses, so the
   size and padding are pinned here; 26px tall = the panel's small control height */
.alert.ss-alert-row .btn { flex: 0 0 auto; margin: 0 0 0 8px; height: 26px; min-height: 0; padding: 2px 10px !important; font-size: 13px !important; line-height: 20px; }
#ss-valheim-10 .ss-v10-text, #ss-valheim-one-update .ss-v10-text, #ss-restart-to-update .ss-v10-text { flex: 0 1 auto; min-width: 0; }
/* the Dragonwilds 1.0 box carries two-line sentences: the text fills the row beside the glyph
   instead of wrapping under it, and its button sits inline after the last line of text */
#ss-dragonwilds-10 .ss-v10-text { flex: 1 1 0; min-width: 0; }
/* the Restart to update notice (big games' Outdated Version, 2026-11-07) carries one-line and three-line words: the
   row never wraps on a computer, so long words stay beside the glyph and the button sits right after them */
#ss-restart-to-update { flex-wrap: nowrap; }
/* phones: the sentence is a bare text node (the translated segment keys on that shape) and as a
   flex item it drops under the glyph, so the row goes back to normal flow and the button sits
   under the text. !important: panel-v2's phone button rules outrank this selector; its 44px
   touch height is left alone; the classic panel gets 36px so the button is big enough to tap (2026-11-07) */
@media (max-width: 600px) {
	.alert.ss-alert-row { display: block; }
	.alert.ss-alert-row .btn { display: flex !important; width: max-content !important; margin: 6px 0 0 0 !important; align-items: center; height: auto; min-height: 36px; }
	#ss-valheim-10 .ss-v10-text, #ss-valheim-one-update .ss-v10-text, #ss-dragonwilds-10 .ss-v10-text, #ss-restart-to-update .ss-v10-text { display: inline; }
}

/* ============================================================
   KEYBOARD FOCUS RING — restores the indicator essentials.css kills globally.

   css/essentials.css:87 ships `textarea, input, button, *:focus { outline:none
   !important; }`. That is a BLANKET suppression: it removes the focus indicator
   from every link, button, tab, pill, checkbox and menu row in both panels, so a
   keyboard user has no way to tell where they are. essentials.css is minified
   vendor-shaped theme CSS and is not edited — this overrides it here instead.

   Scope: `body.sspanel-page`, which is the login page, the order flow, the
   pay-invoice pages, the customer panel and the Death Star — every template that
   loads this stylesheet. The PUBLIC marketing site is deliberately NOT covered:
   it never loads css/sspanel/*.css, so this file cannot reach it, and the public
   pages carry the carousel / revolution-slider / layerslider / magnific-popup
   stack whose focus behaviour would each need its own verification pass. The
   highest-traffic surface does not get an unverified global outline change as a
   side effect of a panel cleanup. Extending it there is a separate, scoped job.

   :focus-visible, not :focus — the ring appears for keyboard/tab navigation and
   never for a mouse click, so nothing about the panel's look changes for the
   mouse user. It is the same token the panel already uses on its custom
   checkboxes (panel-v2-core.css / deathstar-v2-core.css), promoted to the
   panel-wide default and raised to the full gold so it clears WCAG 2.4.11
   contrast (7.5:1 on the #212122 card) instead of the 40%-alpha wash.

   `outline-offset: 2px` puts the ring OUTSIDE the control, so it stays visible on
   a gold .btn-primary (the ring sits on the dark card behind it) and it never
   reads as a thickened border on an input.

   WHAT ALREADY FAKED ITS OWN FOCUS STATE (checked, left intact):
     - .form-control / .form-group input|textarea|select, layout-dark.css:441+
       and sspanel/style.css:135 — gold border-color on :focus, with the browser
       outline explicitly turned off. Those rules keep working untouched; the ring
       is additive and only on keyboard focus, so a keyboard user can now tell
       their focus apart from a mouse click's.
     - select2 (.select2-selection--single:focus / --focus / --open) — gold border
       at (0,3,0) with !important, which deliberately out-specifies this block.
       select2 keeps its own indicator; it is not overridden here.
   ============================================================ */
html body.sspanel-page *:focus-visible {
	outline: 2px solid var(--pv2-gold, #eaa824) !important;
	outline-offset: 2px !important;
	border-radius: inherit;
}

/* form controls and the panel's custom checkbox carry higher-specificity
   suppressions (layout-dark.css `.form-group input:focus`, and the v2 sheets'
   own checkbox :focus-visible token) — restate at a specificity that wins so
   there is ONE ring across the panel rather than three different treatments */
html body.sspanel-page .form-control:focus-visible,
html body.sspanel-page input:focus-visible,
html body.sspanel-page textarea:focus-visible,
html body.sspanel-page select:focus-visible,
html body.sspanel-page button:focus-visible,
html body.sspanel-page a:focus-visible,
html body.sspanel-page [tabindex]:not([tabindex="-1"]):focus-visible {
	outline: 2px solid var(--pv2-gold, #eaa824) !important;
	outline-offset: 2px !important;
}

/* a tabindex="-1" node is a PROGRAMMATIC focus target, never tab-reachable — a
   Bootstrap modal shell, a scroll anchor, a DataTables wrapper. Chrome's
   :focus-visible heuristic will still match it when the modal is opened from the
   keyboard, which would draw a ring around the whole dialog. Nothing is lost by
   excluding them: the user cannot Tab to them in the first place. */
html body.sspanel-page [tabindex="-1"]:focus-visible,
html body.sspanel-page .modal:focus-visible,
html body.sspanel-page .modal-dialog:focus-visible,
html body.sspanel-page .modal-content:focus-visible {
	outline: none !important;
}

/* the ring is painted OUTSIDE the border box, so an ancestor with overflow:hidden
   can clip it. The nav rail already forces overflow:visible on its descendants
   (sspanel/style.css "Force no scrollbars anywhere in navbar"); panel cards clip,
   so a focused control on a card edge gets the offset pulled in rather than
   half-drawn. */
html body.sspanel-page .panel-body > *:focus-visible,
html body.sspanel-page .modal-body > *:focus-visible {
	outline-offset: 1px !important;
}

/* ONE focus indicator on a text field, not two.
   The block above assumes :focus-visible never matches a mouse click. That holds
   for buttons and links, but NOT for text entry: the spec has keyboard-editable
   controls match :focus-visible whenever they are focused, mouse included. So on
   every click into a field the ring was painted 2px outside the gold border the
   field already draws for itself (layout-dark.css .form-control:focus /
   .form-group input:focus, sspanel/style.css:136 - all border-color #d5a84a with
   outline:none), and two gold lines separated by a gap read as one heavy double
   border. Worst on the site nav's game-server search, which is a full-width
   field, and on select2's dropdown search box.
   The border stays as the indicator - same gold token, already contrast-checked -
   and the ring is untouched for everything that does NOT style its own focus:
   buttons, links, custom checkboxes and radios, and tab stops. */
html body.sspanel-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):focus-visible,
html body.sspanel-page textarea:focus-visible,
html body.sspanel-page select:focus-visible,
html body.sspanel-page .form-control:focus-visible,
html body.sspanel-page .select2-search__field:focus-visible {
	outline: none !important;
}

/* ------------ */
/* Shared join / invite code block (sspanel/user/joincode.inc.php, .jcode-*)
   ONE shape for every game that surfaces a code the customer pastes to friends:
   Valheim (join code), Aloft (room code), Soulmask / Moria / Towers / Windrose
   (invite codes). A seventh game inherits it by calling ss_join_code_block()
   instead of hand-rolling a seventh variant.

   The pill is a BADGE. It carries the code and nothing else - the block Ryan
   rejected 2026-08-10 had a whole sentence wrapped inside a warning label, which
   renders as a fat orange lozenge. Explanations live in the info modal, caveats
   in .jcode-help. Empty states are two or three words.

   Colour, height and radius on the pill come from the surface: bootstrap
   .label-success/-warning/-danger on classic, the pv2 pill tokens under
   panel v2 (body.pnv2 .pv2-gsinfo .label wins on specificity). These rules only
   own the LAYOUT so both surfaces agree on shape. */
.jcode-row {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.jcode-row .jcode-pill {
	display: inline-flex;
	align-items: center;
	flex: 0 1 auto;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* the code itself is an id - mono, like every other id/ip in the panel. A long
   code ellipsises on one line; the full string stays in the label's tooltip and
   the copy chip still lifts all of it (same rule as the pv2 ip:port row). */
.jcode-row .jcode-code {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	font-family: Consolas, Monaco, "Courier New", monospace;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
}

/* copy chip - classic panel metrics. Under panel v2 the same button also carries
   .pv2-dcopy and inherits the ip:port chip's 26px box, colours and toast, so
   there is one copy affordance on the page rather than two that look alike. */
.jcode-copy {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 4px;
	color: #888;
	line-height: 1;
	cursor: pointer;
	transition: color .12s, background-color .12s, border-color .12s;
}

.jcode-copy:hover,
.jcode-copy:focus {
	color: #d5a84a;
	background: #2d2d2e;
	border-color: #3a3a3b;
}

.jcode-copy > i {
	font-size: 12px;
	line-height: 1;
}

/* the caveat line - quiet, never louder than the code above it */
.jcode-help {
	margin-top: 5px;
	font-size: 11px;
	line-height: 1.4;
	color: #999;
}

/* touch: the chip clears the 44px tap floor without growing the visible box */
@media (max-width: 767px) {
	.jcode-copy {
		position: relative;
	}
	.jcode-copy::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 44px;
		height: 44px;
		transform: translate(-50%, -50%);
	}
}

/* ------------ */
/* Shared file-upload control (sspanel/includes/fileupload.inc.php, .ssfile-*)
   ONE shape for every picker in the panel: Valheim's local save, Atlas's
   ServerGrid.json + map tiles, Arma 2 / Arma 3 mission + server PBO, Windrose's
   character repair, and the two staff mass-action param pickers. An eleventh
   inherits it by calling ss_file_upload() instead of hand-rolling one.

   Before this, every one of them was a bare <input type="file">, so the browser
   painted its own widget: 21px tall under panel v2 and 23px on classic, sitting in
   a 32px / 42px field row, in the UA's font instead of Open Sans, with no border,
   radius or hover. Ryan flagged it on the Valheim block 2026-08-11.

   Shape:  [ ⬆ Choose File ]  filename.zip

   The real <input> is visually hidden but still in the DOM and still focusable -
   every uploader reads $('#id')[0].files. The <label for> is the button, so the
   picker opens with no JS; JS only paints the filename.

   Height and font come from ONE token per surface (--ssfile-h / --ssfile-fs),
   re-declared rather than re-ruled: classic mirrors the 42px panel field, panel v2
   re-declares to --pv2-ctl-h in panel-v2-gameservers-info.css, and a coarse pointer
   lifts it to the 44px tap floor. Colours mirror .btn-default (transparent, 1px
   rgba(255,255,255,.5), hover #333) per the native-components rule - the classes are
   standalone on purpose, because toolsSection() hoists anything carrying .btn out of
   a details column and into the Tools card. */
.ssfile {
	/* classic panel field metrics (.sspanel-page .panel input.form-control = 42px/14px) */
	--ssfile-h: 42px;
	--ssfile-fs: 14px;
	--ssfile-radius: 4px;
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	max-width: 100%;
}

/* visually hidden, NOT display:none - it must stay focusable and in the a11y tree.
   The picker is opened by the <label for>, so this never needs to be clickable. */
.ssfile .ssfile-input {
	position: absolute;
	width: 1px;
	height: 1px;
	min-height: 0;
	padding: 0;
	margin: -1px;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	background: none;
	opacity: 0;
	pointer-events: none;
}

.ssfile .ssfile-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: var(--ssfile-h);
	padding: 0 14px;
	margin: 0;
	font-family: 'Open Sans', Arial, sans-serif;
	font-size: var(--ssfile-fs);
	font-weight: 400;
	line-height: 1;
	color: #fff;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: var(--ssfile-radius);
	cursor: pointer;
	white-space: nowrap;
	transition: background-color .12s, border-color .12s, color .12s;
	-webkit-user-select: none;
	user-select: none;
}

.ssfile .ssfile-btn > i {
	font-size: .92em;
	line-height: 1;
}

.ssfile .ssfile-btn:hover {
	background: #333;
	color: #fff;
	text-decoration: none;
}

/* keyboard focus lands on the hidden input - paint the ring on the button it drives,
   otherwise tabbing to the control shows nothing at all */
.ssfile .ssfile-input:focus-visible + .ssfile-btn {
	border-color: #d5a84a;
	background: #333;
	outline: 2px solid rgba(213, 168, 74, 0.55);
	outline-offset: 1px;
}

/* the filename readout - quiet, never louder than the button beside it, and it
   ellipsises on one line rather than blowing the row out (full name in the title) */
.ssfile .ssfile-name {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: 'Open Sans', Arial, sans-serif;
	font-size: 13px;
	line-height: 1.3;
	color: #999;
}

.ssfile.ssfile-has .ssfile-name {
	color: #d6d6d7;
}

.ssfile.ssfile-has .ssfile-btn {
	border-color: rgba(255, 255, 255, 0.28);
}

/* disabled - the input can be disabled by game logic; the button must follow */
.ssfile .ssfile-input:disabled + .ssfile-btn {
	opacity: .5;
	cursor: not-allowed;
	background: transparent;
}

/* WindrosePlus dashboard is its own themed surface - Cinzel, --wp-* tokens, and a
   10px root font size, so its rem values are deliberately small. The control takes
   THAT surface's paint rather than the panel's, mirroring the dashboard's own
   "Repair Character" button beside it (0.8rem Cinzel, uppercase, gold on --wp-bg
   with a gold border, ~35px tall). panel-v2-core.css excludes .ssfile-wp from the
   panel skin so those rules cannot out-specify this one. */
.ssfile-wp {
	--ssfile-h: 35px;
	--ssfile-fs: 0.8rem;
	--ssfile-radius: 4px;
}

.ssfile-wp .ssfile-btn {
	font-family: 'Cinzel', Georgia, serif;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp-gold, #c9a959);
	background: var(--wp-bg, #0c0c0e);
	border: 1px solid var(--wp-gold, #c9a959);
}

.ssfile-wp .ssfile-btn:hover {
	background: var(--wp-edge, #2a2317);
	color: var(--wp-gold, #c9a959);
}

.ssfile-wp .ssfile-input:focus-visible + .ssfile-btn {
	background: var(--wp-edge, #2a2317);
	outline: 2px solid var(--wp-gold, #c9a959);
	outline-offset: 1px;
}

/* the filename sits with the dashboard's own body copy, not the panel's */
.ssfile-wp .ssfile-name {
	font-family: 'Cinzel', Georgia, serif;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	color: var(--wp-text-muted, #8a8472);
}

.ssfile-wp.ssfile-has .ssfile-name {
	color: var(--wp-text-soft, #c4bda8);
}

/* touch: one token lift clears the 44px tap floor for the whole control */
@media (hover: none) and (pointer: coarse) {
	.ssfile {
		--ssfile-h: 44px;
	}
}

/* narrow columns: the button keeps its size and the filename takes the remainder,
   wrapping to its own line rather than pushing the row past the card edge */
@media (max-width: 480px) {
	.ssfile {
		flex-wrap: wrap;
		gap: 6px 10px;
	}
	.ssfile .ssfile-name {
		flex: 1 0 100%;
	}
}

/* Vertical alignment against the row's caption - the thing Ryan called out first.
   In a .form-horizontal row the caption is a separate column, and bootstrap gives
   .control-label a 7px padding-top sized for a 34px control. Against the 42px field
   the panel actually uses, the caption text lands ~6px above the control's text and
   the row reads crooked. Centring the caption in the row puts the caption, the
   button's label and the fa-info-circle beside it on ONE midline.

   Only rows that actually contain a picker are touched, and only from 768px up -
   below that .col-sm-* stacks, the caption sits on its own line, and a min-height
   would just add dead space. Browsers without :has() keep the old behaviour, which
   is no worse than before the control existed. */
@media (min-width: 768px) {
/* Captions that carry their own line break are left in normal flow. Arma 2 and
   Arma 3 put a "Download" link under the caption with a <br/>, and a <br/> is not a
   line break inside a flex container - it becomes a zero-width flex item and the
   link slides up beside the info icon. Those two-line captions already sat right
   against the control, so they keep bootstrap's flow and only the single-line
   captions (Valheim, Atlas, and every future game) get centred. */
	.sspanel-page .form-horizontal .form-group:has(.ssfile) > label.control-label:not(:has(br)) {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		min-height: var(--ssfile-h, 42px);
		padding-top: 0;
		padding-bottom: 0;
		margin-bottom: 0;
	}
	/* the caption column carries the same token the control uses, so the two can
	   never drift apart when a surface re-declares the control height */
	.sspanel-page .form-horizontal .form-group:has(.ssfile) {
		--ssfile-h: 42px;
	}
}

/* ------------ */
/* Half-width panel cards: put their field column on the SAME x as the full-width
   config card above them.

   Ryan, 2026-08-11, on the shipped upload control: "that choose file bounding box
   goes more left than the far left icons there going all the way up. It doesn't
   line up." Measuring the whole page showed the picker was NOT the outlier - every
   half-width card on a game-server page (Local Save Upload, Grid Customization,
   Customize Your Game Server, AND Restore a Backup, Modify FTP Password) puts its
   controls at cardLeft+270, while the full-width "Modify Game Server Settings" card
   puts its at cardLeft+284. So the picker already agreed with the select in the card
   directly below it, and nudging only the picker would have traded one misalignment
   for another.

   WHY the two families differ: the full-width card wraps its panel-body in the form
   and then splits with row/col-md-6, so its row gets one 15px gutter. A half-width
   card has the form INSIDE panel-body, so its row pays panel-body's 16px AND the
   form's 15px. The resulting row is a CONSTANT ~31px narrower, which through the
   41.667% col-sm-5 split lands the control ~13-15px left. Constant, not proportional
   - verified identical at 1440, 1200 and 1024.

   The fix moves the 5/7 boundary right by exactly that gap, so the caption keeps its
   15px gutter to the control (rather than padding the control column and doubling the
   gap) and nothing overflows: the row keeps its width, only the split moves. Value is
   measured per surface because classic and v2 use different panel/form padding.

   Scoped to the half-width-card signature - a col-md-6 holding a panel whose body
   DIRECTLY contains a horizontal form - so the full-width card, which nests the other
   way round, is never touched. */
@media (min-width: 768px) {
	[class*="col-md-6"] > .panel > .panel-body > form.form-horizontal .form-group {
		--ssfile-colshift: 15.41px;
	}
	[class*="col-md-6"] > .panel > .panel-body > form.form-horizontal .form-group > [class*="col-sm-5"] {
		width: calc(41.6666667% + var(--ssfile-colshift));
	}
	[class*="col-md-6"] > .panel > .panel-body > form.form-horizontal .form-group > [class*="col-sm-7"] {
		width: calc(58.3333333% - var(--ssfile-colshift));
	}
}

/* Keep native slot selectors readable when the browser uses a light system theme. */
body.sspanel-page #orderupgradeslots { color-scheme: dark; }
