/* Public Scorecard Stylesheet */

/* Only apply overflow hidden to scorecard dashboard pages */
html.scorecard-dashboard-page {
    height: 100%;
    overflow: hidden;
}

body.scorecard-dashboard-page {
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body.scorecard-dashboard-page > .scorecard-header {
    flex-shrink: 0;
}

body.scorecard-dashboard-page > .scorecard-dashboard-container {
    flex: 1;
    min-height: 0;
    height: auto;
}

html, body {
    background: linear-gradient(135deg, #4a148c 0%, #1a237e 50%, #0d47a1 100%);
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
}

/* Dashboard Layout */
.scorecard-dashboard-container {
    display: flex;
    width: 100%;
    height: calc(100vh - var(--header-height, 200px));
    min-height: 0;
    gap: 0;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

/* When body is flex container, let flex handle the height */
body.scorecard-dashboard-page .scorecard-dashboard-container {
    height: auto;
    flex: 1;
}

/* Fallback if CSS variables aren't set */
body.scorecard-dashboard-page:not(.scorecard-dashboard-loaded) .scorecard-dashboard-container {
    height: auto;
    flex: 1;
}

/* Calculate header height dynamically */
.scorecard-header {
    position: relative;
    flex-shrink: 0;
}

.scorecard-dashboard-container {
    --header-height: 0px;
}

/* Set header height after page load */
body.scorecard-dashboard-loaded .scorecard-dashboard-container {
    --header-height: calc(var(--header-logo-height, 0px) + var(--header-title-height, 0px));
}

.scorecard-dashboard-header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.scorecard-dashboard-sidebar {
    width: 400px;
    min-width: 60px;
    background-color: transparent;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.scorecard-dashboard-sidebar.collapsed {
    width: 60px;
}

.scorecard-sidebar-toggle {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 20;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
}

.scorecard-sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.scorecard-dashboard-sidebar.collapsed .scorecard-sidebar-toggle {
    left: 1rem;
}

.scorecard-dashboard-sidebar.collapsed .scorecard-sidebar-toggle #toggleIcon {
    transform: rotate(180deg);
}

.scorecard-dashboard-sidebar-content {
    flex: 1;
    padding: 1rem;
    padding-bottom: 3.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.scorecard-dashboard-sidebar.collapsed .scorecard-dashboard-sidebar-content {
    padding: 1rem 0.5rem;
    opacity: 0;
    pointer-events: none;
}

/* Custom Scrollbar Styles for Sidebar */
.scorecard-dashboard-sidebar-content::-webkit-scrollbar {
    width: 10px;
}

.scorecard-dashboard-sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.scorecard-dashboard-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scorecard-dashboard-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Firefox scrollbar for sidebar */
.scorecard-dashboard-sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

.scorecard-dashboard-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    display: block;
    position: relative;
}

.scorecard-dashboard-main-inner {
    padding: 1rem;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    min-height: 100%;
}

/* Custom Scrollbar Styles for Dashboard Main */
.scorecard-dashboard-main::-webkit-scrollbar {
    width: 12px;
}

.scorecard-dashboard-main::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.scorecard-dashboard-main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.scorecard-dashboard-main::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Firefox scrollbar for main content */
@supports (scrollbar-width: thin) {
    .scorecard-dashboard-main {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
    }
}

/* Responsive Dashboard */
@media (max-width: 992px) {
    .scorecard-dashboard-container {
        flex-direction: column;
    }
    
    .scorecard-dashboard-sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 50vh;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .scorecard-dashboard-sidebar.collapsed {
        width: 100%;
        max-height: 60px;
    }
    
    .scorecard-dashboard-sidebar.collapsed .scorecard-dashboard-sidebar-content {
        display: none;
    }
    
    .scorecard-dashboard-main {
        max-height: 50vh;
    }
    
    .scorecard-sidebar-toggle {
        top: 0.5rem;
        right: 0.5rem;
    }
}

body {
    background-color: transparent;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Ensure scrolling works on all pages except scorecard dashboard */
body:not(.scorecard-dashboard-page) {
    overflow-y: auto;
    min-height: 100vh;
}

/* Custom scrollbar for body */
body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Firefox scrollbar for body */
body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Container transparency */
.container {
    background-color: transparent;
    overflow-x: hidden;
}

/* Ensure containers allow scrolling */
.container-fluid {
    background-color: transparent;
    overflow-x: hidden;
}

/* Ensure all Bootstrap background utilities are overridden */
.bg-light,
.bg-primary,
.bg-success,
.bg-info,
.bg-warning,
.bg-danger,
.bg-secondary {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.bg-opacity-10 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-opacity-25 {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

.bg-opacity-50 {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

.bg-opacity-75 {
    background-color: rgba(255, 255, 255, 0.75) !important;
}

/* Header Styles */
.scorecard-header {
    margin-bottom: 0rem;
    position: relative;
}

/* Logo Section - Full Width Container */
.scorecard-header-logo-section {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.scorecard-header-logo-section .container {
    position: relative;
}

/* Title Section - Full Width Container */
.scorecard-header-title-section {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 0;
}

.scorecard-header-title-section .container {
    position: relative;
}

/* Logo Container Styles */
.scorecard-header-logo-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.scorecard-header-logo-left,
.scorecard-header-logo-right {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.scorecard-header-logo-left {
    margin-right: auto;
}

.scorecard-header-logo-right {
    margin-left: auto;
}

/* Header Content */
.scorecard-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.scorecard-header-title {
    flex: 1;
    min-width: 200px;
}

.scorecard-header-title h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.scorecard-header-title p {
    margin-bottom: 0;
    opacity: 0.9;
}

.scorecard-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Font Awesome Icons */
.fas, .far, .fal, .fab, .fa {
    color: white;
}

/* Card Styles */
.card {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.card-body {
    color: white;
    background-color: transparent !important;
}

.card-title,
.card-subtitle,
.card-text {
    color: white;
}

.judgement-card {
    margin-bottom: 0;
    background-color: transparent !important;
}

/* Accordion Styles */
.accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-color: rgba(255, 255, 255, 0.3);
    --bs-accordion-color: white;
    width: 100%;
}

.accordion-item {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 100%;
}

.accordion-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.accordion-button {
    background-color: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.accordion-button:not(.collapsed) {
    background-color: transparent;
    color: white;
}

.accordion-button::after {
    filter: brightness(0) invert(1);
}

.accordion-body {
    background-color: transparent;
    color: white;
    width: 100%;
    box-sizing: border-box;
}

.accordion-collapse {
    width: 100%;
    box-sizing: border-box;
}

#questionsAccordion .accordion-item {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

#questionsAccordion .accordion-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* Question Jump Dropdown */
.question-jump-dropdown {
    position: relative;
    width: 100%;
}

.question-jump-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
}

.question-jump-trigger:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.question-jump-trigger-text {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.question-jump-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background-color: rgba(74, 20, 140, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.375rem;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.question-jump-option {
    width: 100%;
    text-align: left;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    color: white;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: normal;
    word-wrap: break-word;
}

.question-jump-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.question-jump-option.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.question-jump-option-content {
    width: 100%;
}

.question-jump-option-content .fw-bold {
    font-size: 0.875rem;
}

/* Custom scrollbar for question jump panel */
.question-jump-panel::-webkit-scrollbar {
    width: 8px;
}

.question-jump-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.question-jump-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.question-jump-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Firefox scrollbar for question jump panel */
.question-jump-panel {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Score Badge */
.score-badge {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    color: white;
}

/* Text Colors - Override Bootstrap defaults */
.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.text-primary,
.text-success,
.text-info,
.text-warning,
.text-danger {
    color: white !important;
}

h1, h2, h3, h4, h5, h6,
p, span, div, li, td, th,
label, small, strong, em {
    color: white;
}

/* Buttons - Comprehensive Bootstrap Button Styles */
.btn {
    border-width: 1px;
    transition: all 0.2s ease;
}

.btn-light {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-light:hover,
.btn-light:focus {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.btn-primary {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
    color: white;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.45);
    color: white;
}

.btn-success {
    background-color: rgba(25, 135, 84, 0.6);
    border-color: rgba(25, 135, 84, 0.7);
    color: white;
}

.btn-success:hover,
.btn-success:focus {
    background-color: rgba(25, 135, 84, 0.7);
    border-color: rgba(25, 135, 84, 0.8);
    color: white;
}

.btn-danger {
    background-color: rgba(220, 53, 69, 0.6);
    border-color: rgba(220, 53, 69, 0.7);
    color: white;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: rgba(220, 53, 69, 0.7);
    border-color: rgba(220, 53, 69, 0.8);
    color: white;
}

.btn-warning {
    background-color: rgba(255, 193, 7, 0.6);
    border-color: rgba(255, 193, 7, 0.7);
    color: white;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: rgba(255, 193, 7, 0.7);
    border-color: rgba(255, 193, 7, 0.8);
    color: white;
}

.btn-info {
    background-color: rgba(13, 202, 240, 0.6);
    border-color: rgba(13, 202, 240, 0.7);
    color: white;
}

.btn-info:hover,
.btn-info:focus {
    background-color: rgba(13, 202, 240, 0.7);
    border-color: rgba(13, 202, 240, 0.8);
    color: white;
}

.btn-outline-primary {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
}

.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    background-color: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline-success {
    border-color: rgba(25, 135, 84, 0.6);
    color: white;
    background-color: transparent;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    background-color: rgba(25, 135, 84, 0.3);
    border-color: rgba(25, 135, 84, 0.7);
    color: white;
}

.btn-outline-danger {
    border-color: rgba(220, 53, 69, 0.6);
    color: white;
    background-color: transparent;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background-color: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.7);
    color: white;
}

.btn-outline-warning {
    border-color: rgba(255, 193, 7, 0.6);
    color: white;
    background-color: transparent;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
    background-color: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.7);
    color: white;
}

.btn-outline-info {
    border-color: rgba(13, 202, 240, 0.6);
    color: white;
    background-color: transparent;
}

.btn-outline-info:hover,
.btn-outline-info:focus {
    background-color: rgba(13, 202, 240, 0.3);
    border-color: rgba(13, 202, 240, 0.7);
    color: white;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    background-color: transparent;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
}

.btn-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.btn-link:hover,
.btn-link:focus {
    color: white;
    text-decoration: underline;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.125rem;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badges */
.badge {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.badge.bg-primary,
.badge.bg-success,
.badge.bg-info,
.badge.bg-warning,
.badge.bg-danger {
    background-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

.badge.bg-light {
    background-color: rgba(255, 255, 255, 0.4) !important;
    color: white !important;
}

.badge.bg-dark {
    background-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
}

/* Form Controls */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-select option {
    background-color: rgba(74, 20, 140, 0.95);
    color: white;
    padding: 0.5rem;
}

/* Submission select specific styling */
.scorecard-submission-select {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
}

.scorecard-submission-select:focus {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.form-label {
    color: white;
}

/* Dropdown */
.dropdown-menu {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.dropdown-item {
    color: white;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Alert */
.alert {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.alert-success,
.alert-info,
.alert-warning,
.alert-danger {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Borders */
.border-primary,
.border-success,
.border-info,
.border-warning,
.border-danger {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.border-start {
    border-left-color: rgba(255, 255, 255, 0.3) !important;
}

.rounded {
    background-color: transparent;
}

/* Specific element overrides */
.bg-light.rounded,
.p-3.bg-light {
    background-color: transparent !important;
    color: white;
}

/* Card header with bg classes */
.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-info,
.card-header.bg-warning {
    background-color: transparent !important;
    color: white !important;
}

/* Badge text colors */
.badge.text-dark {
    color: white !important;
}

/* Ensure all text in cards is white */
.card * {
    color: white;
}

.card strong,
.card em {
    color: white;
}

/* List Groups */
.list-group-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.list-group-item.active {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.list-group-item-action {
    color: white;
}

.list-group-item-action:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.list-group-item-action:focus {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Close Button */
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

/* Pagination */
.page-link {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.page-link:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.page-item.active .page-link {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.page-item.disabled .page-link {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

/* Breadcrumb */
.breadcrumb {
    background-color: rgba(255, 255, 255, 0.1);
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb-item a:hover {
    color: white;
}

.breadcrumb-item.active {
    color: white;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* Nav Tabs */
.nav-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.nav-tabs .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border-color: transparent;
}

.nav-tabs .nav-link:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-tabs .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.3) transparent;
}

/* Nav Pills */
.nav-pills .nav-link {
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-pills .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-pills .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.3);
}

/* Progress Bars */
.progress {
    background-color: rgba(255, 255, 255, 0.1);
}

.progress-bar {
    background-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.progress-bar.bg-primary {
    background-color: rgba(255, 255, 255, 0.4) !important;
}

.progress-bar.bg-success {
    background-color: rgba(25, 135, 84, 0.6) !important;
}

.progress-bar.bg-danger {
    background-color: rgba(220, 53, 69, 0.6) !important;
}

.progress-bar.bg-warning {
    background-color: rgba(255, 193, 7, 0.6) !important;
}

.progress-bar.bg-info {
    background-color: rgba(13, 202, 240, 0.6) !important;
}

/* Modal */
.modal-content {
    background-color: rgba(74, 20, 140, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.modal-footer {
    border-top-color: rgba(255, 255, 255, 0.3);
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Tooltip */
.tooltip-inner {
    background-color: rgba(74, 20, 140, 0.95);
    color: white;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: rgba(74, 20, 140, 0.95);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: rgba(74, 20, 140, 0.95);
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: rgba(74, 20, 140, 0.95);
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: rgba(74, 20, 140, 0.95);
}

/* Popover */
.popover {
    background-color: rgba(74, 20, 140, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.popover-header {
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.popover-body {
    color: white;
}

/* Ensure all links are visible */
a {
    color: rgba(255, 255, 255, 0.8);
}

a:hover {
    color: white;
}

a:focus {
    color: white;
    outline-color: rgba(255, 255, 255, 0.5);
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border {
    animation: spin 1s linear infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Offset for Anchor Links */
.accordion-item {
    scroll-margin-top: 20px;
}

/* Aggregated Summary Styles */
.scorecard-aggregated-summary {
    margin-bottom: 2rem;
}

.scorecard-aggregated-summary .table {
    margin-bottom: 0;
    color: white;
}

.scorecard-aggregated-summary .table th {
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.scorecard-aggregated-summary .table tbody tr {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.scorecard-aggregated-summary .table td {
    vertical-align: middle;
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    background-color: transparent;
}

.scorecard-aggregated-summary .table-primary {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

.scorecard-aggregated-summary .table-primary td {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

.scorecard-aggregated-summary .table-row-clickable {
    background-color: rgba(255, 255, 255, 0.1);
}

.scorecard-aggregated-summary .table-row-clickable:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    transition: background-color 0.2s ease;
}

.scorecard-aggregated-summary .table-row-clickable:hover td {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.scorecard-aggregated-summary .badge {
    font-size: 0.875rem;
    padding: 0.35em 0.65em;
}

.scorecard-aggregated-summary .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white;
}

.scorecard-aggregated-summary .table-hover tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* General Table Styles - Applied Throughout App */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: white;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background-color: transparent;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
}

.table tbody + tbody {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

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

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.1);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.table-hover tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.15);
}

.table-bordered {
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.table-borderless th,
.table-borderless td,
.table-borderless thead th,
.table-borderless tbody + tbody {
    border: 0;
}

.table-dark {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.table-dark th,
.table-dark td,
.table-dark thead th {
    border-color: rgba(255, 255, 255, 0.3);
}

.table-dark.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.table-dark.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.table-sm th,
.table-sm td {
    padding: 0.3rem;
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
    margin-bottom: 0;
}

/* Custom scrollbar for table-responsive */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Firefox scrollbar for table-responsive */
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Table variants */
.table-primary,
.table-primary > th,
.table-primary > td {
    background-color: rgba(255, 255, 255, 0.2);
}

.table-secondary,
.table-secondary > th,
.table-secondary > td {
    background-color: rgba(255, 255, 255, 0.15);
}

.table-success,
.table-success > th,
.table-success > td {
    background-color: rgba(25, 135, 84, 0.2);
}

.table-danger,
.table-danger > th,
.table-danger > td {
    background-color: rgba(220, 53, 69, 0.2);
}

.table-warning,
.table-warning > th,
.table-warning > td {
    background-color: rgba(255, 193, 7, 0.2);
}

.table-info,
.table-info > th,
.table-info > td {
    background-color: rgba(13, 202, 240, 0.2);
}

/* Ensure all table text is white */
.table th,
.table td,
.table thead th,
.table tbody td {
    color: white !important;
}

/* Table actions column */
.table .btn {
    margin: 0 0.25rem;
}

/* Custom Translate Select Styles */
.custom-translate-select {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    padding: 0.375rem 2.5rem 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    cursor: pointer;
}

.custom-translate-select:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.custom-translate-select:focus {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    outline: none !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

.custom-translate-select option {
    background-color: rgba(74, 20, 140, 0.95) !important;
    color: white !important;
    padding: 0.5rem !important;
}

/* RTL support for custom translate select */
body[dir="rtl"] .custom-translate-select,
body.rtl .custom-translate-select {
    padding: 0.375rem 0.75rem 0.375rem 2.5rem !important;
    text-align: right !important;
    direction: rtl !important;
}

/* Dyslexic Font Styles - Using system fonts with better spacing */
body.dyslexic-font {
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Verdana', sans-serif !important;
    letter-spacing: 0.05em;
    word-spacing: 0.1em;
    line-height: 1.6;
}

body.dyslexic-font * {
    font-family: inherit !important;
}

/* Preserve Font Awesome icons when dyslexic font is enabled */
body.dyslexic-font .fa,
body.dyslexic-font .fas,
body.dyslexic-font .far,
body.dyslexic-font .fab,
body.dyslexic-font .fal,
body.dyslexic-font .fad,
body.dyslexic-font .fak,
body.dyslexic-font [class^="fa-"],
body.dyslexic-font [class*=" fa-"],
body.dyslexic-font i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
}

/* Form Switch Styling for Dark Theme */
.form-check-input {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.form-check-input:checked {
    background-color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

.form-check-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.form-check-label {
    color: white;
    cursor: pointer;
}

/* Hide Google Translate UI elements (for hidden container) */
#hidden-translate-container {
    display: none !important;
}

.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-banner,
.skiptranslate {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
}

body {
    top: 0 !important;
    position: relative !important;
}

body.skiptranslate {
    top: 0 !important;
    position: relative !important;
}

.goog-te-footer {
    display: none !important;
}

/* RTL Support */
body.rtl,
body[dir="rtl"] {
    direction: rtl;
}

body.rtl .scorecard-dashboard-sidebar,
body[dir="rtl"] .scorecard-dashboard-sidebar {
    direction: rtl;
}

body.rtl .scorecard-dashboard-main,
body[dir="rtl"] .scorecard-dashboard-main {
    direction: rtl;
}

body.rtl .card,
body[dir="rtl"] .card {
    direction: rtl;
    text-align: right;
}

body.rtl .card-body,
body[dir="rtl"] .card-body {
    text-align: right;
}

body.rtl .form-select,
body[dir="rtl"] .form-select {
    direction: rtl;
    text-align: right;
}

body.rtl .scorecard-sidebar-toggle,
body[dir="rtl"] .scorecard-sidebar-toggle {
    left: auto;
    right: 1rem;
}

body.rtl .fa-chevron-left::before,
body[dir="rtl"] .fa-chevron-left::before {
    content: "\f054"; /* fa-chevron-right */
}

body.rtl .fa-chevron-right::before,
body[dir="rtl"] .fa-chevron-right::before {
    content: "\f053"; /* fa-chevron-left */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .scorecard-header-logo-section {
        padding: 1rem 0;
    }
    
    .scorecard-header-title-section {
        padding: 1.5rem 0;
    }
    
    .scorecard-header-logo-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .scorecard-header-logo-left,
    .scorecard-header-logo-right {
        max-width: 150px;
        margin: 0 auto;
    }
    
    .scorecard-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .scorecard-header-title {
        width: 100%;
    }
    
    .scorecard-header-actions {
        width: 100%;
        justify-content: center;
    }
    
    /* Aggregated Summary Responsive */
    .scorecard-aggregated-summary .table-responsive {
        font-size: 0.875rem;
    }
    
    .scorecard-aggregated-summary .table th,
    .scorecard-aggregated-summary .table td {
        padding: 0.5rem;
    }
    
    .scorecard-aggregated-summary .table th:nth-child(n+4),
    .scorecard-aggregated-summary .table td:nth-child(n+4) {
        display: none;
    }
    
    .scorecard-aggregated-summary .table th:nth-child(1)::after {
        content: " / LMS";
    }
    
    .scorecard-aggregated-summary .table th:nth-child(2) {
        display: none;
    }
    
    .scorecard-aggregated-summary .table td:nth-child(2) {
        display: none;
    }
}

