/* Add custom style here */
.wrapper,
.content-wrapper {
    height: auto !important;
    min-height: 100vh;
}

/* Dashboard Specific Layout Adjustments */
@media (min-width: 992px) {
    body.route-dashboard .content-wrapper {
        padding-top: 0 !important;
    }

    body.route-dashboard header.light-header {
        display: none !important;
    }
}


/* Custom Pill Badge */
.exam-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 24px;
    padding: 4px 3px;
    gap: 1px;
    border-radius: 4px;
    background-color: rgba(42, 139, 201, 0.15);
    color: #2a8bc9;
    font-size: 11px;
    font-weight: 500;
}

.qb-badge-ai {
    background-color: #2a8bc9;
    color: #fff;
    font-size: 8px;
    padding: 0px 3px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 8px;
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
}


.red-header {
    background-color: #ee4233;
    border-radius: 20px;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.red-header h1 {
    color: white;
    margin-bottom: 0;
    font-size: 24px;
    font-weight: 700;
}

.red-header .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.red-header .breadcrumb-item,
.red-header .breadcrumb-item a {
    color: white;
}

.red-header .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
    content: ">";
}

.vertical-separator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.subheader-section {
    margin-bottom: 20px;
}

.subheader-section h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
}

.subheader-section p {
    color: #78829d;
    font-size: 14px;
    margin-bottom: 0;
}

.search-action-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.custom-search-input {
    min-width: 254px;
    width: auto;
    height: 34px;
    padding: 0px 12px;
    gap: 6px;
    border-radius: 8px;
    border: 1px solid #dcddde;
    background-color: white;
    display: flex;
    align-items: center;
}

@media (max-width: 767.98px) {
    .custom-search-input {
        width: 100% !important;
        height: 34px !important;
        border-radius: 6px !important;
        padding: 10px 12px !important;
        gap: 6px !important;
    }
}

.custom-search-input input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    height: 100%;
    font-size: 13px;
    line-height: 1;
    padding: 0;
}

.custom-search-input .search-icon {
    width: 14px;
    opacity: 0.5;
}

.search-action-bar .form-select {
    width: 180px;
    height: 34px;
    font-size: 13px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-radius: 8px;
    border: 1px solid #dcddde;
    color: #78829d;
}

.btn-export,
.btn-add-center {
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    padding: 0 16px;
}

.btn-export {
    border-color: #22b058;
    color: #22b058;
    background: white;
}

.btn-export:hover {
    background: #e1fce9;
    color: #22b058;
}

.btn-add-center {
    background-color: #22b058;
    color: white;
    border: none;
}

.btn-add-center:hover {
    background-color: #1a8a44;
    color: white;
}

.main-data-card {
    max-width: 1173px;
    width: 100%;
    background-color: rgba(223, 225, 225, 0.15);
    /* #DFE1E126 approx 16% */
    border: 1px solid #dcddde;
    border-radius: 16px;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    margin: 0 auto 40px;
    overflow: visible;
}

.main-data-card .search-action-bar,
.main-data-card .custom-pagination,
.module-card .custom-pagination,
.main-data-card .mobile-action-btns {
    padding-left: 20px;
    padding-right: 20px;
}

.main-data-card .search-action-bar {
    margin-bottom: 16px;
}

.main-data-card .custom-table-container {
    padding-left: 0;
    padding-right: 0;
}

.custom-table-container {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.custom-table {
    width: 100%;
}

.custom-table thead {
    background-color: #2a8bc9;
}

.custom-table thead th {
    background-color: #2a8bc9;
    color: white;
    font-weight: 500;
    vertical-align: middle;
    padding: 0 14px;
    height: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    white-space: nowrap;
    /* Ensure icon stays on same row */
}

.custom-table thead th:last-child {
    border-right: none;
}

.custom-table thead th img {
    width: 10px;
    height: 10px;
    display: inline-block;
    vertical-align: middle;
}

.custom-table tbody tr {
    background-color: white;
    transition: background-color 0.2s ease;
}

.custom-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
    /* Softer tinted blue for premium look */
}

/* For tables with mobile-detail-row pairs, we need to adjust nth-child to skip hidden rows on desktop */
@media (min-width: 768px) {
    .custom-table tbody tr:nth-child(4n + 3) {
        background-color: #f8fafc;
    }

    /* If the table has mobile details, the even rows (2, 4...) are hidden Detail rows, so we reset them */
    .custom-table tbody tr.mobile-detail-row {
        background-color: transparent !important;
    }
}

.custom-table tbody tr:hover {
    background-color: #f1f5f9 !important;
    /* Subtle highlight on hover */
}

/* Mobile view: override alternating row bg to white */
@media (max-width: 767.98px) {
    .custom-table tbody tr:nth-child(even) {
        background-color: #ffffff;
    }

    .custom-table tbody tr:hover {
        background-color: #ffffff !important;
        /* Disable hover highlight on mobile */
    }
}

.custom-table tbody td {
    vertical-align: middle;
    padding: 7px;
    border-bottom: 1px solid #dcddde;
    /* Match card border color for consistency */
    border-right: 1px solid #dcddde;
}

.table-padding-sidebar td,
.table-padding-sidebar th {
    padding: 10px 12px;
}

.custom-table tbody td:last-child {
    border-right: none;
}

.table-padding-sidebar td .name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.font-weight-medium {
    font-weight: 500;
}

.text-link-blue {
    color: #2a8bc9 !important;
}

.center-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f9f9f9;
    padding: 5px;
    border: 1px solid #eeeeee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.center-info {
    display: flex;
    align-items: center;
}

.center-text .name {
    display: block;
    color: #313336;
}

.center-text .code {
    font-size: 12px;
    color: #78829d;
}

.exam-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 24px;
    padding: 4px 3px;
    gap: 1px;
    border-radius: 4px;
    background-color: rgba(42, 139, 201, 0.15);
    /* #2A8BC926 approx 15% */
    color: #2a8bc9;
    font-size: 11px;
    font-weight: 500;
}

.action-btns {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ebf5fb;
    color: #2a8bc9;
    transition: all 0.2s;
    text-decoration: none;
    padding: 0;
}

.action-btn img {
    width: 16px;
}

.action-btn img[src*="Union.svg"] {
    height: 11px;
    width: auto;
}

.action-btn:hover {
    background-color: #2a8bc9;
}

.action-btn:hover img {
    filter: brightness(0) invert(1);
}

/* Subheader Action Bar for Mobile */
@media (max-width: 767.98px) {
    .subheader-mobile-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 10px;
        width: 100%;
    }
}

/* Auth Pages Background Fix */
@media (max-width: 767.98px) {

    .content-area-block.h-100,
    .content-area-block .container.h-100,
    .content-area-block .h-100 {
        height: auto !important;
        min-height: 400px;
    }

    .wrapper.d-flex.flex-column {
        height: auto !important;
        min-height: 100vh;
    }

    /* Reduce background image height on mobile to ensure visibility */
    .mt-auto div[style*="background-image"] {
        height: 120px !important;
        background-size: auto 100% !important;
        background-position: bottom center !important;
    }
}

/* Auth Pages Background desktop refinement */
.mt-auto div[style*="background-image"] {
    background-size: auto 100%;
    background-position: bottom center;
    background-repeat: repeat-x;
}

/* High-fidelity Action Icon Styles */
.btn-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2a8bc91a;
    /* Light blue circular background */
    border-radius: 8px;
    /* Changed from 50% to 8px */
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    padding: 10px;
    /* Specific padding as requested */
}

.btn-icon:hover {
    background-color: #2a8bc9;
}

.btn-icon:hover img {
    filter: brightness(0) invert(1);
}

.btn-icon img[src*="Union.svg"] {
    height: 14px;
    width: auto;
}

/* Standardized Module Card */
.module-card {
    background: #ffffff !important;
    border: 1px solid #dcddde;
    border-radius: 12px;
    overflow: visible;
    /* Changed from hidden to allow dropdowns */
    margin-bottom: 24px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.02);
}

.card-gray-header {
    background-color: #f9fafb;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.custom-pagination {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 14px;
    letter-spacing: -0.01em;
    color: #78829d;
    min-height: 58px;
    height: auto;
    overflow: visible;
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
    background-color: #fff;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.show-per-page,
.pagination-area {
    min-height: 26px;
    height: auto;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.show-per-page {
    gap: 8px;
}

.pagination-area {
    gap: 16px;
}

.pagination-controls .page-link {
    border: none;
    color: #78829d;
    margin: 0 4px;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 13px;
    background: transparent;
}

.pagination-controls .page-item.active .page-link {
    background-color: #2a8bc9;
    color: white;
}

.pagination-controls .page-item img {
    width: 16px;
}

/* Ensure single-line pagination on all devices */
.custom-pagination {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #ffffff;
    gap: 15px;
}

/* dataTables styles for custom-pagination context (Location / Course pages) */
.custom-pagination .dataTables_length label {
    font-size: 13px;
    color: #78829d;
    font-weight: 500;
    display: flex;
    align-items: center;
    margin: 0;
    white-space: nowrap;
}

.custom-pagination .dataTables_length select {
    background-color: #fafafa;
    color: #393b40;
    border: 1px solid #dcddde;
    font-size: 12px;
    padding: 6px 20px 6px 12px !important;
    margin: 0 4px;
    box-shadow: none;
    border-radius: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23393b40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.custom-pagination .table-footer-paginate {
    display: flex;
    align-items: center;
    gap: 0;
}

.custom-pagination .table-footer-paginate .dataTables_info {
    font-size: 13px;
    color: #8e9198;
    white-space: nowrap;
    margin-right: 0;
}

.custom-pagination .table-footer-paginate .dataTables_paginate {
    font-size: 14px;
    color: #4b5675;
    display: flex;
    margin-left: 12px;
}

.custom-pagination .table-footer-paginate .dataTables_paginate span {
    display: flex;
}

.custom-pagination .table-footer-paginate .paginate_button {
    background-color: #fff;
    border-radius: 6px;
    line-height: 30px;
    display: inline-block;
    width: 20px;
    height: 30px;
    text-align: center;
    cursor: pointer;
    color: #4b5675;
    font-size: 14px;
    text-decoration: none;
}

.custom-pagination .table-footer-paginate .paginate_button.next,
.custom-pagination .table-footer-paginate .paginate_button.previous {
    background-image: url(../img/paginate-arrow.svg);
    background-position: center;
    background-repeat: no-repeat;
    font-size: 0;
    opacity: 0.3;
}

.custom-pagination .table-footer-paginate .paginate_button.next:hover,
.custom-pagination .table-footer-paginate .paginate_button.previous:hover {
    opacity: 1;
    background-color: #fff;
}

.custom-pagination .table-footer-paginate .paginate_button:hover {
    background-color: #f1f1f4;
    font-weight: 500;
}

.custom-pagination .table-footer-paginate .paginate_button.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.custom-pagination .table-footer-paginate .paginate_button.previous {
    transform: rotate(180deg);
}

.custom-pagination .table-footer-paginate .paginate_button.current {
    background-color: #2a8bc9 !important;
    color: #fff;
    font-weight: 500;
}

@media (max-width: 767.98px) {
    .custom-pagination {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        background: #fff;
        padding: 12px 15px !important;
        gap: 10px !important;
        height: auto !important;
    }

    .custom-pagination .dataTables_length,
    .custom-pagination .show-per-page {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        width: auto !important;
        gap: 8px !important;
    }

    .custom-pagination .dataTables_length label {
        white-space: nowrap !important;
        display: flex !important;
        align-items: center !important;
        font-size: 13px !important;
        margin: 0 !important;
        color: #78829d !important;
    }

    .custom-pagination .dataTables_length select,
    .custom-pagination .show-per-page .form-select {
        width: auto !important;
        height: 32px !important;
        font-size: 13px !important;
        margin: 0 5px !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23393b40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
        background-repeat: no-repeat !important;
        background-position: right 8px center !important;
        background-size: 12px !important;
    }

    .custom-pagination .table-footer-paginate,
    .custom-pagination .pagination-area {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 6px !important;
        width: auto !important;
        margin-top: 0 !important;
    }

    .custom-pagination .dataTables_paginate,
    .custom-pagination .pagination-controls {
        margin-left: 0 !important;
        display: flex !important;
    }

    .dataTables_info,
    .pagination-area .text-muted {
        font-size: 12px !important;
        text-align: left !important;
        color: #8e9198 !important;
    }
}

.custom-pagination::-webkit-scrollbar {
    display: none;
}

/* Dashboard Mobile Layout Refinements */
@media (max-width: 991.98px) {
    .student-added-wrapper {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .chart-controls-abs {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        justify-content: center !important;
        width: 100%;
    }

    .chart-controls-abs button {
        width: 30% !important;
        /* Proportional width in mobile */
        min-width: 80px;
        height: 36px !important;
    }
}

@media (min-width: 992px) {
    .student-added-wrapper {
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        border: 1px solid #e2e8f0;
    }

    /* Remove inner box styling on desktop to prevent box-in-box */
    .student-added-wrapper .dash-card {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 5px !important;
    }
}

/* Mobile responsive styles */
@media (max-width: 767.98px) {
    .red-header {
        border-radius: 8px;
        padding: 8px 16px;
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        margin-left: 0;
        margin-right: 0;
    }

    .content.container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-bottom: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .main-data-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
        border-radius: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .search-action-bar {
        padding-left: 10px !important;
        padding-right: 10px !important;
        gap: 10px !important;
    }

    .red-header .vertical-separator {
        display: none;
    }

    .red-header h1 {
        font-size: 20px;
        line-height: normal;
    }

    .custom-table-container {
        overflow: visible !important;
        width: 100% !important;
    }

    #valuationList .custom-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .custom-pagination {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-top: 10px !important;
        font-size: 11px;
        flex-wrap: nowrap;
        overflow: visible !important;
    }

    .custom-search-input {
        min-width: 100% !important;
        width: 100% !important;
    }

    .subheader-section {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-bottom: 15px !important;
    }

    .show-per-page {
        gap: 6px;
    }

    .pagination-area {
        gap: 8px;
    }

    .pagination-controls .page-link {
        width: 22px;
        height: 22px;
        margin: 0 1px;
        font-size: 11px;
    }

    .pagination-controls .page-item img {
        width: 12px;
    }

    /* Fix: Remove display:none from container to restore pagination bar */
    .custom-pagination {
        display: flex !important;
    }

    .search-action-bar {
        justify-content: space-between;
        flex-wrap: wrap !important;
    }

    .search-action-bar .custom-search-input {
        width: 100% !important;
    }

    .search-action-bar .form-select {
        width: calc(50% - 5px) !important;
        flex: 1 1 calc(50% - 5px);
    }

    /* Target ONLY the pseudo-elements and expand-btns to hide the unwanted icon */
    .custom-pagination::after,
    .custom-pagination::before,
    .custom-pagination *::after,
    .custom-pagination *::before,
    .pagination-area::after,
    .pagination-area::before,
    .expand-btn,
    .expand-header,
    [class*="expand"]::after,
    [class*="expand"]::before {
        display: none !important;
        background-image: none !important;
        content: none !important;
    }

    /* Remove background and resize icons for mobile detail action buttons */
    .mobile-detail-content .action-btn {
        background: transparent !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
    }

    .mobile-detail-content .action-btn img {
        width: 18px !important;
        height: 18px !important;
    }

    /* Mobile table layout (style.css no longer interferes since .table class removed) */
    .custom-table {
        display: table !important;
        /* table-layout: fixed !important; */
        width: 100% !important;
    }

    .custom-table thead {
        display: table-header-group !important;
    }

    .custom-table thead tr {
        display: table-row !important;
        width: 100% !important;
    }

    .custom-table tbody {
        display: table-row-group !important;
    }

    .custom-table tbody tr {
        display: table-row !important;
        padding: 0 !important;
    }

    /* Col 1 (#): fixed 42px with right separator */
    .custom-table th:first-child,
    .custom-table td:first-child {
        display: table-cell !important;
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        text-align: center !important;
        vertical-align: middle !important;
        padding: 10px 2px !important;
        white-space: nowrap !important;
        border-bottom: 1px solid #dcddde !important;
        border-right: 1px solid rgba(255, 255, 255, 0.25) !important;
        /* separator in header */
    }

    /* Separator for data rows uses subtle gray */
    .custom-table td:first-child {
        border-right: 1px solid #dcddde !important;
    }

    /* Col 2 (Center Name): takes all remaining space */
    .custom-table th:nth-child(2) {
        display: table-cell !important;
        width: auto !important;
        vertical-align: middle !important;
        padding: 10px 10px 10px 8px !important;
        border-bottom: 1px solid #dcddde !important;
        border-right: none !important;
        white-space: nowrap !important;
    }

    .custom-table td:nth-child(2) {
        display: table-cell !important;
        width: auto !important;
        padding: 0 !important;
        /* Remove td padding to allow full-height separator */
        border-bottom: 1px solid #dcddde !important;
        vertical-align: middle !important;
    }

    .custom-table td:nth-child(2)>div {
        height: 100%;
        display: flex;
        align-items: stretch;
        /* Allow children to fill height */
    }

    .custom-table td:nth-child(2) .center-info {
        padding: 10px 10px 10px 12px;
        flex-grow: 1;
        display: flex;
        align-items: center;
    }

    /* Hide all other columns (3+) on mobile */
    .custom-table th:nth-child(n + 3),
    .custom-table td:nth-child(n + 3) {
        display: none !important;
    }

    /* Hide Code: 1001 text on mobile */
    .custom-table .code {
        display: none !important;
    }

    /* Center name text truncation */
    .custom-table .center-text {
        min-width: 0;
        overflow: hidden;
    }

    .custom-table .center-text .name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        max-width: 170px;
    }

    /* Red Plus Icon Separator on Mobile - Full Height ('Full Touched') */
    .btn-plus-mobile {
        position: relative;
        padding: 0 12px !important;
        margin-left: 0;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-left: 1px solid #dcddde !important;
        /* Full height border */
        height: auto;
        min-height: 44px;
        /* Ensure a decent touch target and height */
    }

    .btn-plus-mobile::before {
        display: none !important;
        /* Remove the old partial-height separator */
    }

    .custom-table.exam-id-mobile-only td:first-child,
    .custom-table.exam-id-mobile-only th:first-child {
        width: 100% !important;
        max-width: none !important;
        padding-left: 15px !important;
        border-right: none !important;
        text-align: left !important;
    }

    .custom-table.exam-id-mobile-only td:nth-child(2),
    .custom-table.exam-id-mobile-only th:nth-child(2) {
        display: none !important;
    }
}

/* Ensure Mobile Detail Rows are hidden on Desktop even if toggled */
@media (min-width: 768px) {
    tr.mobile-detail-row {
        display: none !important;
    }
}

/* Branding Header Styles */
.branding-header {
    background-color: #fff;
    padding: 20px 0;
    text-align: center;
}

.branding-logo {
    max-height: 140px;
    width: auto;
    margin-bottom: 5px;
}

.branding-hindi-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 2px;
}

.branding-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

@media (max-width: 575.98px) {
    .branding-hindi-title {
        font-size: 14px;
    }

    .branding-title {
        font-size: 13px;
    }

    .branding-logo {
        max-height: 100px;
    }
}

.branding-divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 0;
}

/* Student Profile Summary */
.profile-summary {
    background: #fff;
    background-image: radial-gradient(#e5e5e5 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 10px 0;
    text-align: center;
}

.profile-avatar-ring {
    width: 130px;
    height: 130px;
    border: 5px solid #2b8bcb;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    padding: 2px;
    background: #fff;
}

.profile-avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.profile-verified {
    color: #28a745;
}

.profile-contact-info-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.profile-contact-info {
    font-size: 14px;
    color: #777;
    margin-top: 5px;
    display: flex;
    justify-content: center;
    gap: 20px;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .profile-contact-info-wrapper {
        overflow-x: auto !important;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .profile-contact-info-wrapper::-webkit-scrollbar {
        display: none;
    }

    .profile-contact-info {
        justify-content: center !important;
        padding: 0 15px !important;
        gap: 10px 15px !important;
        /* vertical and horizontal gap */
        flex-wrap: wrap !important;
    }

    .contact-item {
        font-size: 11px !important;
    }

    .contact-item .small {
        font-size: 11px !important;
    }
}

/* Basic Details Card */
.details-info-card {
    border-radius: 10px;
    overflow: visible;
    border: 1px solid #eee;
    position: relative;
}

.details-info-card>div {
    overflow: visible;
}

.details-info-card .row {
    overflow: visible;
}

.details-info-card [class*="col-"] {
    overflow: visible;
}

/* Ensure form selects open above content */
.details-info-card .form-select {
    position: relative;
    z-index: 1050;
}

/* Dropdown menu styling for Bootstrap selects */
.dropdown-menu {
    z-index: 1050 !important;
}

/* For select elements - allow dropdown to appear outside */
select.form-select {
    overflow: visible !important;
}

/* Bootstrap dropdown positioning */
.show>.dropdown-menu {
    display: block;
}

.details-card-header {
    background-color: #2a8bc9;
    text-align: left;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 16px;
    color: white;
    border-radius: 10px 10px 0 0;
}

.details-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #f8f8f8;
}

.details-label {
    width: 30%;
    color: #888;
    font-size: 13px;
    font-weight: 500;
}

.details-value {
    font-weight: 400;
    color: #393b40;
    font-size: 14px;
}

.search-input-wrapper {
    position: relative;
    min-width: 354px;
}

@media (max-width: 767.98px) {
    .search-input-wrapper {
        min-width: 100% !important;
    }

    .details-info-card .card-body>div {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    .details-label {
        width: 100% !important;
        margin-bottom: 5px !important;
        font-size: 12px !important;
        color: #94a3b8 !important;
    }

    .details-value {
        font-size: 15px !important;
        font-weight: 500 !important;
        color: #1e293b !important;
    }
}

/* Exam Table overrides for header color */
.custom-table.exam-table thead th {
    background-color: #2b8bcb !important;
}

/* Exam Status Badges */
.badge-pending {
    background-color: #ffedd5;
    color: #9a3412;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-scheduled {
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-live {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-completed {
    background-color: #dcfce7;
    color: #15803d;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-valuation {
    background-color: #fef3c7;
    color: #b45309;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-draft {
    background-color: #f3f4f6;
    color: #374151;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.text-pass {
    color: #28a745;
    font-weight: 600;
}

.text-fail {
    color: #dc3545;
    font-weight: 600;
}

.action-btn-group {
    display: flex;
    gap: 10px;
}

.action-btn-group .btn-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2a8bc926;
    border-radius: 8px;
    padding: 10px;
    opacity: 1;
}

/* Academy Details Hero */
.academy-hero {
    background-color: #fff;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.academy-hero h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.membership-badge {
    background-color: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 12px;
    border-radius: 20px;
    vertical-align: middle;
}

.membership-badge-professional {
    background-color: #dbeafe !important;
    color: #1d4ed8 !important;
}

.hero-metadata {
    font-size: 14px;
    color: #555;
    display: flex;
    gap: 20px;
}

.hero-metadata span b {
    color: #000;
    margin-right: 4px;
}

/* KPI Section */
.blue-card-header {
    background-color: #2b8bcb;
    color: #fff;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
}

.kpi-row {
    background: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    border: none;
    border-radius: 0 0 11px 11px;
    max-width: 1173px;
    height: 88px;
    align-items: center;
}

.module-card> :first-child {
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
}

.kpi-item {
    text-align: left;
}

.kpi-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
    display: block;
}

/* Force consistency on inputs */
.login-form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 334px;
    margin: 0 auto;
}

.login-field-group {
    text-align: left;
    width: 100%;
}

.login-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.login-label-row .form-label {
    margin-bottom: 0;
    font-weight: 500;
    color: #333;
}

.login-label-row a {
    font-size: 13px;
    color: #2a8bc9;
    text-decoration: none;
}

.login-field-group .form-control {
    width: 100% !important;
    height: 40px !important;
    box-sizing: border-box !important;
}

.remember-me-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
    color: #333;
    font-size: 15px;
    opacity: 1;
}

/* Hide the real checkbox */
.remember-me-container input[type="checkbox"] {
    position: absolute !important;
    left: -9999px !important;
}

/* Base checkbox box (The square) - Higher specificity to beat style.css */
.remember-me-container input[type="checkbox"]+label {
    position: relative;
    padding-left: 28px !important;
    /* 18px box + 10px gap */
    cursor: pointer;
    line-height: 18px;
    display: inline-block;
    padding-top: 6px;
    padding-bottom: 6px;
}

.remember-me-container input[type="checkbox"]+label:before {
    content: "";
    position: absolute;
    left: 0 !important;
    top: 6px !important;
    width: 18px !important;
    height: 18px !important;
    border: 1px solid #dcddde !important;
    border-radius: 4px !important;
    /* FORCING SQUARE with 4px radius */
    background: #fff !important;
    box-sizing: border-box !important;
}


/* Checked state - The Tick Icon */
.remember-me-container input[type="checkbox"]:checked+label:after {
    content: "";
    position: absolute;
    top: 7px !important;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-right: 60px;
}

.password-input-wrapper .secure-text {
    position: absolute;
    right: 16px;
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

/* Search input with icon inside */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    z-index: 1;
}

.search-input-wrapper .form-control {
    padding-left: 36px;
}

/* ======================================
   Academy Details - Mobile Responsive
   ====================================== */
@media (max-width: 767.98px) {

    /* Module cards full width with reduced padding */
    .module-card {
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 16px;
    }

    /* KPI row stacks into 2x2 grid on mobile */
    .kpi-row {
        flex-wrap: wrap;
        height: auto !important;
        gap: 0 !important;
        /* Use borders instead of gap */
    }

    .kpi-row .kpi-item {
        flex: 0 0 50%;
        max-width: 50%;
        border: none !important;
        /* Removed separators as per request */
        padding: 15px !important;
    }

    .kpi-value {
        color: #000 !important;
        /* Value color black in mobile view */
        font-weight: 600;
        font-size: 16px;
    }

    /* Academy Details Hero */
    .academy-hero h1 {
        font-size: 20px !important;
    }

    .hero-metadata {
        font-size: 11px !important;
        /* Slightly smaller to fit without scrolling */
        color: #78829d !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
        gap: 0 !important;
    }

    .hero-metadata::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari and Opera */
    }

    .meta-bullet {
        margin: 0 4px !important;
        /* Reduced horizontal spacing */
        color: #d1d5db;
    }

    .membership-badge {
        padding: 4px 12px !important;
        font-size: 11px !important;
        background: #f3f4f6 !important;
        color: #6b7280 !important;
        border-radius: 20px !important;
    }

    .membership-badge-professional {
        background-color: #dbeafe !important;
        color: #1d4ed8 !important;
    }

    /* Table column hiding for expansion system */
    .academy-responsive-table th:nth-child(n + 3),
    .academy-responsive-table td:nth-child(n + 3) {
        display: none !important;
    }

    .academy-responsive-table {
        table-layout: auto !important;
    }

    .academy-responsive-table th:first-child,
    .academy-responsive-table td:first-child {
        width: 42px !important;
    }

    /* Student List & Exam List: horizontal scroll instead of expand */
    .exam-table th:nth-child(n + 3),
    .exam-table td:nth-child(n + 3) {
        display: table-cell !important;
    }

    /* Override global column hide for academy-details tables */
    .exam-table th,
    .exam-table td {
        display: table-cell !important;
        white-space: nowrap;
    }

    .exam-table {
        display: table !important;
        min-width: 600px;
        table-layout: auto !important;
    }

    .exam-table thead {
        display: table-header-group !important;
    }

    .exam-table tbody {
        display: table-row-group !important;
    }

    .exam-table tbody tr {
        display: table-row !important;
    }

    /* Ensure table wrapper scrolls horizontally */
    .module-card .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Exam List search bar: stack on mobile */
    .module-card .p-3.border-bottom.d-flex {
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .module-card .search-input-wrapper {
        max-width: 100% !important;
        flex: 1 1 100%;
    }

    /* Pagination on mobile */
    .custom-pagination {
        height: auto !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        gap: 3px !important;
        padding: 12px 10px !important;
        overflow: visible !important;
    }

    .show-per-page,
    .pagination-area {
        gap: 4px !important;
        flex-shrink: 0;
        font-size: 11px !important;
    }

    .show-per-page select {
        padding: 4px 6px !important;
        font-size: 11px !important;
        height: 30px !important;
        min-width: 50px !important;
    }

    .pagination-controls .page-link {
        padding: 4px 8px !important;
        font-size: 11px !important;
        min-width: 28px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Academy details header area */
    .academy-info-bar {
        flex-wrap: wrap;
        gap: 6px;
    }

    .academy-info-bar .info-item {
        font-size: 12px;
    }

    /* Edit/Close buttons: keep inline on mobile */
    .academy-action-btns {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 8px;
    }
}

/* Exam Detail Page Styles */
.exam-student-info-card {
    width: 100%;
    max-width: 1174px;
    height: auto;
    min-height: 100px;
    background: #ffffff;
    border: 1px solid #dcddde;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.03);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 10px 30px;
    gap: 20px;
    margin: 20px auto;
}

.exam-student-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.exam-student-details {
    flex-grow: 1;
}

.exam-student-name {
    font-size: 24px;
    font-weight: 700;
    color: #071437;
    margin-bottom: 5px;
}

.exam-student-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #78829d;
}

.exam-student-meta span b {
    color: #071437;
}

.exam-screenshots-box {
    width: 200px;
    height: 80px;
    border: 1px solid #dcddde;
    border-radius: 16px;
    padding: 8px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.exam-screenshots-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #071437;
}

.exam-screenshots-list {
    display: flex;
    gap: 5px;
}

.exam-screenshots-list img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #2a8bc9;
}

.exam-summary-header {
    margin-bottom: 20px;
}

.exam-id-badge {
    font-size: 20px;
    font-weight: 700;
    color: #071437;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-fail {
    background: #ffeef3;
    color: #f1416c;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 6px;
}

.exam-meta-info {
    font-size: 13px;
    color: #78829d;
    margin-top: 5px;
}

.exam-meta-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px 15px;
    margin-top: 15px;
}

.exam-meta-grid .meta-label {
    font-size: 13px;
    color: #78829d;
    font-weight: 500;
}

.exam-meta-grid .meta-value {
    font-size: 14px;
    color: #071437;
    font-weight: 600;
}

@media (max-width: 767px) {
    .exam-meta-grid {
        grid-template-columns: 100px 1fr;
        gap: 8px 10px;
    }

    .exam-meta-grid .meta-label {
        font-size: 12px;
    }

    .exam-meta-grid .meta-value {
        font-size: 13px;
    }
}

.exam-stats-grid {
    display: flex;
    gap: 0;
    border: 1px solid #2a8bc9;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.exam-stat-item {
    flex: 1;
    padding: 20px;
    text-align: left;
    border-right: 1px solid #e1e3e6;
}

.exam-stat-item:last-child {
    border-right: none;
}

.exam-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #071437;
    line-height: 1;
}

.exam-stat-label {
    font-size: 12px;
    color: #78829d;
    margin-top: 5px;
}

.question-card {
    background: #ffffff;
    border: 1px solid #f1f1f4;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f1f4;
    padding-bottom: 10px;
}

.question-number {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.question-score {
    font-size: 13px;
    color: #78829d;
}

.question-status {
    font-size: 12px;
    font-weight: 600;
}

.status-wrong {
    color: #f1416c;
}

.status-correct {
    color: #50cd89;
}

.status-na {
    color: #78829d;
}

.question-text {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5675;
    margin-bottom: 20px;
}

.options-label {
    font-size: 14px;
    font-weight: 700;
    color: #071437;
    margin-bottom: 15px;
}

.options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-btn {
    padding: 8px 20px;
    border: 1px solid #e1e3e6;
    border-radius: 8px;
    font-size: 13px;
    color: #4b5675;
    background: #f9f9f9;
    cursor: default;
    transition: all 0.2s;
}

.option-btn.selected-wrong {
    background: #ffeef3;
    border-color: #f1416c;
    color: #f1416c;
}

.option-btn.selected-correct {
    background: #e8fff3;
    border-color: #50cd89;
    color: #50cd89;
}

.option-btn.outline-wrong {
    border-color: #f1416c;
    color: #f1416c;
}

.answer-box {
    background: #f9f9f9;
    border: 1px solid #e1e3e6;
    border-radius: 8px;
    padding: 15px;
    font-size: 13px;
    color: #4b5675;
}

/* Question Navigation Sidebar */
.q-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.q-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #dcddde;
    color: #071437;
    text-decoration: none;
}

.q-circle.correct {
    background: #0e6027;
    border-color: #0e6027;
    color: white;
}

.q-circle.wrong {
    border-color: #ee4233;
    color: #ee4233;
}

.q-circle.unattended {
    border-color: #dcddde;
    color: #071437;
}

.q-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #78829d;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.legend-color.correct {
    background: #0e6027;
}

.legend-color.wrong {
    border: 1px solid #ee4233;
}

.legend-color.unattended {
    border: 1px solid #dcddde;
}

.exam-meta-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px 15px;
    margin-top: 15px;
}

.exam-meta-grid .meta-label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.exam-meta-grid .meta-value {
    font-size: 14px;
    color: #071437;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .exam-student-info-card {
        flex-direction: column;
        height: auto;
        text-align: center;
        padding: 20px;
    }

    .exam-student-meta {
        justify-content: center;
        gap: 10px;
    }

    .exam-stats-grid {
        flex-wrap: wrap;
    }

    .exam-stat-item {
        flex: 0 0 50%;
        border-bottom: 1px solid #2a8bc926;
        border-right: 1px solid #2a8bc926;
    }

    .exam-stat-item:nth-child(even) {
        border-right: none;
    }

    .exam-stat-item:nth-last-child(-n + 2) {
        border-bottom: none;
    }
}

@media (max-width: 767px) {
    .exam-student-info-card {
        align-items: flex-start;
        text-align: left;
        padding: 15px;
        gap: 15px;
    }

    .exam-student-details {
        width: 100%;
    }

    .exam-student-name {
        font-size: 20px;
        margin-top: 5px;
    }

    .exam-student-meta {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 12px 20px;
        width: 100%;
        margin-top: 15px;
    }

    .exam-student-meta span {
        display: contents;
        /* Allows label and value to align in grid */
    }

    .exam-student-meta .meta-label {
        font-size: 13px;
        color: #94a3b8;
        /* Muted label color as per Image 7 */
        font-weight: 500;
        text-align: left;
    }

    .exam-student-meta .meta-value {
        font-size: 14px;
        color: #071437;
        font-weight: 600;
        text-align: right;
    }

    .exam-student-meta .separator {
        display: none;
    }

    .exam-screenshots-box {
        width: 100%;
        height: auto;
        padding: 15px;
    }

    .exam-screenshots-list img {
        width: 45px;
        height: 45px;
    }

    .exam-stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* 2x2 grid */
    }

    .exam-stat-item {
        padding: 15px;
        border-right: 1px solid #e1e3e6 !important;
        border-bottom: 1px solid #e1e3e6 !important;
    }

    .exam-stat-item:nth-child(even) {
        border-right: none !important;
    }

    .exam-stat-item:nth-last-child(-n + 2) {
        border-bottom: none !important;
    }

    .exam-stat-value {
        font-size: 22px;
    }

    .question-card {
        padding: 15px;
    }

    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .question-score,
    .question-status {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .q-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .q-circle {
        width: 40px;
        height: 40px;
        font-size: 11px;
    }
}

/* Question Bank */
.qb-stats-text {
    font-size: 14px;
    font-weight: 500;
    color: #2a8bc9;
    text-align: left;
}

.qb-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
    background: #ffffff;
    padding: 0;
    margin-top: 10px;
    padding-bottom: 5px;
}

.qb-search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 250px;
    max-width: 558px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #e1e3e6;
    border-radius: 6px;
    background: #ffffff;
}

.qb-search-box .search-icon {
    width: 14px;
    height: 32px;
    opacity: 0.5;
    flex-shrink: 0;
}

.qb-search-box input {
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    font-size: 13px;
    background: transparent;
    outline: none;
}

.qb-filter-bar .custom-select {
    flex-shrink: 0;
    min-width: 150px;
    height: 34px;
    min-height: 30px !important;
}

.qb-filter-bar .custom-select .current {
    font-size: 14px;
    color: #78829d;
    height: 34px;
    line-height: 34px;
}

.qb-filter-select {
    width: auto;
    min-width: 150px;
    flex-shrink: 0;
    height: 34px;
    border: 1px solid #e1e3e6;
    border-radius: 6px;
    font-size: 14px;
    color: #78829d;
    padding: 0 35px 0 15px;
    background-color: #ffffff;
    appearance: none;

    background-repeat: no-repeat;
    background-position: right 15px center;
}

.qb-btn-reset-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #78829d;
    font-size: 18px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.qb-btn-reset-icon:hover {
    background: #e9ecef;
    color: #dc3545;
    transform: rotate(90deg);
}

.qb-results-text {
    font-size: 13px;
    color: #78829d;
    margin-top: 8px;
    margin-bottom: 24px;
    text-align: center;
}

.questions-list {
    display: flex;
    flex-direction: column;
}

.qb-card {
    background: #ffffff;
    border: 1px solid #e1e3e6;
    border-radius: 6px;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 1000px;
    min-height: 60px;
    min-width: 0;
    /* prevent flex overflow */
    transition: all 0.2s;
}

.qb-card:hover {
    border-color: #2a8bc9;
}

.qb-card-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.qb-question-header {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.qb-question-header img,
.qb-question-header table {
    max-width: 100%;
    height: auto;
}

.qb-question-header table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.qb-answer-info {
    font-size: 13px;
    color: #78829d;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.qb-correct {
    color: #22b058;
    font-weight: 600;
}

.qb-delete-btn-separate {
    width: 34px;
    height: 34px;
    background: #ffd6d680;
    border: 1px solid #d10032;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    gap: 10px;
    align-self: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qb-delete-btn-separate:hover {
    background: #ffd9d6;
}

.custom-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 0 8px;
}

.custom-pagination .show-per-page {
    font-size: 13px;
    color: #374151;
}

.custom-pagination .pagination-area {
    font-size: 13px;
}

/* Fix Multi-select Selected Item Overflow */
.multi-select-dropdown .selected-item {
    max-width: 180px !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    position: relative !important;
    padding-right: 22px !important;
    /* Space for remove button */
}

.multi-select-dropdown .selected-item .remove-btn {
    position: absolute !important;
    right: 4px !important;
    margin-left: 0 !important;
    background: inherit !important;
    font-size: 16px !important;
    line-height: 1 !important;
}

/* Ensure multi-select wrapper wraps correctly */
.multi-select {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    height: auto !important;
    min-height: 38px !important;
    padding: 4px 8px !important;
}

@media (max-width: 767.98px) {
    .qb-search-box {
        width: 100%;
        min-width: unset;
    }

    .qb-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .qb-filter-select {
        width: 100%;
    }
}

/* Create Exam Page Styles - Redesigned Stepper */
.exam-wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
    gap: 40px;
}

.exam-stepper {
    display: flex;
    gap: 15px;
    flex-grow: 1;
    margin: 0;
    padding: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

@media (min-width: 992px) {
    .step-item {
        flex: none !important;
        width: 25% !important;
    }
}

.step-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.step-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #50cd89;
    width: 0;
    transition: width 0.3s;
}

.step-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-node {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #dcddde;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.step-node i,
.step-node img {
    font-size: 12px;
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: #78829d;
}

/* Active & Complete States */
.step-item.active .step-progress-fill {
    width: 50%;
    /* Half filled for active? Or full? Image 18 shows partial */
}

.step-item.completed .step-progress-fill {
    width: 100%;
}

.step-item.active .step-label,
.step-item.completed .step-label {
    color: #4b5675;
}

.step-item.completed .step-node i,
.step-item.completed .step-node img {
    display: block;
}

.step-item.active .step-node i,
.step-item.active .step-node img {
    display: block;
    /* Image 18 shows checkmark for active step too */
}

/* Exam Action Bar */
.exam-action-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.exam-action-bar .btn-cancel {
    background: none;
    border: none;
    color: #3f4254;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 15px;
}

.exam-action-bar .btn-back {
    background: white;
    border: 1px solid #e1e3e6;
    color: #4b5675;
    padding: 10px 25px;
    font-weight: 600;
}

.exam-action-bar .btn-success {
    padding: 10px 35px;
    font-weight: 600;
}

/* --- Basic Create Form Styles --- */
.exam-create-form .form-label {
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    font-size: 14px;
}

.time-input-group {
    width: 196px;
    height: 34px;
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    position: relative;
}

.time-input-group input {
    border: none;
    outline: none;
    font-size: 13px;
    color: #000;
    width: 100%;
    background: transparent;
    padding: 0;
}

/* Form input size utilities */
.form-input-sm {
    height: 34px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    padding: 0 12px;
    color: #000;
}

/* Schedule/time column widths */
.exam-schedule-col {
    width: 354px;
}

.exam-time-col {
    width: 196px;
}

/* Form check styling */
.form-check-input {
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px !important;
    border: 1.5px solid #e2e8f0 !important;
    margin: 0 !important;
    cursor: pointer;
    background-color: #fff;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    padding: 6px 7px !important;
    box-sizing: border-box;
}

.form-check-input:checked {
    background-color: #2a8bc9 !important;
    border-color: #2a8bc9 !important;
}

.form-check-input:checked::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.form-check-label {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    margin-bottom: 0 !important;
}

/* --- Button Styles --- */
:root {
    --brand-blue: #2a8bc9;
}

.btn-cancel {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0 12px;
    box-sizing: border-box;
}

.btn-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #000;
}

.btn-back-custom {
    width: 53px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    padding: 11px 12px;
    box-sizing: border-box;
}

.btn-back-custom:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #000;
}

/* Empty state */
.question-manager-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 20px;
}

.empty-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Question editor layout */
.question-editor-wrapper {
    display: flex;
    gap: 30px;
}

.question-editor-main {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    min-width: 0;
}

/* Sidebar nav list (question pages) */
.q-sidebar-header {
    margin-bottom: 16px;
}

.q-sidebar-header h5 {
    font-size: 16px;
    color: #1e293b;
}

.q-sidebar-body {
    margin-bottom: 16px;
}

.q-sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.q-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.q-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.q-nav-item:hover {
    background: #f1f5f9;
}

.q-nav-item.active {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
}

.q-nav-num {
    font-weight: 600;
    font-size: 13px;
    min-width: 30px;
}

.q-nav-info {
    flex: 1;
    min-width: 0;
}

.q-nav-text {
    font-size: 13px;
    font-weight: 500;
    color: inherit;
}

.q-nav-meta {
    font-size: 11px;
    color: inherit;
    opacity: 0.8;
}

/* Question Type Modal */
.type-modal-content {
    border-radius: 16px;
    padding: 30px;
}

.type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

.type-select-btn {
    background: #f9f9f9;
    border: 1px solid #e1e3e6;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #4b5675;
    transition: all 0.2s;
}

.type-select-btn:hover {
    background: #fff;
    border-color: #2a8bc9;
    color: #2a8bc9;
    box-shadow: 0 4px 12px rgba(42, 139, 201, 0.1);
}

.type-select-btn-full {
    grid-column: span 2;
}

@media (max-width: 767px) {
    .type-grid {
        gap: 10px;
    }

    .type-select-btn {
        padding: 12px 5px;
        font-size: 13px;
        white-space: nowrap;
    }

    .exam-wizard-header {
        flex-direction: column;
        gap: 20px;
        margin: 20px auto;
    }

    .exam-stepper {
        width: 100%;
        gap: 8px;
    }

    .step-label {
        font-size: 11px;
        white-space: nowrap;
    }

    .exam-action-bar {
        display: flex;
        justify-content: flex-end !important;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .exam-action-bar .btn {
        flex: 1;
        padding: 10px 15px;
    }

    .btn-cancel {
        height: 34px !important;
        padding: 0 12px !important;
        font-size: 14px !important;
        color: #1e293b !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 6px !important;
        background: #fff !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
    }

    .btn-success#nextBtn {
        width: 104px !important;
        min-width: 104px !important;
        max-width: 104px !important;
        flex-shrink: 0 !important;
        height: 34px !important;
        border: none !important;
        border-radius: 6px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    #nextBtn.d-none {
        display: none !important;
    }

    .btn-back-custom {
        width: 66px !important;
        height: 34px !important;
        padding: 0 !important;
        font-size: 14px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        border: 1px solid #e2e8f0 !important;
        border-radius: 6px !important;
    }

    /* Mobile Time Row Fix */
    .time-col-mobile {
        width: 50% !important;
        flex: 0 0 50% !important;
    }

    /* Mobile Checkbox Row Fix */
    .checkbox-group-mobile {
        flex-wrap: nowrap !important;
        gap: 10px !important;
    }

    .checkbox-group-mobile .form-check-label {
        font-size: 8px !important;
        white-space: nowrap;
    }

    /* Mobile Exam ID & Duration Fix */
    .mobile-half-col {
        width: 50% !important;
        flex: 0 0 50% !important;
    }

    .mobile-half-col .form-label {
        font-size: 12px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Mobile Schedule/Time Columns */
    .exam-schedule-col,
    .exam-time-col {
        width: 100%;
    }
}

/* AI Question Modal Styles */
.ai-modal-icon {
    text-align: center;
    margin-bottom: 25px;
}

.ai-modal-icon img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.ai-field-group {
    margin-bottom: 20px;
}

.ai-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #071437;
    margin-bottom: 8px;
    display: block;
}

.btn-generate-main {
    background-color: #50cd89;
    border-color: #50cd89;
    color: white;
    width: 100%;
    padding: 12px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    margin-top: 10px;
    transition: all 0.3s;
}

.btn-generate-main:hover {
    background-color: #47b97a;
    border-color: #47b97a;
    color: white;
    box-shadow: 0 4px 12px rgba(80, 205, 137, 0.2);
}

.btn-try-again {
    background-color: #a8e0c1;
    border-color: #a8e0c1;
    color: white;
    width: 100%;
    padding: 12px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    margin-top: 10px;
    transition: all 0.3s;
}

.btn-try-again:hover {
    background-color: #96ccae;
    border-color: #96ccae;
    color: white;
}

/* AI Results Modal Styles */
.ai-results-header {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.selectable-q-card {
    background: #ffffff;
    border: 1px solid #dcddde;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 15px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.selectable-q-card:hover {
    background: #f8fafc;
}

.selectable-q-card.selected {
    border-color: #2a8bc9;
}

.q-select-check {
    width: 20px;
    height: 20px;
    background: #2a8bc9;
    border-radius: 50%;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.selectable-q-card.selected .q-select-check {
    display: flex;
}

.btn-add-selected {
    background-color: #28a745;
    /* Image 25 shows a solid green */
    border-color: #28a745;
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-add-selected:hover {
    background-color: #218838;
    color: white;
}

.btn-outline-try-again {
    border: 1px solid #28a745;
    color: #28a745;
    background: white;
    padding: 10px 45px;
    border-radius: 8px;
    font-weight: 600;
}

.view-more-link {
    color: #2a8bc9;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: 20px;
}

.view-more-link:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .ai-results-header {
        flex-direction: column;
        width: 100%;
    }

    .ai-results-header .btn {
        width: 100%;
    }

    .q-select-check {
        right: 15px;
    }
}

/* Question Preview Styles */
.preview-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.preview-stats-row .subheader-title {
    font-size: 20px;
}

.preview-score {
    font-size: 14px;
    font-weight: 500;
    color: #78829d;
}

.question-preview-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s;
}

.question-item-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.question-content {
    flex-grow: 1;
}

.question-number-text {
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 4px;
    font-weight: 400 !important;
}

.question-text-main {
    font-size: 14px;
    color: #071437;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.5;
}

.question-answer-detail {
    font-size: 13px;
    color: #78829d;
}

.question-answer-detail b {
    color: #50cd89;
    font-weight: 600;
}

.btn-delete-question {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid #d10032;
    background: #ffd6d6;
    color: #d10032;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-delete-question:hover {
    background: #fecaca;
}

.btn-delete-question img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Question Navigation Sidebar */
.q-nav-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px 20px;
    position: sticky;
    top: 20px;
    min-height: 500px;
}

.q-nav-title {
    font-size: 14px;
    font-weight: 700;
    color: #071437;
    margin-bottom: 16px;
}

.navigator-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.q-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-items: center;
}

.q-nav-node {
    width: 50px;
    height: 50px;
    border-radius: 100px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    background: #fff;
}

.q-nav-node:hover:not(.active) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.q-nav-node.active {
    background: #2a8bc9;
    color: #fff;
    border-color: #2a8bc9;
}

.q-nav-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #dcddde;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #071437;
    background: #fff;
    text-decoration: none;
    transition: all 0.2s;
}

.q-nav-circle:hover {
    border-color: #2a8bc9;
    color: #2a8bc9;
}

.q-nav-circle.active {
    background: #2a8bc9;
    border-color: #2a8bc9;
    color: white;
}

.btn-add-more {
    width: 163px;
    height: 34px;
    border: 1px solid #2a8bc9;
    border-radius: 6px;
    background: #fff;
    color: #2a8bc9;
    font-weight: 500;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}

.btn-add-more:hover {
    background: #f0f9ff;
}

@media (max-width: 991px) {
    .q-nav-card {
        position: static;
        margin-bottom: 25px;
    }
}

@media (max-width: 767px) {
    .preview-stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .question-item-card {
        padding: 15px;
        align-items: flex-start;
    }

    .btn-delete-question {
        flex-shrink: 0;
    }

    .q-nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        grid-template-rows: auto !important;
        height: auto !important;
        min-height: auto !important;
        gap: 10px;
    }

    .header-stats-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-left {
        width: 100%;
    }

    .add-more-container {
        text-align: center;
    }

    .q-nav-card {
        display: none;
    }
}

/* Question Preview Styles */
.question-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 16px;
}

.q-nav-grid-mobile {
    display: grid;
    grid-template-columns: repeat(5, 50px);
    gap: 15px;
    justify-content: flex-start;
}

.add-more-container {
    text-align: left;
}

.header-stats-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stats-left {
    flex-shrink: 0;
}

.stats-text {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}

.header-mobile-stack {
    margin-bottom: 16px;
}

.mobile-q-nav {
    margin-bottom: 16px;
}

.q-nav-card .q-nav-grid {
    gap: 27px;
}

/* Login Page Specific Styles */
.login-form-wrapper {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
}

.login-form-wrapper h1 {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 18px;
    letter-spacing: -0.01em;
    text-align: center;
    color: #333;
    margin-bottom: 5px;
}

.login-subtext {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 14px;
    letter-spacing: 0%;
    text-align: center;
    color: #78829d;
}

.login-subtext a {
    color: #2a8bc9 !important;
    text-decoration: none;
    font-weight: 500;
}

.login-subtext a:hover {
    text-decoration: underline;
}

.login-form-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 32px;
    justify-content: center;
    margin-bottom: 24px;
}

@media (max-width: 767px) {
    .login-form-grid {
        flex-wrap: wrap;
    }
}

.login-field-group {
    width: 334px;
    text-align: left;
}

.login-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    min-height: 22.5px;
}

.login-label-row a {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 14px;
    letter-spacing: 0%;
    color: #2a8bc9;
    text-decoration: none;
}

.login-label-row a:hover {
    text-decoration: underline;
}

.btn-login-main {
    background-color: #2a8bc9;
    color: white;
    border: none;
    border-radius: 8px;
    width: 100%;
    max-width: 334px;
    height: 40px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 14px;
    letter-spacing: -0.01em;
    margin: 0 auto;
    display: block;
    transition: all 0.3s;
}

.btn-login-main:hover {
    background-color: #2170a4;
    color: white;
}

/* Login Page Specific Styles */
.login-form-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.login-form-wrapper h1 {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 18px;
    letter-spacing: -0.01em;
    text-align: center;
    color: #333;
    margin-bottom: 5px;
}

.login-subtext {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 14px;
    letter-spacing: 0%;
    text-align: center;
    color: #78829d;
}

.login-form-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 32px;
    justify-content: center;
    margin-bottom: 24px;
}

@media (max-width: 767px) {
    .login-form-grid {
        flex-wrap: wrap;
    }
}

.login-field-group {
    width: 334px;
    text-align: left;
}

.login-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
    min-height: 22.5px;
}

.login-label-row label {
    margin-bottom: 0;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.login-label-row a {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 14px;
    letter-spacing: 0%;
    color: #2a8bc9;
    text-decoration: none;
}

.login-label-row a:hover {
    color: #2a8bc9 !important;
    text-decoration: underline;
}

.btn-login-main {
    background-color: #2a8bc9;
    color: white;
    border: none;
    border-radius: 8px;
    width: 100%;
    max-width: 334px;
    height: 40px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 14px;
    letter-spacing: -0.01em;
    margin: 0 auto;
    display: block;
    transition: all 0.3s;
}

.btn-login-main:hover {
    background-color: #2170a4;
    color: white;
}

/* Mobile Detail Row Styles */
.mobile-detail-row {
    background-color: #fff !important;
}

.mobile-detail-row.d-none {
    display: none !important;
}

.mobile-detail-content {
    padding: 0;
    background-color: #fff;
}

.detail-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f1f1;
}

.detail-item:last-of-type {
    border-bottom: none;
}

.detail-item .label {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    width: 100px;
    flex-shrink: 0;
    text-align: left;
}

.detail-item .value {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: #333;
    font-weight: 400;
    flex: 1;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collapse-link {
    padding: 4px 14px;
    text-align: left;
}

.collapse-link a {
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}

.collapse-link a {
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

/* Red Plus Circle Button */
.btn-plus-mobile {
    display: none;
    /* Hidden by default, shown on mobile via media query */
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.btn-plus-mobile img {
    display: block;
}

@media (min-width: 768px) {
    .mobile-detail-row {
        display: none !important;
    }
}

/* Password Input with Secure Label */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-right: 65px !important;
}

.password-input-wrapper .secure-text {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #a0a5b1;
    pointer-events: none;
}

/* Add Center Modal Layout */
.modal-create-center {
    max-width: 940px !important;
}

.modal-create-center .modal-content {
    min-height: 934px;
    border-radius: 12px;
    border: none;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1);
}

/* Academy Details Header Actions */
.header-action-close,
.header-action-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 41px !important;
    height: 34px !important;
    background: #ffffff;
    border: 1px solid #dcddde !important;
    border-radius: 6px !important;
    font-family: "Inter", sans-serif;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 12px;
    letter-spacing: 0%;
    color: #333 !important;
    text-decoration: none;
    padding: 11px 1px !important;
    /* Reduced side padding to fit text in 41px */
}

.header-action-edit:hover,
.header-action-close:hover {
    background-color: #f9f9f9;
}

/* High-Fidelity Custom Dropdowns */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    /* Increased z-index */
    display: none;
    min-width: 200px;
    padding: 8px 0;
    margin: 8px 0 0;
    font-size: 13px;
    color: #333;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow:
        0px 10px 15px -3px rgba(0, 0, 0, 0.1),
        0px 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.custom-dropdown-menu.show {
    display: block;
}

.custom-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    clear: both;
    font-weight: 500;
    color: #313336;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.custom-dropdown-item:hover {
    background-color: #f9fafb;
    color: #313336;
    text-decoration: none;
}

.custom-dropdown-item.active {
    background-color: #f3f4f6;
}

.custom-dropdown-item.text-danger {
    color: #d92d20 !important;
}

.custom-dropdown-item.text-danger:hover {
    background-color: #fef3f2;
}

/* Directional logic classes */
.custom-dropdown.drop-up .custom-dropdown-menu {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 8px;
}

.custom-dropdown.drop-left .custom-dropdown-menu {
    left: auto;
    right: 0;
}

/* Student List High-Fidelity Rework */
.section-title {
    font-family: "Inter", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 4px;
}

.section-subtitle {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #78829d;
    margin-bottom: 0;
}

.btn-export-green {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #10b981 !important;
    border-radius: 8px !important;
    color: #10b981 !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    background: transparent;
    transition: all 0.2s;
}

.btn-export-green:hover {
    background-color: #10b981 !important;
    color: white !important;
}

.btn-export-green img {
    width: 16px;
}

.btn-plus-red {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #e11d48 !important;
    border: none !important;
    border-radius: 50% !important;
    color: white !important;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

.btn-plus-red:hover {
    background-color: #be123c !important;
}

.search-input-wrapper-white {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
}

.search-input-wrapper-white .form-control {
    border: none;
    padding: 0;
    background: transparent;
}

/* Student List & Action Dropdown Premium Refinements */

.token-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #ebf5fb !important;
    color: #2a8bc9 !important;
    border-radius: 8px !important;
    font-weight: 600;
    font-size: 14px;
}

/* Table Blue Header Styling */
.table-blue-header thead {
    background-color: #2a8bc9 !important;
}

.table-blue-header thead th {
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    text-transform: capitalize !important;
    border-bottom: none !important;
    padding: 15px !important;
    vertical-align: middle !important;
}

.table-blue-header thead th i,
.table-blue-header thead th img {
    filter: brightness(0) invert(1);
    /* Make icons white */
}

.mobile-detail-content-premium {
    padding: 10px 0;
}

.mobile-detail-content-premium .detail-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    background: transparent !important;
}

.mobile-detail-content-premium .detail-item:last-of-type {
    border-bottom: none;
}

.mobile-detail-content-premium .detail-item .label {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    width: 32%;
    margin: 0;
    flex-shrink: 0;
}

.mobile-detail-content-premium .detail-item .value {
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    /* Changed from left to match design */
    flex: 1;
}

.mobile-detail-content-premium .collapse-link {
    padding: 15px;
    text-align: left;
}

.mobile-detail-content-premium .collapse-link a {
    color: #e11d48 !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

/* Red Plus Circle - Mobile only toggle visibility handled in HTML */
.btn-plus-red {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #e11d48 !important;
    border-radius: 50% !important;
    color: white !important;
    border: none !important;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

/* Custom Dropdown Styling (Image 3) */
.custom-dropdown-menu {
    border: none !important;
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    min-width: 240px !important;
}

.custom-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px !important;
    color: #64748b !important;
    /* Grayish for Download/Email */
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s;
    text-decoration: none;
}

.custom-dropdown-item:hover {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

.custom-dropdown-item.active {
    color: #1e293b !important;
    /* Dark black for View Detail */
    background: transparent !important;
}

.custom-dropdown-item.text-danger {
    color: #e11d48 !important;
    /* Red for Delete */
}

.custom-dropdown-item i {
    margin-right: 12px;
    font-size: 16px;
}

/* =====================================================
   SIDEBAR MENU ICON STYLING
   Ensure menu icons match the 38x38px hamburger icon size
   ===================================================== */
.side-bar .side-menu a .menu-icon {
    width: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
}

.side-bar .side-menu a .menu-icon img,
.side-bar .side-menu a .menu-icon svg {
    max-width: 38px !important;
    max-height: 38px !important;
    width: auto !important;
    height: auto !important;
    transform: translateY(-1px);
    /* Lift slightly to align with text */
}

/* =====================================================
   SIDEBAR EXPANDED & COLLAPSED STATES
   ===================================================== */

/* Base reset for nav list */
.sidebar-nav-list {
    flex-direction: column;
    padding: 0;
    gap: 2px;
}

/* Category Toggle Header */
.sidebar-section-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 32px !important;
    padding: 0 12px 0 16px !important;
    margin-top: 10px !important;
    margin-bottom: 2px !important;
    background: transparent !important;
    border-radius: 0 !important;
    cursor: pointer;
}

.sidebar-section-toggle::after {
    display: none !important;
    /* Hide default dropdown arrow */
}

/* Category Label */
.sidebar-section-label {
    font-size: 14px;
    font-weight: 600;
    color: #939393;
    white-space: nowrap;
}

/* Chevron */
.sidebar-chevron {
    width: 14px;
    height: 14px;
    background-image: url('data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 8.75L7 5.25L3.5 8.75" stroke="%239CA3AF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.sidebar-section-toggle.collapsed .sidebar-chevron,
.nav-item.dropdown:not(.open) .sidebar-chevron {
    transform: rotate(180deg);
}

/* Submenu Links */
.sidebar-submenu {
    position: static !important;
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.sidebar-submenu .dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 6px;
    /* Reduced from 8px */
    padding: 8px 10px !important;
    /* Further reduced from 12px */
    border-radius: 8px !important;
    color: #6b7280 !important;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: visible !important;
    width: 100% !important;
}

.sidebar-submenu .dropdown-item:hover {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

.sidebar-submenu .dropdown-item::before {
    display: none !important;
    /* Remove any old bullet dots */
}

/* Active Dashboard Link */
.sidebar-nav-list .nav-item.active>.nav-link {
    background-color: #2a8bc9 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center;
    padding: 8px 16px !important;
    gap: 8px;
    margin: 0 10px;
    /* Slight inset like Figma */
}

.sidebar-nav-list .nav-item.active>.nav-link .menu-icon img {
    filter: brightness(0) invert(1) !important;
}

.sidebar-nav-list .nav-item.active>.nav-link .menu-label {
    color: #ffffff !important;
    font-weight: 500;
}

/* Badges */
.sidebar-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    white-space: nowrap !important;
    display: inline-flex !important;
    min-width: max-content !important;
    flex-shrink: 0 !important;
}

.badge-live {
    background-color: #ef4444;
    color: white;
}

.badge-pending {
    background-color: #f59e0b;
    color: white;
}

/* COLLAPSED STATE LOGIC (ody.close-menu or similar logic based on existing) */
/* Assuming ody.open-sidebar isn't used, but .side-bar-wrapper width shrinking is used. 
Let's use the standard ody.close-menu or width-based media query if needed. 
Wait, the template uses ody.close-menu for collapsed state on desktop. */

body.close-menu .sidebar-section-toggle,
body.tablet:not(.open-menu) .sidebar-section-toggle {
    display: none !important;
    /* Hide category headers entirely */
}

body.close-menu .dropdown-menu.sidebar-submenu,
body.tablet:not(.open-menu) .dropdown-menu.sidebar-submenu {
    display: block !important;
    /* Force all sub-items to be visible */
    visibility: visible !important;
    opacity: 1 !important;
}

body.close-menu .sidebar-submenu .dropdown-item,
body.tablet:not(.open-menu) .sidebar-submenu .dropdown-item {
    justify-content: center !important;
    padding: 8px !important;
}

body.close-menu .menu-label,
body.tablet:not(.open-menu) .menu-label,
body.close-menu .sidebar-badge,
body.tablet:not(.open-menu) .sidebar-badge {
    display: none !important;
    /* Hide text in collapsed mode */
}

/* Ensure menu-icon inside dropdowns is styled exactly like normal icons */
.sidebar-submenu .menu-icon {
    width: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.sidebar-submenu .menu-icon img {
    width: 38px !important;
    height: 38px !important;
    transform: translateY(-1px);
    /* Lift slightly to align with text */
}

/* Fix active item cut-off in collapsed state without affecting other designs */
body.close-menu .sidebar-nav-list .nav-item.active>.nav-link,
body.tablet:not(.open-menu) .sidebar-nav-list .nav-item.active>.nav-link {
    margin: 0 !important;
    padding: 6px !important;
    justify-content: center !important;
}

/* Increase expanded sidebar width to fit long text */
:root {
    --menu-open: 290px;
}

/* Ensure category headers take full width so chevrons align perfectly on the right */
.sidebar-section-toggle {
    width: 100% !important;
}

body {
    --menu-open: 330px !important;
}

/* Ensure the wrapper uses the variable so it collapses/expands correctly */
body.desktop.expand-menu .side-bar-wrapper,
body.tablet.open-menu .side-bar-wrapper {
    width: 330px !important;
}

/* Give more horizontal room inside the sidebar */
.side-bar {
    padding-left: 12px !important;
    padding-right: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Make active item and category toggles full width of the container */
.sidebar-nav-list .nav-item.active>.nav-link {
    margin: 0 !important;
    padding: 10px 15px !important;
    width: 100% !important;
}

.sidebar-section-toggle {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 15px !important;
}

.sidebar-submenu .dropdown-item {
    width: 100% !important;
    padding: 8px 15px !important;
    white-space: nowrap !important;
}

/* Ensure arrows are consistently placed at the right */
.sidebar-chevron {
    margin-left: auto;
}

/* Replace the expanded sidebar close icon with the logout icon as requested */
.open-menu .side-bar-close,
.expand-menu .side-bar-close,
body.tablet.open-menu .side-bar .side-bar-close,
body.desktop.expand-menu .side-bar .side-bar-close {
    background-image: url(../img/ri_logout-circle-r-line.png) !important;
    background-size: 38px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Reduce sidebar width to prevent content breakpoint drop, while keeping labels visible */
body {
    --menu-open: 260px !important;
}

/* Optimize internal sidebar spacing to fit long text in 260px */
.sidebar-submenu .dropdown-item {
    font-size: 13.5px !important;
    padding-left: 12px !important;
    padding-right: 8px !important;
    gap: 8px !important;
}

.sidebar-submenu .menu-icon {
    width: 32px !important;
    height: 32px !important;
}

.sidebar-submenu .menu-icon img {
    width: 28px !important;
    height: 28px !important;
}

/* Restore wide content layout to match Screenshot 1 */
.content-wrapper .container {
    max-width: 1320px !important;
    /* Match Bootstrap xxl width */
    width: 100% !important;
}

/* Ensure the red header also reaches the edges like the first screenshot */
.red-header {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Final fix for content width and padding-bottom to match Screenshot 1 */
body {
    --menu-open: 260px !important;
    /* Narrower sidebar to keep content wide */
}

.content-wrapper .container {
    max-width: 1320px !important;
    /* Force a wide layout */
    padding-left: 15px !important;
    padding-right: 30px !important;
}

.content {
    padding-top: 20px !important;
    padding-bottom: 60px !important;
}

.red-header {
    border-radius: 12px !important;
    /* margin-bottom: 20px !important; */
}

/* Align red header width perfectly with the white table card */
.red-header {
    margin-left: 12px !important;
    /* Adjusted to match Bootstrap column alignment */
    margin-right: 12px !important;
}

/* Ensure the container width is consistent across all sections */
.content-wrapper .container {
    padding-left: 15px !important;
    padding-right: 30px !important;
}

/* Ultimate fix for aligning red header and table card widths */
.red-header {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* Remove Bootstrap column padding so the table card matches the red header width.
   Applied only to specific list pages to avoid breaking form layouts like Exam Create. */
.list-view-page .content .row>[class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Add horizontal padding to the container itself to keep content away from screen edges */
.content-wrapper .container {
    max-width: 1320px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Ensure consistency for fluid containers as well */
.content-wrapper .container-fluid {
    max-width: 1320px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin-left: auto !important;
}

/* Standardized Layout Width Alignment (1173px) */
.main-data-card,
.red-header,
.light-header,
.subheader-section,
.exam-student-info-card,
.kpi-row,
.exam-wizard-header,
.step-content {
    max-width: 1173px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

/* Reset container padding to ensure perfect alignment of header and card edges */
.content-wrapper .container,
.content-wrapper .container-fluid {
    max-width: 1173px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Mobile responsive resets */
@media (max-width: 767.98px) {

    .main-data-card,
    .red-header,
    .light-header,
    .subheader-section,
    .exam-student-info-card,
    .kpi-row {
        max-width: 100% !important;
        border-radius: 8px !important;
    }

    .content-wrapper .container,
    .content-wrapper .container-fluid {
        padding-left: 15px !important;
        padding-right: 30px !important;
    }
}

/* Student Details Fixes */
@media (max-width: 767.98px) {
    .search-input-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 10px;
    }

    .custom-table.exam-id-mobile-only th:first-child,
    .custom-table.exam-id-mobile-only td:first-child {
        width: 100% !important;
        text-align: left !important;
        padding-left: 15px !important;
    }

    .custom-table.exam-id-mobile-only td:first-child .d-flex {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    .mobile-detail-row td {
        width: 100% !important;
    }

    .mobile-detail-content {
        width: 100% !important;
    }
}

/* Table Action Dropdown Styles */
.table-action-dropdown {
    position: relative !important;
}

.table-action-dropdown .dropdown-toggle::after {
    display: none;
}

.table-action-menu {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    width: 220px !important;
    /* min-height: 180px !important; */
    margin-top: 5px !important;
    z-index: 1050 !important;
}

.table-action-menu .dropdown-item {
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #334155 !important;
    transition: all 0.2s !important;
}

.table-action-menu .dropdown-item:hover {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

.table-action-menu .dropdown-item.delete-action {
    color: #ef4444 !important;
}

.table-action-menu .dropdown-item.delete-action:hover {
    background-color: #fef2f2 !important;
}

/* AI Generation Modal Styles */
.ai-generation-modal-content {
    padding: 20px 20px 30px 20px !important;
    border-radius: 12px !important;
    height: auto !important;
    min-height: 0 !important;
}

.ai-modal-icon {
    width: 60px !important;
    height: 60px !important;
    margin: 0 auto 45px !important;
}

.ai-modal-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn-try-again {
    width: 420px;
    height: auto !important;
    background-color: #a8e6cf !important;
    /* Soft green from image */
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 10px auto 0 !important;
    gap: 10px !important;
    text-decoration: none !important;
    transition: background-color 0.2s !important;
    cursor: pointer !important;
}

.btn-try-again:hover {
    background-color: #8fd9b6 !important;
}

@media (max-width: 767.98px) {
    .btn-try-again {
        width: 100% !important;
        max-width: 420px !important;
    }
}

/* Custom Badges */
.custom-badge-scheduled {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 66px !important;
    height: 24px !important;
    background-color: #f0ecff !important;
    color: #271086 !important;
    border-radius: 4px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    border: none !important;
    gap: 1px !important;
    opacity: 1 !important;
}

.btn-submit-valuation {
    width: 100% !important;
    max-width: none !important;
}

@media (min-width: 768px) {
    .btn-submit-valuation {
        max-width: 226px !important;
    }
}

@media (min-width: 768px) {
    .w-md-auto {
        width: auto !important;
    }
}

/* Dashboard Specific Styles */
.dash-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    padding: 24px;
    height: 100%;
}

.table-custom-header th {
    color: white !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    padding: 12px 16px !important;
    border: none !important;
}

.table-custom-header th:first-child {
    border-top-left-radius: 8px;
}

.table-custom-header th:last-child {
    border-top-right-radius: 8px;
}

.exam-row td {
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 13px;
    transition: background 0.2s ease;
}

.exam-row:hover td {
    background-color: #f8fafc !important;
}

.exam-row:last-child td {
    border-bottom: none;
}

.mobile-exam-card {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    background: #fff;
}

.academy-list-item {
    padding: 6px 0;
    border-bottom: none;
}

.academy-list-item:last-child {
    border-bottom: none;
}

.q-block {
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 20px 24px;
    color: white;
}

.q-block .q-num {
    font-size: 34px;
    font-weight: 500;
}

.q-block .q-text {
    font-size: 14px;
    font-weight: 500;
}

/* Hide search in custom-select when no-search class is present */
.custom-select.no-search .custom-select-search {
    display: none;
}

/* Custom select dropdown positioning */
.custom-select {
    position: relative;
    z-index: 1050;
}

.custom-select.open {
    z-index: 10001;
}

.custom-select .custom-select-options,
.custom-select .list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999 !important;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.custom-select.drop-up .list,
.custom-pagination .custom-select .list {
    top: auto !important;
    bottom: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    transform-origin: 50% 100% !important;
}

@media (max-width: 991.98px) {
    .content-wrapper {
        padding-left: 0 !important;
    }

    .chart-controls-abs {
        top: 0px !important;
        right: 0px !important;
        left: 0px !important;
        justify-content: center;
        background: transparent;
    }

    .chart-controls-abs .btn {
        width: auto !important;
        min-width: 70px;
        padding: 10px 16px !important;
    }
}

/* Fix horizontal overflow on mobile view globally */
@media (max-width: 767.98px) {

    html,
    body {
        overflow-x: hidden !important;
    }
}

/* =====================================================
   EXAM WIZARD PREMIUM STYLES
   ===================================================== */

.wizard-stepper-container {
    padding: 20px 0 40px;
}

.wizard-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.wizard-stepper::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.wizard-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 33.33%;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #64748b;
}

.wizard-step.active .step-icon {
    border-color: #10b981;
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.wizard-step.completed .step-icon {
    border-color: #10b981;
    background: #ffffff;
    color: #10b981;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
}

.wizard-step.active .step-label {
    color: #1e293b;
    font-weight: 600;
}

.wizard-step.completed .step-label {
    color: #10b981;
}

/* Wizard Header with Red Background */
.wizard-header-section {
    background: #901b20;
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-header-title h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: white;
}

.wizard-header-actions {
    display: flex;
    gap: 12px;
}

/* Premium Card for Wizard Content */
.wizard-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    margin-bottom: 30px;
}

.wizard-card-header {
    padding: 20px 30px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.wizard-card-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.wizard-card-body {
    padding: 30px;
}

/* Form Styling within Wizard */
.wizard-form .form-label {
    font-weight: 500;
    color: #475569;
    font-size: 14px;
    margin-bottom: 8px;
}

.wizard-form .form-control,
.wizard-form .form-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.wizard-form .form-control:focus,
.wizard-form .form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Premium Buttons */
.btn-premium-next {
    background: #10b981 !important;
    color: white !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-premium-next:hover {
    background: #059669 !important;
    transform: translateY(-1px);
}

.btn-premium-back {
    background: #ffffff !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.2s;
}

.btn-premium-back:hover {
    background: #f8fafc !important;
    color: #1e293b !important;
}

.btn-premium-cancel {
    background: transparent !important;
    color: #94a3b8 !important;
    border: none !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
}

/* Specific Step 2 Styles (Questions) */
.question-item-premium {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.question-item-premium:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.question-palette-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.palette-item {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
}

.palette-item.active {
    background: #10b981;
    color: white;
}

.palette-item.pending {
    background: #f1f5f9;
    color: #64748b;
}

.palette-item:hover:not(.active) {
    background: #e2e8f0;
}

/* KPI Widgets for Review Page */
.review-kpi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #10b981;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.review-kpi-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.review-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

/* Subheader Styles from Reference */
.subheader-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.subheader-subtitle {
    font-size: 13px;
    color: #64748b;
}

.main-data-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* New Wizard Stepper Mockup Styles */
.wizard-stepper-horizontal {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
    margin-bottom: 0;
}

.wizard-stepper-horizontal .step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

.wizard-stepper-horizontal .step-item.active {
    color: #10b981;
}

.step-icon-new {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: #fff;
}

.step-item.active .step-icon-new {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.step-label-new {
    font-weight: 500;
    font-size: 14px;
}

.step-line-new {
    height: 1px;
    background: #e2e8f0;
    flex-grow: 1;
    max-width: 100px;
}

.btn-premium-cancel {
    color: #64748b;
    background: transparent;
    border: none;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    padding: 0 10px;
}

.btn-premium-cancel:hover {
    color: #ef4444;
}

.section-title {
    color: #1e293b;
    font-size: 16px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* ============================================
   Question Editor Styles (MCQ, True/False, Short Answer)
   ============================================ */

:root {
    --brand-blue: #2a8bc9;
}

/* Question Editor Layout */
.question-editor-view {
    display: flex;
}

.question-editor-wrapper {
    display: flex;
    gap: 30px;
    width: 100%;
}

.question-editor-main {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    min-width: 0;
}

.question-nav-sidebar {
    width: 220px;
    background: #fff;
    border-radius: 16px;
    flex-shrink: 0;
    height: auto;
    min-height: 400px;
    box-sizing: border-box;
}

/* Editor Header */
.q-editor-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

@media (max-width: 767.98px) {
    .q-editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .q-editor-header .d-flex.gap-3 {
        gap: 8px !important;
        width: 100%;
        justify-content: flex-start;
    }

    .q-editor-header .q-type-select-main {
        font-size: 12px;
        padding: 5px 8px;
        flex-shrink: 0;
    }

    .q-editor-header .q-type-select-main::after {
        width: 10px;
        height: 10px;
        margin-left: 6px;
    }

    .q-editor-header .q-score-badge {
        font-size: 12px;
        padding: 0 8px;
        height: 30px;
        flex-shrink: 0;
    }
}

.q-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.q-type-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: #64748b;
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.q-type-select:hover {
    border-color: #cbd5e1;
}

.q-type-select:focus {
    border-color: #2a8bc9;
    color: #1e293b;
}

.q-type-select-main {
    display: inline-flex;
    align-items: center;
}

.q-type-select-main::after {
    content: "" !important;
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url('../img/down.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none !important;
    margin-left: 8px;
}

#option-count-select {
    width: 96px !important;
    height: 34px !important;
    border-radius: 6px !important;
    border: 1px solid #DCDDDE !important;
    color: #393B40 !important;
    font-weight: 500 !important;
    padding: 0 24px 0 7px !important;
    display: inline-flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url('../img/down.png') !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 12px !important;
    background-color: #fff !important;
}

.q-score-badge {
    background: #fff;
    border: 1px solid var(--brand-blue);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--brand-blue);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 34px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.q-score-badge:hover {
    background: #f0f7ff;
    border-color: #2a8bc9;
}

.q-score-badge img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Editor Body */
.q-editor-body {
    margin-bottom: 24px;
}

.q-label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.q-textarea {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: #1e293b;
    resize: none;
}

.q-textarea::placeholder {
    color: #94a3b8;
}

/* Mobile Navigator */
.q-nav-mobile-container {
    display: none;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px 10px;
    justify-items: center;
    margin-bottom: 25px;
}

.q-nav-mobile-container .q-nav-node {
    width: 50px;
    height: 50px;
    color: #000;
    border-color: #d9d9d9;
    border-width: 1px;
    background: #fff;
    font-size: 13px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.q-nav-mobile-container .q-nav-node.active {
    background: #2a8bc9;
    color: #fff;
    border-color: #2a8bc9;
}

/* Options Section */
.options-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Option Count Dropdown */
.options-section-title .dropdown {
    margin-left: auto;
}

.options-section-title .btn {
    border: 1.5px solid #2a8bc9 !important;
    color: #2a8bc9 !important;
    background: #fff !important;
    padding: 6px 12px !important;
    height: 32px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.options-section-title .btn:hover {
    background: #f0f7ff !important;
}

.options-section-title .dropdown-menu {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.options-section-title .dropdown-item {
    font-size: 13px;
    color: #1e293b;
    padding: 10px 16px;
}

.options-section-title .dropdown-item:hover {
    background: #f8fafc;
    color: #2a8bc9;
}

.options-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 20px;
}

/* Add Option Button */
.btn-add-option {
    border: 1.5px solid #2a8bc9;
    background: #fff;
    color: #2a8bc9;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-add-option:hover {
    background: #f0f7ff;
    border-color: #2a8bc9;
}

/* Option Row (Reference HTML Structure) */
.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.option-check-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #8e9198;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    background: #fff;
    box-sizing: border-box;
}

.option-check-btn.selected {
    border: 4px solid #22b058;
    background: #fff;
}

.option-check-btn img {
    display: none;
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.option-check-btn.selected img {
    display: block;
}

.option-input {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
}

.option-input:focus {
    border-color: #3b82f6;
}

.btn-delete-option {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1.5px solid #f87171;
    background: #ffebeb;
    color: #d10032;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
    cursor: pointer;
    min-width: 44px;
}

.btn-delete-option:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

.btn-delete-option i {
    font-size: 18px;
    color: #d10032;
}

.btn-delete-option img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Footer */
.q-editor-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.btn-back-q,
.btn-preview-all {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    background: #fff;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    box-sizing: border-box;
    text-decoration: none;
    white-space: nowrap;
}

.btn-save-q {
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 30px;
    font-size: 14px;
    font-weight: 600;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    box-sizing: border-box;
    text-align: center;
    cursor: pointer;
    margin-left: auto;
    white-space: nowrap;
}

/* Sidebar Navigation */

.q-sidebar-body {
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 991px) {
    .question-editor-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .question-nav-sidebar {
        width: 100%;
    }

    .q-editor-header {
        flex-wrap: wrap;
    }
}

@media (max-width: 991.98px) {
    .q-nav-mobile-container {
        display: grid !important;
    }

    .question-nav-sidebar {
        display: none !important;
    }

    .option-row {
        gap: 8px !important;
    }

    .option-input {
        min-width: 0 !important;
    }

    .btn-delete-option {
        width: 44px !important;
        height: 44px !important;
    }
}

/* Premium Table & Reporting Styles */
.badge.bg-outline-danger {
    min-width: 28px;
}

.user-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

.user-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-table tbody tr td .name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0;
    line-height: 1.4;
}

.cert-apply {
    color: #ee4233 !important;
    font-weight: 600;
    text-decoration: none;
}

.cert-not-ready {
    color: #6b7280;
    font-size: 12px;
}

/* ======================== Question Bank Modal Styles ======================== */

.qb-modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.qb-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.qb-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    margin-bottom: 8px;
}

.qb-modal-subtitle {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin-bottom: 0;
}

.qb-modal-body {
    padding: 20px 30px 30px;
}

.qb-search-filters {
    margin-bottom: 20px;
}

.qb-search-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.qb-search-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
}

.qb-search-input::placeholder {
    color: #9ca3af;
}

.qb-search-input:focus {
    border-color: #2a8bc9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 139, 201, 0.1);
}

.qb-search-wrapper i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 13px;
    pointer-events: none;
}

.qb-filters-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.qb-filter-dropdown {
    flex: 1;
    min-width: 140px;
}

.qb-filter-btn {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #4b5563;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    transition: all 0.2s;
}

.qb-filter-btn:hover {
    border-color: #2a8bc9;
    color: #2a8bc9;
}

.qb-stats-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 16px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.qb-stats-selected {
    font-size: 13px;
    color: #2a8bc9;
    margin-bottom: 0;
    font-weight: 500;
}

.qb-questions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    margin: 16px 0;
    padding: 8px 0;
}

.qb-questions-list::-webkit-scrollbar {
    width: 6px;
}

.qb-questions-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.qb-questions-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.qb-questions-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.qb-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
}

.qb-pagination-link {
    font-size: 12px;
    color: #2a8bc9;
    text-decoration: none;
    transition: color 0.2s;
}

.qb-pagination-link:hover {
    color: #1e5da4;
    text-decoration: underline;
}

.qb-action {
    display: flex;
    justify-content: center;
    padding-top: 12px;
}

.qb-action .btn {
    min-width: 160px;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* ======================== AI Modal Styles (Updated for Reference Design) ======================== */

.ai-generation-modal-content {
    border-radius: 12px;
    border: none;
}

.ai-modal-icon {
    width: 60px !important;
    height: 60px !important;
    margin: 0 auto 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-modal-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ai-field-group {
    margin-bottom: 16px;
}

.ai-field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 6px;
}

.ai-field-group .form-control {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}

.ai-field-group .form-control:focus {
    border-color: #2a8bc9;
    box-shadow: 0 0 0 3px rgba(42, 139, 201, 0.1);
}

.ai-field-group .form-control:disabled {
    background: #f3f4f6;
    color: #9ca3af;
}

.ai-error-alert {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 12px 14px;
    color: #dc2626;
    font-size: 12px;
    margin-bottom: 16px;
}

.btn-generate-main {
    width: 100%;
    height: 40px;
    background: #2a8bc9;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-generate-main:hover {
    background: #1e5da4;
}

.btn-generate-main:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.btn-try-again {
    background: #a8e6cf;
    color: #ffffff;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.btn-try-again:hover {
    background: #8dd9bd;
}

.ai-results-header {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-add-selected {
    background: #2a8bc9;
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-selected:hover {
    background: #1e5da4;
}

.btn-outline-try-again {
    background: #ffffff;
    color: #2a8bc9;
    border: 1px solid #2a8bc9;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-try-again:hover {
    background: #f0f9ff;
}

.ai-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0 20px;
    margin-bottom: 12px;
}

.ai-results-list::-webkit-scrollbar {
    width: 6px;
}

.ai-results-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.ai-results-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.ai-results-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.selectable-q-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.selectable-q-card:hover {
    border-color: #2a8bc9;
    box-shadow: 0 2px 8px rgba(42, 139, 201, 0.1);
}

.selectable-q-card.selected {
    border-color: #2a8bc9;
    background: #f0f9ff;
}

.selectable-q-card .question-number-text {
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 4px;
    font-weight: 500;
    flex: 1;
}

.selectable-q-card .question-answer-detail {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.q-select-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    color: transparent;
    background: #ffffff;
    flex-shrink: 0;
    transition: all 0.2s;
}

.selectable-q-card.selected .q-select-check {
    background: #2a8bc9;
    border-color: #2a8bc9;
    color: #ffffff;
}

.q-select-check i {
    font-size: 12px;
}

.view-more-link {
    font-size: 12px;
    color: #2a8bc9;
    text-decoration: none;
    transition: color 0.2s;
}

.view-more-link:hover {
    color: #1e5da4;
    text-decoration: underline;
}

/* Type Modal Content Override */
.type-modal-content {
    border-radius: 16px;
    padding: 20px;
}

/* ======================== Question Bank Modal Styles (Reference Design) ======================== */

.bank-search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.bank-search-input {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.bank-search-input input {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    height: 40px;
    padding: 0 40px;
    width: 100%;
    font-size: 14px;
}

.bank-search-input input:focus {
    outline: none;
    border-color: #2a8bc9;
}

.bank-search-input i {
    position: absolute;
    left: 15px;
    top: 11px;
    color: #94a3b8;
    font-size: 16px;
}

.bank-filter-select {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    height: 40px;
    padding: 0 32px 0 12px;
    color: #64748b;
    background: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 150px;
    font-size: 13px;
    text-align: left;
}

.bank-filter-select::after {
    display: none;
}

.bank-filter-select:hover {
    border-color: #2a8bc9;
    color: #2a8bc9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%232a8bc9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
}

.bank-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
}

.bank-stats .selected-count {
    color: #2a8bc9;
    font-weight: 600;
}

.btn-add-bank {
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    height: 40px;
    padding: 0 30px;
    font-weight: 600;
    display: block;
    margin: 0 auto 24px;
    font-size: 14px;
    transition: background 0.2s;
    cursor: pointer;
}

.btn-add-bank:hover:not(:disabled) {
    background: #16a34a;
    color: #fff;
}

.btn-add-bank:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.bank-questions-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 0 4px;
}

.bank-questions-list::-webkit-scrollbar {
    width: 6px;
}

.bank-questions-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.bank-questions-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.bank-q-item {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    text-align: left;
    display: block;
}

.bank-q-item:hover {
    border-color: #2a8bc9;
}

.bank-q-item.selected {
    border-color: #2a8bc9;
    background: #fff;
    box-shadow: 0 2px 10px rgba(42, 139, 201, 0.1);
}

.bank-q-text {
    font-size: 14px;
    font-weight: 400;
    color: #1e293b;
    margin-bottom: 6px;
    padding-right: 40px;
    line-height: 1.4;
}

.bank-q-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 0;
    padding-right: 40px;
}

.bank-q-check {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
}

.bank-q-item.selected .bank-q-check {
    background: #2a8bc9;
    border-color: #2a8bc9;
    color: #fff;
}

.bank-q-check i {
    display: none;
    font-size: 14px;
    color: #fff;
}

.bank-q-item.selected .bank-q-check i {
    display: block;
}

@media (max-width: 767.98px) {
    .bank-search-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .bank-search-input {
        flex: 0 0 100%;
        min-width: 100%;
        order: 1;
    }

    .bank-filter-dropdown {
        flex: 1;
        min-width: 0;
        order: 2;
    }

    .bank-filter-select {
        width: 100%;
        height: 36px;
        font-size: 12px;
    }

    .bank-stats {
        font-size: 12px;
        margin-top: 10px;
    }

    .btn-add-bank {
        width: 100%;
        max-width: 240px;
    }
}

/* Bank Filter Dropdown Positioning */
.bank-filter-dropdown {
    position: relative;
    display: inline-block;
}

.bank-filter-dropdown .bank-filter-select {
    width: 100%;
}

.bank-filter-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 4px !important;
    min-width: 100% !important;
    transform: none !important;
    inset: auto !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 6px 0;
    z-index: 1060;
}

.bank-filter-menu .dropdown-item {
    font-size: 13px;
    color: #1e293b;
    padding: 8px 16px;
    cursor: pointer;
}

.bank-filter-menu .dropdown-item:hover,
.bank-filter-menu .dropdown-item:focus {
    background: #f0f9ff;
    color: #2a8bc9;
}

/* ======================== AI Modal — Reference Design (Final Overrides) ======================== */

.ai-modal-dialog {
    max-width: 500px !important;
}

.ai-generation-modal-content {
    width: 500px !important;
    max-width: 95vw !important;
    min-height: 600px !important;
    border-radius: 12px !important;
    border: 1px solid #eeeeee !important;
    padding: 40px !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.ai-modal-icon {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 20px !important;
    width: auto !important;
    height: auto !important;
}

.ai-modal-icon img {
    width: 100px !important;
    height: 100px !important;
    object-fit: contain !important;
}

.ai-field-group {
    margin-bottom: 25px !important;
}

.ai-field-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 10px !important;
    display: block !important;
}

.ai-field-group .form-control {
    height: 48px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0 16px !important;
    font-size: 14px !important;
}

.ai-field-group .form-control:focus {
    border-color: #2a8bc9 !important;
    box-shadow: 0 0 0 3px rgba(42, 139, 201, 0.1) !important;
}

.btn-generate-main {
    width: 420px !important;
    max-width: 100% !important;
    height: 40px !important;
    border-radius: 6px !important;
    background: #22b058 !important;
    border: none !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 13px 16px !important;
    margin: 20px auto 0 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    box-sizing: border-box !important;
}

.btn-generate-main:hover {
    background: #1da14f !important;
    color: #fff !important;
}

.btn-generate-main:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
}

.btn-try-again {
    width: 420px !important;
    max-width: 100% !important;
    height: auto !important;
    background-color: #a8e6cf !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 10px auto 0 !important;
    gap: 10px !important;
    text-decoration: none !important;
    transition: background-color 0.2s !important;
    cursor: pointer !important;
}

.btn-try-again:hover {
    background-color: #8dd9bd !important;
}

/* AI Results Modal */
.ai-result-modal-content {
    max-width: 900px !important;
    padding: 20px !important;
}

.ai-results-header {
    display: flex !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
}

.btn-add-selected {
    background: #22b058 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.btn-add-selected:hover {
    background: #1da14f !important;
    color: #fff !important;
}

.btn-add-selected:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
}

.btn-outline-try-again {
    background: transparent !important;
    color: #22b058 !important;
    border: 1.5px solid #22b058 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.btn-outline-try-again:hover {
    background: #f0fff4 !important;
    color: #1da14f !important;
}

/* Selectable Question Card — Reference Structure */
.selectable-q-card {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s !important;
    text-align: left !important;
    display: block !important;
    gap: 0 !important;
}

.selectable-q-card:hover {
    border-color: #2a8bc9 !important;
    box-shadow: none !important;
}

.selectable-q-card.selected {
    border-color: #2a8bc9 !important;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(42, 139, 201, 0.1) !important;
}

.selectable-q-card .question-number-text {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #1e293b !important;
    margin-bottom: 6px !important;
    padding-right: 40px !important;
    line-height: 1.4 !important;
    flex: none !important;
}

.selectable-q-card .question-answer-detail {
    font-size: 13px !important;
    color: #64748b !important;
    margin: 0 !important;
    padding-right: 40px !important;
}

.selectable-q-card .q-select-check {
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    border: 2px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    background: #fff !important;
}

.selectable-q-card.selected .q-select-check {
    background: #2a8bc9 !important;
    border-color: #2a8bc9 !important;
    color: #fff !important;
}

.selectable-q-card .q-select-check i {
    display: none !important;
    font-size: 12px !important;
    color: #fff !important;
}

.selectable-q-card.selected .q-select-check i {
    display: block !important;
}

.view-more-link {
    color: #2a8bc9 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.view-more-link:hover {
    color: #1e5da4 !important;
    text-decoration: underline !important;
}

.ai-question-hidden {
    display: none !important;
}

@media (max-width: 767.98px) {
    .ai-generation-modal-content {
        width: auto !important;
        min-height: auto !important;
        padding: 24px !important;
    }

    .ai-modal-icon img {
        width: 70px !important;
        height: 70px !important;
    }

    .btn-generate-main,
    .btn-try-again {
        width: 100% !important;
    }

    .ai-results-header {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }

    .btn-add-selected,
    .btn-outline-try-again {
        flex: 1 !important;
        font-size: 11px !important;
        padding: 8px 4px !important;
        white-space: nowrap !important;
    }
}

/* ======================== AI Modal — Size Reduction ======================== */

.ai-modal-dialog {
    max-width: 440px !important;
}

.ai-generation-modal-content {
    width: 100% !important;
    max-width: 440px !important;
    min-height: auto !important;
    border-radius: 12px !important;
    border: 1px solid #eeeeee !important;
    padding: 24px 28px !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.ai-modal-icon {
    margin-bottom: 12px !important;
}

.ai-modal-icon img {
    width: 70px !important;
    height: 70px !important;
}

.ai-generation-modal-content h4 {
    font-size: 18px !important;
}

.ai-generation-modal-content .text-muted.small {
    font-size: 13px !important;
}

.ai-field-group {
    margin-bottom: 14px !important;
}

.ai-field-label {
    font-size: 13px !important;
    margin-bottom: 6px !important;
}

.ai-field-group .form-control {
    height: 40px !important;
    font-size: 13px !important;
    padding: 0 12px !important;
}

.btn-generate-main {
    width: 100% !important;
    height: 40px !important;
    margin: 16px auto 0 !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
}

.btn-try-again {
    width: 100% !important;
    margin: 16px auto 0 !important;
    padding: 10px 16px !important;
}

@media (max-width: 575.98px) {
    .ai-generation-modal-content {
        padding: 20px !important;
    }

    .ai-modal-icon img {
        width: 60px !important;
        height: 60px !important;
    }
}

/* Ensure d-none always wins over .btn-try-again's display: flex */
.btn-try-again.d-none,
.btn-generate-main.d-none,
.btn-add-selected.d-none,
.btn-outline-try-again.d-none,
.ai-error-alert.d-none,
.ai-question-hidden {
    display: none !important;
}

/* ======================== Question Preview Pagination (Inline Variant) ======================== */

/* Inline variant of .custom-pagination — strips the card-bottom look
   (used by Question Preview page where pagination sits in flow, not inside a card) */
.custom-pagination.custom-pagination--inline {
    border: none !important;
    background: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    height: auto !important;
    border-radius: 0 !important;
}

/* Per-page select sized to match reference (30px high, compact) */
.custom-pagination .qp-per-page {
    height: 30px !important;
    font-size: 12px !important;
    padding: 0 10px !important;
    cursor: pointer;
}

/* Mobile: stack the per-page selector above the pager so it doesn't overflow */
@media (max-width: 575.98px) {
    .custom-pagination.custom-pagination--inline {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    .custom-pagination.custom-pagination--inline .show-per-page,
    .custom-pagination.custom-pagination--inline .pagination-area {
        flex-wrap: wrap;
    }
}

/* Add-more button on mobile stays centered (override the desktop left-align) */
@media (max-width: 767.98px) {
    .add-more-container {
        text-align: center;
    }
}

/* Per-page selector (Question Preview pagination) — give the custom-select
   wrapper enough width so the value "07" and the dropdown arrow don't overlap.
   The .no-search class on the original <select> is copied onto the wrapper by
   the customSelect() initialiser, hiding the search input inside the dropdown. */
.qp-per-page+.custom-select,
.custom-select.qp-per-page {
    min-width: 70px !important;
    width: 70px !important;
}

.qp-per-page+.custom-select .current,
.custom-select.qp-per-page .current {
    padding-right: 24px;
}

/* ===== Exam Show Page Revamp ===== */

/* Exam Show Page Revamp */
:root {
    --brand-blue: #2a8bc9;
}

.nav-tabs-custom {
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 25px;
    display: flex;
    gap: 5px;
}

.nav-tabs-custom .nav-link {
    border: none;
    color: #64748b;
    font-weight: 500;
    padding: 12px 25px;
    position: relative;
    background: #f1f5f9;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
}

.nav-tabs-custom .nav-link.active {
    color: #fff;
    background: var(--brand-blue);
}

.details-info-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
    overflow: hidden;
}

.details-card-header {
    background: var(--brand-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 20px;
}

.review-stats-container {
    border: 1px solid var(--brand-blue);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    width: 100%;
    background: #fff;
    margin-bottom: 25px;
}

.review-stat-col {
    flex: 1;
    padding: 25px 15px;
    text-align: center;
    border-right: 1px solid #f1f5f9;
}

.review-stat-col:last-child {
    border-right: none;
}

.review-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin-bottom: 2px;
}

.review-stat-label {
    font-size: 13px;
    color: var(--brand-blue);
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .review-stats-container {
        flex-direction: row !important;
    }

    .review-stat-col {
        border-right: 1px solid #f1f5f9 !important;
        border-bottom: none !important;
        padding: 10px 5px !important;
    }

    .review-stat-col:last-child {
        border-right: none !important;
    }

    .review-stat-num {
        font-size: 18px !important;
    }

    .review-stat-label {
        font-size: 10px !important;
        line-height: 1.2;
    }

    /* Mobile: left spacing for right-column icons */
    .review-icon-right {
        margin-left: 0 !important;
    }

    /* Mobile: remove inner borders inside review Exam Info cards */
    .details-info-card .row.g-0 {
        border-bottom: none !important;
    }

    .score-field-mobile-full {
        width: 100% !important;
    }

    .details-info-card [class*="col-"] {
        border-right: none !important;
        border-bottom: none !important;
    }

    .stat-label {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }
}

.questions-stat-wrapper {
    width: 100%;
    max-width: 677px;
    height: 80px;
    background: #f9f9f9;
    border: 1px solid #f4f4f4;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    box-sizing: border-box;
}

.questions-stat-box {
    flex: 1;
    height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 18px 14px 18px;
    border-right: 1px solid #eaeaea;
    box-sizing: border-box;
    background: #fff;
    border-radius: 4px;
}

.questions-stat-box:last-child {
    border-right: none;
}

.questions-stat-box .val {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    line-height: 1;
}

.questions-stat-box .lbl {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    line-height: 1;
}

@media (max-width: 767.98px) {
    .questions-stat-wrapper {
        height: auto;
        padding: 4px;
        overflow-x: auto;
    }

    .questions-stat-box {
        height: auto;
        padding: 10px 8px;
        border-right: 1px solid #eaeaea;
        border-bottom: none;
        gap: 5px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .questions-stat-box:last-child {
        border-right: none;
    }

    .questions-stat-box .val {
        font-size: 18px;
    }

    .questions-stat-box .lbl {
        font-size: 11px;
        line-height: 1.3 !important;
    }

    .mobile-no-box {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}

.valuation-stat-wrapper {
    width: 100%;
    max-width: 677px;
    background: #f9f9f9;
    border: 1px solid #f4f4f4;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    box-sizing: border-box;
}

.valuation-stat-box {
    flex: 1;
    height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 18px;
    border-right: 1px solid #eaeaea;
    background: #fff;
    border-radius: 4px;
}

.valuation-stat-box:last-child {
    border-right: none;
}

.valuation-stat-box .val {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    line-height: 1;
}

.valuation-stat-box .lbl {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    line-height: 1;
}

@media (max-width: 767.98px) {
    .valuation-stat-wrapper {
        flex-wrap: wrap;
    }

    .valuation-stat-box {
        flex: 1 1 calc(50% - 2px);
        min-width: calc(50% - 2px);
    }

    .valuation-stat-box:nth-child(2) {
        border-right: none;
    }

    .valuation-stat-box:nth-child(1),
    .valuation-stat-box:nth-child(2) {
        border-bottom: 1px solid #eaeaea;
    }
}

.nav-tabs-container {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 4px;
    width: 100%;
    max-width: 707px;
    height: 42px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    margin: 0;
    border: 1px solid #eeeeee;
    box-sizing: border-box;
    overflow: hidden;
}

.nav-tabs-container .nav-link {
    flex: 1;
    height: 34px;
    border: none;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    padding: 0 10px;
    background: transparent;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
}

.nav-tabs-container .nav-link:hover {
    color: var(--brand-blue);
}

.nav-tabs-container .nav-link.active {
    color: #fff;
    background: #2a8bc9;
}

@media (max-width: 767.98px) {
    .nav-tabs-container .nav-link {
        padding: 0 2px;
        font-size: 12px;
    }
}

.content-aligned {
    padding-left: 40px !important;
    padding-right: 40px !important;
    overflow-x: hidden;
}

/* Question Navigator Grid for this page */
@media (min-width: 992px) {
    .q-nav-grid {
        width: 226px;
        height: auto;
        min-height: 500px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
        row-gap: 15px;
        column-gap: 15px;
        justify-content: center;
        align-content: flex-start;
        justify-items: center;
        align-items: center;
        background: #f9f9f9;
        border: 1px solid #d9d9d9;
        border-radius: 20px;
        padding: 20px;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Mobile/Default view for nodes */
@media (max-width: 991.98px) {
    .q-nav-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: auto !important;
        height: auto !important;
        min-height: auto !important;
        gap: 8px;
        justify-content: flex-start;
        background: transparent;
        border: none;
        padding: 0;
    }
}

.q-nav-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: #fff;
    transition: all 0.2s;
    text-decoration: none !important;
}

@media (max-width: 991.98px) {
    .q-nav-circle {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
        font-size: 11px !important;
    }
}

.q-nav-circle.active {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
}

@media (max-width: 767.98px) {
    .content-aligned {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Location Module Scoped Styles */
.location-module-page .red-header,
.location-module-page .table-1 {
    max-width: 1173px;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

.location-module-page .table-1 {
    border: none !important;
}

.location-module-page .table-action-list li a img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.location-module-page .btn-primary {
    width: 108px;
    height: 34px;
    background-color: #22b058 !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 9px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
}

.location-module-page .btn-primary:hover {
    background-color: #1a8a44 !important;
}

/* Fix mobile search input and search button overflow on Location module components */
@media (max-width: 767.98px) {
    .location-module-page .custom-search-input {
        min-width: 0 !important;
        width: auto !important;
        flex: 1 !important;
        max-width: none !important;
    }
}

@media (max-width: 767.98px) {
    .location-module-page .table-header-item.d-flex.justify-content-end {
        align-items: flex-end !important;
    }
}

.location-module-page .table-1 .table-header {
    padding: 14px 12px !important;
}

@media (max-width: 767.98px) {
    .location-module-page .table-search {
        width: 100% !important;
        max-width: none !important;
    }

    .location-module-page .table-search input {
        flex: 1 !important;
    }
}

@media (max-width: 767.98px) {

    .location-module-page .table-header-item,
    .location-module-page .table-header-item form,
    .location-module-page .table-search {
        width: 100% !important;
    }
}

@media (max-width: 767.98px) {

    .location-module-page .table-header-item,
    .location-module-page .table-header-item form,
    .location-module-page .table-search {
        width: 100% !important;
        max-width: none !important;
    }

    .location-module-page .table-search input {
        flex: 1 !important;
    }
}

@media (max-width: 767.98px) {
    .location-module-page .table-header-item {
        align-items: stretch !important;
    }
}

@media (max-width: 767.98px) {
    .date-filter button {
        text-align: left !important;
        height: auto !important;
        min-height: 34px !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .date-filter button span {
        text-align: left !important;
        display: inline-block !important;
        line-height: 1.2 !important;
    }
}

.cert-apply-link {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 14px !important;
    text-decoration: underline !important;
    color: #2A8BC9 !important;
}

/* Student Exam Detail Page Scoped Styles */
.student-exam-detail-page .valuation-stat-wrapper {
    width: 100%;
    background: #F9F9F9;
    border: 1px solid #F4F4F4;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    box-sizing: border-box;
}

.student-exam-detail-page .valuation-stat-box {
    flex: 1;
    height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 18px;
    border-right: 1px solid #EAEAEA;
    background: #fff;
    border-radius: 4px;
}

.student-exam-detail-page .valuation-stat-box:last-child {
    border-right: none;
}

.student-exam-detail-page .valuation-stat-box .val {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    line-height: 1;
}

.student-exam-detail-page .valuation-stat-box .lbl {
    font-size: 12px;
    color: #64748B;
    font-weight: 500;
    line-height: 1;
}

@media (max-width: 767.98px) {
    .student-exam-detail-page .valuation-stat-wrapper {
        flex-wrap: wrap;
    }

    .student-exam-detail-page .valuation-stat-box {
        flex: 1 1 calc(50% - 2px);
        min-width: calc(50% - 2px);
    }

    .student-exam-detail-page .valuation-stat-box:nth-child(2) {
        border-right: none;
    }

    .student-exam-detail-page .valuation-stat-box:nth-child(1),
    .student-exam-detail-page .valuation-stat-box:nth-child(2) {
        border-bottom: 1px solid #EAEAEA;
    }
}

/* Question Navigator Grid */
.student-exam-detail-page .q-nav-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-content: center;
    background: #F9F9F9;
    border: 1px solid #D9D9D9;
    border-radius: 20px;
    padding: 20px;
    max-height: 420px;
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .student-exam-detail-page .q-nav-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: auto !important;
        height: auto !important;
        min-height: auto !important;
        gap: 8px;
        background: transparent;
        border: none;
        padding: 0;
        max-height: none;
    }
}

.student-exam-detail-page .q-nav-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    background: #fff;
    transition: all 0.2s;
    cursor: pointer;
}


@media (max-width: 991.98px) {
    .student-exam-detail-page .q-nav-circle {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
        font-size: 11px !important;
    }
}

.student-exam-detail-page .q-nav-circle.correct {
    background: #10B981 !important;
    color: #fff !important;
    border-color: #10B981 !important;
}

.student-exam-detail-page .q-nav-circle.wrong {
    border: 1px solid #EF4444 !important;
    color: #EF4444 !important;
    background: #fff !important;
}

.student-exam-detail-page .q-nav-circle:hover {
    opacity: 0.8;
}

/* Student Show Detail Page Scoped Styles */
.student-show-detail-page .cert-apply {
    color: #0d6efd;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.student-show-detail-page .cert-not-ready {
    color: #6c757d;
}

.student-show-detail-page .table .thead-tr div>span:first-child {
    width: 30% !important;
}

.student-show-detail-page .table tbody .expand-header span:first-child {
    width: 110px !important;
}

/* Modal Close Button Custom Styling */
.modal-content .btn-close {
    width: 18px !important;
    height: 18px !important;
    border-radius: 6px !important;
    padding: 8px !important;
    position: absolute !important;
    top: 15px !important;
    right: 16px !important;
    z-index: 1055 !important;
    opacity: 1 !important;
    transition: all 0.2s;
}

.modal-content .btn-close:hover {
    border-color: #ddd !important;
}

/* Settings Module Specific Header Divider */
#settings-module-header-divider {
    max-width: 1173px;
    margin: 0 auto;
    width: 100%;
}

#settings-module-header-divider .divider-line {
    width: 100%;
    height: 0px;
    border-top: 1px solid #8E919840;
    opacity: 1;
}

/* Delete Question Modal Close Button - Transparent Override */
#deleteModal .modal-content .btn-close,
#deleteQuestionModal .modal-content .btn-close {
    border: none !important;
    box-shadow: none !important;
}

#deleteModal .modal-content .btn-close:hover,
#deleteQuestionModal .modal-content .btn-close:hover {
    background-color: transparent !important;
    opacity: 0.8 !important;
}

/* Exam Creation - remove background and border from q-nav-grid */
.question-editor-wrapper .q-nav-grid {
    background: transparent !important;
}

/* --- Exam Review Page Styles --- */
.exam-review-page .btn-back-custom {
    width: 53px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    padding: 11px 12px;
    box-sizing: border-box;
}

.exam-review-page .btn-back-custom:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #000;
}

.exam-review-page .btn-cancel {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0 12px;
    box-sizing: border-box;
}

.exam-review-page .btn-cancel:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #000;
}

.exam-review-page .btn-draft,
.exam-review-page .btn-publish {
    height: 36px;
    padding: 0 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
}

.exam-review-page .btn-draft {
    border: 1.5px solid #10B981;
    background: #fff;
    color: #10B981;
}

.exam-review-page .btn-publish {
    background: #10B981;
    color: #fff;
    border: none;
}

.exam-review-page .review-stats-outer {
    max-width: 677px;
    height: 80px;
    border-radius: 6px;
    border: 1px solid #F4F4F4;
    background: #F9F9F9;
    padding: 4px;
    display: flex;
    gap: 4px;
    align-items: stretch;
}

.exam-review-page .review-stats-container {
    border: 1px solid #2A8BC9;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    width: 100%;
    height: 100%;
    background: #fff;
}

.exam-review-page .review-stat-col {
    background-color: white;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 15px;
    text-align: left;
    border-right: 1px solid #F1F5F9;
}

.exam-review-page .review-stat-col:last-child {
    border-right: none;
}

.exam-review-page .review-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin-bottom: 2px;
}

.exam-review-page .review-stat-label {
    font-size: 13px;
    color: #2A8BC9;
    font-weight: 400;
}

.exam-review-page .step-3-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .exam-review-page .step-3-wrapper {
        padding: 0;
    }
}

@media (max-width: 767.98px) {

    .exam-review-page .review-stats-outer {
        height: 80px !important;
    }

    .exam-review-page .review-stats-container {
        flex-direction: row !important;
        flex: 1;
    }

    .exam-review-page .review-stat-col {
        border-right: 1px solid #F1F5F9 !important;
        border-bottom: none !important;
        padding: 10px 5px !important;
        text-align: start !important;
    }

    .exam-review-page .review-stat-col:last-child {
        border-right: none !important;
    }

    .exam-review-page .review-stat-num {
        font-size: 18px !important;
    }

    .exam-review-page .review-stat-label {
        font-size: 10px !important;
        line-height: 1.2;
    }

    .exam-review-page .btn-draft,
    .exam-review-page .btn-publish {
        height: 34px !important;
        padding: 0 14px !important;
        font-size: 13px !important;
    }

    .exam-review-page .btn-back-custom {
        width: 66px !important;
        height: 34px !important;
        padding: 0 !important;
        font-size: 14px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        border: 1px solid #E2E8F0 !important;
        border-radius: 6px !important;
    }
}

.exam-review-page .border-right-desktop {
    border-right: 1px solid #F1F5F9;
}

@media (max-width: 767.98px) {
    .exam-review-page .border-right-desktop {
        border-right: none !important;
        border-bottom: 1px solid #F1F5F9;
    }

    .exam-review-page .step-3-wrapper a {
        word-break: break-all;
    }
}

/* Prevent layout breakage by keeping validation errors on a single line for the Exam Forms */
#exam-create-form .invalid-feedback,
#exam-edit-form .invalid-feedback {
    white-space: normal !important;
    font-size: 11px !important;
}

/* Reduce academy center list icon size on mobile */
@media (max-width: 767.98px) {
    .academy-center-icon-outer {
        width: 32px !important;
        height: 32px !important;
    }

    .academy-center-icon-img {
        width: 28px !important;
        height: 28px !important;
    }
}

/* Sidebar close icon and logout icon size 40px */
.side-bar-close,
.open-menu .side-bar-close,
.expand-menu .side-bar-close,
body.tablet.open-menu .side-bar .side-bar-close,
body.desktop.expand-menu .side-bar .side-bar-close {
    width: 42px !important;
    height: 42px !important;
    background-size: 42px !important;
}

.side-bar-footer img {
    width: 40px !important;
    height: 40px !important;
}

/* Sidebar submenu active item highlight style */
.sidebar-submenu li.active .dropdown-item,
.sidebar-submenu .active .dropdown-item,
.side-bar .side-menu .dropdown-menu .active .dropdown-item,
.side-bar-wrapper .sidebar-submenu li.active a.dropdown-item {
    color: #2A8BC9 !important;
    font-weight: 600 !important;
    background-color: rgba(42, 139, 201, 0.1) !important;
    border-radius: 8px !important;
}

.sidebar-submenu li.active .dropdown-item::before,
.sidebar-submenu .active .dropdown-item::before,
.side-bar .side-menu .dropdown-menu .active .dropdown-item::before {
    background-color: #2A8BC9 !important;
}

/* Valuation List page-specific mobile search and filter layout */
@media (max-width: 767.98px) {
    #valuation-list #filter-form {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #valuation-list #filter-form .custom-search-input {
        max-width: 100% !important;
        width: 100% !important;
    }

    #valuation-list .filter-dropdowns-group {
        display: flex !important;
        gap: 8px !important;
        width: 100% !important;
    }

    #valuation-list .filter-dropdowns-group select {
        flex: 1 !important;
        min-width: 0 !important;
    }
}

/* Academy Dashboard statcard mobile adjustments to keep labels in a single line */
@media (max-width: 767.98px) {
    .card-tile-item-2 {
        min-height: auto !important;
        padding-bottom: 12px !important;
    }

    .card-tile-item-2 .card-tile-body {
        padding: 12px 6px !important;
    }

    .card-tile-item-2 p {
        white-space: nowrap !important;
        font-size: 11px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .card-tile-item-2 h2 {
        font-size: 24px !important;
    }

    .card-tile-item-2 .card-tile-icon img {
        width: 32px !important;
    }
}