:root {
    --tblr-primary: #6c4bf4;
    --tblr-primary-rgb: 108, 75, 244;
    --tblr-body-bg: #f4f7fb;
    --cii-sidebar-width: 260px;
    --cii-sidebar-collapsed-width: 78px;
}

html,
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

body {
    letter-spacing: 0;
    overflow-x: hidden;
}

a,
a:hover,
a:focus {
    text-decoration: none;
}

.page-wrapper {
    background:
        linear-gradient(180deg, rgba(108, 75, 244, 0.06), rgba(244, 247, 251, 0) 260px),
        var(--tblr-body-bg);
}

.card {
    border: 1px solid rgba(82, 96, 127, 0.13);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(29, 39, 59, 0.07);
}

.card-header {
    border-bottom-color: rgba(82, 96, 127, 0.1);
}

.cii-page-header {
    background:
        radial-gradient(circle at 96% 20%, rgba(108, 75, 244, 0.16), transparent 28%),
        radial-gradient(circle at 16% 0%, rgba(32, 107, 196, 0.12), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f7f5ff 52%, #eef6ff 100%);
    border-bottom: 1px solid rgba(82, 96, 127, 0.12);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.7), 0 12px 28px rgba(29, 39, 59, 0.04);
    padding: 18px 0;
    position: relative;
}

.cii-page-header::after {
    background: linear-gradient(90deg, #6c4bf4, #206bc4, #12a594);
    bottom: 0;
    content: "";
    height: 3px;
    left: 0;
    opacity: 0.85;
    position: absolute;
    width: 180px;
}

.cii-header-shell {
    align-items: center;
    display: flex;
    gap: 14px;
    min-height: 54px;
}

.cii-header-icon {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(108, 75, 244, 0.12);
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(108, 75, 244, 0.14);
    color: #6c4bf4;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.35rem;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.cii-header-content {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.cii-header-content > .d-flex {
    width: 100%;
}

.cii-page-header .btn-list,
.cii-page-header .d-flex > .btn,
.cii-page-header .d-flex > form {
    flex: 0 0 auto;
    margin-left: auto;
}

.cii-page-header .page-pretitle {
    color: #6c4bf4;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.cii-page-header .page-title {
    color: #1d273b;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0;
}

.cii-sidebar {
    background: #ffffff;
    border-right: 1px solid rgba(82, 96, 127, 0.13);
    box-shadow: 12px 0 34px rgba(29, 39, 59, 0.045);
    overflow: visible !important;
    z-index: 1080;
}

.cii-sidebar .container-fluid {
    align-items: center;
    gap: 6px;
    overflow: visible;
    position: relative;
    z-index: 1081;
}

.cii-sidebar .navbar-nav {
    width: 100%;
}

.cii-sidebar .navbar-collapse {
    -ms-overflow-style: none;
    overscroll-behavior: contain;
    scrollbar-width: none;
    width: 100%;
}

.cii-sidebar .navbar-collapse::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.cii-sidebar .navbar-brand,
.cii-sidebar .navbar-brand a {
    color: #1d273b;
}

.cii-sidebar .navbar-brand a {
    align-items: center;
    display: inline-flex;
    min-width: 0;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, #6c4bf4, #206bc4);
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(108, 75, 244, 0.22);
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    margin-right: 10px;
    width: 46px;
}

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

.cii-sidebar-toggle {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(82, 96, 127, 0.14);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(29, 39, 59, 0.12);
    color: #667085;
    height: 28px;
    justify-content: center;
    position: absolute;
    right: -14px;
    top: 22px;
    transform: none;
    transition: color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    width: 28px;
    z-index: 1090;
}

.cii-sidebar-toggle:hover {
    color: #6c4bf4;
    box-shadow: 0 12px 26px rgba(108, 75, 244, 0.18);
    transform: translateX(-1px);
}

.cii-sidebar-toggle i {
    font-size: 1rem;
    line-height: 1;
}

.cii-sidebar .nav-link {
    border-radius: 8px;
    color: #526070;
    font-weight: 500;
    margin: 4px 10px;
    min-height: 42px;
    position: relative;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.cii-sidebar .nav-link-icon {
    color: #7b8796;
    font-size: 1.15rem;
}

.cii-sidebar .nav-link:hover {
    background: #f2f5f9;
    color: #1d273b;
}

.cii-sidebar .nav-link:hover .nav-link-icon {
    color: #6c4bf4;
}

.cii-sidebar .nav-item.active .nav-link {
    background: rgba(108, 75, 244, 0.12);
    color: #6c4bf4;
}

.cii-sidebar .nav-item.active .nav-link::before {
    background: #6c4bf4;
    border-radius: 0 4px 4px 0;
    content: "";
    height: 24px;
    left: -10px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
}

.cii-sidebar .nav-item.active .nav-link-icon {
    color: #6c4bf4;
}

.cii-sidebar .nav-item.disabled {
    opacity: 0.55;
}

.cii-subnav {
    list-style: none;
    margin: -2px 10px 6px 48px;
    padding: 0;
}

.cii-subnav a {
    align-items: center;
    border-radius: 7px;
    color: #667085;
    display: flex;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 8px;
    min-height: 32px;
    padding: 6px 10px;
    text-decoration: none;
}

.cii-subnav a:hover,
.cii-subnav a.active {
    background: rgba(108, 75, 244, 0.1);
    color: #6c4bf4;
}

.cii-subnav i {
    font-size: 1rem;
}

.cii-topbar {
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(82, 96, 127, 0.13);
    backdrop-filter: blur(12px);
    height: 54px;
    padding: 0;
    /* backdrop-filter creates a stacking context, so the topbar needs its own
       layer above .page-wrapper or the user dropdown paints behind the page header. */
    position: relative;
    z-index: 1030;
}

.cii-topbar,
.cii-topbar .container-xl {
    height: 54px;
    min-height: 54px;
}

.cii-topbar .container-xl {
    align-items: center;
    display: flex;
}

.cii-topbar .dropdown-menu {
    z-index: 1035;
}

.modal-backdrop.show {
    background:
        radial-gradient(circle at 18% 16%, rgba(108, 75, 244, 0.12), transparent 32%),
        radial-gradient(circle at 82% 22%, rgba(20, 184, 166, 0.08), transparent 30%),
        rgba(248, 250, 255, 0.68);
    -webkit-backdrop-filter: blur(14px) saturate(112%);
    backdrop-filter: blur(14px) saturate(112%);
    opacity: 1;
}

.modal .modal-content {
    border: 1px solid rgba(108, 75, 244, 0.16);
    box-shadow:
        0 28px 80px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.modal .modal-header {
    background:
        linear-gradient(135deg, rgba(108, 75, 244, 0.08), rgba(20, 184, 166, 0.06)),
        #ffffff;
}

.knowledge-bulk-bar {
    background:
        linear-gradient(135deg, rgba(108, 75, 244, 0.07), rgba(20, 184, 166, 0.045)),
        #fbfcff;
    border: 1px solid rgba(108, 75, 244, 0.14);
    border-radius: 8px;
    padding: 10px 12px;
}

.avatar {
    background: #6c4bf4;
    color: #ffffff;
}

.cii-metric {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.94)),
        #ffffff;
    border-left: 4px solid #6c4bf4;
    box-shadow: 0 18px 38px rgba(29, 39, 59, 0.075);
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.cii-metric:hover {
    box-shadow: 0 22px 46px rgba(29, 39, 59, 0.1);
    transform: translateY(-1px);
}

.cii-metric .card-body {
    position: relative;
    z-index: 1;
}

.cii-metric .subheader {
    color: #667085;
    font-weight: 700;
}

.cii-metric .h1,
.cii-metric .h2 {
    font-weight: 700;
}

.cii-metric-icon {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(108, 75, 244, 0.12), rgba(32, 107, 196, 0.06)),
        #f7f5ff;
    border: 1px solid rgba(108, 75, 244, 0.1);
    border-radius: 8px;
    color: #6c4bf4;
    display: inline-flex;
    font-size: 1.3rem;
    height: 44px;
    justify-content: center;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 44px;
}

.cii-metric-blue .cii-metric-icon {
    background:
        linear-gradient(135deg, rgba(32, 107, 196, 0.12), rgba(108, 75, 244, 0.05)),
        #f3f8ff;
    color: #206bc4;
}

.cii-metric-yellow .cii-metric-icon {
    background:
        linear-gradient(135deg, rgba(245, 159, 0, 0.14), rgba(108, 75, 244, 0.04)),
        #fff8e8;
    color: #f59f00;
}

.cii-metric-teal .cii-metric-icon {
    background:
        linear-gradient(135deg, rgba(18, 165, 148, 0.13), rgba(32, 107, 196, 0.05)),
        #eefcf9;
    color: #12a594;
}

.cii-metric-blue {
    border-left-color: #206bc4;
}

.cii-metric-yellow {
    border-left-color: #f59f00;
}

.cii-metric-teal {
    border-left-color: #12a594;
}

.table-hover tbody tr:hover {
    background: #f7f9fc;
}

.table thead th {
    background: #fbfcfe;
    color: #667085;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.table td,
.table th {
    vertical-align: middle;
}

/* Buttons: icon/text spacing plus shared premium surface. */
.btn {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-weight: 600;
    gap: 8px;
    justify-content: center;
    letter-spacing: 0.01em;
    line-height: 1.35;
    padding: 8px 16px;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

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

.btn-sm {
    border-radius: 7px;
    gap: 6px;
    padding: 5px 11px;
}

.btn-lg {
    gap: 10px;
    padding: 11px 22px;
}

.btn-icon {
    gap: 0;
    padding-left: 0;
    padding-right: 0;
}

.btn:hover {
    box-shadow: 0 10px 22px rgba(29, 39, 59, 0.1);
    transform: translateY(-1px);
}

.btn:active {
    box-shadow: none;
    transform: translateY(0);
}

.btn:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(108, 75, 244, 0.2);
    outline: none;
}

.btn:disabled,
.btn.disabled {
    box-shadow: none;
    opacity: 0.6;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #7a5bf7 0%, #6c4bf4 55%, #5a3bdd 100%);
    border-color: #5a3bdd;
    box-shadow: 0 10px 22px rgba(108, 75, 244, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #6c4bf4 0%, #5f3fe6 55%, #4f32cc 100%);
    border-color: #4f32cc;
    box-shadow: 0 14px 28px rgba(108, 75, 244, 0.28);
}

.btn-outline-primary {
    border-color: rgba(108, 75, 244, 0.45);
    color: #6c4bf4;
}

.btn-outline-primary:hover {
    background: rgba(108, 75, 244, 0.08);
    border-color: #6c4bf4;
    color: #5a3bdd;
}

.btn-outline-secondary:hover {
    background: rgba(82, 96, 127, 0.08);
}

.btn-list {
    gap: 8px;
}

/* Inputs. */
.form-label {
    color: #46526b;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.form-control,
.form-select {
    background-color: #ffffff;
    border-color: rgba(82, 96, 127, 0.22);
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(29, 39, 59, 0.03);
    color: #1d273b;
    padding: 8px 13px;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-select {
    padding-right: 34px;
}

.form-control-sm,
.form-select-sm {
    border-radius: 7px;
    padding: 5px 10px;
}

.form-select-sm {
    padding-right: 30px;
}

.form-control:hover:not(:disabled):not(:focus),
.form-select:hover:not(:disabled):not(:focus) {
    border-color: rgba(108, 75, 244, 0.35);
}

.form-control::placeholder {
    color: #9aa4b2;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: #6c4bf4;
    box-shadow: 0 0 0 0.2rem rgba(108, 75, 244, 0.12);
}

.form-control:disabled,
.form-select:disabled {
    background-color: #f5f7fb;
    color: #8a94a6;
}

.input-icon .input-icon-addon {
    color: #9aa4b2;
    transition: color 0.16s ease;
}

.input-icon:focus-within .input-icon-addon {
    color: #6c4bf4;
}

.form-check-input:checked {
    background-color: #6c4bf4;
    border-color: #6c4bf4;
}

.form-check-input:focus {
    border-color: #6c4bf4;
    box-shadow: 0 0 0 0.2rem rgba(108, 75, 244, 0.12);
}

.cii-section {
    border-top: 1px solid var(--tblr-border-color);
    margin-top: 24px;
    padding-top: 20px;
}

.cii-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.pre-line {
    line-height: 1.65;
    white-space: pre-line;
}

.cii-transcript {
    background: #f8fafc;
    border: 1px solid var(--tblr-border-color);
    border-radius: 8px;
    padding: 14px;
}

.cii-audio-player {
    background:
        radial-gradient(circle at 96% 18%, rgba(108, 75, 244, 0.1), transparent 30%),
        linear-gradient(145deg, #ffffff, #f8faff);
    border: 1px solid rgba(108, 75, 244, 0.14);
    border-radius: 8px;
    box-shadow: 0 16px 32px rgba(29, 39, 59, 0.08);
    padding: 16px;
}

.cii-audio-head {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.cii-audio-icon {
    align-items: center;
    background: #f2efff;
    border: 1px solid rgba(108, 75, 244, 0.14);
    border-radius: 8px;
    color: #6c4bf4;
    display: inline-flex;
    flex: 0 0 40px;
    font-size: 1.2rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.cii-audio-title {
    color: #1d273b;
    font-weight: 700;
}

.cii-audio-subtitle {
    color: #667085;
    font-size: 0.82rem;
}

.cii-audio-control {
    display: block;
    width: 100%;
}

.cii-audio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.cii-meta-list dt {
    color: var(--tblr-secondary);
    font-weight: 600;
}

.cii-meta-list dd {
    margin-bottom: 12px;
}

.cii-ticket-actions {
    border-top: 3px solid #6c4bf4;
    box-shadow: 0 16px 34px rgba(29, 39, 59, 0.08);
}

.cii-note {
    background: linear-gradient(145deg, #ffffff, #fbfaff);
    padding-bottom: 16px;
    padding-top: 16px;
}

.cii-timeline {
    position: relative;
}

.cii-timeline::before {
    background: linear-gradient(180deg, rgba(108, 75, 244, 0.28), rgba(82, 96, 127, 0.1));
    bottom: 12px;
    content: "";
    left: 17px;
    position: absolute;
    top: 12px;
    width: 2px;
}

.cii-timeline-item {
    display: flex;
    gap: 14px;
    padding-bottom: 22px;
    position: relative;
}

.cii-timeline-item:last-child {
    padding-bottom: 0;
}

.cii-timeline-marker {
    align-items: center;
    background: #f2efff;
    border: 1px solid rgba(108, 75, 244, 0.2);
    border-radius: 50%;
    color: #6c4bf4;
    display: flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
    position: relative;
    width: 36px;
    z-index: 1;
}

.cii-timeline-note {
    background: #eefcf9;
    border-color: rgba(18, 165, 148, 0.2);
    color: #128b7d;
}

.cii-timeline-content {
    min-width: 0;
    padding-top: 5px;
}

.cii-change-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.cii-change-list span {
    background: #f5f3ff;
    border: 1px solid rgba(108, 75, 244, 0.12);
    border-radius: 6px;
    color: #667085;
    font-size: 0.78rem;
    padding: 4px 8px;
}

.cii-payload-viewer {
    background: #0f172a;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.82rem;
    line-height: 1.55;
    max-height: 70vh;
    overflow: auto;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.form-errors {
    color: var(--tblr-danger);
    font-size: 13px;
    margin: 8px 0 0;
    padding-left: 18px;
}

.status-message {
    background: var(--tblr-green-lt);
    border: 1px solid rgba(47, 179, 68, 0.2);
    border-radius: 6px;
    color: var(--tblr-green);
    margin-bottom: 16px;
    padding: 10px 12px;
}

.source-type-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-type-card {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid rgba(82, 96, 127, 0.18);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 14px;
    min-height: 116px;
    padding: 20px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.source-type-card.active,
.source-type-card:has(.source-type-input:checked) {
    background: linear-gradient(135deg, rgba(108, 75, 244, 0.08), rgba(32, 107, 196, 0.04));
    border-color: #6c4bf4;
    box-shadow: 0 14px 28px rgba(108, 75, 244, 0.12);
}

.source-type-card.disabled {
    cursor: default;
    opacity: 0.55;
}

.source-type-input {
    display: none;
}

.source-type-radio {
    align-items: center;
    border: 1px solid rgba(82, 96, 127, 0.25);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 24px;
    justify-content: center;
    margin-top: 3px;
    width: 24px;
}

.source-type-card.active .source-type-radio,
.source-type-card:has(.source-type-input:checked) .source-type-radio {
    background: #206bc4;
    border-color: #206bc4;
    box-shadow: inset 0 0 0 7px #ffffff;
}

.source-type-title,
.source-type-copy {
    display: block;
}

.source-type-title {
    color: #1d273b;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.source-type-copy {
    color: #667085;
    line-height: 1.45;
}

.screenshot-preview-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.screenshot-preview-item {
    background: #ffffff;
    border: 1px solid rgba(82, 96, 127, 0.16);
    border-radius: 8px;
    overflow: hidden;
}

.screenshot-preview-item:active {
    cursor: grabbing;
}

.screenshot-preview-image {
    aspect-ratio: 16 / 10;
    background: #f2f5f9;
    position: relative;
}

.screenshot-preview-image img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.screenshot-preview-image span {
    align-items: center;
    background: #6c4bf4;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    height: 26px;
    justify-content: center;
    left: 8px;
    position: absolute;
    top: 8px;
    width: 26px;
}

.screenshot-preview-meta {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 8px;
}

.existing-attachments {
    background: #f8fafc;
    border: 1px solid rgba(82, 96, 127, 0.12);
    border-radius: 8px;
    padding: 12px;
}

.knowledge-content-card .card-header {
    background: linear-gradient(135deg, #ffffff, #f8f6ff);
}

.knowledge-content-body {
    background: #fbfcfe;
    border: 1px solid rgba(82, 96, 127, 0.13);
    border-radius: 8px;
    color: #1d273b;
    font-family: var(--tblr-font-sans-serif);
    font-size: 0.9375rem;
    line-height: 1.72;
    margin: 0;
    overflow: auto;
    padding: 18px;
    white-space: pre-wrap;
    word-break: break-word;
}

.knowledge-metadata-panel {
    background: linear-gradient(135deg, rgba(98, 91, 245, 0.08), rgba(30, 180, 167, 0.05));
    border: 1px solid rgba(98, 91, 245, 0.16);
    border-left: 3px solid #625bf5;
    border-radius: 8px;
    padding: 16px;
}

.knowledge-side-card {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96)),
        #ffffff;
    box-shadow: 0 18px 42px rgba(29, 39, 59, 0.075);
    position: sticky;
    top: 18px;
}

.knowledge-side-card .card-header {
    background: linear-gradient(135deg, rgba(108, 75, 244, 0.055), rgba(32, 107, 196, 0.045));
}

.knowledge-review-editor .card-header {
    background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.knowledge-review-textarea {
    min-height: 520px;
    resize: vertical;
}

.knowledge-review-raw {
    max-height: 340px;
}

.knowledge-chunk-review {
    border-bottom: 1px solid rgba(82, 96, 127, 0.12);
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.knowledge-chunk-review:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.knowledge-chunk-text {
    background: #fbfcfe;
    border: 1px solid rgba(82, 96, 127, 0.13);
    border-radius: 8px;
    color: #1d273b;
    font-family: var(--tblr-font-sans-serif);
    font-size: 0.875rem;
    line-height: 1.62;
    max-height: 260px;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.voice-agent-setup-card .card-header {
    background:
        linear-gradient(135deg, rgba(108, 75, 244, 0.08), rgba(18, 165, 148, 0.05)),
        #ffffff;
}

.agent-kb-export-card .card-header {
    background:
        linear-gradient(135deg, rgba(32, 107, 196, 0.08), rgba(108, 75, 244, 0.06)),
        #ffffff;
}

.agent-kb-export-preview {
    background: #fbfcfe;
    border: 1px solid rgba(82, 96, 127, 0.13);
    border-radius: 8px;
    color: #1d273b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    max-height: 680px;
    overflow: auto;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.cii-toast-stack {
    display: grid;
    gap: 10px;
    max-width: min(380px, calc(100vw - 24px));
    position: fixed;
    right: 16px;
    top: 76px;
    width: 380px;
    z-index: 1200;
}

.cii-toast {
    background: #ffffff;
    border: 1px solid rgba(82, 96, 127, 0.14);
    border-left: 4px solid #6c4bf4;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(29, 39, 59, 0.16);
    padding: 12px;
}

.cii-toast-success {
    border-left-color: #12a594;
}

.cii-toast-warning {
    border-left-color: #f59f00;
}

.cii-toast-info {
    border-left-color: #206bc4;
}

.cii-toast-danger {
    border-left-color: #d63939;
}

.cii-toast-secondary {
    border-left-color: #667085;
}

.cii-toast-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.cii-toast-title {
    color: #1d273b;
    font-weight: 700;
}

.cii-toast-close {
    align-items: center;
    background: transparent;
    border: 0;
    color: #667085;
    display: inline-flex;
    height: 24px;
    justify-content: center;
    padding: 0;
    width: 24px;
}

.cii-toast-message {
    color: #526070;
    font-size: 0.875rem;
    line-height: 1.45;
    margin-top: 4px;
}

.cii-toast-progress {
    background: #eef2f7;
    border-radius: 999px;
    height: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.cii-toast-progress-bar {
    background: linear-gradient(90deg, #6c4bf4, #12a594);
    height: 100%;
    transition: width 0.2s ease;
    width: 0;
}

@media (max-width: 700px) {
    .cii-toast-stack {
        left: 12px;
        right: 12px;
        top: 66px;
        width: auto;
    }

    .source-type-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .cii-sidebar .navbar-collapse.show,
    .cii-sidebar .navbar-collapse.collapsing {
        max-height: calc(100vh - 84px);
        overflow-y: auto;
    }
}

@media (min-width: 992px) {
    .navbar-vertical.navbar-expand-lg.cii-sidebar {
        background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
        display: flex;
        height: 100vh;
        overflow: visible !important;
        position: fixed;
        transition: width 0.18s ease, box-shadow 0.18s ease;
        width: var(--cii-sidebar-width);
        z-index: 1080;
    }

    .navbar-vertical.navbar-expand-lg.cii-sidebar > .container-fluid {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        height: 100%;
        min-height: 0;
    }

    .navbar-vertical.navbar-expand-lg.cii-sidebar .navbar-collapse {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding-bottom: 12px;
    }

    .navbar-vertical.navbar-expand-lg.cii-sidebar ~ .cii-topbar,
    .navbar-vertical.navbar-expand-lg.cii-sidebar ~ .page-wrapper {
        margin-left: var(--cii-sidebar-width);
        transition: margin-left 0.18s ease;
    }

    body.cii-sidebar-collapsed .navbar-vertical.navbar-expand-lg.cii-sidebar {
        border-right-color: rgba(82, 96, 127, 0.1);
        box-shadow: 8px 0 24px rgba(29, 39, 59, 0.035);
        width: var(--cii-sidebar-collapsed-width);
    }

    body.cii-sidebar-collapsed .navbar-vertical.navbar-expand-lg.cii-sidebar ~ .cii-topbar,
    body.cii-sidebar-collapsed .navbar-vertical.navbar-expand-lg.cii-sidebar ~ .page-wrapper {
        margin-left: var(--cii-sidebar-collapsed-width);
    }

    body.cii-sidebar-collapsed .page-wrapper .container-xl {
        padding-left: 12px;
    }

    body.cii-sidebar-collapsed .cii-sidebar .brand-text,
    body.cii-sidebar-collapsed .cii-sidebar .nav-link-title {
        display: none;
    }

    body.cii-sidebar-collapsed .cii-subnav {
        display: none;
    }

    body.cii-sidebar-collapsed .cii-sidebar .navbar-brand {
        justify-content: center;
        margin: 0 0 8px;
        padding-right: 0;
        width: 100%;
    }

    body.cii-sidebar-collapsed .cii-sidebar .navbar-nav {
        padding-top: 4px !important;
    }

    body.cii-sidebar-collapsed .cii-sidebar .brand-mark {
        height: 42px;
        margin-right: 0;
        width: 42px;
    }

    body.cii-sidebar-collapsed .cii-sidebar-toggle {
        right: -14px;
        top: 22px;
    }

    body.cii-sidebar-collapsed .cii-sidebar-toggle:hover {
        transform: translateX(1px);
    }

    body.cii-sidebar-collapsed .cii-sidebar .nav-link {
        align-items: center;
        display: flex;
        height: 42px;
        justify-content: center;
        margin: 3px auto;
        min-height: 42px;
        min-width: 42px;
        padding-left: 0;
        padding-right: 0;
        width: 42px;
    }

    body.cii-sidebar-collapsed .cii-sidebar .nav-link-icon {
        display: inline-flex;
        font-size: 1.18rem;
        justify-content: center;
        margin-right: 0;
        width: 100%;
    }

    body.cii-sidebar-collapsed .cii-sidebar .nav-item.active .nav-link {
        background:
            linear-gradient(135deg, rgba(108, 75, 244, 0.16), rgba(32, 107, 196, 0.08)),
            #f6f3ff;
        box-shadow: 0 12px 24px rgba(108, 75, 244, 0.12);
    }

    body.cii-sidebar-collapsed .cii-sidebar .nav-item.active .nav-link::before {
        left: calc((var(--cii-sidebar-collapsed-width) - 42px) / -2);
    }
}

/*
 * Sidebar hover label. Rendered in <body> by public/js/app.js because the sidebar
 * menu scrolls, and a scrolling box clips its children on both axes.
 */
.cii-sidebar-tooltip {
    background: #1d273b;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(29, 39, 59, 0.18);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    left: 0;
    line-height: 1;
    opacity: 0;
    padding: 9px 10px;
    pointer-events: none;
    position: fixed;
    top: 0;
    transform: translateY(-50%);
    transition: opacity 0.12s ease;
    visibility: hidden;
    white-space: nowrap;
    z-index: 1100;
}

.cii-sidebar-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}

.cii-sidebar-flyout {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(82, 96, 127, 0.14);
    border-radius: 10px;
    box-shadow: 0 18px 44px rgba(29, 39, 59, 0.16);
    min-width: 230px;
    opacity: 0;
    padding: 8px;
    pointer-events: none;
    position: fixed;
    transform: translateX(-4px);
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
    visibility: hidden;
    z-index: 1110;
}

.cii-sidebar-flyout::before {
    border-bottom: 8px solid transparent;
    border-right: 8px solid rgba(255, 255, 255, 0.97);
    border-top: 8px solid transparent;
    content: "";
    left: -8px;
    position: absolute;
    top: 22px;
}

.cii-sidebar-flyout.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

.cii-sidebar-flyout-title {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 7px 10px 6px;
    text-transform: uppercase;
}

.cii-sidebar-flyout-list {
    display: grid;
    gap: 4px;
}

.cii-sidebar-flyout-list a {
    align-items: center;
    border-radius: 8px;
    color: #344054;
    display: flex;
    font-size: 0.9rem;
    font-weight: 650;
    gap: 10px;
    min-height: 40px;
    padding: 9px 10px;
    text-decoration: none;
}

.cii-sidebar-flyout-list a:hover,
.cii-sidebar-flyout-list a.active {
    background: rgba(108, 75, 244, 0.1);
    color: #6c4bf4;
}

.cii-sidebar-flyout-list i {
    align-items: center;
    background: rgba(108, 75, 244, 0.09);
    border-radius: 7px;
    color: #6c4bf4;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.05rem;
    height: 28px;
    justify-content: center;
    width: 28px;
}

/* Shared AJAX list table (see public/js/cii-table.js). */
.cii-table-viewport {
    position: relative;
}

.cii-table-spinner {
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    display: none;
    inset: 0;
    justify-content: center;
    position: absolute;
    z-index: 2;
}

.cii-table.cii-table-loading .cii-table-spinner {
    display: flex;
}

.cii-table.cii-table-loading tbody {
    opacity: 0.45;
}

.cii-table-shimmer {
    animation: cii-table-shimmer 1.2s ease-in-out infinite;
    background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 50%, #eef1f6 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    height: 14px;
    margin: 10px 0;
}

@keyframes cii-table-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.cii-table-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.cii-table-sortable i {
    color: #9aa4b2;
    font-size: 0.9rem;
}

.cii-table-sortable.cii-table-sorted,
.cii-table-sortable.cii-table-sorted i {
    color: #6c4bf4;
}

.cii-table .card-footer {
    padding: 10px 16px;
}

.cii-table .pagination .page-link {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-weight: 600;
    height: 34px;
    justify-content: center;
    margin-left: 4px;
    min-width: 34px;
    text-align: center;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.cii-table .pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background: rgba(108, 75, 244, 0.08);
    border-color: rgba(108, 75, 244, 0.3);
    color: #5a3bdd;
}

.cii-table .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #7a5bf7, #5a3bdd);
    border-color: #5a3bdd;
    box-shadow: 0 8px 18px rgba(108, 75, 244, 0.24);
    color: #ffffff;
}

.cii-table .pagination .page-item.disabled .page-link {
    color: #b6bec9;
    opacity: 0.75;
}

.cii-hero {
    align-items: center;
    background:
        radial-gradient(900px 320px at 88% -40%, rgba(255, 255, 255, 0.22), transparent 60%),
        linear-gradient(135deg, #4c2fd4 0%, #6c4bf4 48%, #8b6bff 100%);
    border-radius: 16px;
    box-shadow: 0 22px 46px rgba(76, 47, 212, 0.24);
    color: #ffffff;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
    overflow: hidden;
    padding: 24px 26px;
    position: relative;
}

.cii-hero::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 68%);
    border-radius: 50%;
    content: "";
    height: 280px;
    position: absolute;
    right: -70px;
    top: -110px;
    width: 280px;
}

.cii-hero-main {
    max-width: 640px;
    position: relative;
    z-index: 1;
}

.cii-hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    opacity: 0.8;
    text-transform: uppercase;
}

.cii-hero-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 6px 0 6px;
}

.cii-hero-subtitle {
    margin-bottom: 16px;
    max-width: 560px;
    opacity: 0.9;
}

.cii-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cii-hero-actions .btn-primary {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 10px 22px rgba(24, 12, 66, 0.22);
    color: #5a3bdd;
}

.cii-hero-actions .btn-primary:hover {
    background: #f4f1ff;
    border-color: #f4f1ff;
    color: #4c2fd4;
}

.cii-hero-actions .btn:not(.btn-primary) {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.cii-hero-actions .btn:not(.btn-primary):hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.cii-hero-side {
    align-items: center;
    display: flex;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.cii-hero-ring {
    align-items: center;
    background:
        conic-gradient(#ffffff calc(var(--cii-ring-value, 0) * 1%), rgba(255, 255, 255, 0.22) 0);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    height: 116px;
    justify-content: center;
    position: relative;
    width: 116px;
}

.cii-hero-ring::before {
    background: rgba(76, 47, 212, 0.82);
    border-radius: 50%;
    content: "";
    inset: 10px;
    position: absolute;
}

.cii-hero-ring-value,
.cii-hero-ring-label {
    position: relative;
    z-index: 1;
}

.cii-hero-ring-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.cii-hero-ring-label {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    opacity: 0.85;
    text-transform: uppercase;
}

.cii-hero-side-meta {
    display: grid;
    font-size: 0.85rem;
    gap: 8px;
}

.cii-dot {
    border-radius: 50%;
    display: inline-block;
    height: 8px;
    margin-right: 7px;
    width: 8px;
}

.cii-dot-blue { background: #8ec5ff; }
.cii-dot-yellow { background: #ffd166; }
.cii-dot-teal { background: #7ae7d6; }

.cii-segment {
    background: #ffffff;
    border: 1px solid rgba(82, 96, 127, 0.16);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(29, 39, 59, 0.05);
    display: inline-flex;
    gap: 4px;
    padding: 4px;
}

.cii-segment-item {
    border-radius: 7px;
    color: #667085;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    text-decoration: none;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.cii-segment-item:hover {
    background: rgba(108, 75, 244, 0.08);
    color: #5a3bdd;
}

.cii-segment-item.active {
    background: linear-gradient(135deg, #7a5bf7, #5a3bdd);
    box-shadow: 0 8px 16px rgba(108, 75, 244, 0.22);
    color: #ffffff;
}

.cii-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cii-chip {
    background: rgba(108, 75, 244, 0.08);
    border: 1px solid rgba(108, 75, 244, 0.16);
    border-radius: 999px;
    color: #5a3bdd;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 11px;
}

.cii-chip-red {
    background: rgba(214, 57, 57, 0.08);
    border-color: rgba(214, 57, 57, 0.18);
    color: #c62828;
}

.cii-trend {
    align-items: flex-end;
    display: flex;
    gap: 8px;
    min-height: 200px;
}

.cii-trend-col {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    text-align: center;
}

.cii-trend-bar-wrap {
    align-items: flex-end;
    background: linear-gradient(180deg, rgba(108, 75, 244, 0.05), rgba(108, 75, 244, 0.02));
    border-radius: 8px;
    display: flex;
    height: 148px;
    padding: 4px;
}

.cii-trend-bar {
    background: linear-gradient(180deg, #8b6bff 0%, #6c4bf4 60%, #5a3bdd 100%);
    border-radius: 6px;
    box-shadow: 0 6px 14px rgba(108, 75, 244, 0.22);
    transition: filter 0.16s ease, transform 0.16s ease;
    width: 100%;
}

.cii-trend-col:hover .cii-trend-bar {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.cii-trend-value {
    color: #1d273b;
    font-size: 0.8rem;
    font-weight: 700;
}

.cii-trend-label {
    color: #98a2b3;
    font-size: 0.68rem;
    white-space: nowrap;
}

.cii-progress-row {
    margin-bottom: 14px;
}

.cii-progress-head {
    display: flex;
    font-size: 0.85rem;
    font-weight: 600;
    justify-content: space-between;
    margin-bottom: 6px;
}

.cii-stat-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.cii-stat {
    background: linear-gradient(145deg, #fbfaff, #f5f7ff);
    border: 1px solid rgba(82, 96, 127, 0.12);
    border-radius: 12px;
    padding: 14px 16px;
}

.cii-stat-value {
    color: #1d273b;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.cii-stat-label {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cii-stat-note {
    color: #98a2b3;
    font-size: 0.78rem;
    margin-top: 4px;
}

.cii-stat-warn {
    background: linear-gradient(145deg, #fff9ec, #fff4dc);
    border-color: rgba(245, 159, 0, 0.28);
}

.cii-inline-warning {
    background: rgba(245, 159, 0, 0.1);
    border-radius: 8px;
    color: #a86a00;
    font-size: 0.82rem;
    padding: 7px 10px;
}

.knowledge-steps {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(82, 96, 127, 0.13);
    border-radius: 10px;
    display: flex;
    gap: 12px;
    padding: 10px;
}

.knowledge-steps-track {
    -ms-overflow-style: none;
    display: flex;
    flex: 1 1 auto;
    gap: 5px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.knowledge-steps-track::-webkit-scrollbar {
    display: none;
    height: 0;
}

.knowledge-step {
    align-items: center;
    border-radius: 8px;
    color: #667085;
    display: inline-flex;
    flex: 1 0 auto;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 7px;
    justify-content: center;
    min-height: 38px;
    padding: 6px 9px;
}

.knowledge-step,
.knowledge-steps-home {
    text-decoration: none;
}

.knowledge-step:hover,
.knowledge-step:focus,
.knowledge-steps-home:hover,
.knowledge-steps-home:focus {
    text-decoration: none;
}

.knowledge-step:hover {
    background: #f2f5f9;
    color: #1d273b;
}

.knowledge-steps-home:hover {
    color: #6c4bf4;
}

.knowledge-step.is-active {
    background: rgba(108, 75, 244, 0.12);
    color: #6c4bf4;
}

.knowledge-step.is-complete:not(.is-active) {
    color: #0f8f76;
}

.knowledge-step-number,
.knowledge-hub-step-number,
.knowledge-hub-next-number {
    align-items: center;
    background: #eef1f6;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.knowledge-step.is-active .knowledge-step-number {
    background: #6c4bf4;
    color: #ffffff;
}

.knowledge-step.is-complete:not(.is-active) .knowledge-step-number {
    background: rgba(18, 165, 148, 0.13);
}

.knowledge-steps-home {
    align-items: center;
    border-left: 1px solid rgba(82, 96, 127, 0.13);
    color: #526070;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 6px;
    padding: 6px 8px 6px 18px;
}

.knowledge-hub-intro {
    background:
        radial-gradient(circle at 94% 20%, rgba(108, 75, 244, 0.13), transparent 30%),
        linear-gradient(135deg, #ffffff, #f7f5ff);
}

.knowledge-hub-intro .card-body {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.knowledge-hub-next {
    align-items: center;
    background: rgba(108, 75, 244, 0.1);
    border: 1px solid rgba(108, 75, 244, 0.16);
    border-radius: 10px;
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    min-width: 210px;
    padding: 12px;
}

.knowledge-hub-next-number {
    background: #6c4bf4;
    color: #ffffff;
    height: 36px;
    width: 36px;
}

.knowledge-workflow-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knowledge-workflow-card {
    border: 1px solid rgba(82, 96, 127, 0.13);
    overflow: hidden;
}

.knowledge-workflow-card::before {
    content: "";
    display: block;
    height: 4px;
}

.knowledge-workflow-website::before {
    background: linear-gradient(90deg, #6c4bf4, #12a594);
}

.knowledge-workflow-services::before {
    background: linear-gradient(90deg, #0f73d8, #f59f00);
}

.knowledge-workflow-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
}

.knowledge-workflow-icon {
    align-items: center;
    background: rgba(108, 75, 244, 0.11);
    border: 1px solid rgba(108, 75, 244, 0.14);
    border-radius: 10px;
    color: #6c4bf4;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.35rem;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.knowledge-workflow-services .knowledge-workflow-icon {
    background: rgba(15, 115, 216, 0.1);
    border-color: rgba(15, 115, 216, 0.14);
    color: #0f73d8;
}

.knowledge-workflow-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
}

.knowledge-workflow-stats span {
    background: #f8fafc;
    border: 1px solid rgba(82, 96, 127, 0.09);
    border-radius: 8px;
    color: #667085;
    font-size: 0.82rem;
    padding: 10px;
}

.knowledge-workflow-stats strong {
    color: #1d273b;
    display: block;
    font-size: 1.2rem;
    line-height: 1.1;
}

.knowledge-hub-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.knowledge-hub-card {
    border-top: 3px solid transparent;
    min-width: 0;
}

.knowledge-hub-card.is-next {
    border-color: #6c4bf4;
    box-shadow: 0 16px 38px rgba(108, 75, 244, 0.13);
}

.knowledge-hub-card.is-complete:not(.is-next) {
    border-top-color: #12a594;
}

.knowledge-hub-card-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.knowledge-hub-step-number {
    background: rgba(108, 75, 244, 0.11);
    color: #6c4bf4;
    height: 34px;
    width: 34px;
}

.knowledge-hub-card.is-complete .knowledge-hub-step-number {
    background: rgba(18, 165, 148, 0.13);
    color: #0f8f76;
}

.knowledge-hub-count {
    align-items: baseline;
    display: flex;
    gap: 7px;
}

.knowledge-hub-count strong {
    color: #1d273b;
    font-size: 1.75rem;
    line-height: 1;
}

.knowledge-hub-count span {
    color: #667085;
    font-size: 0.82rem;
}

@media (max-width: 991.98px) {
    .knowledge-workflow-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .knowledge-steps-home {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .cii-hero {
        padding: 20px;
    }

    .cii-trend-label {
        display: none;
    }

    .knowledge-hub-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-workflow-head {
        flex-direction: column;
    }

    .knowledge-workflow-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .knowledge-hub-intro .card-body {
        align-items: stretch;
        flex-direction: column;
    }

    .knowledge-hub-next {
        min-width: 0;
    }
}

.cii-settings-hero {
    align-items: center;
    background:
        radial-gradient(760px 260px at 90% -60%, rgba(255, 255, 255, 0.2), transparent 62%),
        linear-gradient(135deg, #3f2ac2 0%, #6c4bf4 52%, #9a7bff 100%);
    border-radius: 16px;
    box-shadow: 0 20px 42px rgba(76, 47, 212, 0.22);
    color: #ffffff;
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
    padding: 22px 24px;
}

.cii-settings-hero-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    display: flex;
    flex: 0 0 auto;
    font-size: 1.5rem;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.cii-settings-hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.82;
    text-transform: uppercase;
}

.cii-settings-hero-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 4px 0 0;
}

.cii-settings-hero-copy {
    margin: 4px 0 0;
    max-width: 620px;
    opacity: 0.9;
}

.cii-settings-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: 258px minmax(0, 1fr);
}

.cii-settings-aside {
    position: sticky;
    top: 84px;
}

.cii-settings-nav {
    display: grid;
    gap: 8px;
}

.cii-settings-nav-item {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(82, 96, 127, 0.13);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(29, 39, 59, 0.05);
    color: #45526b;
    display: flex;
    gap: 12px;
    padding: 11px 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cii-settings-nav-item:hover,
.cii-settings-nav-item:focus {
    border-color: rgba(108, 75, 244, 0.34);
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(108, 75, 244, 0.12);
    color: #45526b;
    transform: translateY(-1px);
}

.cii-settings-nav-item.is-active {
    background: linear-gradient(135deg, rgba(108, 75, 244, 0.1), rgba(108, 75, 244, 0.03));
    border-color: rgba(108, 75, 244, 0.42);
    color: #4c2fd4;
}

.cii-settings-nav-icon {
    align-items: center;
    background: rgba(108, 75, 244, 0.1);
    border-radius: 10px;
    color: #6c4bf4;
    display: flex;
    flex: 0 0 auto;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.cii-settings-nav-item.is-active .cii-settings-nav-icon {
    background: #6c4bf4;
    color: #ffffff;
}

.cii-settings-nav-text {
    display: grid;
    min-width: 0;
}

.cii-settings-nav-label {
    font-weight: 600;
}

.cii-settings-nav-hint {
    color: #7b879c;
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cii-settings-nav-arrow {
    color: #b4bccc;
    margin-left: auto;
}

.cii-settings-nav-item.is-active .cii-settings-nav-arrow {
    color: #6c4bf4;
}

.cii-settings-card {
    border-radius: 14px;
}

.cii-settings-option {
    align-items: center;
    border-bottom: 1px solid rgba(82, 96, 127, 0.1);
    cursor: pointer;
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 16px 20px;
    transition: background 0.15s ease;
}

.cii-settings-option:last-child {
    border-bottom: 0;
}

.cii-settings-option-compact {
    border: 1px solid rgba(82, 96, 127, 0.1);
    border-radius: 12px;
    height: 100%;
    padding: 14px;
}

.cii-settings-option:hover {
    background: rgba(108, 75, 244, 0.035);
}

.cii-settings-option-icon {
    align-items: center;
    background: rgba(108, 75, 244, 0.1);
    border-radius: 10px;
    color: #6c4bf4;
    display: flex;
    flex: 0 0 auto;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.cii-settings-option-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.cii-settings-option-title {
    color: #1d273b;
    font-weight: 600;
}

.cii-settings-option-copy {
    color: #667085;
    font-size: 0.82rem;
}

.cii-settings-option-switch {
    margin: 0 0 0 auto;
    min-height: auto;
    padding-left: 0;
}

.cii-settings-option-switch .form-check-input {
    cursor: pointer;
    float: none;
    height: 1.3rem;
    margin: 0;
    width: 2.4rem;
}

.cii-day-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cii-day-pill {
    margin: 0;
}

.cii-day-pill input {
    display: none;
}

.cii-day-pill span {
    background: #ffffff;
    border: 1px solid rgba(82, 96, 127, 0.18);
    border-radius: 999px;
    color: #52607f;
    cursor: pointer;
    display: inline-flex;
    font-weight: 600;
    min-width: 54px;
    padding: 8px 12px;
    justify-content: center;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.cii-day-pill input:checked + span {
    background: rgba(108, 75, 244, 0.12);
    border-color: #6c4bf4;
    color: #6c4bf4;
}

.cii-settings-actions {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.cii-settings-secret {
    border-bottom: 1px solid rgba(82, 96, 127, 0.1);
    padding: 18px 20px;
}

.cii-settings-secret:last-child {
    border-bottom: 0;
}

.cii-settings-secret-head {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cii-settings-secret-title {
    color: #1d273b;
    font-weight: 600;
    margin: 0;
}

.cii-settings-secret-state {
    color: #667085;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

@media (max-width: 991.98px) {
    .cii-settings-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .cii-settings-aside {
        position: static;
    }

    .cii-settings-nav {
        grid-auto-columns: minmax(180px, 1fr);
        grid-auto-flow: column;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .cii-settings-nav::-webkit-scrollbar {
        display: none;
    }

    .cii-settings-nav-arrow {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .cii-settings-hero {
        flex-direction: column;
        gap: 12px;
    }

    .cii-settings-option {
        align-items: start;
        flex-wrap: wrap;
    }
}

.block { display: block; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-end { justify-content: flex-end; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.ms-2 { margin-left: 8px; }
.ms-3 { margin-left: 12px; }
.w-full { width: 100%; }
