/* --- Assessment Details Styles: (Moved from assessment-details.html inline <style>) --- */
.answer-feedback {
    display: inline-block;
    /*width: 20px;*/
    height: 20px;
    vertical-align: middle;
    margin-left: 5px;
}

.answer-feedback svg {
    width: 18px;
    height: 18px;
}

.answer-success {
    color: var(--success-green);
}

.answer-error {
    color: var(--error-red);
}

.ctrl-desc-btn {
    background: none;
    border: none;
    padding: 0 2px;
    cursor: pointer;
    vertical-align: middle;
}

.ctrl-desc-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--primary-blue);
    filter: drop-shadow(0 0 4px rgba(34, 116, 165, 0.22));
    transition: fill 0.2s;
}

.ctrl-desc-btn:hover svg {
    fill: var(--accent-orange);
}

.ctrl-desc-tooltip {
    display: none;
    position: relative;
    left: 0;
    z-index: 20;
    max-width: 100%;
    background: linear-gradient(94deg, var(--modal-beige1) 90%, var(--modal-beige2) 100%);
    color: var(--text-main);
    border: 1.5px solid var(--modal-beige3);
    box-shadow: 0 6px 24px rgba(255, 205, 58, 0.25), 0 1.5px 0px 1.5px var(--modal-beige4);
    padding: 0.7em 1em;
    border-radius: 10px;
    font-size: 0.96em;
    margin-top: 0.25em;
    animation: fadeInDesc 0.23s;
}

@keyframes fadeInDesc {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.ctrl-desc-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.ctrl-reference {
    font-size: 0.82em;
    color: var(--gray-888, #888);
    margin-top: 0.2em;
}

.catalog-headline-banner {
    padding: 0.8em 1.2em;
    margin-bottom: 1em;
    font-size: 1.08em;
    font-weight: 600;
    color: var(--primary, #2274A5);
    border-left: 4px solid var(--primary, #2274A5);
    background: var(--card-bg, #fff);
}

.taken-over {
    background: var(--taken-over-bg) !important;
    color: var(--gray-888) !important;
}

.taken-over-label {
    color: var(--label-gold);
    font-size: 0.92em;
    margin-left: 8px;
}

/* ---- End Assessment Details Styles ---- */

/* Flex row for control actions in controls-table - Consolidated Layout */
.control-actions-flex-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

/* Guide, Answer, and Override controls row */
.answering-guide-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.answering-guide-row .answering-guide-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.25em 0.6em;
    font-size: 0.9em;
}

/* Dropdown and feedback row */
.dropdown-row {
    display: flex;
    flex-direction: baseline;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: nowrap;
}

.dropdown-row select {
    flex: 1;
    min-width: 160px;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.32em 0.78em;
}

.dropdown-row .answer-feedback {
    flex-shrink: 0;
}

/* Taken-over label row */
.takenOver-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    padding: 0.2em 0;
    flex: 1;
}

.takenOver-row .taken-over-label {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    display: inline;
    line-height: 1.4;
}

/* Override slider row */
.override-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    flex-shrink: 0;
}

.override-slider-row .override-slider-label {
    flex-shrink: 0;
}

/* Comment textarea row */
.testarea-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.comment-textarea {
    flex: 1;
    width: 100%;
    max-width: 100%;
    height: 6em;
    resize: vertical;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .control-actions-flex-row {
        gap: 10px;
    }

    .comment-textarea {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .answering-guide-btn {
        padding: 0.2em 0.5em;
        font-size: 0.85em;
    }

    .dropdown-row {
        gap: 8px;
    }

    .comment-textarea {
        min-width: 120px;
        height: 28px;
        font-size: 0.9em;
    }
}

/* Modal Launch Buttons Row for Assessment Details */
.choose-buttons-row {
    display: flex;
    gap: 0.9em;
    margin-bottom: 2em;
}

/* .modal-launch-btn styling is in BUTTON VARIANTS section */

/* ----- START: Collapsible/Domain/Card Styles ---- */
.domain-outline {
    border: 2px solid var(--primary-blue);
    border-radius: 9px;
    margin-bottom: 0.5em;
    background: linear-gradient(94deg, var(--table-bg1) 94%, var(--table-bg2) 100%);
}

.domain-header {
    cursor: pointer;
    font-weight: bold;
    background: linear-gradient(90deg, var(--table-bg3) 89%, var(--table-bg4) 100%);
    border-radius: 9px 9px 0 0;
    padding: 1.1em 1.2em;
    font-size: 1.22em;
    display: flex;
    align-items: baseline;
    gap: 1.1em;
    box-shadow: 0 4px 18px rgba(34, 116, 165, 0.08);
}

.domain-header .domain-title {
    font-weight: bold;
    color: var(--primary-blue-dark);
    font-size: 1.02em;
}

.domain-header .domain-desc {
    font-weight: normal;
    color: var(--gray-777);
    display: flex;
}

.domain-collapsible .domain-controls {
    padding: 1em 1.2em 0 1.2em;
}

.ctrl-section-headline {
    color: var(--primary-blue-dark);
    font-size: 1.08em;
    margin-top: 0.7em;
    margin-bottom: 0.8em;
    letter-spacing: 0.02em;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(34, 116, 165, 0.10);
    background: none;
    border: none;
    padding-left: 0;
}

/* ----------- Added for Control Name Column ----------- */
.ctrl-name-col {
    width: 40%;
    min-width: 210px;
    max-width: 700px;
}

@media (max-width: 600px) {
    .ctrl-name-col {
        width: 99vw !important;
        min-width: 120px !important;
        max-width: 99vw !important;
    }
}

/* ----- END: Collapsible/Domain/Card Styles ---- */

.domain-checkmark svg {
    vertical-align: middle;
}

body {
    font-family: var(--nav-font-family, 'Segoe UI', Arial, sans-serif);
    background-color: var(--background-light);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    font-size: 0.76em;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.3s;
}

a:hover,
a:focus {
    color: var(--accent-orange);
    text-shadow: 0 0 8px var(--shine-highlight), 0 2px 3px rgba(255, 149, 5, 0.14);
}



header,
footer {
    background: linear-gradient(92deg, var(--primary-blue) 80%, var(--header-grad-highlight) 104%);
    color: #fff;
    padding: 1.2rem 1.3rem;
    text-align: center;
    box-shadow: 0 6px 24px 0 rgba(87, 203, 250, 0.14);
    position: relative;
    overflow: hidden;
}

header::after,
footer::after {
    content: '';
    position: absolute;
    left: -20%;
    top: -50%;
    width: 140%;
    height: 100%;
    background: linear-gradient(115deg, var(--shine-glare) 6%, transparent 72%);
    opacity: 0.22;
    pointer-events: none;
    filter: blur(6px);
}

main {
    max-width: 830px;
    margin: 1.1rem auto;
    background: linear-gradient(138deg, #fff 83%, var(--table-bg2) 99%);
    padding: 1.2rem 1rem;
    border-radius: 9px;
    box-shadow: 0 3px 12px rgba(34, 116, 165, 0.10);
    border: 1px solid var(--border);
    position: relative;
}

main::before {
    content: '';
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    right: 0.7rem;
    height: 9px;
    background: linear-gradient(90deg, var(--shine-glare) 0%, transparent 88%);
    opacity: 0.30;
    border-radius: 8px;
    pointer-events: none;
}

h1,
h2,
h3,
h4 {
    color: var(--primary-blue-dark);
    margin-top: 0.5em;
    margin-bottom: 0.6em;
    font-size: 1em;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(34, 116, 165, 0.10);
}

h1 {
    font-size: 1.68em;
}

h2 {
    font-size: 1.28em;
}

h3 {
    font-size: 1.08em;
}

h4 {
    font-size: 1em;
}

.page-title {
    font-size: 2em;
    color: var(--primary-blue-dark);
    text-align: left;
    font-weight: 520;
    letter-spacing: 0.01em;
    margin: 0 0 0.95em 0;
    padding-bottom: 0.14em;
    border-bottom: 1.5px solid var(--border);
    background: none;
    box-shadow: none;
    text-shadow: 0 4px 20px rgba(34, 116, 165, 0.09);
}

button,
input[type=submit],
.btn {
    background: linear-gradient(89deg, var(--primary-blue) 86%, var(--accent-orange) 100%);
    color: #fff;
    border: none;
    padding: 0.19em 0.68em;
    font-size: 0.86em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.22s, filter 0.2s;
    min-height: 22px;
    position: relative;
    box-shadow: 0 2px 8px rgba(83, 190, 255, 0.17), 0 0 3px var(--shine-glare) inset;
    font-weight: 470;
    font-family: inherit;
}

button:hover,
input[type=submit]:hover,
.btn:hover {
    background: linear-gradient(92deg, var(--accent-orange) 68%, var(--yellow-highlight) 99%);
    box-shadow: 0 3px 14px rgba(255, 149, 5, 0.22), 0 0 7px var(--shine-glare) inset;
    filter: brightness(1.04);
}

button::before,
.btn::before,
input[type=submit]::before {
    content: '';
    position: absolute;
    left: 18%;
    top: 6%;
    width: 64%;
    height: 23%;
    background: linear-gradient(86deg, var(--shine-glare) 18%, transparent 99%);
    border-radius: 4px 4px 11px 11px;
    opacity: 0.35;
    pointer-events: none;
}

input,
textarea,
select {
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.32em 0.78em;
    font-size: 0.96em;
    background: #fff;
    transition: border 0.2s, box-shadow 0.15s;
    box-shadow: 0 0 6px 0 var(--shine-highlight) inset;
}

/* Tag suggestions styling */
.tag-suggestions {
    margin-top: 0.35em;
}

.tag-suggestions-label {
    display: block;
    font-size: 0.84em;
    color: var(--gray-777);
    margin-bottom: 0.25em;
}

.tag-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em;
}

.tag-pill {
    border-radius: 999px;
    padding: 0.18em 0.7em;
    border: 1px solid var(--primary-blue);
    background: #f3f8ff;
    color: var(--primary-blue-dark);
    font-size: 0.86em;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.08s;
    box-shadow: 0 1px 4px rgba(34, 116, 165, 0.15);
}

.tag-pill:hover,
.tag-pill:focus {
    background: linear-gradient(92deg, var(--accent-orange) 10%, var(--yellow-highlight) 96%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 149, 5, 0.35);
    outline: none;
}

.tag-pill:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 16px 0 var(--shine-highlight);
}

.table,
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.65em 0;
    font-size: 0.97em;
}

.table th,
.table td,
table th,
table td {
    padding: 0.47em 0.62em;
    border-bottom: 1px solid var(--border);
}

.table th,
table th {
    background: linear-gradient(93deg, var(--primary-blue) 60%, var(--table-bg5) 110%);
    color: #fff;
    font-size: 0.98em;
    text-shadow: 0 2px 8px var(--shine-highlight);
    letter-spacing: 0.01em;
}

.table tbody tr:hover,
table tbody tr:hover {
    background: linear-gradient(90deg, var(--table-hover1) 80%, var(--table-hover2) 100%);
    box-shadow: 0 2px 8px rgba(255, 223, 139, 0.06);
}

.alert {
    padding: 0.7em 1em;
    border-left: 5px solid var(--accent-orange);
    background: linear-gradient(90deg, var(--alert-bg1) 84%, var(--alert-bg2) 100%);
    color: var(--alert-color);
    border-radius: 4px;
    margin-bottom: 0.87em;
    box-shadow: 0 4px 13px rgba(255, 223, 139, 0.11);
    position: relative;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 9px;
    background: linear-gradient(90deg, var(--shine-glare) 0%, transparent 80%);
    opacity: 0.21;
}

/* --- Entity Edit Frame style --- */
.entity-edit-frame {
    border: 2px solid var(--primary-blue);
    background: linear-gradient(128deg, #eaf3fa 80%, white 100%);
    border-radius: 10px;
    padding: 1.14rem 1.2rem;
    margin: 1.4rem auto 1rem auto;
    max-width: 510px;
    box-shadow: 0 2px 12px 0 rgba(34, 116, 165, 0.10), 0 0px 0px 1.5px var(--primary-blue);
    position: relative;
}

.entity-edit-frame::before {
    content: '';
    position: absolute;
    left: 12%;
    top: 5%;
    width: 70%;
    height: 15%;
    background: linear-gradient(97deg, var(--shine-glare) 33%, transparent 95%);
    border-radius: 4px 4px 18px 28px;
    opacity: 0.23;
    pointer-events: none;
}

@media (max-width: 650px) {
    .entity-edit-frame {
        padding: 1rem 0.3rem;
        max-width: 98vw;
    }
}

/************** Navigation & Dropdown Styles **************/

.dropdown-content {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.20);
    z-index: 2000;
    min-width: 180px;
    border-radius: 5px;
    padding: 5px 0;
    margin-top: 5px;
}

.dropdown-content.open {
    display: flex;
    flex-direction: column;
}

.dropdown-content a .dropdown-menu-btn,
.dropdown-content a.dropdown-menu-btn {
    width: calc(100% - 20px);
    height: 36px;
    margin: 2px 10px;
    border-radius: 3px;
    background: #f6faff;
    border: 1px solid #eeeeee;
    color: var(--primary-blue);
    transition: background .15s;
    font-size: var(--font-size-nav, 0.93em);
    cursor: pointer;
    text-align: left;
    padding-left: 10px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-content a .dropdown-menu-btn:hover,
.dropdown-content a.dropdown-menu-btn:hover {
    background: #d1e7f8;
    color: #185a89;
}

.nav-row,
.main-navigation,
.landing-main {
    overflow: visible !important;
}



.secondary-nav {
    display: flex;
    flex-direction: row;
    gap: 1em;
    align-items: center;
    margin-bottom: 1.2em;
    margin-top: 0;
    position: sticky;
    top: 56px;
    /* height of the main-navigation bar */
    z-index: 9998;
    /* right below navigation */
    background: #f8fbfd;
    border-bottom: 1px solid #e3e9ef;
    min-height: 52px;
    padding: 0.7em 0.8em 0.7em 0.8em;
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.07);
}

/* .btn-secondary is defined globally in BUTTON VARIANTS section */
.secondary-nav .btn-nav {
    min-width: 120px;
    height: 32px;
    font-size: var(--font-size-btn, 0.85em);
    padding: 0 16px;
    border-radius: 4px;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    background: #eaf3fa;
    transition: background 0.15s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

.secondary-nav .btn-nav:hover {
    background: #d1e7f8;
    color: var(--primary-blue-dark);
    border-color: #185a89;
}

/************** Sticky Navigation  **************/
.main-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: linear-gradient(135deg, #eee7ff 0%, var(--nav-violet) 78%, #f6e9ff 100%);
    box-shadow: 0 3px 18px 0 rgba(140, 55, 255, 0.09), 0 0.5px 0px 1.5px #d6c7f5;
    border-radius: 0 0 15px 15px;
    font-size: 0.98em;
    min-height: 56px;
    margin-bottom: 0;
}

.main-navigation::before {
    content: '';
    position: absolute;
    left: -30%;
    top: -45%;
    width: 150%;
    height: 180%;
    pointer-events: none;
    background: radial-gradient(circle at 65% 30%, var(--shine-glare) 0%, rgba(255, 255, 255, 0.17) 38%, rgba(238, 231, 255, 0.04) 100%);
    opacity: 0.66;
    filter: blur(2px);
}

@media (max-width: 600px) {

    .landing-entries,
    .landing-entry,
    .main-navigation table {
        width: 100%;
        max-width: 100%;
        align-items: stretch;
    }

    .landing-entry button,
    .main-navigation button {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 0.97em !important;
    }

    .main-navigation {
        border-radius: 7px;
        padding: 0.22rem;
    }
}

/* --- Additional Existing Styles Not Directly Related to Navigation --- */
.landing-main {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem !important;
}

.landing-image {
    flex: 0 0 auto;
}

.landing-image img {
    /*max-width: 20em !important;*/
    filter: drop-shadow(0 2px 16px rgba(255, 255, 255, 0.15));
}

.ci-logo-img {
    max-width: 88px;
    height: auto;
    display: block;
    margin: 9px 10px 10px 5px;
    box-shadow: 0 5px 16px 0 rgba(34, 116, 165, 0.15), 0 1.2px 2px 0 rgba(30, 70, 100, 0.05);
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    border: 1.5px solid #e2f1fe;
}

.ci-headline {
    display: inline-block;
    font-family: 'Segoe UI', Arial, sans-serif;
    text-transform: lowercase;
    letter-spacing: 0.07em;
    font-size: 1.5rem;
    color: var(--primary-blue);
    text-shadow: 0 2px 12px rgba(34, 116, 165, 0.15), 0 1px 10px var(--shine-highlight);
    font-weight: 400;
    vertical-align: middle;
}

.table.landing-table,
.landing-table {
    width: auto;
}

.table.landing-table td,
.landing-table td {
    padding: 0.10em 0.4em !important;
}

.entry-icon svg {
    width: 17px !important;
    height: 17px !important;
    filter: drop-shadow(0 0 6px var(--shine-glare));
}



/*********** Assessment Details Scrollable Controls Table ***********/
.controls-scroll-wrapper {
    max-height: 44vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    margin-bottom: 0.8em;
    box-shadow: 0 1px 8px rgba(34, 116, 165, 0.06);
}

.action-buttons-flex {
    display: flex;
    gap: 1em;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

@media (max-width: 600px) {
    .action-buttons-flex {
        flex-direction: column;
        gap: .6em;
        align-items: stretch;
    }
}

.domain-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
}

.domain-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* ——— Styled Actions Panel for Assessment Details ——— */
.actions-panel {
    border: 2px solid var(--primary-blue);
    background: linear-gradient(135deg, #fafdff 86%, #e6f2fe 99%);
    border-radius: 10px;
    box-shadow: 0 3px 12px 0 rgba(34, 116, 165, 0.08), 0 0px 0px 1.5px var(--primary-blue);
    padding: 0.25em 0.25em 0.25em 0.25em;
    margin: 2.3em auto 1em auto;
    min-width: 320px;
    display: flex;
    gap: 0.1em;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.actions-panel .btn-nav,
.actions-panel button[type='submit'],
.actions-panel button,
.actions-panel form button {
    min-width: 170px;
    min-height: 36px;
    font-size: 1em;
    margin-top: 0.45em;
    margin-bottom: 0.45em;
    box-sizing: border-box;
}

.actions-panel #create-url-feedback {
    min-width: 110px;
    display: inline-block;
}

.actions-panel .nav-back {
    margin-left: auto;
}

@media (max-width: 699px) {
    .actions-panel {
        flex-direction: column;
        align-items: stretch;
        padding: 0.9em 0.45em 0.8em 0.45em;
        min-width: 0;
    }

    .actions-panel .btn-nav,
    .actions-panel button[type='submit'],
    .actions-panel button,
    .actions-panel form button {
        width: 100%;
        min-width: 0;
        margin-top: 0.2em;
        margin-bottom: 0.2em;
    }

    .actions-panel .nav-back {
        margin-left: 0;
        margin-top: 0.9em;
        text-align: center;
    }
}

/* ————— Progress Popup Styles ————— */
.progress-popup {
    min-width: 450px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.progress-popup h3 {
    margin: 0 0 0.5em 0;
    font-size: 1.2em;
    color: var(--primary-blue-dark);
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

.progress-bar-bg {
    width: 100%;
    height: 28px;
    background: #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) inset;
    border: 1px solid #d0d0d0;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 50%, #3d8b40 100%);
    border-radius: 14px;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5) inset;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
    border-radius: 14px;
}

.progress-text {
    text-align: center;
    font-weight: bold;
    color: var(--primary-blue-dark);
    font-size: 1em;
}

.progress-status {
    text-align: center;
    color: var(--gray-777);
    font-size: 0.95em;
    min-height: 1.5em;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@media (max-width: 600px) {
    .progress-popup {
        min-width: 85vw;
        min-height: auto;
    }
}

/* ————— Override Slider Styles ————— */
.override-slider-row {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.override-slider-label {
    position: relative;
    display: inline-block;
    cursor: pointer;
    user-select: none;
}

.override-slider-checkbox {
    display: none;
}

.override-slider {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    background-color: #ccc;
    border-radius: 34px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.override-slider::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: left 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.override-slider-checkbox:checked+.override-slider {
    background-color: #4CAF50;
}

.override-slider-checkbox:checked+.override-slider::after {
    left: 29px;
}

.override-slider-label:hover .override-slider {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.override-slider-checkbox:checked+.override-slider {
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.override-slider-checkbox:checked+.override-slider:hover {
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.5);
}

.override-slider-label:active .override-slider {
    transform: scale(1.05);
}

.override-slider-label:active .override-slider::after {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ————— Filter Bar Sticky Styles ————— */
.sticky-filter-bar {
    position: fixed;
    top: 56px;
    /* Below main navigation */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9998;
    background: linear-gradient(90deg, #f8fbfd 0%, #f3f9fd 100%);
    border-bottom: 2px solid var(--primary-blue);
    box-shadow: 0 4px 12px rgba(34, 116, 165, 0.12);
    padding: 0.9em 1.2em;
    display: flex;
    gap: 2em;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.controls-filter-bar.sticky-filter-bar .filter-section {
    display: flex;
    gap: 1.5em;
    align-items: center;
    flex-wrap: wrap;
}

.controls-filter-bar.sticky-filter-bar .filter-item {
    display: flex;
    align-items: center;
    gap: 0.6em;
}

.controls-filter-bar.sticky-filter-bar .filter-item label {
    font-weight: 500;
    color: var(--primary-blue-dark);
    font-size: 0.95em;
    white-space: nowrap;
    margin: 0;
}

.controls-filter-bar.sticky-filter-bar .filter-checkbox,
.controls-filter-bar.sticky-filter-bar .filter-select {
    padding: 0.35em 0.6em;
    font-size: 0.9em;
    border: 1.5px solid var(--primary-blue);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.controls-filter-bar.sticky-filter-bar .filter-select {
    min-width: 160px;
}

.controls-filter-bar.sticky-filter-bar .progress-section {
    display: flex;
    gap: 1.5em;
    align-items: center;
    flex-wrap: nowrap;
}

.controls-filter-bar.sticky-filter-bar .progress-info {
    display: flex;
    align-items: center;
    gap: 0.8em;
    min-width: 200px;
}

.controls-filter-bar.sticky-filter-bar .progress-label {
    font-weight: 500;
    color: var(--primary-blue-dark);
    font-size: 0.95em;
    white-space: nowrap;
}

.controls-filter-bar.sticky-filter-bar .progress-bar-container {
    width: 120px;
    height: 20px;
    background: #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d0d0d0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.controls-filter-bar.sticky-filter-bar .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.controls-filter-bar.sticky-filter-bar .progress-percentage {
    font-weight: 600;
    color: var(--primary-blue-dark);
    font-size: 0.9em;
    min-width: 35px;
    text-align: right;
}

.controls-filter-bar.sticky-filter-bar .answer-count-info {
    font-size: 0.9em;
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .sticky-filter-bar {
        flex-direction: column;
        gap: 1em;
        align-items: stretch;
    }

    .controls-filter-bar.sticky-filter-bar .filter-section,
    .controls-filter-bar.sticky-filter-bar .progress-section {
        flex-direction: column;
        align-items: stretch;
    }

    .controls-filter-bar.sticky-filter-bar .filter-item,
    .controls-filter-bar.sticky-filter-bar .progress-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .controls-filter-bar.sticky-filter-bar .progress-bar-container {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .sticky-filter-bar {
        top: 56px;
        padding: 0.7em 0.8em;
        gap: 0.8em;
    }

    .controls-filter-bar.sticky-filter-bar .filter-section {
        gap: 1em;
    }

    .controls-filter-bar.sticky-filter-bar .progress-section {
        gap: 1em;
    }

    .controls-filter-bar.sticky-filter-bar .progress-info {
        min-width: 100%;
    }

    .container {
        margin-top: calc(56px + 100px);
        /* Adjust for mobile */
    }
}


/* =========================================================
   UTILITY CLASSES
   ========================================================= */

/* Display */
.d-none {
    display: none;
}

.d-flex {
    display: flex;
}

.d-inline {
    display: inline;
}

.d-inline-block {
    display: inline-block;
}

.d-block {
    display: block;
}

.d-grid {
    display: grid;
}

/* Flex helpers */
.flex-row {
    flex-direction: row;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

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

.align-center {
    align-items: center;
}

.align-start {
    align-items: flex-start;
}

.align-end {
    align-items: flex-end;
}

.align-baseline {
    align-items: baseline;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

/* Gaps */
.gap-xs {
    gap: 0.25em;
}

.gap-sm {
    gap: 0.5em;
}

.gap-md {
    gap: 1em;
}

.gap-lg {
    gap: 1.5em;
}

.gap-xl {
    gap: 2em;
}

/* Compact form controls (small selects, inputs in filter bars and table cells) */
.tiny {
    font-size: var(--font-size-btn, 0.85em);
    padding: 0.15em 0.35em;
    height: auto;
    line-height: 1.4;
}

/* Margins */
.m-0 {
    margin: 0;
}

.mt-0 {
    margin-top: 0;
}

.mt-sm {
    margin-top: 0.5em;
}

.mt-md {
    margin-top: 1em;
}

.mt-lg {
    margin-top: 1.5em;
}

.mt-xl {
    margin-top: 2em;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-sm {
    margin-bottom: 0.5em;
}

.mb-md {
    margin-bottom: 1em;
}

.mb-lg {
    margin-bottom: 1.5em;
}

.mb-xl {
    margin-bottom: 2em;
}

.ml-auto {
    margin-left: auto;
}

.ml-sm {
    margin-left: 0.5em;
}

.ml-md {
    margin-left: 1em;
}

.mr-sm {
    margin-right: 0.5em;
}

.my-md {
    margin-top: 1em;
    margin-bottom: 1em;
}

.my-lg {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

/* Padding */
.p-0 {
    padding: 0;
}

.p-sm {
    padding: 0.5em;
}

.p-md {
    padding: 1em;
}

.p-lg {
    padding: 1.5em;
}

.px-md {
    padding-left: 1em;
    padding-right: 1em;
}

.py-sm {
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

.py-md {
    padding-top: 1em;
    padding-bottom: 1em;
}

/* Text */
.text-center {
    text-align: center;
}

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

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--gray-777);
}

.text-success {
    color: var(--success-green);
    font-weight: bold;
}

.text-danger {
    color: var(--error-red);
    font-weight: bold;
}

.text-bold {
    font-weight: bold;
}

.text-sm {
    font-size: 0.9em;
}

.text-xs {
    font-size: 0.85em;
}

.text-lg {
    font-size: 1.1em;
}

.text-nowrap {
    white-space: nowrap;
}

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Width */
.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Misc */
.inline-form {
    display: inline;
}

.no-results {
    text-align: center;
    padding: 2em;
    color: var(--gray-777);
}

.list-unstyled {
    list-style: none;
    padding: 0;
    margin: 0;
}

.border-bottom {
    border-bottom: 1px solid var(--border);
}

.rounded {
    border-radius: 4px;
}

.overflow-auto {
    overflow: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

.required-star {
    color: var(--error-red);
}

/* =========================================================
   NAV META CHIPS (user, role, version badges)
   ========================================================= */
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.meta-label {
    color: var(--background-light);
    background: var(--primary-blue-dark);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    white-space: nowrap;
}

.meta-value {
    color: var(--text-main);
    background: var(--shine-glare);
    padding: 2px 6px;
    border-radius: 3px;
}

/* =========================================================
   BUTTON VARIANTS (centralized)
   ========================================================= */
/* Shared base for all action/form buttons */
.btn-action,
.btn-submit,
.btn-edit,
.btn-cancel,
.btn-danger,
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    min-width: 5rem;
    padding: 0.3em 0.9em;
    font-size: var(--font-size-btn, 0.85em);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    box-sizing: border-box;
    line-height: 1.4;
    min-height: 1.5em;
}

.btn-action {
    background: linear-gradient(89deg, var(--primary-blue) 86%, var(--accent-orange) 100%);
    color: #fff;
    font-weight: 500;
}

.btn-action:hover {
    background: linear-gradient(92deg, var(--accent-orange) 68%, var(--yellow-highlight) 99%);
    color: var(--primary-blue-dark);
}

.btn-submit {
    background: linear-gradient(89deg, var(--primary-blue) 86%, var(--accent-orange) 100%);
    color: #fff;
    font-weight: 600;
    padding: 0.38em 1.1em;
    min-width: 90px;
}

.btn-submit:hover {
    background: linear-gradient(92deg, var(--accent-orange) 68%, var(--yellow-highlight) 99%);
    color: var(--primary-blue-dark);
}

.btn-edit {
    background: #eaf3fa;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.btn-edit:hover {
    background: var(--dropdown-bg-hover);
    color: var(--primary-blue-dark);
}

.btn-cancel {
    background: var(--secondary-color);
    color: #fff;
}

.btn-cancel:hover {
    background: var(--gray-777);
}

.btn-danger {
    background: linear-gradient(89deg, var(--error-red) 86%, #ff4444 100%);
    color: #fff;
}

.btn-danger:hover {
    background: var(--error-red);
    filter: brightness(0.88);
}

.btn-primary {
    background: var(--primary-blue);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 0.18em 0.55em;
    font-size: 0.82em;
     margin-bottom: 0.5em;
}
}

/* =========================================================
   FORM COMPONENTS (centralized)
   ========================================================= */
.form-group {
    margin-bottom: 1em;
}

.form-group label {
    display: block;
    margin-bottom: 0.4em;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95em;
}

.form-row {
    display: flex;
    gap: 1em;
    align-items: flex-start;
}

.form-error {
    color: var(--error-red);
    font-size: 0.9em;
    margin-top: 0.3em;
}

.form-hint {
    font-size: 0.85em;
    color: var(--gray-777);
    margin-top: 0.3em;
    font-style: italic;
}

/* =========================================================
   MODAL CONFIRMATION (small quick-question popups)
   ========================================================= */
.modal-popup-confirmation {
    background: var(--modal-beige1);
    border-radius: 10px;
    box-shadow: 0 1.5px 14px rgba(0, 0, 0, 0.15);
    padding: 2em;
    min-width: 320px;
    max-width: 500px;
    text-align: center;
    position: relative;
}

.modal-popup-confirmation h3 {
    margin-top: 0;
    color: var(--text-main);
}

.modal-popup-confirmation p {
    color: var(--gray-777);
    font-size: 0.95em;
    margin: 0.5em 0 1.5em 0;
}

/* =========================================================
   ALERT VARIANTS
   ========================================================= */
.alert-success {
    background-color: #e8f5e9;
    border-color: var(--success-green);
    color: #2e7d32;
}

.alert-error {
    background-color: #ffebee;
    border-color: var(--error-red);
    color: #c62828;
}

.alert-info {
    background-color: #e3f2fd;
    border-left-color: var(--primary-blue);
    color: #1565c0;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: var(--accent-orange);
    color: #856404;
}

/* =========================================================
   GENERAL BUTTON BAR
   ========================================================= */
.general-button-bar {
    display: flex;
    gap: 0.9em;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
}

/* =========================================================
   FIELDSET STYLING
   ========================================================= */
fieldset.config-fieldset {
    margin: 1em 0;
    border: 1px solid var(--border);
    padding: 0.8em 1.2em;
    border-radius: 7px;
}

fieldset.config-fieldset legend {
    font-size: 1em;
    color: var(--primary-blue-dark);
    font-weight: bold;
}

/* =========================================================
   INFO BOX
   ========================================================= */
.info-box {
    margin-top: 1.5em;
    padding: 1em;
    background: var(--modal-beige1);
    border-radius: 8px;
    border-left: 4px solid var(--primary-blue);
}

/* =========================================================
   BACK LINK
   ========================================================= */
.back-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

.back-link:hover {
    color: var(--accent-orange);
}


/* =================================================================
   LAYOUT & NAVIGATION STRUCTURE (merged from general.css)
   ================================================================= */
/* =========== MAIN LAYOUT STRUCTURE =========== */

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 1. FIXED NAVIGATION (always visible) */
.main-navigation {
    background: linear-gradient(135deg, var(--primary-blue) 2%, var(--accent-orange) 60%, var(--accent-orange) 120%) !important;
    height: 60px;
    min-height: 6em;
    max-height: 60px;
    padding: 0.15em 0.7em 0.13em 0.6em;
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.07);
    border-radius: 0 0 14px 14px;
    border: 1.5px solid var(--border);
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    width: 100%;
    flex-direction: column;
    flex-shrink: 0;
}

/* Page content wrapper - sits below fixed nav */
body::before {
    content: '';
    display: block;
    height: 60px;
    flex-shrink: 0;
    order: -1;
}

/* 2. STICKY FILTER BAR (below nav, sticky on scroll) */
.controls-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2em;
    padding: 1.2em 24px;
    background: #fff;
    border-bottom: 2px solid rgba(34, 116, 165, 0.15);
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.08);
    flex-wrap: wrap;
    position: sticky;
    top: 78px;
    z-index: 1100;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.filter-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    min-width: 300px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.8em;
}

.filter-item label {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.9em;
    white-space: nowrap;
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.filter-select {
    padding: 0.5em 0.8em;
    border: 1px solid rgba(34, 116, 165, 0.3);
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

.filter-select:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(34, 116, 165, 0.08);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
}

.progress-section {
    display: flex;
    flex-direction: column;
    min-width: 250px;
    align-items: flex-end;
}

.progress-info {
    display: flex;
    align-items: center;
    width: 100%;
}

.progress-label {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.9em;
    white-space: nowrap;
}

.progress-bar-container {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(34, 116, 165, 0.25);
    border-radius: 12px;
    overflow: hidden;
    min-width: 120px;
    max-width: 200px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange) 0%, rgba(255, 149, 5, 0.8) 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-percentage {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 0.9em;
    min-width: 35px;
    text-align: right;
}

.answer-count-info {
    font-size: 0.85em;
    color: #666;
    text-align: right;
    white-space: nowrap;
}

.answer-count-info span {
    font-weight: 600;
    color: var(--primary-blue);
}

/* 3. MAIN CONTENT CONTAINER (scrollable) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em 24px;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
    padding-top: 4em;
}

.controls-viewport {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    margin-bottom: 2em;
    padding-bottom: 5em;
}

/* 4. BUTTON BAR (at bottom of container) */
.general-button-bar {
    position: fixed;
    left: 0px;
    bottom: 0px;
    border-top: 2px solid rgba(34, 116, 165, 0.15);
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.08);
    background: linear-gradient(135deg, #fafdff 86%, #e6f2fe 99%);
    padding: 1.25em 0.25em 1.25em 0.25em;
    gap: 0.4em;
    flex-wrap: wrap;
    display: flex;
    width: 100%;
    justify-content: center;
    background: #fff;
}

/* modal-launch-btn: use btn-action / btn-danger / btn-submit classes directly */

.direct-url-row {
    display: none;
    flex: 1;
    min-width: 250px;
    padding: 0.5em 1em;
    background: rgba(34, 175, 165, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(34, 175, 165, 0.3);
}

.direct-url-row a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.direct-url-row a:hover {
    text-decoration: underline;
}

/* =========== RESPONSIVE LAYOUT =========== */

@media (max-width: 1024px) {
    .controls-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1.2em;
    }

    .filter-section {
        width: 100%;
    }

    .progress-section {
        width: 100%;
        align-items: flex-start;
    }

    .progress-info {
        width: 100%;
    }

    .progress-bar-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .controls-filter-bar {
        padding: 1em 24px;
        gap: 1em;
    }

    .filter-section {
        flex-direction: column;
        gap: 0.8em;
        width: 100%;
    }

    .filter-item {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-select {
        width: 100%;
    }

    .progress-section {
        width: 100%;
    }

    .progress-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .progress-bar-container {
        width: 100%;
    }

    .progress-percentage {
        text-align: left;
    }

    .answer-count-info {
        text-align: left;
    }


    .general-button-bar button,
    .general-button-bar form {
        width: 100%;
    }

    .direct-url-row {
        width: 100%;
    }

    .container {
        padding: 1em 24px;
    }
}

/* =========== NAVIGATION STYLES =========== */

.main-scroll-container {
    margin-top: 0;
    height: auto;
    overflow-y: auto;
    width: 100vw;
    box-sizing: border-box;
    background: var(--background-light);
}

.nav-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3em;
    min-height: 32px;
    margin: 0;
}

.nav-entry {
    display: flex;
    align-items: center;
    gap: 0.18em;
    height: 32px;
    margin: 0;
}

.ci-logo-img-visible {
    max-height: 10em !important;
    margin-right: 0.6em !important;
}

.ci-headline {
    font-size: 1.09em;
    margin-right: 1.1em;
    line-height: 1.0;
}

.user-section {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 1em;
    gap: 0;
    min-height: 28px;
}

.user-info-card {
    display: flex;
    align-items: center;
    gap: 0.25em;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 2px 10px 2px 6px;
}

.user-role-sep {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.30);
    margin: 0 6px;
    vertical-align: middle;
}

/* ── Session timer in navigation header ───────────────────────────────── */
.session-timer-display {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 2px 10px 2px 8px;
    margin-right: 0.6em;
    min-width: 72px;
    transition: background 0.4s, border-color 0.4s;
}

.session-timer-display.session-timer-warning {
    background: rgba(220, 80, 20, 0.30);
    border-color: rgba(255, 140, 60, 0.70);
    animation: session-timer-pulse 1s ease-in-out infinite;
}

@keyframes session-timer-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 80, 20, 0.0); }
    50%       { box-shadow: 0 0 6px 3px rgba(220, 80, 20, 0.35); }
}

.session-timer-icon {
    font-size: 1em;
    line-height: 1;
}

.session-timer-value {
    font-size: 0.88em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: var(--background-light);
    min-width: 38px;
    text-align: right;
}

/* ── Session expiry warning overlay ──────────────────────────────────── */
#sessionExpiryOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

#sessionExpiryPopup {
    background: var(--background-light, #fff);
    border-radius: 10px;
    padding: 2em 2.5em;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    text-align: center;
}

#sessionExpiryPopup h3 {
    margin: 0 0 0.6em;
    font-size: 1.2em;
    color: #c0392b;
}

#sessionExpiryPopup p {
    margin: 0.4em 0;
    color: #333;
    font-size: 1em;
}

.session-expiry-countdown {
    font-size: 1.5em;
    font-weight: 700;
    color: #c0392b;
    font-variant-numeric: tabular-nums;
}

.session-expiry-hint {
    font-size: 0.88em;
    color: #666;
    margin-bottom: 1.2em !important;
}

#sessionExpiryPopup .btn-submit {
    margin-top: 1em;
    padding: 0.55em 2em;
    font-size: 1em;
}

.nav-label {
    color: var(--background-light);
    background: var(--primary-blue-dark);
    padding: 1px 7px 1px 7px;
    font-size: 0.89em;
    border-radius: 8px 8px 8px 0;
    letter-spacing: 0.05em;
    margin-right: 4px;
    font-weight: 500;
}

.logout-form {
    margin: 0;
    display: flex;
    align-items: center;
}

.dropdown {
    position: relative;
    height: 32px;
}

.dropdown-button {
    min-width: 120px;
    height: 28px;
    font-size: 0.97em;
    border-radius: 4px;
    background: var(--nav-violet);
    color: var(--text-main);
    border: 1px solid var(--primary-blue);
    font-weight: 500;
    margin: 0;
    box-sizing: border-box;
    transition: background 0.13s, color 0.13s;
    display: inline-block;
    padding: 0 0.65em;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-button:hover {
    background: var(--nav-violet);
    color: var(--primary-blue-dark);
}

.dropdown-content {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.10);
    z-index: 2010;
    min-width: 130px;
    border-radius: 4px;
    padding: 3px 0;
    margin-top: 3px;
}

.dropdown-content.open {
    display: flex;
    flex-direction: column;
}

.dropdown-menu-btn {
    width: 98%;
    height: 24px;
    margin: 1px 6px;
    border-radius: 3px;
    background: var(--nav-violet);
    border: 1px solid #eeeeee;
    color: var(--primary-blue);
    font-size: 0.97em;
    cursor: pointer;
    transition: background .13s;
    text-align: left;
    padding-left: 7px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.dropdown-menu-btn:hover {
    background: var(--nav-violet);
    color: var(--primary-blue-dark);
}

.entry-link,
.entry-form {
    margin: 0;
    display: inline-block;
}

.btn-nav,
.nav-btn {
    min-width: 110px;
    height: 28px;
    font-size: 0.97em;
    border-radius: 4px;
    background: var(--nav-violet);
    color: var(--text-main);
    border: 1px solid var(--primary-blue);
    font-weight: 500;
    margin: 0;
    margin-right: 0.06em;
    box-sizing: border-box;
    transition: background 0.13s, color 0.13s;
    display: inline-block;
    padding: 0 0.63em;
    text-decoration: none;
    line-height: 28px;
}

.btn-nav:hover,
.nav-btn:hover {
    background: var(--nav-violet);
    color: var(--primary-blue-dark);
}

.org-details {
    display: inline-block;
    margin-left: 16px;
    min-width: 200px;
}

.org-details .org-name {
    font-size: var(--org-name-font-size);
    color: var(--org-name-color);
    font-weight: 600;
    padding-right: 7px;
    letter-spacing: 0.01em;
}

.org-details .tool-name {
    font-size: var(--tool-name-font-size);
    color: var(--tool-name-color);
    margin-left: 7px;
    font-style: italic;
    font-weight: 400;
}

@media (max-width: 650px) {
    .org-details {
        display: block;
        margin-left: 6px;
        min-width: 115px;
    }

    .org-details .org-name {
        font-size: 1em;
        padding-right: 3px;
    }

    .org-details .tool-name {
        font-size: 0.96em;
    }
}

/* =========== ASSESSMENT DETAILS STYLES =========== */

.assessment-details-collapsible {
    margin-bottom: 2.5em;
}

.assessment-details-body {
    display: none;
}

.domain-outline {
    margin-bottom: 0.5em;
}

.domain-collapsible {
    cursor: pointer;
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8em;
    background: linear-gradient(135deg, rgba(34, 116, 165, 0.05) 0%, rgba(255, 149, 5, 0.03) 100%);
    border-radius: 8px;
    border: 1px solid rgba(34, 116, 165, 0.1);
}

.domain-header:hover {
    background: linear-gradient(135deg, rgba(34, 116, 165, 0.08) 0%, rgba(255, 149, 5, 0.05) 100%);
}

.domain-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

.domain-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-blue);
}

.domain-desc {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

.domain-header-actions {
    display: flex;
    gap: 1em;
    align-items: center;
}

.domain-checkmark {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.domain-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.domain-chevron svg {
    transition: transform 0.3s ease;
}

.domain-controls {
    display: block;
    padding: 1.2em;
    background: #fff;
    border-top: 1px solid rgba(34, 116, 165, 0.1);
}

.domain-controls-tbl {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.ctrl-name-col {
    width: 350px;
}

.ctrl-desc-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.ctrl-desc-wrap>span {
    font-weight: bold;
}

.ctrl-desc-tooltip {
    display: block;
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* =========== TABLE STYLES =========== */

.summary-table {
    margin-top: 1.5em;
}

/* =========== CONTROL ACTIONS =========== */

.control-actions-flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    align-items: flex-start;
}

.answering-guide-row {
    flex: 0 1 auto;
}

.answering-guide-btn {
    padding: 0.5em 1em;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #ff8c00 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answering-guide-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e68a00 0%, #ff7700 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 149, 5, 0.25);
}

.answering-guide-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Compact icon-only guide button inside org answer row */
.org-answer-row .org-guide-btn {
    padding: 0.35em 0.55em;
    font-size: 1.1em;
    line-height: 1;
    flex-shrink: 0;
    border-radius: 5px;
}

.dropdown-row {
    flex: 1;
    min-width: 180px;
}

.answer-select {
    width: 100%;
    padding: 0.6em 0.8em;
    border: 1px solid rgba(34, 116, 165, 0.2);
    border-radius: 6px;
    font-size: 0.9em;
    background: #fff;
    color: #333;
    transition: all 0.2s ease;
}

.answer-select:hover:not(:disabled) {
    border-color: var(--primary-blue);
}

.answer-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
}

.answer-select.taken-over {
    background: rgba(200, 200, 200, 0.1);
    color: #999;
}

.answer-select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.answer-feedback {
    display: inline-block;
    margin-left: 0.5em;
}

.answer-feedback svg {
    width: 18px;
    height: 18px;
}

.takenOver-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 150px;
}

.taken-over-label {
    display: inline-block;
    padding: 0.4em 0.8em;
    background: rgba(200, 200, 200, 0.15);
    border-radius: 4px;
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
}

.testarea-row {
    flex: 1;
    min-width: 240px;
}

.comment-textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.6em 0.8em;
    border: 1px solid rgba(34, 116, 165, 0.2);
    border-radius: 6px;
    font-size: 0.9em;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

.comment-textarea:hover:not(:disabled) {
    border-color: var(--primary-blue);
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
}

.comment-textarea:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.1);
}

.comment-feedback {
    display: block;
    margin-top: 0.3em;
    font-size: 0.85em;
    color: #999;
}

.controls-table {
    width: 100%;
}

.controls-table th {
    width: 350px;
}

/* =========== MODAL STYLES =========== */

.modal-bg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-popup {
    background: #fff;
    border-radius: 12px;
    padding: 2em;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-popup h3 {
    margin: 0 0 1.5em 0;
    color: var(--primary-blue);
    font-size: 1.4em;
    font-weight: 700;
}

.modal-popup form {
    display: flex;
    flex-direction: column;
    gap: 1.2em;
}

.modal-popup select {
    width: 100%;
    padding: 0.6em 0.8em;
    border: 1px solid rgba(34, 116, 165, 0.2);
    border-radius: 6px;
    font-size: 0.95em;
    background: #fff;
    color: #333;
}

.modal-popup select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
}

.modal-btn-row {
    display: flex;
    gap: 0.8em;
    justify-content: flex-end;
    margin-top: 1.5em;
}

.modal-btn-row button {
    padding: 0.65em 1.5em;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-row button[type="submit"] {
    background: linear-gradient(135deg, var(--primary-blue) 0%, rgba(34, 116, 165, 0.9) 100%);
    color: #fff;
}

.modal-btn-row button[type="submit"]:hover:not(:disabled) {
    background: linear-gradient(135deg, #003fa0 0%, #004499 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 116, 165, 0.25);
}

.modal-btn-row button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-btn-row button[type="button"] {
    background: #eee;
    color: #333;
}

.modal-btn-row button[type="button"]:hover {
    background: #ddd;
    transform: translateY(-2px);
}

.modal-error {
    display: none;
    padding: 0.8em 1em;
    background: #ffcccc;
    color: #cc2222;
    border-radius: 6px;
    border: 1px solid #ff9999;
    font-size: 0.9em;
    margin-top: 0.5em;
}

/* =========== ORG SERVICE MODAL =========== */

#orgservice-list {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    margin-bottom: 1.2em;
}

.orgservice-label {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.6em 0.8em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(34, 116, 165, 0.02);
}

.orgservice-label:hover {
    background: rgba(34, 116, 165, 0.06);
}

.orgservice-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.orgservice-label span {
    flex: 1;
    font-size: 0.95em;
    color: #333;
}

/* =========== ANSWERING GUIDE MODAL =========== */

.answering-guide-popup {
    max-width: 1100px;
    width: 95vw;
    height: 68vh;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

/* Two-column layout for answering guide */
.answering-guide-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    gap: 1.5em;
    overflow: hidden;
}

.guide-left-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.guide-right-panel {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid rgba(34, 116, 165, 0.15);
    padding-left: 1.5em;
}

.guide-right-panel-title {
    margin: 0 0 0.8em 0;
    color: var(--primary-blue);
    font-size: 1em;
    font-weight: 700;
    padding-bottom: 0.5em;
    border-bottom: 1px solid rgba(34, 116, 165, 0.1);
    flex-shrink: 0;
}

.guide-maturity-answers-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding-right: 0.3em;
}

.maturity-answer-card {
    padding: 0.7em 0.9em;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid rgba(34, 116, 165, 0.12);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.maturity-answer-card:hover {
    background: rgba(34, 116, 165, 0.06);
    border-color: rgba(34, 116, 165, 0.3);
    transform: translateX(2px);
}

.maturity-answer-card.maturity-answer-suggested {
    background: rgba(34, 175, 120, 0.08);
    border-color: rgba(34, 175, 120, 0.45);
    border-left: 4px solid rgba(34, 175, 120, 0.7);
}

.maturity-answer-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    margin-bottom: 0.2em;
}

.maturity-answer-suggested .maturity-answer-name::after {
    content: ' \2713  Suggested';
    color: #24a060;
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 0.4em;
}

.maturity-answer-desc {
    color: #666;
    font-size: 0.82em;
    line-height: 1.45;
}

.answering-guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 2px solid rgba(34, 116, 165, 0.1);
}

.answering-guide-header h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.4em;
    font-weight: 700;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #999;
    cursor: pointer;
    padding: 0.2em;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    color: #333;
    transform: scale(1.1);
}

.answering-guide-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    margin-bottom: 1.5em;
    padding-right: 0.5em;
}

.guide-control-name {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding: 1em;
    background: rgba(34, 116, 165, 0.05);
    border-radius: 6px;
    border-left: 4px solid var(--primary-blue);
}

.guide-control-name h4 {
    margin: 0;
    color: var(--primary-blue);
    font-weight: 700;
}

.guide-control-name p {
    margin: 0;
    color: #666;
    line-height: 1.5;
    font-size: 0.95em;
}

.guide-loading {
    text-align: center;
    padding: 2em 1em;
    color: #666;
    font-style: italic;
}

.guide-loading p {
    margin: 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.guide-loading-initial {
    display: flex;
}

.guide-loading-submit {
    display: none;
}

/* ---- Guide loading overlay (covers entire popup) ---- */
.answering-guide-popup {
    position: relative;
}

.guide-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(200, 210, 220, 0.65);
    border-radius: inherit;
    z-index: 30;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1em;
    pointer-events: all;
    backdrop-filter: blur(1px);
}

.guide-overlay.active {
    display: flex;
}

.guide-overlay-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(255, 255, 255, 0.55);
    border-top-color: #2274a5;
    border-radius: 50%;
    animation: guideOverlaySpin 0.75s linear infinite;
    box-shadow: 0 2px 12px rgba(34,116,165,0.2);
}

.guide-overlay-label {
    color: #1a3a5c;
    font-size: 0.95em;
    font-weight: 600;
    background: rgba(255,255,255,0.8);
    padding: 0.3em 1em;
    border-radius: 20px;
}

@keyframes guideOverlaySpin {
    to { transform: rotate(360deg); }
}

/* ---- Guide loading overlay (covers entire popup) ---- */
.answering-guide-popup {
    position: relative;
}

.guide-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(200, 210, 220, 0.65);
    border-radius: inherit;
    z-index: 30;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1em;
    pointer-events: all;
    backdrop-filter: blur(1px);
}

.guide-overlay.active {
    display: flex;
}

.guide-overlay-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(255, 255, 255, 0.55);
    border-top-color: #2274a5;
    border-radius: 50%;
    animation: guideOverlaySpin 0.75s linear infinite;
    box-shadow: 0 2px 12px rgba(34,116,165,0.2);
}

.guide-overlay-label {
    color: #1a3a5c;
    font-size: 0.95em;
    font-weight: 600;
    background: rgba(255,255,255,0.8);
    padding: 0.3em 1em;
    border-radius: 20px;
}

@keyframes guideOverlaySpin {
    to { transform: rotate(360deg); }
}

.guide-questions {
    display: flex !important;
    flex-direction: column;
    gap: 1em;
}

.questions-container {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.question-item {
    padding: 1em;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid rgba(34, 116, 165, 0.1);
}

.question-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8em;
    font-size: 0.95em;
}

.question-answer-options {
    display: flex;
    gap: 0.6em;
    flex-wrap: wrap;
}

.question-pill {
    padding: 0.35em 1.1em;
    border: 2px solid var(--primary-blue);
    border-radius: 20px;
    background: transparent;
    color: var(--primary-blue);
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1.4;
}

.question-pill:hover {
    background: rgba(34, 116, 165, 0.08);
}

.question-pill.question-pill-selected {
    background: var(--primary-blue);
    color: #fff;
}

.guide-submit-answers-btn {
    padding: 0.8em 1.5em;
    background: linear-gradient(135deg, var(--primary-blue) 0%, rgba(34, 116, 165, 0.9) 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: center;
    margin-top: 1em;
}

.guide-submit-answers-btn:hover {
    background: linear-gradient(135deg, #003fa0 0%, #004499 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 116, 165, 0.25);
}

.guide-questions .guide-submit-answers-btn {
    align-self: center;
    margin-top: 0.5em;
}

.guide-proposed-answer {
    display: none;
    padding: 0.9em 1.2em;
    background: rgba(34, 175, 120, 0.07);
    border-radius: 6px;
    border-left: 4px solid rgba(34, 175, 120, 0.55);
}

.guide-suggestion-notice {
    display: flex;
    align-items: center;
    gap: 0.6em;
    font-size: 0.95em;
    color: #2a6c45;
}

.guide-suggestion-icon {
    font-size: 1.1em;
    font-weight: 700;
    color: #22a060;
}

.guide-try-again-link {
    display: inline-block;
    margin-top: 0.5em;
    font-size: 0.85em;
    color: #666;
    text-decoration: none;
    border-bottom: 1px dashed #999;
}

.guide-try-again-link:hover {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* =========== PROGRESS MODAL =========== */

.progress-popup {
    max-width: 400px;
    width: 90%;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin: 1.5em 0;
}

.progress-bar-bg {
    width: 100%;
    height: 24px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(34, 116, 165, 0.2);
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95em;
}

.progress-status {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    min-height: 20px;
}

/* =========== USER MULTISELECT =========== */

.users-multiselect {
    width: 100%;
    padding: 0.6em 0.8em;
    border: 1px solid rgba(34, 116, 165, 0.2);
    border-radius: 6px;
    font-size: 0.9em;
    background: #fff;
    color: #333;
    font-family: inherit;
}

.users-multiselect:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
}

.users-multiselect option {
    padding: 0.4em 0.6em;
}

.users-multiselect option:checked {
    background: linear-gradient(135deg, var(--primary-blue) 0%, rgba(34, 116, 165, 0.8) 100%);
    color: #fff;
}

/* =========== FORM STYLES =========== */

.create-assessment-form {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    max-width: 700px;
    margin: 0 auto;
}

.form-control-select {
    width: 100%;
    padding: 0.75em 0.9em;
    border: 1.5px solid rgba(34, 116, 165, 0.2);
    border-radius: 6px;
    font-size: 0.95em;
    background: #fff;
    color: #333;
    font-family: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-control-select:hover:not(:disabled) {
    border-color: rgba(34, 116, 165, 0.4);
    box-shadow: 0 2px 4px rgba(34, 116, 165, 0.06);
}

.form-control-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.12);
}

.form-control-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.05);
}

.form-control-select option {
    padding: 0.6em 0.8em;
    background: #fff;
    color: #333;
}

.form-control-select option:checked {
    background: linear-gradient(135deg, var(--primary-blue) 0%, rgba(34, 116, 165, 0.8) 100%);
    color: #fff;
}

.form-hint {
    margin: 0.5em 0 0 0;
    font-size: 0.85em;
    color: #999;
    font-style: italic;
}

/* =========== UTILITY CLASSES =========== */

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.08);
    border: 1px solid rgba(34, 116, 165, 0.1);
}

.no-results-message {
    pointer-events: none;
}

/* =========== ORG SERVICE LIST STYLES =========== */
.orgservice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2em;
    padding-bottom: 1.5em;
    border-bottom: 2px solid rgba(34, 116, 165, 0.2);
    flex-wrap: wrap;
    gap: 1em;
}

.orgservice-header h1 {
    margin: 0;
    flex: 1;
    min-width: 150px;
}


.card-header {
    background: linear-gradient(135deg, rgba(34, 116, 165, 0.08) 0%, rgba(255, 149, 5, 0.05) 100%);
    padding: 1.5em 1.5em 1.2em 1.5em;
    border-bottom: 1px solid rgba(34, 116, 165, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1em;
}

.card-header h2 {
    margin: 0;
    color: var(--primary-blue-dark);
    font-size: 1.3em;
    flex: 1;
    word-break: break-word;
}


.empty-state {
    text-align: center;
    padding: 3em 2em;
    background: rgba(34, 116, 165, 0.03);
    border: 2px dashed rgba(34, 116, 165, 0.2);
    border-radius: 10px;
    color: #666;
    font-size: 1.05em;
}

.empty-state p {
    margin: 0;
}

.empty-state a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

.btn-modal-confirm {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
    padding: 0.8em 1.8em;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-confirm:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.25);
}

.btn-modal-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-modal-cancel {
    background: #eee;
    color: #333;
    padding: 0.8em 1.8em;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
    background: #ddd;
    transform: translateY(-2px);
}

/* Compact control-task icon button */
.ctrl-task-btn {
    background: transparent;
    border: none;
    padding: 4px 6px;
    font-size: 1.05em;
    line-height: 1;
    cursor: pointer;
    color: var(--primary-blue-dark);
}
.ctrl-task-btn:hover {
    background: rgba(25,118,210,0.06);
    border-radius: 4px;
}
.btn-sm.ctrl-task-btn {
    padding: 2px 6px;
    font-size: 0.95em;
}

/* Icon-only button: show only the icon, no border, no transition */
.icon-only-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;    
    align-items: center;
    width: auto;
    height: auto;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    text-decoration: none;
    transition: none !important;
    box-shadow: none !important;
}
.icon-only-btn:hover {
    background: transparent !important;
    color: var(--primary-blue-dark, #1a5a7a);
    box-shadow: none !important;
    filter: none !important;
    text-decoration: none;
    opacity: 0.75;
}
.icon-only-btn svg {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}
.icon-only-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34,116,165,0.14);
    border-radius: 4px;
}


@media (max-width: 1024px) {
    .control-actions-flex-row {
        flex-direction: column;
    }

    .dropdown-row,
    .testarea-row,
    .takenOver-row {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .assessment-details-collapsible {
        margin-bottom: 1.5em;
    }

    .domain-outline {
        margin-bottom: 1.5em;
    }

    .domain-header {
        padding: 0.8em;
    }

    .domain-controls {
        padding: 0.8em;
    }

    .control-actions-flex-row {
        flex-direction: column;
        gap: 0.8em;
    }

    .ctrl-name-col {
        width: 100%;
    }

    .modal-popup {
        max-width: 90%;
        padding: 1.5em;
    }

    .answering-guide-popup {
        max-width: 95%;
        height: 90vh;
    }

    .answering-guide-body {
        flex-direction: column;
    }

    .guide-right-panel {
        border-left: none;
        border-top: 1px solid rgba(34, 116, 165, 0.15);
        padding-left: 0;
        padding-top: 1em;
        flex: 0 0 180px;
    }
}


/* =========================================================
   NAVIGATION OVERRIDES & THEME-FONT APPLICATION
   ========================================================= */

/* Apply theme font variables to main navigation */
.main-navigation {
    font-family: var(--nav-font-family, 'Segoe UI', Arial, sans-serif);
    font-size: var(--font-size-nav, 0.97em);
}

/* Uploaded logo sizing (user-uploaded CI logo in nav) */
.logo-uploaded {
    min-width: 7em;
    max-width: 7em;
}

/* User value chip */
.user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.93em;
    padding: 1px 2px;
    letter-spacing: 0.01em;
}

/* Role badge - accent styled */
.user-role {
    color: var(--primary-blue-dark);
    background: var(--accent-orange);
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Version section layout */
.version-section {
    display: flex;
    align-items: center;
    padding: 0 1.4em 0 0.6em;
}

/* App version chip */
.app-version {
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.20);
    font-size: 0.82em;
    font-family: 'Courier New', monospace;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.04em;
}

/* =========================================================
   LANDING PAGE
   ========================================================= */
.landing-container {
    max-width: 100%;
    margin: 4.5em auto;
    padding: 0 1.5em 1.5em;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.5em;
    width: 96%;
    box-sizing: border-box;
}

.landing-header {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 2px solid rgba(34, 116, 165, 0.15);
}

.landing-header h1 {
    margin: 0 0 0.5em 0;
    font-size: 2.2em;
    color: var(--primary-blue-dark);
    text-shadow: 0 2px 8px rgba(34, 116, 165, 0.10);
}

.landing-header p {
    margin: 0;
    color: #666;
    font-size: 1.05em;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5em;
    margin-bottom: 1.5em;
    flex: 1;
}

.landing-card {
    background: #fff;
    border: 2px solid rgba(34, 116, 165, 0.12);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(34, 116, 165, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 35vw
}

.card-icon-row {
    display: flex;
    align-items: center;
    gap: 0.8em;
    flex: 1;
}

.card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, rgba(34, 116, 165, 0.7) 100%);
    border-radius: 8px;
    color: #fff;
    font-size: 1.5em;
    flex-shrink: 0;
}

.assessment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.assessment-item {
    padding: 0.9em 1em;
    background: linear-gradient(135deg, #f8fbfd 0%, #f3f9fd 100%);
    border: 1px solid rgba(34, 116, 165, 0.1);
    border-radius: 8px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6em;
}

.assessment-item:hover {
    background: linear-gradient(135deg, #f0f7fc 0%, #e8f4fc 100%);
    border-color: rgba(34, 116, 165, 0.25);
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.08);
    transform: translateX(4px);
}

.assessment-link {
    display: block;
    width: 100%;
    color: var(--primary-blue-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: color 0.2s;
}

.assessment-link:hover {
    color: var(--accent-orange);
    text-shadow: 0 0 8px var(--shine-highlight);
}

.assessment-meta {
    display: flex;
    gap: 1.2em;
    flex-wrap: wrap;
    font-size: 0.9em;
}

.assessment-org {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: var(--primary-blue);
    font-weight: 500;
}

.assessment-org::before {
    content: 'org:';
    font-size: 0.85em;
    color: var(--gray-777);
}

.assessment-date {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: #999;
}

.assessment-side {
    display: flow-root;
    align-items: center;
    gap: 0.8em;
    margin-left: 12px;
}

.team-leader {
    white-space: nowrap;
    color: var(--text-main);
    font-size: 1.1em;
}

.completion-bar-wrapper {
    width: 10em;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.completion-bar-container {
    background: #e9f4fb;
    border-radius: 6px;
    height: 14px;
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(34, 116, 165, 0.3);
    overflow: hidden;
}

.completion-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffd166 50%, #22b573 100%);
    border-radius: 6px;
    width: 0%;
    transition: width 0.35s ease;
}

.completion-bar-pct {
    font-size: 0.78em;
    color: var(--gray-777, #777);
    text-align: right;
    line-height: 1;
}

.filter-bar {
    display: flex;
    gap: 0.5em;
    align-items: center;
    margin-bottom: 0.6em;
    flex-wrap: wrap;
}

/* Filter section card (for labeled multi-field filters) */
.filter-card {
    background: #f5f8fc;
    border: 1px solid #d0e0ec;
    border-radius: 6px;
    padding: 0.7em 1em;
    margin-bottom: 0.8em;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.filter-card h3 {
    font-size: 0.9em;
    color: var(--primary-blue);
    margin: 0 0 0.2em 0;
}

.filter-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em 0.8em;
    align-items: flex-end;
}

.filter-inputs > div {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
    min-width: 120px;
}

.filter-inputs label {
    font-size: 0.82em;
    font-weight: 600;
    color: #555;
}

.filter-inputs input,
.filter-inputs select {
    font-size: 0.84em;
    padding: 0.22em 0.45em;
    border: 1px solid #c8d8e8;
    border-radius: 3px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.coming-soon {
    text-align: center;
    padding: 2.5em 2em;
    color: #999;
    font-style: italic;
    margin: 0;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2em;
    margin-bottom: 1.5em;
}

.stat-card {
    background: linear-gradient(135deg, #fff 0%, #f8fbfd 100%);
    border: 1px solid rgba(34, 116, 165, 0.1);
    border-radius: 10px;
    padding: 1.2em 1em;
    text-align: center;
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.06);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(34, 116, 165, 0.3);
    box-shadow: 0 4px 16px rgba(34, 116, 165, 0.1);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-blue-dark);
    margin: 0 0 0.3em 0;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin: 0;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .landing-container {
        grid-template-columns: 2fr 1fr;
        gap: 1.2em;
    }

    .landing-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 1.2em;
    }

    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1em;
    }
}

@media (max-width: 768px) {
    .landing-container {
        grid-template-columns: 1fr;
        padding: 1em;
        gap: 1em;
        width: 100%;
    }

    .landing-header {
        margin-bottom: 2em;
    }

    .landing-header h1 {
        font-size: 1.8em;
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 1em;
    }
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 24px;
}

.login-container input[type=text],
.login-container input[type=password] {
    width: 100%;
    padding: 10px;
    margin: 8px 0 16px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
}

.login-container button:hover:not(:disabled) {
    background-color: var(--primary-blue-dark);
}

.or-separator {
    margin: 24px 0;
    display: flex;
    align-items: center;
}

.or-separator span {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.or-separator label {
    margin: 0 15px;
    color: #888;
    font-weight: bold;
    letter-spacing: 1px;
}

.error-message {
    color: var(--error-red);
    margin-bottom: 16px;
}

.oauth2-error-box {
    background-color: #fde7e7;
    border: 2px solid var(--error-red);
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.oauth2-error-box h3 {
    color: var(--error-red);
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.oauth2-error-box p {
    color: #333;
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.oauth2-error-box .error-code {
    color: #999;
    font-size: 0.85em;
    margin-top: 8px;
    font-style: italic;
}

.oauth-btn {
    display: inline-block;
    text-decoration: none;
    padding: 8px 0;
    width: 100%;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.07em;
    margin-bottom: 8px;
    border: none;
    cursor: pointer;
}

.oauth-keycloak {
    background: #49236d;
    color: #fff;
}

.oauth-azure {
    background: #0078d4;
    color: #fff;
}

.oauth-google {
    background: #db4437;
    color: #fff;
}

.oauth-github {
    background: #333;
    color: #fff;
}

.oauth-btn:disabled,
.oauth-btn.disabled {
    background: #dadada !important;
    color: #ababab !important;
    cursor: not-allowed;
}

.logo-login {
    max-width: 20em;
}

/* =========================================================
   NOT AUTHORIZED PAGE
   ========================================================= */
.not-authorized-container {
    max-width: 600px;
    margin: 80px auto;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.not-authorized-icon {
    font-size: 4em;
    margin-bottom: 20px;
    color: var(--error-red);
}

.not-authorized-container h1 {
    color: var(--error-red);
    margin-bottom: 16px;
    font-size: 2.2em;
}

.not-authorized-container p {
    color: #555;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 24px;
}

.authorization-details {
    background-color: #fde7e7;
    border: 1px solid var(--error-red);
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.authorization-details h3 {
    color: var(--error-red);
    margin: 0 0 12px 0;
    font-size: 1.05em;
}

.authorization-details p {
    color: #333;
    margin: 8px 0;
    font-size: 0.95em;
}

.authorization-details .required-perm {
    margin-top: 16px;
}

.authorization-details ul {
    color: #333;
    font-size: 0.95em;
    margin: 8px 0;
    padding-left: 20px;
}

.authorization-details li {
    margin: 4px 0;
}

.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 1em;
    transition: background-color 0.3s;
}

.action-button.primary {
    background-color: var(--primary-blue);
    color: #fff;
}

.action-button.primary:hover {
    background-color: var(--primary-blue-dark);
}

.action-button.secondary {
    background-color: #e0e0e0;
    color: #333;
}

.action-button.secondary:hover {
    background-color: #d0d0d0;
}

.status-code {
    color: #999;
    font-size: 0.9em;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.status-code strong {
    color: var(--error-red);
}

/* =========================================================
   CREATE ASSESSMENT / ORG UNIT PICKER MODAL
   ========================================================= */
.selection-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.modal-search-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
}

.org-unit-list-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.org-unit-list-item:hover {
    background: rgba(34, 116, 165, 0.05);
}

/* =========================================================
   ASSESSMENT LIST
   ========================================================= */
.filters {
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
}

.sort-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.assessment-row {
    cursor: pointer;
}

.clear-filter-icon {
    margin-left: 0.5em;
    cursor: pointer;
}

/* =========================================================
   ORG UNIT WIZARD MODAL
   ========================================================= */
.ou-wizard-modal-inner {
    width: 440px;
    max-width: 440px;
    max-height: 80vh;
    overflow: hidden;
    padding-bottom: 1.25em;
    display: flex;
    flex-direction: column;
}

.ou-wizard-title {
    flex-shrink: 0;
    margin-bottom: 0.5em;
}

.ou-wizard-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 220px;
    max-height: 55vh;
}

.ou-wizard-footer {
    flex-shrink: 0;
    margin-top: 0.75em;
}

.ou-wizard-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.ou-wizard-content {
    display: flex;
    align-items: stretch;
    gap: 0.5em;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0.25em 0.5em;
}

.ou-wizard-side-nav {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ou-wizard-list-shell {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
}

.ou-wizard-list {
    min-height: 100%;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ou-wizard-back-row {
    display: flex;
    align-items: center;
    padding: 0.35em 0.6em 0.5em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.3em;
}

.ou-wizard-row {
    display: flex;
    align-items: center;
    gap: 0.38em;
    margin: 0.22em 0;
}

.ou-wizard-select-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 0.55em 0.9em;
    min-height: 2.4em;
    background: var(--background-light);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s, color 0.15s;
}

.ou-wizard-select-btn.has-children {
    border-radius: 4px;
}

.ou-wizard-select-btn:hover,
.ou-wizard-select-btn.selected {
    background: var(--primary-blue);
    color: #fff;
}

.ou-wizard-nav-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75em;
    min-height: 2.4em;
    min-width: 2.2em;
    background: var(--background-light);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ou-wizard-nav-btn.drill-btn {
    border-radius: 4px;
}

.ou-wizard-nav-btn:hover {
    background: var(--primary-blue);
    color: #fff;
}

.ou-wizard-empty {
    padding: 1.5em 0.8em;
    color: var(--gray-777);
    text-align: center;
    font-size: 0.9em;
}

/* =========================================================
   ASSESSMENT DETAILS - SUMMARY CHARTS & LEGEND
   ========================================================= */
/* btn-primary and btn-secondary defined globally in BUTTON VARIANTS section */
.modal-content {
    margin: 20px 0;
    line-height: 1.6;
}

.summary-answers-container {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pie-chart-box {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.no-answers-message {
    color: #999;
    font-size: 1em;
    text-align: center;
    padding: 40px;
    background-color: #fafafa;
    border-radius: 8px;
}

.summary-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 18px;
    border-left: 18px solid var(--primary-blue);
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.legend-label {
    flex: 1;
    font-weight: 600;
    color: #333;
    font-size: 1em;
    margin-right: 20px;
}

.legend-values {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 5px;
    white-space: nowrap;
}

.legend-count {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.legend-percent {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--primary-blue);
}

.legend-item-data {
    display: none;
}

.bar-chart-container {
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 0.5em 1em;
}

.bar-chart-box {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    height: auto;
    min-height: 2em;
}

#maturityRatingChart {
    height: 100%;
    max-height: none;
}

.control-action-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Assessment direct page */
.assessment-direct-content {
    margin: 3em 0;
    padding: 0 3em;
}

.assessment-details-card {
    margin-bottom: 2.8em;
}

.domain-card-spaced {
    margin-bottom: 2.5em;
}

.control-col-wide {
    width: 350px;
}

.comment-textarea-sized {
    min-width: 180px;
    min-height: 36px;
    resize: vertical;
}

/* Security control domains page */
.security-domain-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.security-domain-table th,
.security-domain-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.security-domain-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.security-domain-table tr:hover {
    background-color: #f9f9f9;
}

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

.scd-action-buttons a,
.scd-action-buttons button {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.scd-action-buttons a {
    background-color: var(--primary-blue);
    color: #fff;
}

.scd-action-buttons a:hover {
    background-color: var(--primary-blue-dark);
}

/* scd-* classes removed — modals now use standard .modal-bg / .modal-popup-confirmation */

/* Inline replacement utilities */
.text-success {
    color: var(--success-green);
}

.text-danger {
    color: var(--error-red);
}

.text-primary {
    color: var(--primary-blue);
}

.w-30 {
    width: 30px;
}

.w-35 {
    width: 35%;
}

.w-60 {
    width: 60px;
}

.w-70 {
    width: 70px;
}

.w-80 {
    width: 80px;
}

.w-100 {
    width: 100px;
}

.w-110 {
    width: 110px;
}

.w-150 {
    width: 150px;
}

.w-250 {
    width: 250px;
}

.w-20 {
    width: 20%;
}

.w-25 {
    width: 25%;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-15 {
    margin-bottom: 15px;
}

.my-5 {
    margin-top: 5px;
    margin-bottom: 5px;
}

.my-10 {
    margin-top: 10px;
    margin-bottom: 10px;
}

.my-20 {
    margin-top: 20px;
    margin-bottom: 20px;
}

.text-12-muted {
    font-size: 12px;
    color: #666;
}

.word-break {
    word-break: break-word;
}

.w-120 {
    width: 120px;
}

.mt-1rem {
    margin-top: 1rem;
}

.text-primary-link {
    color: var(--primary-blue);
    text-decoration: underline;
}

.provider-active-indicator {
    color: #4caf50;
    font-weight: 600;
}

.btn-cancel-link {
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-security-control-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.detected-language-label {
    font-weight: bold;
    color: #0066cc;
}

.translation-progress-box {
    margin: 15px 0;
    padding: 10px;
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 4px;
}

.w-0 {
    width: 0%;
}

.import-btn-primary {
    background-color: #007bff;
}

.import-btn-success {
    background-color: #28a745;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.gap-20 {
    gap: 20px;
}

/* --- Typography: font size --- */
.text-11 {
    font-size: 11px;
}

.text-13 {
    font-size: 13px;
}

.text-14 {
    font-size: 14px;
}

.text-16 {
    font-size: 16px;
}

.text-24 {
    font-size: 24px;
}

/* --- Typography: style/format --- */
.italic {
    font-style: italic;
}

.nowrap {
    white-space: nowrap;
}

.pre-wrap {
    white-space: pre-wrap;
}

/* --- Typography: color / weight --- */
.text-light {
    font-weight: 300;
}

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

.text-main {
    color: #333;
}

.text-gray-6c {
    color: #6c757d;
}

.text-555 {
    color: #555;
}

.text-light-muted {
    color: #999;
}

.text-red-dark {
    color: #c0392b;
}

.text-warning-strong {
    color: #d32f2f;
    font-weight: 600;
}

.text-blue-1976 {
    color: #1976d2;
}

/* --- Spacing --- */
.mt-15 {
    margin-top: 15px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-2em {
    margin-top: 2em;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-3em {
    margin-bottom: 3em;
}

.my-8 {
    margin-top: 8px;
    margin-bottom: 8px;
}

.pl-20 {
    padding-left: 20px;
}

.p-30 {
    padding: 30px;
}

.p-12-20 {
    padding: 12px 20px;
}

/* --- Layout --- */
.flex-auto {
    flex: 1 1 auto;
    min-height: 0;
}

.scroll-y {
    overflow-y: auto;
}

.no-float {
    float: none;
}

.min-h-80 {
    min-height: 80px;
}

.truncate-250 {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- State / interaction --- */
.bg-disabled {
    background-color: #e9ecef;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* --- Button variants --- */
.btn-danger-gradient {
    background: linear-gradient(89deg, var(--error-red) 86%, #ff4444 100%);
    color: #fff;
    border: none;
    padding: 0.35em 1em;
    font-size: 0.9em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-danger-gradient:hover {
    background: #aa1111;
}

/* --- Panel components --- */
.panel-gray-20 {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 15px;
}

.panel-white-15 {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.panel-ai {
    background: #e8f4fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

/* --- Info / alert boxes --- */
.info-box-blue {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    border-radius: 4px;
    padding: 12px 15px;
    margin: 10px 0;
}

.info-box-light {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px 15px;
    margin: 10px 0;
}

.success-box {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 10px 0;
}

/* --- Scrollable containers --- */
.scroll-box-600 {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px;
}

/* --- Headings with underline accent --- */
.heading-blue-underlined {
    color: #1976d2;
    border-bottom: 2px solid #1976d2;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

.heading-green-underlined {
    color: #388e3c;
    border-bottom: 2px solid #388e3c;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

/* --- Modal extensions --- */
.modal-content-wide {
    display: flex;
    flex-direction: column;
    max-width: 780px;
    width: min(780px, 95vw);
    max-height: 88vh;
    padding: 16px 20px;
}

/* ===== Security Control Edit Popup ===== */
.sc-edit-popup {
    min-width: 85vw;
    min-height: 80vh;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sc-edit-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 4px 4px 0;
}

/* Form wrapper */
.sc-edit-form-wrap form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Each row — visual card box */
.sc-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--modal-beige1, #f8f6f1);
    border: 1px solid rgba(34, 116, 165, 0.12);
    border-radius: 7px;
    padding: 10px 12px;
}

/* Each field inside a row */
.sc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 0;
    min-width: 0;
}
.sc-field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-blue-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sc-field input,
.sc-field select,
.sc-field textarea {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
    background: #fff;
    transition: border-color 0.15s;
}
.sc-field input:focus,
.sc-field select:focus,
.sc-field textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(34, 116, 165, 0.12);
}

/* Full-width field */
.sc-field-full { flex: 1 1 100%; }

/* Row 2: description takes 2/3, catalogs 1/3 */
.sc-row-desc { align-items: stretch; }
.sc-field-desc { flex: 2 1 0; }
.sc-field-desc textarea { height: 20vh; min-height: 80px; resize: vertical; }
.sc-field-catalogs { flex: 1 1 0; min-width: 160px; }
.sc-catalog-list {
    list-style: none;
    margin: 2px 0 0 0;
    padding: 4px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 20vh;
    min-height: 40px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.sc-catalog-list li {
    background: var(--faint-blue1, #eef3ff);
    border-left: 3px solid var(--primary-blue);
    padding: 3px 7px;
    border-radius: 2px;
    color: var(--text-main);
    font-size: 12px;
    word-break: break-word;
}

/* Row 3: version | ref | domain | tags */
.sc-row-meta { flex-wrap: wrap; }
.sc-field-version { flex: 0 0 auto; min-width: 150px; }
.sc-version-bump {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 0;
}
.sc-version-badge { font-family: monospace; font-size: 12px; }
.sc-field-ref { flex: 0 0 120px; }
.sc-field-domain { flex: 1 1 140px; }
.sc-field-tags { flex: 2 1 170px; }
.sc-field-tags .tag-suggestions { margin-top: 4px; }
.sc-field-tags .tag-suggestions-list { display: flex; flex-wrap: wrap; gap: 3px; }
.sc-field-tags .tag-pill { padding: 1px 6px; font-size: 11px; border-radius: 10px; }

/* Row 5: action buttons */
.sc-row-actions {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    background: transparent;
    border: none;
    padding: 4px 0 0 0;
}

/* =========================================================
   EDIT SECURITY CATALOG
   ========================================================= */
.catalog-edit-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2em;
}

.catalog-general-section {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.catalog-controls-section {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}

.form-field-group label {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95em;
}

.form-input,
.form-textarea {
    padding: 0.75em;
    border: 1px solid rgba(34, 116, 165, 0.2);
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input:hover:not(:disabled),
.form-textarea:hover:not(:disabled) {
    border-color: rgba(34, 116, 165, 0.4);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.security-controls-section {
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(34, 116, 165, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.security-controls-section-header {
    background: linear-gradient(135deg, rgba(34, 116, 165, 0.08) 0%, rgba(255, 149, 5, 0.05) 100%);
    padding: 1.2em 1.5em;
    border-bottom: 1px solid rgba(34, 116, 165, 0.1);
}

.security-controls-section-header h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.1em;
    font-weight: 700;
}

.security-controls-filter-bar {
    padding: 1.2em 1.5em;
    border-bottom: 1px solid rgba(34, 116, 165, 0.1);
    background: rgba(34, 116, 165, 0.02);
}

.filter-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8em;
}

.filter-input-wrapper label {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.9em;
    white-space: nowrap;
    margin: 0;
}

.filter-input {
    flex: 1;
    padding: 0.6em 0.8em;
    border: 1px solid rgba(34, 116, 165, 0.2);
    border-radius: 6px;
    font-size: 0.9em;
    font-family: inherit;
    transition: all 0.2s ease;
    min-width: 250px;
}

.filter-input:hover {
    border-color: rgba(34, 116, 165, 0.4);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
}

.security-controls-table-wrapper {
    flex: 1;
    overflow-y: auto;
    max-height: 600px;
}

.security-controls-table {
    width: 100%;
    border-collapse: collapse;
}

.security-controls-domain-header-row {
    background: linear-gradient(135deg, rgba(34, 116, 165, 0.06) 0%, rgba(255, 149, 5, 0.03) 100%);
    border-bottom: 1px solid rgba(34, 116, 165, 0.1);
}

.security-controls-domain-header-row td {
    padding: 0.9em 1.5em;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95em;
}

.security-control-row {
    border-bottom: 1px solid rgba(34, 116, 165, 0.05);
    transition: all 0.2s ease;
}

.security-control-row:hover {
    background: rgba(34, 116, 165, 0.03);
}

.security-control-row.hidden {
    display: none;
}

.security-control-row td {
    padding: 1em 1.5em;
    vertical-align: top;
}

.security-control-checkbox-cell {
    width: 50px;
    text-align: center;
}

.security-control-checkbox-cell input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
    margin: 0;
}

.security-control-name-cell {
    width: 30%;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
    word-break: break-word;
}

.security-control-detail-cell {
    flex: 1;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    word-break: break-word;
}

.form-actions {
    display: flex;
    gap: 1em;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 1em;
}

.btn-back {
    background: #eee;
    color: #333;
    border: 1px solid #ddd;
    padding: 0.8em 1.5em;
    font-size: 0.95em;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-back:hover {
    background: #ddd;
    transform: translateY(-2px);
}

.success-message {
    padding: 1em 1.2em;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 6px;
    color: #2e7d32;
    font-weight: 500;
    border-left: 4px solid #4CAF50;
}

.no-results-found {
    padding: 2em;
    text-align: center;
    color: #999;
    font-style: italic;
}

.sticky-buttons {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 1em 0;
    border-top: 1px solid rgba(34, 116, 165, 0.1);
}

@media (max-width: 1024px) {
    .catalog-edit-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .security-controls-table-wrapper {
        max-height: 400px;
    }

    .security-control-name-cell {
        width: 35%;
    }

    .security-control-detail-cell {
        font-size: 0.85em;
        padding: 1em 0.8em;
    }

    .filter-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-input {
        min-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-back {
        width: 100%;
        text-align: center;
    }
}


/* =========================================================
   EXTRACTED FROM: ai-cache-management.html
   ========================================================= */
.cache-stats {
    display: flex;
    gap: 2em;
    margin-bottom: 2em;
    flex-wrap: wrap;
}

.stat-box {
    padding: 1em;
    background: var(--modal-beige-1);
    border-left: 4px solid var(--primary-blue-dark);
    border-radius: 4px;
    min-width: 200px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-main);
    font-weight: bold;
}

.stat-value {
    font-size: 1.8em;
    color: var(--primary-blue-dark);
    font-weight: bold;
    margin-top: 0.5em;
}

.cache-controls {
    display: flex;
    gap: 1em;
    margin-bottom: 2em;
    flex-wrap: wrap;
}

.cache-table-wrapper {
    overflow-x: auto;
    margin-bottom: 2em;
}

.cache-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.cache-table thead {
    background: var(--primary-blue-dark);
    color: white;
    font-weight: bold;
}

.cache-table th {
    padding: 1em;
    text-align: left;
    border-right: 1px solid #ddd;
}

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

.cache-table td {
    padding: 1em;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
}

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

.cache-table tbody tr:hover {
    background: var(--table-hover-1);
}

.cache-table tbody tr:nth-child(odd) {
    background: var(--table-bg-1);
}

.cache-table tbody tr:nth-child(even) {
    background: var(--table-bg-2);
}

.prompt-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
    font-size: 0.9em;
}

.prompt-cell:hover {
    cursor: pointer;
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

.provider-badge {
    display: inline-block;
    padding: 0.3em 0.7em;
    background: var(--accent-color);
    color: white;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: bold;
}

.hit-count-badge {
    display: inline-block;
    padding: 0.3em 0.7em;
    background: var(--label-gold);
    color: white;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: bold;
}

.empty-state {
    text-align: center;
    padding: 3em;
    color: var(--gray-777);
}

.empty-state-icon {
    font-size: 3em;
    margin-bottom: 1em;
}

.message {
    margin-bottom: 1.5em;
}

.cache-detail-row {
    margin-bottom: 1em;
    padding-bottom: 1em;
    border-bottom: 1px solid #eee;
}

.cache-detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-label {
    font-weight: bold;
    color: var(--primary-blue-dark);
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 0.5em;
}

.detail-value {
    font-family: monospace;
    background: var(--modal-beige-1);
    padding: 0.8em;
    border-radius: 3px;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.message {
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1.5em;
    display: none;
}

.message.show {
    display: block;
}

.message.success {
    background: var(--success-green);
    color: white;
}

.message.error {
    background: var(--error-red);
    color: white;
}

.loading {
    text-align: center;
    padding: 2em;
    color: var(--primary-blue-dark);
}

.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-blue-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.search-box {
    margin-bottom: 1.5em;
}

.search-box input {
    width: 100%;
    max-width: 500px;
    padding: 0.7em;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1em;
}

.search-box input::placeholder {
    color: var(--gray-888);
}

/* =========================================================
   EXTRACTED FROM: auth-config.html
   ========================================================= */
.auth-config-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
}

.provider-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
}

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.provider-title {
    font-size: 1.2em;
    font-weight: bold;
}

.status-indicator {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-healthy {
    background: #d4edda;
    color: #155724;
}

.status-unhealthy {
    background: #f8d7da;
    color: #721c24;
}

.status-unconfigured {
    background: #fff3cd;
    color: #856404;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type=text],
.form-group input[type=password] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.hidden {
    display: none;
}

.provider-form {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.health-details {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 12px;
    margin-top: 10px;
    font-size: 0.9em;
}

.health-details h4 {
    margin: 0 0 8px 0;
    font-size: 1em;
}

.health-error {
    background: #ffe6e6;
    border: 1px solid #ffcccc;
}

.health-success {
    background: #e6ffe6;
    border: 1px solid #ccffcc;
}

.expandable {
    cursor: pointer;
}

.expandable:hover {
    background: #f0f0f0;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.redirect-uri-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.health-check-btn {
    background: #28a745;
    color: white;
}

.health-check-btn:hover {
    background: #218838;
}

.health-check-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.auto-refresh-indicator {
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 10px;
}

/* =========================================================
   EXTRACTED FROM: compliance-check-edit.html
   ========================================================= */
.threshold-entry {
    margin-bottom: 0.6em;
}

.threshold-entry input,
.threshold-entry select {
    margin-right: 0.4em;
}

/* =========================================================
   EXTRACTED FROM: compliance-view.html
   ========================================================= */
#popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

#calc-popup {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
}

#calc-popup .popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

#calc-popup .popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

#calc-popup .popup-content {
    padding: 20px;
}

#calc-popup .details-section {
    margin-bottom: 24px;
}

#calc-popup .details-section:last-child {
    margin-bottom: 0;
}

#calc-popup .details-section h4 {
    color: #667eea;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 12px 0;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

#calc-popup .summary {
    background: #f5f7fa;
    padding: 12px;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

#calc-popup .chart-container {
    max-width: 350px;
    margin: 0 auto;
    padding: 16px 0;
}

#calc-popup .details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#calc-popup .details-table thead {
    background: #f5f7fa;
}

#calc-popup .details-table tr {
    border-bottom: 1px solid #e0e0e0;
}

#calc-popup .details-table tr:hover {
    background: #fafbfc;
}

#calc-popup .details-table th {
    font-weight: 700;
    color: #333;
    padding: 10px 8px;
    text-align: left;
}

#calc-popup .details-table td {
    padding: 10px 8px;
    color: #555;
}

#calc-popup .details-table td:first-child {
    font-weight: 600;
    color: #333;
}

#calc-popup .score-cell {
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

#calc-popup .popup-footer {
    padding: 12px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    background: #f5f7fa;
    border-radius: 0 0 8px 8px;
}

#calc-popup .close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 28px;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

#calc-popup .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#calc-popup .popup-footer button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

#calc-popup .popup-footer button:hover {
    background: #764ba2;
}

#calc-popup .no-data {
    color: #999;
    font-style: italic;
    padding: 12px;
    text-align: center;
}

/* =========================================================
   EXTRACTED FROM: database-config.html
   ========================================================= */
.db-config-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.section-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.section-card h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 3px solid #4364a3;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.db-status-section {
    border-color: #2196f3;
    background-color: #e3f2fd;
}

.db-status-section h3 {
    color: #1565c0;
    border-bottom-color: #2196f3;
}

.status-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.status-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.status-item label {
    display: block;
    font-weight: 600;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.status-item .value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.migrations-section {
    border-color: #ff9800;
    background-color: #fff8f0;
}

.migrations-section h3 {
    color: #e65100;
    border-bottom-color: #ff9800;
}

.backup-section {
    border-color: #4caf50;
    background-color: #eef8ef;
}

.backup-section h3 {
    color: #2e7d32;
    border-bottom-color: #4caf50;
}

.section-header-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.section-header-actions h3 {
    margin-bottom: 0;
    flex: 1;
}

.btn-success {
    background-color: #4caf50;
    color: #fff;
}

.btn-success:hover {
    background-color: #2e7d32;
}

.backup-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.backup-table th,
.backup-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
}

.backup-table th {
    background: #f3f3f3;
    font-size: 12px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.backup-table td.actions-cell {
    text-align: right;
}

.migration-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.migration-info {
    flex: 1;
}

.migration-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 14px;
}

.migration-info p {
    margin: 0;
    color: #666;
    font-size: 12px;
}

.version-range {
    display: inline-block;
    background-color: #f0f0f0;
    padding: 4px 10px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    margin: 5px 0;
}

.migration-actions {
    display: flex;
    gap: 10px;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-info {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

.alert-warning {
    background-color: #fff8f0;
    border-color: #ff9800;
    color: #e65100;
}

.alert-success {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.alert-error {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.no-migrations {
    text-align: center;
    padding: 30px;
    color: #999;
}

.no-migrations p {
    font-size: 14px;
    margin: 0;
}

#statusMessage {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 2000;
    max-width: 400px;
    border-left: 4px solid;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(450px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(450px);
        opacity: 0;
    }
}

#statusMessage.show {
    display: block;
}

#statusMessage.hide {
    animation: slideOutRight 0.3s ease forwards;
}

#statusMessage.success {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

#statusMessage.error {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

#statusMessage.info {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

#statusMessage .status-icon {
    margin-right: 10px;
    font-weight: bold;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    border: 2px solid #ff9800;
    border-radius: 8px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff9800;
    padding-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    color: #e65100;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-footer .btn-primary {
    background-color: #4364a3;
    color: white;
}

.modal-footer .btn-primary:hover {
    background-color: #334d7f;
}

.modal-footer .btn-warning {
    background-color: #ff9800;
    color: white;
}

.modal-footer .btn-warning:hover {
    background-color: #e65100;
}

.modal-footer .btn-secondary {
    background-color: #ccc;
    color: #333;
}

.modal-footer .btn-secondary:hover {
    background-color: #bbb;
}

/* ---- Import-backup drop zone (database-config.html) ---- */

.import-drop-zone {
    border: 2px dashed #bbb;
    border-radius: 8px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    background: #f9f9f9;
    margin: 12px 0 4px;
    transition: border-color 0.2s, background-color 0.2s;
}

.import-drop-zone.dragover {
    border-color: #4364a3;
    background: #eef2fb;
}

.import-drop-icon {
    font-size: 2.2rem;
    margin-bottom: 6px;
}

.import-drop-text {
    color: #666;
    margin: 0 0 12px;
    font-size: 0.93rem;
}

.import-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 6px;
    background: #eef0f4;
    margin-top: 10px;
    font-size: 13px;
}

.import-file-name {
    flex: 1;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-file-size {
    color: #777;
    font-size: 12px;
    white-space: nowrap;
}

.import-overview {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    padding: 12px 14px;
}

.import-overview-row {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f2f5;
    align-items: baseline;
}

.import-overview-row:last-child {
    border-bottom: none;
}

.import-meta-label {
    color: #888;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 82px;
    flex-shrink: 0;
    padding-top: 1px;
}

.import-table-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.import-table-chip {
    background: #e8f0fe;
    color: #1a3a6b;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-family: monospace;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.import-table-chip-count {
    background: #c0d0f0;
    border-radius: 3px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 600;
}

.import-parsing-msg {
    color: #777;
    font-size: 13px;
    font-style: italic;
    padding: 8px 0;
}

/* Entity selection (selective restore checkboxes) */
.import-entity-select {
    margin-top: 10px;
    border-top: 1px solid #eef0f5;
    padding-top: 10px;
}

.import-entity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.import-entity-all-label {
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.import-entity-count-label {
    font-size: 12px;
    color: #888;
}

.import-entity-list {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #e4e8f0;
    border-radius: 4px;
    background: #f9fafb;
}

.import-entity-item {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-bottom: 1px solid #f0f2f5;
    gap: 8px;
}

.import-entity-item:last-child {
    border-bottom: none;
}

.import-entity-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    min-width: 0;
}

.import-entity-name {
    font-family: monospace;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-entity-view {
    color: #5a5aab;
    font-style: italic;
}

.import-entity-rows {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =========================================================
   EXTRACTED FROM: edit-security-control.html
   ========================================================= */
/* ===== Security Control Editor Modal Styles ===== */

.security-control-editor {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.editor-header {
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    display: none;
}

.editor-header h1 {
    display: none;
}

.editor-form {
    flex: 1 1 auto;
    overflow-y: auto;
    width: 100%;
}

.editor-form form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    padding: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group.description-group {
    grid-column: 1 / -1;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.tag-suggestions {
    margin-top: 8px;
}

.tag-suggestions-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.tag-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-pill:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.tag-pill.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.tag-pill.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin: 14px 0 8px 0;
    flex-shrink: 0;
}

.catalog-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    border-radius: 4px;
    flex-shrink: 0;
}

.catalog-info p {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.catalog-info ul {
    margin: 0;
    padding: 0 0 0 20px;
    list-style: none;
}

.catalog-info li {
    margin: 4px 0;
    padding: 0 0 0 6px;
    font-size: 13px;
    color: #666;
    position: relative;
}

.catalog-info li:before {
    content: "•";
    position: absolute;
    left: -12px;
    color: #007bff;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }

    .form-group.description-group {
        grid-column: 1;
    }

    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
    }
}

/* =========================================================
   EXTRACTED FROM: image-upload.html
   ========================================================= */
.upload-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--background-light);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upload-area {
    border: 3px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: var(--shine-glare);
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-blue);
    background: var(--nav-violet);
}

.upload-area.drag-over {
    border-color: var(--accent-orange);
    background: var(--modal-beige1);
}

/* Hide the raw file input inside the drag-drop upload area (image upload) */
.upload-area .file-input {
    display: none;
}

.upload-button {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.upload-button:hover {
    background: var(--primary-blue-dark);
}

.current-image {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.preview-image {
    max-width: 300px;
    max-height: 150px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin: 1rem 0;
}

.message {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: bold;
}

.message.success {
    background: var(--alert-bg1);
    color: var(--success-green);
    border: 1px solid var(--success-green);
}

.message.error {
    background: #fee;
    color: var(--error-red);
    border: 1px solid var(--error-red);
}

.delete-button {
    background: var(--error-red);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 1rem;
}

.delete-button:hover {
    background: darkred;
}

.info-box {
    background: var(--modal-beige1);
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border-left: 4px solid var(--label-gold);
}

.upload-instructions {
    color: var(--text-main);
    margin: 1rem 0;
}

.file-requirements {
    font-size: 0.9em;
    color: var(--gray-777);
    margin-top: 0.5rem;
}

/* =========================================================
   EXTRACTED FROM: maturitymodel-edit.html
   ========================================================= */
.entity-edit-frame-wide {
    max-width: none !important;
    width: 100% !important;
}

.edit-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 1em;
}

.edit-table td:first-child {
    width: 30%;
    font-weight: 500;
    text-align: right;
    padding-right: 1.3em;
    vertical-align: top;
}

.edit-table td:last-child {
    width: 70%;
}

.edit-table input[type="text"],
.edit-table textarea,
.edit-table select {
    width: 95%;
    min-width: 240px;
    box-sizing: border-box;
}

.edit-table select[multiple] {
    min-height: 10em;
}

.actions-panel {
    margin-top: 1.3em;
}

@media (max-width: 800px) {

    .edit-table td:first-child,
    .edit-table td:last-child {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.25em 0;
    }

    .edit-table tr {
        display: block;
        margin-bottom: 1em;
    }
}

/* =========================================================
   EXTRACTED FROM: openai-config.html
   ========================================================= */
.ai-config-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .section-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.section-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.section-card:hover {
    border-color: #bbb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.section-card h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 3px solid #4364a3;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-card h3 button {
    font-size: 12px;
    padding: 5px 10px;
}

.provider-section {
    border: 2px solid #4364a3;
    background-color: #f0f4f8;
}

.provider-section h3 {
    color: #4364a3;
    border-bottom-color: #4364a3;
}

.general-section {
    border: 2px solid #7cb342;
    background-color: #f8f9f3;
}

.general-section h3 {
    color: #558000;
    border-bottom-color: #7cb342;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4364a3;
    box-shadow: 0 0 5px rgba(67, 100, 163, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.provider-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

@media (max-width: 768px) {
    .provider-grid {
        grid-template-columns: 1fr;
    }
}

.provider-info {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.provider-info:hover {
    border-color: #4364a3;
    background-color: #f5f8fb;
}

.provider-info.active {
    border: 2px solid #4364a3;
    background-color: #e8f0fb;
    font-weight: 600;
}

.provider-info strong {
    display: block;
    color: #333;
    margin-bottom: 4px;
    flex-grow: 1;
}

.provider-info small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

.provider-actions {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.provider-actions button {
    flex: 1;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    border: none;
    border-radius: 3px;
    background-color: #f0f0f0;
    color: #333;
    transition: all 0.2s ease;
}

.provider-actions button:hover {
    background-color: #e0e0e0;
}

.provider-actions button.delete:hover {
    background-color: #ff5252;
    color: white;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.button-group button {
    flex: 1;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.alert-error {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.alert-info {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.full-width {
    grid-column: 1 / -1;
}

.test-section {
    border: 2px solid #ff9800;
    background-color: #fff8f0;
    margin-top: 30px;
}

.test-section h3 {
    color: #e65100;
    border-bottom-color: #ff9800;
}

#testResult {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    max-height: 300px;
    overflow-y: auto;
}

/* MODAL STYLES */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    border: 2px solid #4364a3;
    border-radius: 8px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #4364a3;
    padding-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    color: #4364a3;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-footer .btn-primary {
    background-color: #4364a3;
    color: white;
}

.modal-footer .btn-primary:hover {
    background-color: #334d7f;
}

.modal-footer .btn-secondary {
    background-color: #ccc;
    color: #333;
}

.modal-footer .btn-secondary:hover {
    background-color: #bbb;
}

.modal-footer .btn-danger {
    background-color: #f44336;
    color: white;
}

.modal-footer .btn-danger:hover {
    background-color: #d32f2f;
}

.setting-row {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-row input {
    flex: 1;
    margin-right: 10px;
}

.setting-row button {
    padding: 5px 10px;
    font-size: 12px;
}

.add-setting {
    margin-top: 10px;
}

.provider-list-item {
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.provider-list-item strong {
    color: #4364a3;
}

.provider-list-item .status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
    background-color: #e0e0e0;
}

.provider-list-item .status.active {
    background-color: #4caf50;
    color: white;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 0 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: #4caf50;
}

input:checked+.toggle-slider:before {
    transform: translateX(26px);
}

.provider-details-section {
    background-color: #f5f8fb;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.provider-details-section h5 {
    margin-top: 0;
    color: #4364a3;
    margin-bottom: 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inline Status Messages */
#statusMessage {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 2000;
    max-width: 400px;
    border-left: 4px solid;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(450px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(450px);
        opacity: 0;
    }
}

#statusMessage.show {
    display: block;
}

#statusMessage.hide {
    animation: slideOutRight 0.3s ease forwards;
}

#statusMessage.success {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

#statusMessage.error {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

#statusMessage.info {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

#statusMessage .status-icon {
    margin-right: 10px;
    font-weight: bold;
}

/* =========================================================
   EXTRACTED FROM: org-tree-view.html
   ========================================================= */
:root {
    --tree-bg-a: #f5faf6;
    --tree-bg-b: #eef4fb;
    --panel: #ffffff;
    --panel-border: #d7e0ea;
    --primary: #1d6f56;
    --primary-strong: #135342;
    --accent: #2573a8;
    --muted: #5d6a79;
    --link: #1e5e89;
    --line: #8fa7ba;
    --focus: #e9f8f2;
    --shadow: 0 14px 26px rgba(20, 51, 80, 0.09);
}

.org-tree-page {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding-left: 20px;
    padding-right: 20px;
}

.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 14px 0 12px;
}

.tree-caption {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.org-tree-container {
    width: 100%;
    height: calc(100vh - 220px);
    min-height: 560px;
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    background:
        radial-gradient(circle at 18% 18%, rgba(37, 115, 168, 0.11), transparent 38%),
        radial-gradient(circle at 84% 78%, rgba(29, 111, 86, 0.11), transparent 34%),
        linear-gradient(155deg, var(--tree-bg-a), var(--tree-bg-b));
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.org-svg-tree {
    width: 100%;
    height: 100%;
    cursor: grab;
}

.org-svg-tree.grabbing {
    cursor: grabbing;
}

.org-link {
    stroke: var(--line);
    stroke-width: 2;
    fill: none;
}

.zoom-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 7px;
    z-index: 10;
}

.zoom-btn {
    padding: 6px 11px;
    border: 1px solid #cfd8e2;
    background-color: #ffffff;
    color: #234057;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.zoom-btn:hover {
    background-color: #edf4fb;
}

.zoom-display {
    padding: 6px 10px;
    background-color: #f3f8fd;
    border-radius: 8px;
    border: 1px solid #dfe7ef;
    font-size: 12px;
    color: #24445f;
    min-width: 48px;
    text-align: center;
    font-weight: 600;
}

.nav-controls {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 6px;
    z-index: 10;
}

.nav-up-btn {
    border: 1px solid #cdd8e5;
    background: #ffffff;
    color: #163c57;
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
    font-weight: 700;
}

.nav-up-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.focus-label {
    font-size: 13px;
    color: #29465d;
    font-weight: 600;
    padding: 0 6px;
}

.top-level-select {
    border: 1px solid #cdd8e5;
    border-radius: 8px;
    background: #fff;
    color: #1d3f58;
    padding: 6px 8px;
    font-size: 12px;
    min-width: 180px;
}

.edit-modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 16, 30, 0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.edit-modal.open {
    display: flex;
}

.edit-modal-content {
    width: min(1100px, 94vw);
    height: min(88vh, 880px);
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #d6dfeb;
    box-shadow: 0 24px 44px rgba(7, 25, 44, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.edit-modal-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e3eaf2;
    background: #f5f9fd;
    font-weight: 600;
    color: #21435a;
}

.edit-modal-body {
    padding: 12px;
    overflow: auto;
    height: 100%;
    background: #f7fafd;
}

.edit-modal-body .form-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.08);
    padding: 2em;
    margin: 0;
    border: 1px solid rgba(34, 116, 165, 0.1);
}

.edit-modal-body .form-header {
    background: linear-gradient(135deg, #2274a5 0%, rgba(34, 116, 165, 0.9) 100%);
    padding: 1.2em;
    margin: -2em -2em 1.6em -2em;
    border-radius: 12px 12px 0 0;
    color: #fff;
}

.edit-modal-body .form-header h1 {
    margin: 0;
    font-size: 1.4em;
}

.edit-modal-body .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2em;
    margin-bottom: 1.2em;
}

.edit-modal-body .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45em;
    margin-bottom: 1.1em;
}

.edit-modal-body .form-group label {
    font-weight: 600;
    color: #1e4d73;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.edit-modal-body .form-group input,
.edit-modal-body .form-group select,
.edit-modal-body .form-group textarea {
    padding: 0.75em;
    border: 1.5px solid rgba(34, 116, 165, 0.25);
    border-radius: 6px;
    font-size: 0.95em;
    background: #fff;
    color: #253746;
}

.edit-modal-body .form-actions {
    display: flex;
    gap: 0.8em;
    margin-top: 1.6em;
    padding-top: 1.2em;
    border-top: 1px solid #edf2f7;
}

.edit-modal-body .btn-primary,
.edit-modal-body .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75em 1.5em;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
}

.edit-modal-body .btn-primary {
    background: linear-gradient(135deg, #2274a5 0%, #0056b3 100%);
    color: #fff;
    border: none;
}

.edit-modal-body .btn-secondary {
    background: #f2f4f7;
    color: #2f3d4a;
    border-color: #d9e0e8;
}

.edit-modal-loading,
.edit-modal-error {
    background: #ffffff;
    border: 1px solid #d6dfeb;
    border-radius: 10px;
    padding: 18px;
    color: #27445b;
    font-weight: 600;
}

.edit-modal-error {
    color: #8a2432;
    border-color: #e8c7cf;
    background: #fff8fa;
}

.edit-modal-close {
    border: 1px solid #c5d4e4;
    background: #ffffff;
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
}

.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 18, 31, 0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2100;
}

.dialog-overlay.open {
    display: flex;
}

.dialog-box {
    width: min(460px, 92vw);
    background: #ffffff;
    border: 1px solid #d4deea;
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(15, 34, 54, 0.28);
    overflow: hidden;
}

.dialog-title {
    background: #f4f8fc;
    color: #24465f;
    font-weight: 700;
    padding: 12px 14px;
    border-bottom: 1px solid #e4ebf3;
}

.dialog-message {
    padding: 14px;
    color: #2a3f50;
    line-height: 1.45;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #edf1f6;
    background: #fbfdff;
}

.dialog-btn {
    border: 1px solid #cfd9e5;
    border-radius: 8px;
    background: #fff;
    color: #2b4559;
    font-weight: 600;
    padding: 7px 12px;
    cursor: pointer;
}

.dialog-btn.primary {
    border-color: #1f658f;
    background: #1f658f;
    color: #fff;
}

.dialog-btn.danger {
    border-color: #c44456;
    background: #c44456;
    color: #fff;
}

@media (max-width: 900px) {
    .org-tree-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .org-tree-container {
        height: calc(100vh - 190px);
        min-height: 500px;
    }
}

/* =========================================================
   EXTRACTED FROM: organisation-details.html
   ========================================================= */
.config-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.config-header {
    text-align: center;
    margin-bottom: 35px;
    border-bottom: 3px solid #4364a3;
    padding-bottom: 20px;
}

.config-header h2 {
    color: #2c3e50;
    font-size: 28px;
    margin: 0;
    font-weight: 600;
}

.form-group {
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="file"]:focus {
    border-color: #4364a3;
    outline: none;
    box-shadow: 0 0 8px rgba(67, 100, 163, 0.3);
}

.form-group input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

.file-upload-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e6ed;
}

.file-upload-hint {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 6px;
    font-style: italic;
}

.current-template {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid #4364a3;
}

.current-template span {
    color: #2c3e50;
    font-weight: 600;
}

.template-name {
    color: #4364a3;
    word-break: break-all;
}

.template-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.template-actions button {
    padding: 8px 16px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-template {
    background-color: #e74c3c;
    color: white;
}

.btn-remove-template:hover {
    background-color: #c0392b;
}

.btn-upload {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-upload:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

.btn-upload:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 35px;
}


.success-message {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
}

.success-message::before {
    content: "✓";
    font-size: 20px;
    font-weight: bold;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-box {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.info-box strong {
    color: #2980b9;
}

/* =========================================================
   EXTRACTED FROM: orgservice-assessment.html
   ========================================================= */
.assessment-header {
    margin-bottom: 2em;
}

.filter-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.2em;
    margin-bottom: 0em;
    border: 1px solid #e9ecef;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.95em;
    color: #495057;
}

.filter-group input[type="text"],
.filter-group input[type="search"],
.filter-group select {
    padding: 0.75em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
}

.filter-group input[type="text"]:focus,
.filter-group input[type="search"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.filter-checkbox-group input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.filter-checkbox-group label {
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.filter-stats {
    padding-top: 1.5em;
    border-top: 1px solid #e9ecef;
    margin-top: 1.5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.stat-number {
    font-weight: 700;
    font-size: 1.2em;
    color: #007bff;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1.5em;
}

.info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1.5em;
}

.controls-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.controls-table thead {
    border-bottom: 2px solid rgba(34, 116, 165, 0.3);
}

.controls-table th {
    padding: 0.47em 0.62em;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    background: linear-gradient(93deg, var(--primary-blue) 60%, var(--table-bg5) 110%);
    color: #fff;
    text-shadow: 0 2px 8px var(--shine-highlight);
}

.controls-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.controls-table tbody tr:hover {
    background-color: #f8f9fa;
}

.controls-table tbody tr.hidden {
    display: none;
}

.controls-table td {
    padding: 1em;
    vertical-align: middle;
}

.control-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.3em;
}

.control-detail {
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.4;
}

.control-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.control-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.control-input,
.control-select {
    width: 100px;
    padding: 0.5em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
}

.control-input:disabled,
.control-select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.control-comment {
    background-color: white;
    transition: background-color 0.3s;
    width: 100%;
    min-height: 6em;
    resize: vertical;
    padding: 0.5em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
}

.control-comment:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.linked-service-info {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 0.5em;
}

.linked-service-info b {
    color: #007bff;
}

.button-group {
    display: flex;
    gap: 1em;
    margin-top: 2em;
    flex-wrap: wrap;
}

.no-results {
    text-align: center;
    padding: 2em;
    color: #6c757d;
    font-size: 1.1em;
}

.form-table-wrapper {
    overflow-x: auto;
}

.save-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #44a728;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgb(0, 0, 0);
    z-index: 2000;
    display: none;
    align-items: center;
    font-weight: 500;
    font-size: 1.25em;
    opacity: 1;
    background-color: #44a728;
    width: 22em;
    height: 4em;
}

.save-notification.show {
    display: flex;
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.save-notification.error {
    background-color: #dc3545;
}

.save-notification .checkmark {
    font-size: 1.3em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.save-notification.show .checkmark {
    animation: checkmarkBounce 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes checkmarkBounce {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(0deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.save-notification.hide {
    animation: slideOut 0.3s ease-in forwards;
}

/* =========================================================
   EXTRACTED FROM: orgservice-edit.html
   ========================================================= */
/* ========== EDIT FORM STYLES ========== */

.form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(34, 116, 165, 0.1);
    padding: 2.5em;
    border: 1px solid rgba(34, 116, 165, 0.08);
}

.form-fields-container {
    display: flex;
    flex-direction: column;
    gap: 2em;
    margin-bottom: 2.5em;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.3em;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.label-text {
    color: var(--primary-blue);
}

.label-required {
    color: #cc2222;
    font-weight: 700;
}

.form-input,
.form-textarea,
.form-select {
    padding: 0.85em 1em;
    border: 2px solid rgba(34, 116, 165, 0.15);
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
    background: #fff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #999;
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}

.select-wrapper {
    position: relative;
}

.form-select {
    width: 100%;
    padding: 0.75em 1em;
    background-color: #fff;
    cursor: pointer;
}

.form-select option {
    padding: 0.5em;
    background: #fff;
    color: #333;
}

.form-select option:checked {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0056b3 100%);
    color: #fff;
}

.form-hint {
    font-size: 0.85em;
    color: #666;
    margin: 0;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 1em;
    align-items: center;
    padding-top: 1.5em;
    border-top: 1px solid #f0f0f0;
}

/* Page header styling */
.orgservice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5em;
    padding-bottom: 1.5em;
    border-bottom: 2px solid rgba(34, 116, 165, 0.1);
}

.orgservice-header h1 {
    margin: 0;
    font-size: 2.2em;
    color: var(--primary-blue);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-card {
        padding: 1.5em;
    }

    .form-fields-container {
        gap: 1.5em;
        margin-bottom: 1.5em;
    }

    .orgservice-header h1 {
        font-size: 1.8em;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.8em;
    }

    .btn-create-primary,
    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 1.2em;
        border-radius: 8px;
    }

    .form-label {
        font-size: 0.9em;
    }

    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .orgservice-header h1 {
        font-size: 1.5em;
    }
}

/* =========================================================
   EXTRACTED FROM: orgunit-edit.html
   ========================================================= */
.form-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.08);
    padding: 2em;
    margin-bottom: 2em;
    border: 1px solid rgba(34, 116, 165, 0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-bottom: 1.8em;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8em;
    border: 1.5px solid rgba(34, 116, 165, 0.2);
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    color: #333;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
}

.form-group select[multiple] {
    min-height: 120px;
    padding: 0.5em;
}

.form-group select[multiple] option {
    padding: 0.5em;
    line-height: 1.5;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    margin-bottom: 1.8em;
}

.form-row-full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 1em;
    margin-top: 2.5em;
    padding-top: 2em;
    border-top: 1px solid #f0f0f0;
}

.help-text {
    font-size: 0.85em;
    color: #666;
    margin-top: 0.3em;
    font-style: italic;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1.5em;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: #003fa0;
    gap: 0.8em;
}

.disabled-user {
    color: #999;
    font-style: italic;
}

.warning-box {
    display: none;
    margin-top: 0.8em;
    padding: 0.8em;
    background: rgba(204, 34, 34, 0.08);
    border-left: 3px solid #cc2222;
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
}

.warning-box.show {
    display: block;
}

@media (max-width: 768px) {
    .form-container {
        padding: 1.5em;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1em;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

body.embed-mode .main-scroll-container {
    padding-top: 0;
}

body.embed-mode .container {
    padding-top: 1em;
}

/* =========================================================
   EXTRACTED FROM: orgunit-list.html
   ========================================================= */
.orgunit-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.orgunit-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.orgunit-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orgunit-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.orgunit-table tbody tr:hover {
    background-color: #f8f9fa;
}

.orgunit-table td {
    padding: 16px;
    color: #212529;
    font-size: 14px;
}

.orgunit-table td:first-child {
    font-weight: 600;
    color: #0066cc;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-table-action {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-table-edit {
    background-color: #0066cc;
    color: white;
}

.btn-table-edit:hover {
    background-color: #0052a3;
}

.btn-table-tree {
    background-color: #6c757d;
    color: white;
}

.btn-table-tree:hover {
    background-color: #5a6268;
}

/* =========================================================
   EXTRACTED FROM: security-catalogs.html
   ========================================================= */
.catalog-controls {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-controls-expanded {
    white-space: normal;
    max-width: none;
}

.expand-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.85em;
    padding: 0;
    margin-left: 5px;
}

.expand-btn:hover {
    color: var(--accent-orange);
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Prevents action-column buttons from line-wrapping in narrow table cells */
.td-actions {
    white-space: nowrap;
    min-width: 150px;
}

.btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    transition: background 0.2s;
}

.btn-delete:hover {
    background: rgba(204, 34, 34, 0.1);
}

.btn-delete svg {
    width: 18px;
    height: 18px;
}

.create-button {
    background: linear-gradient(89deg, var(--primary-blue) 86%, var(--accent-orange) 100%);
    color: #fff;
    border: none;
    padding: 0.6em 1.5em;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1.5em;
    box-shadow: 0 2px 8px rgba(83, 190, 255, 0.17), 0 0 3px var(--shine-glare) inset;
    transition: background 0.2s, box-shadow 0.22s, filter 0.2s;
}

.create-button:hover {
    background: linear-gradient(92deg, var(--accent-orange) 68%, var(--yellow-highlight) 99%);
    color: var(--primary-blue-dark);
    box-shadow: 0 3px 14px rgba(255, 149, 5, 0.22), 0 0 7px var(--shine-glare) inset;
}

.checkbox-container {
    margin: 1em 0;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.checkbox-container input[type="checkbox"] {
    margin: 0;
}

.modal-checkbox-label {
    font-size: 0.95em;
    color: var(--text-main);
    cursor: pointer;
}

.modal-error-message {
    display: none;
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    padding: 0.8em;
    margin: 1em 0;
    color: #c62828;
    font-size: 0.9em;
    line-height: 1.4;
    max-height: 150px;
    overflow-y: auto;
}

.modal-error-message::before {
    content: "⚠ ";
    font-weight: bold;
}

.modal-error-message.constraint-error {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.modal-error-message.constraint-error::before {
    content: "🔒 ";
}

.modal-success-message {
    display: none;
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 4px;
    padding: 0.8em;
    margin: 1em 0;
    color: #2e7d32;
    font-size: 0.9em;
    line-height: 1.4;
    white-space: pre-line;
}

.modal-success-message::before {
    content: "✓ ";
    font-weight: bold;
}

@media (max-width: 768px) {

    .table th,
    .table td {
        padding: 0.3em 0.4em;
        font-size: 0.9em;
    }

    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }

    .catalog-controls {
        max-width: 150px;
    }
}

/* =========================================================
   EXTRACTED FROM: security-control-editor.html
   ========================================================= */
/* ===== Security Control Editor Page Styles ===== */
/* ===== Security Control Editor Form Styles ===== */

.security-control-editor {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.editor-form {
    width: 100%;
}

.editor-form form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    padding: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group.description-group {
    grid-column: 1 / -1;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.tag-suggestions {
    margin-top: 8px;
}

.tag-suggestions-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.tag-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-pill:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.tag-pill.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.tag-pill.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin: 25px 0 20px 0;
}

.catalog-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    border-radius: 4px;
}

.catalog-info p {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.catalog-info ul {
    margin: 0;
    padding: 0 0 0 20px;
    list-style: none;
}

.catalog-info li {
    margin: 4px 0;
    padding: 0 0 0 6px;
    font-size: 13px;
    color: #666;
    position: relative;
}

.catalog-info li:before {
    content: "•";
    position: absolute;
    left: -12px;
    color: #007bff;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 15px;
    }

    .editor-card {
        padding: 20px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }

    .form-group.description-group {
        grid-column: 1;
    }

    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
    }
}

/* =========================================================
   EXTRACTED FROM: security-controls-orgservice-mapping.html
   ========================================================= */
.mapping-header {
    margin-bottom: 2em;
}

.filter-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0em;
    margin-bottom: 0em;
    border: 1px solid #e9ecef;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.95em;
    color: #495057;
}

.filter-group input[type="text"],
.filter-group input[type="search"],
.filter-group select {
    padding: 0.75em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
}

.filter-group input[type="text"]:focus,
.filter-group input[type="search"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-stats {
    padding-top: 1.5em;
    border-top: 1px solid #e9ecef;
    margin-top: 1.5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.stat-number {
    font-weight: 700;
    font-size: 1.2em;
    color: #007bff;
}

.controls-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.controls-table thead {
    border-bottom: 2px solid rgba(34, 116, 165, 0.3);
}

.controls-table th {
    padding: 0.47em 0.62em;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    background: linear-gradient(93deg, var(--primary-blue) 60%, var(--table-bg5) 110%);
    color: #fff;
    text-shadow: 0 2px 8px var(--shine-highlight);
}

.controls-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.controls-table tbody tr:hover {
    background-color: #f8f9fa;
}

.controls-table tbody tr.hidden {
    display: none;
}

.controls-table td {
    padding: 1em;
    vertical-align: middle;
}

.control-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.3em;
}

.control-detail {
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.4;
}

.control-select {
    width: 100%;
    max-width: 250px;
    padding: 0.5em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
    background-color: white;
}

.control-select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.control-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: 0.3em;
}

.tag-badge {
    background-color: #e7f3ff;
    color: #004085;
    padding: 0.25em 0.75em;
    border-radius: 12px;
    font-size: 0.85em;
    border: 1px solid #b8daff;
}

.domain-badge {
    background-color: #f0f0f0;
    color: #495057;
    padding: 0.25em 0.75em;
    border-radius: 12px;
    font-size: 0.85em;
    border: 1px solid #dee2e6;
}

.catalog-badge {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.25em 0.75em;
    border-radius: 12px;
    font-size: 0.85em;
    border: 1px solid #ffeaa7;
}

.no-results {
    text-align: center;
    padding: 3em 2em;
    color: #6c757d;
    font-size: 1.1em;
}

.form-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
}

.save-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #44a728;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgb(0, 0, 0);
    z-index: 2000;
    display: none;
    align-items: center;
    font-weight: 500;
    font-size: 1.25em;
    opacity: 1;
    background-color: #44a728;
    width: 22em;
    height: 4em;
}

.save-notification.show {
    display: flex;
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.save-notification.error {
    background-color: #dc3545;
}

.save-notification .checkmark {
    font-size: 1.3em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 1em 0 1.5em;
}

.save-notification.show .checkmark {
    animation: checkmarkBounce 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes checkmarkBounce {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(0deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.save-notification.hide {
    animation: slideOut 0.3s ease-in forwards;
}

.button-group {
    display: flex;
    gap: 1em;
    margin-top: 2em;
    flex-wrap: wrap;
}

.info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1.5em;
}

/* =========================================================
   EXTRACTED FROM: security-controls.html
   ========================================================= */
/* Popup Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 7em;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modalLevel2 {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

.csv-instructions {
    background-color: #f9f9f9;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.csv-instructions h4 {
    margin-top: 0;
    color: #2196F3;
}

.column-list {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
}

.column-list ul {
    margin: 5px 0;
    padding-left: 20px;
}

.column-list li {
    margin: 5px 0;
    font-family: monospace;
    background-color: #f5f5f5;
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
}

.example-section {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
}

.example-section h5 {
    margin-top: 0;
    color: #856404;
}

.example-csv {
    font-family: monospace;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    overflow-x: auto;
    white-space: pre;
    font-size: 12px;
}

.import-button {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    margin-right: 10px;
    display: inline-block;
    text-decoration: none;
}

.import-button:hover {
    background-color: #218838;
}

.import-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.import-button.primary {
    background-color: #007bff;
}

.import-button.primary:hover {
    background-color: #0056b3;
}

.upload-section {
    margin: 20px 0;
    padding: 15px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    text-align: center;
}

/* File input shown inline in the CSV import wizard */
.upload-section .file-input {
    display: block;
    margin: 10px auto;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
    cursor: pointer;
}

.catalog-options {
    background-color: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.catalog-options h4 {
    margin-top: 0;
    color: #2d5a2d;
}

.radio-group {
    margin: 10px 0;
}

/* === Governance Task Status Badges === */
.task-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.82em;
    font-weight: 600;
    color: #fff;
    min-width: 6rem;
    text-align: center;
}
.task-status-badge.status-identified {
    background: #6c757d;
}
.task-status-badge.status-inprogress {
    background: var(--primary-blue, #2274A5);
}
.task-status-badge.status-approval {
    background: var(--accent-orange, #e07b00);
}
.task-status-badge.status-done {
    background: var(--success-green, #33aa33);
}
.link {
    color: var(--primary-blue, #2274A5);
    text-decoration: none;
}
.related-item-control {
    color: #2274A5;
    background: #eef4fb;
    border: 1px solid #c2dcf0;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 0.88em;
    font-weight: 500;
    white-space: nowrap;
}
.related-item-catalog {
    color: #7c3aed;
    background: #f3eeff;
    border: 1px solid #d4b8ff;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 0.88em;
    font-weight: 500;
    white-space: nowrap;
}
.related-item-control:hover { background: #d8eaf7; text-decoration: none; }
.related-item-catalog:hover { background: #e8d8ff; text-decoration: none; }
.link:hover {
    text-decoration: underline;
}

.radio-option {
    margin: 8px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.radio-option:hover {
    background-color: #f0f0f0;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
}

.new-catalog-fields {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.new-catalog-fields input,
.new-catalog-fields textarea {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.existing-catalog-select {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.existing-catalog-select select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.preview-section {
    display: none;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 11px;
}

.preview-table th,
.preview-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
}

.preview-table th {
    background-color: #e9ecef;
    font-weight: bold;
}

.preview-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.preview-table td {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-stats {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.error-box {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
    color: #721c24;
}

.step-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
    display: none;
}

.step-container.active {
    display: block;
}

.step-header {
    background-color: #e9ecef;
    padding: 15px;
    font-weight: bold;
    color: #495057;
}

.step-content {
    padding: 20px;
}

.step-number {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 14px;
}

.warning-box {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
    color: #856404;
}

.error-row {
    background-color: #f8d7da !important;
    color: #721c24;
}

.valid-row {
    background-color: #d1eddd;
    color: #155724;
}

.match-high {
    background-color: #fff3cd;
}

.match-medium {
    background-color: #d1ecf1;
}

.match-low {
    background-color: #f0f0f0;
}

.match-none {
    background-color: #ffffff;
}

.analysis-progress {
    margin: 15px 0;
    padding: 10px;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    display: none;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background-color: #007bff;
    width: 0%;
    transition: width 0.3s;
}

.match-badge-high {
    background-color: #ffc107;
    color: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
}

.match-badge-high:hover {
    background-color: #ffb300;
}

.match-badge-medium {
    background-color: #17a2b8;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
}

.match-badge-medium:hover {
    background-color: #138496;
}

.match-badge-low {
    background-color: #6c757d;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
}

.match-badge-low:hover {
    background-color: #5a6268;
}

.match-badge-none {
    background-color: #28a745;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.action-select {
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 11px;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    border-bottom: 1px dotted #333;
}

.tooltip-content {
    visibility: hidden;
    width: 350px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 12px;
    position: absolute;
    z-index: 1001;
    bottom: 125%;
    left: 50%;
    margin-left: -175px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: normal;
    white-space: normal;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

.match-tooltip {
    display: inline-block;
    cursor: help;
    position: relative;
}

.match-tooltip .tooltip-content {
    position: fixed !important;
    z-index: 2000 !important;
}

.match-info {
    background-color: #2c3e50;
    border-left: 3px solid #3498db;
    padding: 10px;
    margin: 5px 0;
    border-radius: 3px;
}

.match-info-label {
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 3px;
}

.match-info-value {
    color: #bdc3c7;
    font-size: 11px;
    word-break: break-word;
}

.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 14px;
}

.row-analyzing {
    opacity: 0.6;
}

.translation-section {
    background-color: #f0f8ff;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.translation-section h5 {
    margin-top: 0;
    color: #004085;
}

.translation-checkbox {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.translation-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.translation-checkbox label {
    margin: 0;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.button-secondary {
    background-color: #6c757d;
}

.button-secondary:hover {
    background-color: #5a6268;
}

/* Delete Confirmation Modal */
.delete-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease-out;
}

.delete-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #dc3545;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.delete-modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dc3545;
}

.delete-modal-header .icon {
    font-size: 32px;
    color: #dc3545;
}

.delete-modal-header h3 {
    margin: 0;
    color: #dc3545;
    flex: 1;
}

.delete-modal-body {
    margin: 20px 0;
    line-height: 1.6;
    color: #333;
}

.delete-modal-body .control-name {
    font-weight: bold;
    color: #495057;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    word-break: break-word;
}

.delete-modal-body .error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    color: #721c24;
    padding: 15px;
    margin: 15px 0;
    display: none;
}

.delete-modal-body .error-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delete-modal-body .error-icon {
    font-size: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

.delete-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.delete-modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.delete-modal-footer .btn-cancel {
    background-color: #6c757d;
    color: white;
}

.delete-modal-footer .btn-cancel:hover {
    background-color: #5a6268;
}

.delete-modal-footer .btn-confirm {
    background-color: #dc3545;
    color: white;
}

.delete-modal-footer .btn-confirm:hover:not(:disabled) {
    background-color: #c82333;
    transform: scale(1.02);
}

.delete-modal-footer .btn-confirm:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.delete-modal-footer .btn-confirm .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Action Buttons Styling */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Success/Error Messages */
.alert {
    padding: 15px;
    margin: 20px 0;
    border: 1px solid transparent;
    border-radius: 5px;
    animation: slideDown 0.3s ease-out;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-close {
    float: right;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: inherit;
    opacity: 0.7;
}

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

table tr.hidden {
    display: none;
}

/* =========================================================
   EXTRACTED FROM: statistics.html
   ========================================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card h3 {
    margin: 0 0 .5rem 0;
    font-size: 1rem;
    color: #333;
}

.metric {
    font-size: 2rem;
    font-weight: 600;
}

.small {
    color: #666;
    font-size: .9rem;
}

.recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-item {
    padding: .5rem 0;
    border-bottom: 1px dashed #eee;
}

.muted {
    color: #777;
    font-size: .9rem;
}

/* simple bar chart */
.chart {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    padding: 1rem 0;
    height: 220px;
}

.chart-bar {
    background: #4a90e2;
    border-radius: 4px 4px 0 0;
    width: 36px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
}

.chart-labels {
    display: flex;
    gap: .5rem;
    margin-top: .5rem;
}

.chart-label {
    width: 36px;
    text-align: center;
    font-size: .75rem;
    color: #333;
}

.chart-wrap {
    overflow-x: auto;
}

/* =========================================================
   EXTRACTED FROM: users.html
   ========================================================= */
.users-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.users-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.users-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.users-table tbody tr:hover {
    background-color: #f8f9fa;
}

.users-table td {
    padding: 16px;
    color: #212529;
    font-size: 14px;
}

.users-table td:first-child {
    font-weight: 600;
    color: #0066cc;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-table-action {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-table-edit {
    background-color: #0066cc;
    color: white;
}

.btn-table-edit:hover {
    background-color: #0052a3;
}

.btn-table-delete {
    background-color: #dc3545;
    color: white;
}

.btn-table-delete:hover {
    background-color: #c82333;
}

.delete-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.delete-modal {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    padding: 18px;
}

.delete-modal h3 {
    margin: 0 0 12px 0;
    color: #212529;
    font-size: 18px;
}

.delete-modal p {
    margin: 0 0 10px 0;
    color: #495057;
}

.delete-list-wrap {
    max-height: 220px;
    overflow: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

.delete-list {
    margin: 0;
    padding-left: 18px;
}

.delete-list li {
    margin-bottom: 6px;
}

.delete-block-notice {
    display: none;
    background: #fff5f5;
    border: 1px solid #f5c2c7;
    color: #842029;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.delete-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-modal-cancel,
.btn-modal-confirm {
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
}

.btn-modal-cancel {
    background-color: #6c757d;
    color: #fff;
}

.btn-modal-cancel:hover {
    background-color: #5a6268;
}

.btn-modal-confirm {
    background-color: #dc3545;
    color: #fff;
}

.btn-modal-confirm:hover {
    background-color: #c82333;
}

/* =========================================================
   EXTRACTED FROM: user_form.html
   ========================================================= */
.user-form-container {
    max-width: 700px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(34, 116, 165, 0.1);
    border: 1px solid rgba(34, 116, 165, 0.1);
}

.form-group {
    margin-bottom: 1.8em;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.6em;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.form-group label .required {
    color: #cc2222;
    font-size: 1.1em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.85em;
    border: 1px solid rgba(34, 116, 165, 0.25);
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fff;
}

.form-group select[multiple] {
    min-height: 120px;
    padding: 0.5em;
}

.form-group select[multiple] option {
    padding: 0.5em;
    line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(34, 116, 165, 0.1);
    background: #fafbfc;
}

.form-group input::placeholder {
    color: #bbb;
}

.form-group.required>input,
.form-group.required>select {
    border-color: rgba(34, 116, 165, 0.35);
}

.role-info {
    display: none;
    margin-top: 0.8em;
    padding: 1em;
    background: rgba(255, 149, 5, 0.08);
    border-left: 3px solid var(--accent-orange);
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
}

.role-info.show {
    display: block;
}

.form-section {
    margin-bottom: 2.2em;
    padding-bottom: 2em;
    border-bottom: 1px solid #efefef;
}

.form-section:last-of-type {
    margin-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 0.5em;
}

.form-actions {
    display: flex;
    gap: 1em;
    justify-content: flex-end;
    margin-top: 2.5em;
    padding-top: 2em;
    border-top: 1px solid #efefef;
}

.form-error {
    color: #cc2222;
    font-size: 0.85em;
    margin-top: 0.4em;
}

.field-hint {
    font-size: 0.85em;
    color: #999;
    font-weight: 400;
    margin-top: 0.4em;
    text-transform: none;
    letter-spacing: normal;
}

.org-unit-selection {
    display: none;
}

.org-unit-selection.show {
    display: flex;
}

.disabled-option {
    color: #999;
    font-style: italic;
}

.warning-box {
    display: none;
    margin-top: 0.8em;
    padding: 1em;
    background: rgba(204, 34, 34, 0.08);
    border-left: 3px solid #cc2222;
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
}

.warning-box.show {
    display: block;
}

.info-box {
    display: none;
    margin-top: 0.8em;
    padding: 1em;
    background: rgba(34, 116, 165, 0.08);
    border-left: 3px solid var(--primary-blue);
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
}

.info-box.show {
    display: block;
}

@media (max-width: 768px) {
    .user-form-container {
        margin: 1em;
        padding: 1.5em;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
    }
}

/* =====================================================================
   GLOBAL BUTTON SIZE NORMALIZATION
   Ensures uniform button sizing across all pages. Font-size uses
   the configurable --font-size-btn CSS variable (set via LayoutConfig).
   These rules apply last and override any per-section padding/font-size.
   ===================================================================== */
.btn-action,
.btn-submit,
.btn-cancel,
.btn-danger,
.btn-edit,
.btn-primary,
.btn-secondary,
.btn-create-primary,
.import-button {
    font-size: var(--font-size-btn, 0.85em) !important;
    min-width: 5rem;
    text-decoration: none;
    cursor: pointer;
}

/* Table action buttons: no min-width override — let cell context size them */
.table td .btn-action,
.table td .btn-danger,
.table td .btn-edit,
.table td .btn-cancel,
.card td .btn-action,
.card td .btn-danger,
.card td .btn-edit,
.card td .btn-cancel {
    min-width: 5rem;
}

/* Filter row in table headers: neutral background, no gradient text */
.filter-row th {
    padding: 0.3em 0.62em;
}

.filter-row th input {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(15, 15, 15, 0.25);
    border-radius: 3px;
    outline: none;
}

.filter-row th input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.filter-row th input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Sortable table header */
.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-th .sort-arrow {
    display: inline-block;
    margin-left: 0.25em;
    font-size: 0.75em;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.sortable-th.sort-asc .sort-arrow::after {
    content: '▲';
    opacity: 1;
}

.sortable-th.sort-desc .sort-arrow::after {
    content: '▼';
    opacity: 1;
}

.sortable-th:not(.sort-asc):not(.sort-desc) .sort-arrow::after {
    content: '⇅';
}

/* =====================================================================
   GLOBAL MODAL HEADER NORMALIZATION
   All .modal-header elements get a consistent gradient header with
   white text and the brand font. Overrides all per-section definitions.
   ===================================================================== */
.modal-header {
    background: linear-gradient(89deg, var(--primary-blue) 86%, var(--header-grad-highlight) 100%);
    color: #fff;
    padding: 0.7em 1.2em;
    margin: -1.5em -1.5em 1.2em -1.5em;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none !important;
}

.modal-header h2,
.modal-header h3 {
    color: #fff !important;
    font-size: var(--font-size-headline, 1.2em) !important;
    font-family: var(--nav-font-family, 'Segoe UI, Arial, sans-serif');
    margin: 0;
    font-weight: 600;
}

.modal-close {
    background: none !important;
    border: none !important;
    cursor: pointer;
    font-size: 1.4em;
    color: rgba(255, 255, 255, 0.85);
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close:hover {
    color: #fff;
}

/* =====================================================================
   GLOBAL LINK NORMALIZATION
   Generic text links and back-links inside the app container.
   ===================================================================== */
.back-link,
a.back-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    transition: color 0.15s;
}

.back-link:hover,
a.back-link:hover {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

/* =========================================================
   Capability Report View - Tree Nodes
   ========================================================= */

.cap-tree-forest {
    display: flex;
    gap: 0.35rem;
}

.cap-tree-block {
    position: relative;
    margin-bottom: 1rem;
}

.cap-tree-root {
    display: flex;
    position: relative;
}

.cap-tree-root::after {
    content: "";
    position: absolute;
    left: 1.1rem;
    bottom: -0.85rem;
    height: 0.85rem;
    border-left: 2px solid rgba(34, 116, 165, 0.26);
}

.cap-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.8rem 0 0 1.8rem;
    background: transparent;
}

.cap-card-body.tree-view {
    position: relative;
}

.cap-tree-children::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0.85rem;
    left: 1.1rem;
    border-left: 2px solid rgba(34, 116, 165, 0.26);
}

.cap-domain-tree-item {
    position: relative;
    display: flex;
    align-items: stretch;
    padding-left: 0.85rem;
}

.cap-domain-branch {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0.85rem;
    border-top: 2px solid rgba(34, 116, 165, 0.24);
    transform: translateY(-50%);
}

.cap-node-card {
    width: 210px;
    min-height: 162px;
    border: 1.5px solid var(--border, #d0deec);
    border-radius: 10px;
    padding: 0.62rem 0.72rem 0.62rem;
    box-shadow: 0 2px 8px rgba(34, 116, 165, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}

.cap-node-card-capability {
    width: 210px;
    border-color: rgba(16, 74, 126, 0.42);
    background: linear-gradient(180deg, rgba(18, 102, 166, 0.22) 0%, rgba(227, 240, 250, 0.92) 100%);
    box-shadow: 0 3px 10px rgba(18, 102, 166, 0.16);
}

.cap-node-card-domain {
    width: 147px;
    min-height: 132px;
    padding: 0.48rem 0.56rem 0.5rem;
    border-color: rgba(132, 72, 7, 0.42);
    background: linear-gradient(180deg, rgba(245, 167, 59, 0.24) 0%, rgba(255, 246, 224, 0.95) 100%);
    box-shadow: 0 2px 7px rgba(166, 103, 18, 0.14);
}

.cap-node-card-domain .cap-node-title {
    font-size: 0.74rem;
}

.cap-node-card-domain .cap-node-stats {
    gap: 0.28rem;
}

.cap-node-card-domain .cap-stat-label {
    font-size: 0.54rem;
}

.cap-node-card-domain .cap-stat-value {
    font-size: 0.72rem;
}

.cap-node-card-domain .cap-stat-detail {
    font-size: 0.58rem;
}

.cap-node-card-domain .cap-node-bar {
    height: 5px !important;
}

.cap-node-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
}

.cap-node-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main, #1f3647);
    line-height: 1.25;
    min-height: 2.5em;
}

.cap-node-subtitle {
    font-size: 0.69rem;
    color: var(--gray-777, #777);
}

.cap-node-stats {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.08rem;
    margin-bottom: auto;
}

.cap-node-stats-stacked {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.24rem;
}

.cap-node-stats-stacked .cap-stat-box {
    width: 100%;
    align-items: stretch;
    flex: 0 0 auto;
}

.cap-node-stats-stacked .cap-stat-box:first-child {
    justify-content: flex-start;
}

.cap-node-stats-stacked .cap-stat-label,
.cap-node-stats-stacked .cap-stat-value {
    text-align: center;
}

.cap-primary-rating {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.cap-node-stats-stacked .maturity-level-pill {
    display: flex;
    white-space: normal;
    line-height: 1.2;
    min-height: 1.1em;
}

.cap-node-stats .cap-stat-box:first-child {
    justify-content: flex-end;
}

.cap-stat-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    min-width: 0;
    flex: 1 1 0;
}

.cap-stat-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-888, #888);
}

.cap-stat-value {
    font-size: 0.82rem;
    font-weight: 700;
}

.maturity-level-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.24rem 0.62rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    max-width: 88%;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: auto;
}

.maturity-level-high {
    color: #195f2f;
    background: rgba(67, 160, 71, 0.22);
    border: 1px solid rgba(46, 125, 50, 0.4);
}

.maturity-level-mid {
    color: #8a5800;
    background: rgba(255, 167, 38, 0.24);
    border: 1px solid rgba(192, 120, 0, 0.45);
}

.maturity-level-low {
    color: #8f1b1a;
    background: rgba(239, 83, 80, 0.2);
    border: 1px solid rgba(183, 28, 28, 0.4);
}

.maturity-level-none {
    color: #5b6f7f;
    background: rgba(34, 116, 165, 0.12);
    border: 1px solid rgba(34, 116, 165, 0.28);
}

.cap-stat-detail {
    font-size: 0.64rem;
    color: var(--gray-777, #777);
}

.cap-node-bar {
    height: 6px !important;
    border-radius: 5px !important;
}

.cap-node-bar .progress-bar-fill {
    border-radius: 5px;
}

.cap-domain-empty {
    padding: 0.2rem 0 0.2rem 1rem;
    font-size: 0.76rem;
    text-align: left;
}

@media (max-width: 768px) {
    .cap-node-card,
    .cap-node-card-capability,
    .cap-node-card-domain {
        width: min(210px, 100%);
    }

    .cap-node-card-domain {
        width: min(147px, 100%);
    }

    .cap-card-body {
        padding-left: 1.6rem;
    }

    .cap-tree-root::after,
    .cap-tree-children::before {
        left: 0.8rem;
    }
}

.score-high {
    color: var(--success-green, #2e7d32);
}

.score-mid {
    color: #c07800;
}

.score-low {
    color: var(--error-red, #b71c1c);
}

.bar-high {
    background: linear-gradient(90deg, #43a047 0%, #2e7d32 100%);
    box-shadow: 0 0 8px rgba(56, 180, 90, 0.35) inset;
}

.bar-mid {
    background: linear-gradient(90deg, #ffa726 0%, #c07800 100%);
    box-shadow: 0 0 8px rgba(230, 160, 30, 0.35) inset;
}

.bar-low {
    background: linear-gradient(90deg, #ef5350 0%, #b71c1c 100%);
    box-shadow: 0 0 8px rgba(200, 50, 50, 0.25) inset;
}

/* =========================================================
   GOVERNANCE MODALS — modal-form, status pills, user-check-list
   ========================================================= */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.modal-form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-main);
}

.modal-form input[type="text"],
.modal-form input[type="date"],
.modal-form select,
.modal-form textarea {
    width: 100%;
    box-sizing: border-box;
}

.modal-form input[readonly] {
    background: var(--background-light);
    color: var(--gray-777);
}

.status-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

.status-pill {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    border: 3px solid transparent;
    cursor: pointer;
    font-size: 0.82em;
    font-weight: 600;
    color: #fff;
    transition: filter 0.15s, border-color 0.15s;
}

.status-pill:hover {
    filter: brightness(0.88);
}

.status-pill.pill-identified {
    background: #6c757d;
}

.status-pill.pill-inprogress {
    background: var(--primary-blue);
}

.status-pill.pill-approval {
    background: var(--accent-orange);
}

.status-pill.pill-done {
    background: var(--success-green);
}

.status-pill.pill-active {
    border-color: var(--primary-blue-dark);
    filter: brightness(0.85);
}

.user-check-list {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.user-check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95em;
}

.ctrl-task-btn {
    margin-left: 0.4rem;
    vertical-align: middle;
    font-size: 1.2em;
}

/* --- ctrl-task modal improvements --- */
.modal-popup-ctrl-task { max-width: 580px; }
.ctrl-task-context-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(25, 118, 210, 0.07);
    border-left: 3px solid var(--primary-blue);
    border-radius: 0 6px 6px 0;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--primary-blue-dark, #1565c0);
}
.modal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
/* Task modal shared design */
.task-modal { max-width: 560px; }
.task-modal-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.4rem;
    color: var(--primary-blue);
}
.task-modal-header h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.2em;
    font-weight: 700;
}
.task-link-section {
    background: #f7f9fc;
    border: 1px solid #dce8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.task-link-label {
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5a6a7a;
}
.link-type-toggle {
    display: flex;
    border: 1px solid #c8d8e8;
    border-radius: 6px;
    overflow: hidden;
}
.link-type-btn {
    flex: 1;
    padding: 0.4rem 0.5rem;
    font-size: 0.82em;
    font-weight: 600;
    background: #fff;
    border: none;
    border-right: 1px solid #c8d8e8;
    color: #5a6a7a;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.link-type-btn:last-child { border-right: none; }
.link-type-btn:hover:not(.link-active) { background: #eef4fb; color: #2274A5; }
.link-type-btn.link-active { background: #2274A5; color: #fff; }
.field-error {
    display: none;
    color: #c0392b;
    font-size: 0.8em;
    margin-top: 2px;
    font-weight: 500;
}
.required-hint {
    font-size: 0.8em;
    font-weight: 400;
    color: var(--error-red, #e53935);
    margin-left: 0.2em;
}
/* Governance tables: stable fixed-width columns — prevents reflow during filtering/editing */
#tasksTable, #projectsTable {
    table-layout: fixed;
    width: 100%;
}

/* === Deviation Analysis === */
.gap-table td { vertical-align: top; }
.gap-score { font-weight: bold; }
.gap-score.below { color: var(--error-red); }
.gap-controls-list { font-size: 0.88em; color: var(--gray-777); margin: 0; padding-left: 1.2em; }
.gap-recommendation { font-style: italic; }
.deviation-filter-form { padding: 1.5em; margin-bottom: 1.5em; }
.deviation-summary-bar { padding: 0.8em 1em; margin-bottom: 1em; display: flex; align-items: center; gap: 0.5em; background: var(--background-light); }
.deviation-project-fieldset { border: 1px solid var(--border-color, #ddd); border-radius: 6px; padding: 0.8em 1em; }
.deviation-project-fieldset legend { font-weight: 600; padding: 0 0.4em; }
.d-none { display: none !important; }

/* === Version Management === */
.badge-info { background: var(--info-blue, #3498db); color: #fff; padding: 0.15em 0.5em; border-radius: 4px; font-size: 0.82em; }
.badge-success { background: var(--success-green, #27ae60); color: #fff; padding: 0.15em 0.5em; border-radius: 4px; font-size: 0.82em; }
.version-badge { display: inline-block; background: var(--background-light, #f0f0f0); border: 1px solid var(--border-color, #ccc); padding: 0.1em 0.5em; border-radius: 4px; font-weight: 600; font-size: 0.88em; font-family: monospace; }
.version-management-section { border: 1px solid var(--border-color, #ddd); border-radius: 6px; padding: 0.5em 0.9em; margin-top: 0.6em; margin-bottom: 0.5em; background: var(--background-light, #fafafa); }
.version-mgmt-top { display: flex; gap: 2em; align-items: flex-end; flex-wrap: wrap; margin-bottom: 0.5em; }
.version-mgmt-field { display: flex; flex-direction: column; gap: 3px; }
.version-mgmt-field > label { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: #555; }
.checkbox-label { display: flex; align-items: center; gap: 0.5em; cursor: pointer; }
.track-changes-inline {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 0.4em 0;
}
.track-changes-inline .checkbox-label {
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}
.track-changes-inline .text-muted {
    flex: 1;
    min-width: 0;
}

/* Uniform project-type pill in table */
.type-pill {
    display: inline-block;
    min-width: 8rem;
    max-width: 12rem;
    text-align: center;
    cursor: default;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.text-sm { font-size: 0.85em; }

/* Version History Tree */
.version-history-tree { max-height: 60vh; overflow-y: auto; padding: 0.5em; }
.version-tree { display: flex; flex-direction: column; }
.version-node { border: 1px solid var(--border-color, #ddd); border-radius: 6px; padding: 0.8em 1em; background: #fff; }
.version-node-current { border-color: var(--info-blue, #3498db); border-width: 2px; }
.version-node-header { display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap; }
.version-node-detail { margin-top: 0.5em; font-size: 0.9em; color: var(--gray-555, #555); }
.version-detail-text { margin-top: 0.3em; font-style: italic; white-space: pre-wrap; }
.version-connector { display: flex; justify-content: center; padding: 0.3em 0; }
.version-connector::after { content: "│"; font-size: 1.2em; color: var(--gray-777, #999); }
.hist-diff-added { background: #c8f0c8; color: #1a5c1a; border-radius: 2px; padding: 0 2px; }
.hist-diff-removed { background: #f5c6c6; color: #8b0000; text-decoration: line-through; border-radius: 2px; padding: 0 2px; }

/* Modal large variant */
.modal-popup-lg { max-width: 800px; width: 90%; }

/* Changes Tracking UI */
.changes-container { max-height: 60vh; overflow-y: auto; }
.changes-toolbar { margin-bottom: 0.8em; display: flex; gap: 0.5em; }
.changes-list { display: flex; flex-direction: column; gap: 0.5em; }
.change-item { border: 1px solid var(--border-color, #ddd); border-radius: 6px; overflow: hidden; }
.change-header { padding: 0.7em 1em; cursor: pointer; display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap; background: var(--background-light, #fafafa); }
.change-header:hover { background: var(--hover-bg, #f0f0f0); }
.change-toggle { font-size: 0.7em; color: var(--gray-777, #999); min-width: 1em; text-align: center; }
.change-detail { padding: 0.8em 1em; border-top: 1px solid var(--border-color, #eee); }
.change-comparison { display: flex; gap: 1.5em; flex-wrap: wrap; }
.change-col { flex: 1; min-width: 250px; }
.change-col h4 { margin: 0 0 0.5em 0; font-size: 0.95em; }

/* Project Info Card */
.project-info-card { padding: 1.5em; margin-bottom: 1.5em; }

/* === Project Type Selection Cards === */
.project-type-cards {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}
.project-type-card {
    flex: 1;
    min-width: 150px;
    border: 2px solid var(--border, #ddd);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--background-light, #fafafa);
}
.project-type-card:hover {
    border-color: var(--primary-blue, #3498db);
    background: rgba(25, 118, 210, 0.04);
}
.project-type-card.selected {
    border-color: var(--primary-blue, #3498db);
    background: rgba(25, 118, 210, 0.08);
}
.project-type-card-name {
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}
.project-type-card-desc {
    font-size: 0.82em;
    color: var(--gray-777, #777);
    line-height: 1.4;
}

/* === Linked Assessments === */
.linked-assessments-container {
    max-height: 40vh;
    overflow-y: auto;
    margin-bottom: 1rem;
}
.linked-assessments-add-section {
    border-top: 1px solid var(--border, #ddd);
    padding-top: 1rem;
    margin-top: 0.5rem;
}
.linked-assessments-add-section h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95em;
}

/* Linked assessments two-column split */
.linked-assessments-split {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    min-height: 200px;
}
.linked-assessments-split-left {
    flex: 2;
    min-width: 0;
    overflow-y: auto;
    max-height: 50vh;
}
.linked-assessments-split-right {
    flex: 1;
    min-width: 220px;
    border-left: 1px solid var(--border, #ddd);
    padding-left: 1.5rem;
}

/* --- Assessment Details --- */
#email-body-editor .ql-editor { min-height: 220px; max-height: 480px; overflow-y: auto; font-size: 0.95em; }
#email-body-editor .ql-toolbar { border-radius: 4px 4px 0 0; }
#email-body-editor .ql-container { border-radius: 0 0 4px 4px; }

.detail-inline-edit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.details-action-col {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
    padding-left: 0.3em;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    background: #eaf4fb;
    color: #1f4f6f;
    font-weight: 600;
    line-height: 1.2;
}

/* --- Capability Report Progress --- */
.calc-card {
    max-width: 640px;
    margin: 2.5rem auto;
    border: 1px solid #dde3ec;
    border-radius: 10px;
    padding: 2rem 2.2rem;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.calc-title {
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.calc-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 1.5rem;
}
.calc-progress-wrap {
    height: 1.1rem;
    background: #e5ecf5;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.7rem;
}
#calc-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2274a5, #5aade0);
    border-radius: 999px;
    transition: width 0.45s cubic-bezier(0.4,0,0.2,1);
}
#calc-step {
    font-size: 0.88em;
    color: #555;
    min-height: 1.4em;
    margin-bottom: 1.2rem;
}
#calc-error {
    display: none;
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    background: #fdf0ef;
    border: 1px solid #e8b4b0;
    border-radius: 6px;
    color: #a93226;
    font-size: 0.9em;
}
.calc-back-link {
    font-size: 0.88em;
    color: #888;
    text-decoration: none;
}
.calc-back-link:hover { text-decoration: underline; }

/* --- Org Unit Reporting --- */
.reporting-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}
.reporting-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.reporting-selector label {
    font-weight: 600;
    white-space: nowrap;
}
.reporting-selector select {
    min-width: 220px;
}
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
}
#loading-indicator {
    display: none;
    color: #555;
    margin-top: 0.5rem;
}
#chart-placeholder {
    color: #888;
    font-style: italic;
    margin-top: 0.5rem;
}
.catalog-chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.coverage-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

/* --- Security Capability Mapping --- */
.mapping-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
.mapping-filter-bar label {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-secondary, #555);
}
.mapping-filter-bar select {
    min-width: 200px;
}
.cap-chips-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    min-width: 180px;
}
.cap-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    padding: 0.18em 0.5em 0.18em 0.75em;
    background: #e8f2fb;
    border: 1px solid #a8c9e8;
    color: #1a5a7a;
    font-size: 0.83em;
    white-space: nowrap;
}
.cap-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    font-size: 1em;
    line-height: 1;
    padding: 0 2px;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
}
.cap-chip-remove:hover {
    color: #c0392b;
    background: #fce8e6;
}
.add-cap-select {
    font-size: 0.85em;
    padding: 0.2em 0.5em;
    border-radius: 6px;
    border: 1px solid #bbb;
    cursor: pointer;
    min-width: 160px;
}
.domain-row.hidden-by-filter {
    display: none;
}
.mapping-status-bar {
    position: fixed;
    bottom: 1.2rem;
    right: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.4em 1em;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    font-size: 0.9em;
    z-index: 9999;
}
.mapping-status-bar.success { border-color: #27ae60; color: #27ae60; }
.mapping-status-bar.error   { border-color: #c0392b; color: #c0392b; }

/* =========================================================
   ACTIVE FILTER TAG (dismissible chip in filter bars)
   ========================================================= */
.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    background: var(--primary-blue, #2274a5);
    color: #fff;
    border-radius: 999px;
    padding: 0.18em 0.3em 0.18em 0.7em;
    font-size: var(--font-size-body, 0.9em);
    font-weight: 500;
    white-space: nowrap;
}
.active-filter-tag-label {
    opacity: 0.82;
    font-size: 0.87em;
    margin-right: 0.1em;
}
.active-filter-tag-value {
    font-weight: 600;
}
.active-filter-tag-remove {
    background: rgba(255,255,255,0.22);
    border: none;
    border-radius: 50%;
    width: 1.35em;
    height: 1.35em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 0.8em;
    margin-left: 0.15em;
    padding: 0;
    line-height: 1;
    transition: background 0.15s;
}
.active-filter-tag-remove:hover {
    background: rgba(255,255,255,0.44);
}

/* =========================================================
   ANALYSIS LOADING OVERLAY (deviation analysis patience popup)
   ========================================================= */
.analysis-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #d8eaf6;
    border-top-color: var(--primary-blue, #2274a5);
    border-radius: 50%;
    animation: analysis-spin 0.75s linear infinite;
    flex-shrink: 0;
}
@keyframes analysis-spin {
    to { transform: rotate(360deg); }
}

/* =========================================================
   FONT PICKER MODAL
   ========================================================= */
.font-picker-option {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    padding: 0.5em 0.8em;
    border: 1px solid #dde8f0;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, border-color 0.12s;
    width: 100%;
    box-sizing: border-box;
}
.font-picker-option:hover {
    background: #e8f2fb;
    border-color: var(--primary-blue, #2274a5);
}
.font-picker-option.selected {
    background: #d0e8f8;
    border-color: var(--primary-blue, #2274a5);
    border-width: 2px;
}
.font-picker-name {
    font-size: 0.78em;
    color: var(--gray777, #666);
    font-family: inherit !important;
}
.font-picker-preview {
    font-size: 1.08em;
    color: var(--text-main, #222);
}

/* =================== Assessment Wizard =================== */

/* Launch button highlight */
.wizard-launch-btn {
    background: linear-gradient(135deg, #2274A5, #1b5d87) !important;
    color: #fff !important;
    font-weight: 600;
}
.wizard-launch-btn:hover {
    background: linear-gradient(135deg, #1b5d87, #154a6c) !important;
    box-shadow: 0 2px 12px rgba(34,116,165,0.25);
}

/* Popup shell */
.wizard-popup {
    width: 96vw;
    max-width: 1400px;
    height: 92vh;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    position: relative;
}

/* Header */
.wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: linear-gradient(135deg, #2274A5 0%, #1b5d87 100%);
    color: #fff;
    flex-shrink: 0;
}
.wizard-header h3 {
    margin: 0;
    font-size: 1.25em;
    font-weight: 700;
    color: #fff;
}
.wizard-header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}
.wizard-progress-info {
    font-size: 0.88em;
    opacity: 0.92;
    display: flex;
    gap: 8px;
    align-items: center;
}
.wizard-progress-sep {
    opacity: 0.4;
}

/* Progress bar */
.wizard-progress-bar {
    height: 4px;
    background: #e0e7ef;
    flex-shrink: 0;
}
.wizard-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    transition: width 0.4s ease;
    border-radius: 0 2px 2px 0;
    width: 0%;
}

/* Minimap */
.wizard-minimap {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 8px 24px;
    background: #f6f8fa;
    border-bottom: 1px solid #e0e7ef;
    flex-shrink: 0;
    max-height: 44px;
    overflow: hidden;
}
.wizard-minimap-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccd5de;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.wizard-minimap-dot:hover {
    transform: scale(1.5);
}
.wizard-minimap-dot.current {
    background: #2274A5;
    box-shadow: 0 0 0 3px rgba(34,116,165,0.25);
    transform: scale(1.4);
}
.wizard-minimap-dot.answered {
    background: #27ae60;
}
.wizard-minimap-dot.disabled {
    background: #e0e3e7;
    cursor: default;
    opacity: 0.5;
}

/* Body / scroll area — two-column, each column scrolls independently */
.wizard-body {
    flex: 1;
    overflow: hidden;
    min-height: 0;
    display: flex;
}
.wizard-two-col {
    display: grid;
    grid-template-columns: 3fr 2fr;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.wizard-col-left {
    overflow-y: auto;
    padding: 24px 20px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}
.wizard-col-right {
    overflow-y: auto;
    padding: 24px 24px 24px 20px;
    border-left: 1px solid #dde4ed;
    background: #f6f8fb;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Control info */
.wizard-control-info {}
.wizard-control-header {}
.wizard-control-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.wizard-domain-badge {
    background: #eef4fb;
    color: #2274A5;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.82em;
    font-weight: 600;
    border: 1px solid rgba(34,116,165,0.18);
}
.wizard-ref-badge {
    background: #f0f0f0;
    color: #555;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.82em;
    font-weight: 500;
}
.wizard-control-title {
    margin: 0 0 8px 0;
    font-size: 1.35em;
    color: #1a2a3a;
    font-weight: 700;
    line-height: 1.3;
}
.wizard-control-detail {
    color: #4a5568;
    font-size: 0.95em;
    line-height: 1.65;
    background: #f8fafc;
    border-left: 3px solid #2274A5;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}
.wizard-taken-over-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9em;
    color: #664d03;
    margin-top: 10px;
}

/* AI Guess card */
.wizard-ai-guess {}
.wizard-ai-guess-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f0f7ff, #e8f4f8);
    border-radius: 10px;
    border: 1px dashed #b0cfe0;
    font-size: 0.9em;
    color: #4a7c9b;
}
.wizard-pulse-dot {
    width: 10px;
    height: 10px;
    background: #2274A5;
    border-radius: 50%;
    animation: wizardPulse 1.2s ease-in-out infinite;
}
@keyframes wizardPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.wizard-ai-guess-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2f8 100%);
    border: 1px solid rgba(34,116,165,0.2);
    border-radius: 12px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}
.wizard-ai-guess-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #2274A5, #27ae60);
    border-radius: 4px 0 0 4px;
}
.wizard-ai-guess-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.wizard-ai-icon {
    font-size: 1.3em;
}
.wizard-ai-label {
    font-weight: 700;
    color: #1a2a3a;
    font-size: 0.95em;
}
.wizard-confidence-badge {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: auto;
}
.wizard-confidence-badge.confidence-high {
    background: #d4edda;
    color: #155724;
}
.wizard-confidence-badge.confidence-medium {
    background: #fff3cd;
    color: #664d03;
}
.wizard-confidence-badge.confidence-low {
    background: #f8d7da;
    color: #721c24;
}
.wizard-ai-guess-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wizard-ai-suggested-answer {
    font-weight: 700;
    color: #2274A5;
    font-size: 1.05em;
}
.wizard-ai-reasoning {
    color: #5a6a7a;
    font-size: 0.88em;
    line-height: 1.5;
}
/* Answer cards */
.wizard-answers-section {}
.wizard-section-label {
    display: block;
    font-weight: 700;
    color: #1a2a3a;
    font-size: 0.95em;
    margin-bottom: 10px;
}
.wizard-answer-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.wizard-answer-card {
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #e0e7ef;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s, box-shadow 0.15s;
    position: relative;
}
.wizard-answer-card:hover {
    border-color: #2274A5;
    background: #f5faff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34,116,165,0.1);
}
.wizard-answer-card.wizard-answer-selected {
    border-color: #27ae60;
    background: #f0faf4;
    box-shadow: 0 0 0 3px rgba(39,174,96,0.15);
}
.wizard-answer-card.wizard-answer-suggested {
    border-color: #2274A5;
    border-style: dashed;
    background: #f5faff;
}
.wizard-answer-card.wizard-answer-guide-suggested {
    border-color: #7c4dbb;
    border-style: dashed;
    background: #f8f5ff;
}
.wizard-answer-card-top {
    display: flex;
    align-items: flex-start;
    gap: 6px 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.wizard-answer-name {
    flex: 1;
    font-weight: 700;
    color: #1a2a3a;
    font-size: 0.95em;
}
.wizard-answer-pills {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}
.wizard-answer-check {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.1em;
}
.wizard-answer-ai-tag {
    background: #eef4fb;
    color: #2274A5;
    border: 1px solid #c2dcf0;
    font-size: 0.72em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.wizard-answer-guide-tag {
    background: #f2edff;
    color: #7c4dbb;
    border: 1px solid #c9b8f0;
    font-size: 0.72em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.wizard-guess-loading-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 2px 4px;
    font-size: 0.76em;
    color: #7a8a9a;
}
.wizard-guess-spinner {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 2px solid #c2dcf0;
    border-top-color: #2274A5;
    border-radius: 50%;
    animation: wizardGuessSpin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes wizardGuessSpin {
    to { transform: rotate(360deg); }
}
.wizard-comment-clear-btn {
    margin-top: 5px;
    font-size: 0.78em;
    padding: 2px 10px;
    background: #f2f5f8;
    color: #5a6a7a;
    border: 1px solid #c8d4de;
    border-radius: 4px;
    cursor: pointer;
    min-width: unset;
    display: inline-block;
    line-height: 1.6;
    box-shadow: none;
}
.wizard-comment-clear-btn:hover {
    background: #e4eaf0 !important;
    color: #2274A5 !important;
    box-shadow: none !important;
    filter: none !important;
}
/* Reporting dropdown */
.reporting-dropdown {
    position: absolute;
    bottom: 100%;
    top: auto;
    left: 0;
    z-index: 200;
    background: #fff;
    border: 1px solid #d0d8e0;
    border-radius: 8px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.13);
    min-width: 180px;
    padding: 4px 0;
    margin-bottom: 3px;
}
.reporting-option {
    display: block;
    padding: 9px 16px;
    color: #1a2a3a;
    text-decoration: none;
    font-size: 0.93em;
    white-space: nowrap;
}
.reporting-option:hover {
    background: #eef4fb;
    color: #2274A5;
    text-decoration: none;
}
.wizard-answer-desc {
    color: #5a6a7a;
    font-size: 0.84em;
    line-height: 1.45;
    margin-bottom: 8px;
}
.wizard-rating-bar {
    height: 4px;
    background: #e8edf2;
    border-radius: 2px;
    overflow: hidden;
}
.wizard-rating-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFC300, #ff9800);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Comment area */
.wizard-comment-area {}
.wizard-comment-label {
    display: block;
    font-weight: 700;
    color: #1a2a3a;
    font-size: 0.95em;
    margin-bottom: 8px;
}
.wizard-comment-label .text-muted {
    font-weight: 400;
    color: #8a95a5;
}
.wizard-comment-input {
    width: 100%;
    min-height: 144px;
    max-height: 360px;
    resize: vertical;
    border: 1.5px solid #d0d8e0;
    border-radius: 8px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.92em;
    line-height: 1.5;
    color: #1a2a3a;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.wizard-comment-input:focus {
    outline: none;
    border-color: #2274A5;
    box-shadow: 0 0 0 3px rgba(34,116,165,0.1);
}
.wizard-comment-input:disabled {
    background: #f0f2f5;
    cursor: not-allowed;
}

/* AI Guide section */
.wizard-guide-section {
    background: #fafbfc;
    border: 1px solid #e0e7ef;
    border-radius: 10px;
    padding: 16px 18px;
}
.wizard-guide-section.wizard-guide-active {
    background: #f5faff;
    border-color: rgba(34,116,165,0.25);
}
.wizard-guide-btn {
    background: linear-gradient(135deg, #f0f7ff, #e8f4f8);
    border: 1.5px solid #b8d4e8;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 0.92em;
    font-weight: 600;
    color: #2274A5;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.wizard-guide-btn:hover {
    background: linear-gradient(135deg, #e0edff, #d8ecf5);
    border-color: #2274A5;
    transform: translateY(-1px);
}
.wizard-guide-icon {
    margin-right: 6px;
}
.wizard-guide-hint {
    display: inline-block;
    margin-left: 12px;
    color: #7a8a9a;
    font-size: 0.85em;
}
.wizard-guide-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(34,116,165,0.12);
}
.wizard-guide-title {
    font-weight: 700;
    color: #2274A5;
    font-size: 1em;
}
.wizard-guide-questions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wizard-guide-question {}
.wizard-guide-q-label {
    font-size: 0.92em;
    color: #1a2a3a;
    margin-bottom: 6px;
    font-weight: 500;
    line-height: 1.45;
}
.wizard-guide-q-pills {
    display: flex;
    gap: 8px;
}

/* Completion screen */
.wizard-complete {
    text-align: center;
    padding: 48px 24px;
}
.wizard-complete-icon {
    font-size: 3em;
    margin-bottom: 16px;
}
.wizard-complete h3 {
    margin: 0 0 12px 0;
    font-size: 1.5em;
    color: #1a2a3a;
}
.wizard-complete-summary {
    font-size: 1.05em;
    color: #4a5568;
    margin-bottom: 8px;
}
.wizard-complete-hint {
    color: #7a8a9a;
    font-size: 0.92em;
    margin-bottom: 18px;
}

/* Footer */
.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 24px;
    background: #f6f8fa;
    border-top: 1px solid #e0e7ef;
    flex-shrink: 0;
}
.wizard-exit-btn {
    background: transparent !important;
    color: #6c757d !important;
    border: 1.5px solid #ced4da !important;
    padding: 8px 16px !important;
    font-size: 0.875em !important;
}
.wizard-exit-btn:hover {
    background: #f8f9fa !important;
    color: #343a40 !important;
    border-color: #adb5bd !important;
}
.wizard-nav-btns {
    display: flex;
    gap: 10px;
    align-items: center;
}
.wizard-skip-btn {
    color: #7a8a9a !important;
    border-color: #d0d8e0 !important;
}
.wizard-skip-btn:hover {
    color: #4a5568 !important;
    border-color: #b0b8c0 !important;
}

/* Right-panel guide styles */
.wizard-guide-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.wizard-guide-panel .wizard-guide-section {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0;
}
.wizard-guide-panel .wizard-guide-header {
    position: sticky;
    top: 0;
    background: #f6f8fb;
    z-index: 1;
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.wizard-guide-disabled {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8a95a5;
    font-size: 0.9em;
    padding: 16px 0;
}
.wizard-guide-retry-btn {
    background: transparent;
    border: 1.5px solid #b8d4e8;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.88em;
    color: #2274A5;
    margin-top: 8px;
    transition: background 0.15s;
}
.wizard-guide-retry-btn:hover {
    background: #e8f4f8;
}
.wizard-guide-error {
    color: #856404;
    background: #fff3cd;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.88em;
    margin-bottom: 8px;
}

/* Responsive for smaller screens */
@media (max-width: 900px) {
    .wizard-two-col {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        overflow-y: auto;
    }
    .wizard-col-left, .wizard-col-right {
        overflow-y: visible;
        max-height: none;
    }
    .wizard-col-right {
        border-left: none;
        border-top: 1px solid #dde4ed;
    }
}
@media (max-width: 600px) {
    .wizard-popup {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    .wizard-answer-cards {
        grid-template-columns: 1fr;
    }
    .wizard-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .wizard-footer {
        flex-wrap: wrap;
    }
}

/* ===== Extract Single Assessment Wizard ===== */
.extract-wizard-modal { max-width: 760px; }

.extract-stepper {
    list-style: none;
    display: flex;
    gap: 12px;
    padding: 0;
    margin: 0 0 18px 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.extract-stepper li {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 14px;
    font-weight: 500;
}
.extract-stepper li .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #555;
    font-weight: 700;
    font-size: 13px;
}
.extract-stepper li.active { color: #1565c0; }
.extract-stepper li.active .step-num { background: #1565c0; color: #fff; }
.extract-stepper li.done .step-num { background: #2e7d32; color: #fff; }
.extract-stepper li.done { color: #2e7d32; }

.extract-wizard-step { display: none; }
.extract-wizard-step.active { display: block; }

.extract-list {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px;
    background: #fafafa;
}
.extract-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 4px;
    background: #fff;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.extract-row:hover { background: #f0f7ff; }
.extract-row.selected {
    background: #e3f2fd;
    border-color: #1565c0;
}
.extract-row input[type="radio"] { margin: 0; }
.extract-row-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.extract-row-title {
    font-weight: 600;
    color: #222;
    word-break: break-all;
}
.extract-row-sub {
    font-size: 12px;
    color: #777;
}

.extract-summary-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 14px 16px;
    background: #fafafa;
}
.extract-summary-row {
    display: flex;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}
.extract-summary-row:last-child { border-bottom: none; }
.extract-summary-row .label {
    font-weight: 600;
    color: #555;
    min-width: 110px;
}