/* === ACCESS GATE === */
#access-gate {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #0a1628;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Inter", sans-serif;
}
#access-gate.hidden { display: none; }
.gate-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 48px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}
.gate-card h1 {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 8px;
}
.gate-card p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    margin-bottom: 32px;
}
.gate-card input[type="email"],
.gate-card input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.gate-card input[type="email"]:focus,
.gate-card input[type="password"]:focus {
    border-color: rgba(99,179,237,0.6);
}
.gate-card input[type="email"]::placeholder,
.gate-card input[type="password"]::placeholder {
    color: rgba(255,255,255,0.3);
}
.gate-card label {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    text-align: left;
}
.gate-card button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.gate-card button:hover { opacity: 0.9; }
.gate-error {
    color: #fc8181;
    font-size: 13px;
    margin-top: 12px;
    display: none;
}
.gate-error.visible { display: block; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Inter", sans-serif;
    background: #0a1628;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #00ffeb, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

body::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #00d9c0, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, 30px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* HEADER STYLES */
.header {
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.95) 0%, rgba(13, 30, 54, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 32px;
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
    box-shadow: 0 8px 32px rgba(0, 217, 192, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.logo {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 6px;
    color: #ffffff;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.logo-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #b8c5d6;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-tabs {
    display: flex;
    gap: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-tab {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #b8c5d6;
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tab:hover {
    color: #00d9c0;
}

.nav-tab.active {
    color: #00d9c0;
    border-bottom-color: #00d9c0;
}

/* MAIN CONTENT */
.main-content {
    display: flex;
    flex: 1;
    gap: 0;
    overflow: hidden;
}

.panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.left-panel {
    width: 35%;
    background: #0a1628;
    border-right: 1px solid rgba(26, 58, 92, 0.5);
    padding: 32px;
    overflow-y: auto;
}

.right-panel {
    width: 65%;
    background: #0a1628;
    padding: 32px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* SCROLLBAR STYLING */
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar,
textarea::-webkit-scrollbar {
    width: 8px;
}

.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
    background: transparent;
}

.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 192, 0.3);
    border-radius: 4px;
}

.left-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 192, 0.6);
}

/* SECTION HEADERS */
.section-header {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 24px;
    line-height: 1.2;
}

.subsection-header {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    margin-top: 20px;
    line-height: 1.2;
}

/* CHARACTER SELECTOR */
.character-selector {
    margin-bottom: 28px;
}

.character-selector label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7c93;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.character-selector select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(13, 30, 54, 0.6);
    border: 1px solid rgba(26, 58, 92, 0.5);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.character-selector select:hover {
    border-color: #00d9c0;
    background: rgba(13, 30, 54, 0.8);
}

.character-selector select:focus {
    outline: none;
    border-color: #00ffeb;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.2);
}

/* CHARACTER METADATA */
.character-metadata {
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.character-metadata:hover {
    border-color: rgba(0, 217, 192, 0.3);
    background: rgba(13, 30, 54, 0.8);
}

.metadata-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
}

.metadata-row:last-child {
    margin-bottom: 0;
}

.metadata-label {
    color: #b8c5d6;
    font-weight: 500;
}

.metadata-value {
    color: #00d9c0;
    font-weight: 600;
}

.colour-swatch {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* PROMPT EDITOR */
.prompt-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.prompt-textarea {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    background: rgba(10, 22, 40, 0.8);
    border: 1px solid rgba(26, 58, 92, 0.5);
    color: #ffffff;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    border-radius: 8px;
    resize: vertical;
    transition: all 0.3s ease;
    caret-color: #00d9c0;
}

.prompt-textarea:hover {
    border-color: rgba(0, 217, 192, 0.3);
    background: rgba(10, 22, 40, 1);
}

.prompt-textarea:focus {
    outline: none;
    border-color: #00ffeb;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.2);
}

/* BUTTONS */
.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-primary {
    background: #00d9c0;
    color: #0a1628;
}

.button-primary:hover {
    background: #00ffeb;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.4);
    transform: translateY(-2px);
}

.button-primary:active {
    transform: translateY(0);
}

.button-primary:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.6);
}

.button-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(26, 58, 92, 0.5);
}

.button-secondary:hover {
    border-color: #00d9c0;
    color: #00d9c0;
    background: rgba(0, 217, 192, 0.05);
}

.button-secondary:active {
    background: rgba(0, 217, 192, 0.1);
}

.button-secondary:focus {
    outline: none;
    border-color: #00ffeb;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.3);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* TABS */
.tab-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
    margin-bottom: 0;
}

.tab-button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #b8c5d6;
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: -1px;
}

.tab-button:hover {
    color: #00d9c0;
}

.tab-button.active {
    color: #00d9c0;
    border-bottom-color: #00d9c0;
}

.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Add padding only for comparison tab */
#comparison-tab {
    overflow-y: auto;
    padding-top: 24px;
}

/* SIMULATION PANEL */
.simulation-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.api-settings-panel {
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 12px;
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 12px;
}

.api-settings-panel.active {
    display: flex;
}

.api-settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.api-settings-row.full {
    grid-template-columns: 1fr;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7c93;
    letter-spacing: 0.5px;
}

.input-field {
    padding: 12px 16px;
    background: rgba(13, 30, 54, 0.6);
    border: 1px solid rgba(26, 58, 92, 0.5);
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-field:hover {
    border-color: rgba(0, 217, 192, 0.3);
}

.input-field:focus {
    outline: none;
    border-color: #00ffeb;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.2);
}

textarea.input-field {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(26, 58, 92, 0.5);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00d9c0;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #00ffeb;
    box-shadow: 0 0 10px rgba(0, 217, 192, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00d9c0;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #00ffeb;
    box-shadow: 0 0 10px rgba(0, 217, 192, 0.4);
}

.slider-value {
    min-width: 40px;
    text-align: center;
    color: #00d9c0;
    font-weight: 600;
    font-size: 13px;
}

/* CHAT OUTPUT - base styles (overridden by lesson view) */
.chat-output {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CHAT INPUT - base styles (overridden by lesson view) */
.chat-input-area {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.chat-button-group {
    display: flex;
    gap: 8px;
}

.chat-btn {
    padding: 12px 20px;
    background: #00d9c0;
    color: #0a1628;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.chat-btn:hover:not(:disabled) {
    background: #00ffeb;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.4);
    transform: translateY(-2px);
}

.chat-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.chat-btn.secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(26, 58, 92, 0.5);
}

.chat-btn.secondary:hover:not(:disabled) {
    border-color: #00d9c0;
    color: #00d9c0;
    background: rgba(0, 217, 192, 0.05);
}

/* PRE-LESSON VIEW */
.pre-lesson-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    overflow-y: auto;
}

.pre-lesson-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 12px;
    padding: 24px 28px;
}

.pre-lesson-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.pre-lesson-text {
    font-size: 13px;
    color: #b8c5d6;
    text-align: center;
    max-width: 400px;
    margin: 0;
    line-height: 1.5;
}

/* LESSON VIEW */
.lesson-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

/* HEADER BAR - Below main app header */
.lesson-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(13, 30, 54, 0.8);
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
    padding: 16px 24px;
    flex-shrink: 0;
    gap: 32px;
}

.lesson-header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lesson-back-btn {
    background: transparent;
    border: none;
    color: #00d9c0;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.lesson-back-btn:hover {
    color: #00ffeb;
}

.lesson-unit-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    flex: 1;
}

.lesson-learning-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    background: rgba(0, 217, 192, 0.15);
    color: #00d9c0;
    border: 1px solid rgba(0, 217, 192, 0.3);
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.lesson-header-center {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lesson-character-icon {
    width: 32px;
    height: 32px;
    background: rgba(0, 217, 192, 0.1);
    border: 1px solid rgba(0, 217, 192, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #00d9c0;
    flex-shrink: 0;
}

.lesson-character-badge {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lesson-character-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.lesson-character-subtitle {
    font-size: 12px;
    color: #6b7c93;
}

.lesson-character-dropdown {
    background: transparent;
    border: none;
    color: #b8c5d6;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-left: 4px;
}

.lesson-header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.lesson-end-session-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lesson-end-session-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

/* OBJECTIVE BAR */
.objective-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(13, 30, 54, 0.6);
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
    padding: 12px 24px;
    flex-shrink: 0;
    gap: 16px;
}

.objective-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.objective-label {
    font-size: 12px;
    color: #6b7c93;
    font-weight: 600;
}

.objective-text {
    font-size: 13px;
    font-weight: 500;
    color: #00d9c0;
}

.objective-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.bloom-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    background: transparent;
    color: #00d9c0;
    border: 1px solid rgba(0, 217, 192, 0.3);
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.objective-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.objective-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(26, 58, 92, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.objective-progress-fill {
    height: 100%;
    background: #00d9c0;
    transition: width 0.3s ease;
}

.objective-progress-text {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    min-width: 35px;
    text-align: right;
}

/* COLLAPSIBLE OBJECTIVES SECTION */
.objectives-section {
    background: rgba(13, 30, 54, 0.6);
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
    flex-shrink: 0;
}

.objectives-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    font-weight: 600;
    color: #00d9c0;
}

.objectives-header:hover {
    background: rgba(0, 217, 192, 0.05);
}

.objectives-toggle-icon {
    color: #00d9c0;
    font-size: 12px;
    transition: transform 0.3s;
    margin-right: 8px;
}

.objectives-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.objectives-body {
    display: none;
    padding: 16px 24px;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.objectives-body.expanded {
    display: flex;
    flex-direction: column;
}

/* MAIN LESSON AREA - Chat + Sidebar */
.lesson-main-area {
    display: flex;
    flex: 1;
    gap: 0;
    min-height: 0;
    overflow: hidden;
}

.lesson-chat-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-right: 1px solid rgba(26, 58, 92, 0.5);
}

/* CHAT OUTPUT */
.lesson-chat-column .chat-output {
    flex: 1;
    background: rgba(10, 22, 40, 0.4);
    border: none;
    border-radius: 0;
    padding: 16px 24px;
    overflow-y: auto;
    gap: 16px;
    min-height: auto;
    display: flex;
    flex-direction: column;
}

.lesson-chat-column .chat-output:empty::after {
    content: 'Ask your teacher any questions below.';
    color: #6b7c93;
    font-size: 13px;
    margin: auto;
}

.lesson-chat-bubble {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.lesson-chat-bubble.learner {
    flex-direction: row-reverse;
}

.lesson-character-avatar {
    width: 32px;
    height: 32px;
    background: rgba(0, 217, 192, 0.1);
    border: 1px solid rgba(0, 217, 192, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #00d9c0;
    flex-shrink: 0;
}

.lesson-message-bubble {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lesson-message-content {
    background: rgba(13, 30, 54, 0.7);
    border: 1px solid rgba(0, 217, 192, 0.1);
    border-radius: 4px 16px 16px 16px;
    padding: 16px;
    color: #ffffff;
    line-height: 1.6;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

.lesson-chat-bubble.learner .lesson-message-content {
    background: rgba(0, 217, 192, 0.08);
    border-color: rgba(0, 217, 192, 0.2);
    border-radius: 16px 4px 16px 16px;
}

.lesson-message-content p {
    margin: 0 0 10px 0;
}
.lesson-message-content p:last-child {
    margin-bottom: 0;
}
.lesson-message-content ul {
    margin: 8px 0;
    padding-left: 20px;
}
.lesson-message-content li {
    margin-bottom: 4px;
}
.lesson-message-content strong {
    color: #00d9c0;
}

.lesson-message-timestamp {
    font-size: 11px;
    color: #00d9c0;
    padding: 0 4px;
}

.lesson-chat-bubble.learner .lesson-message-timestamp {
    text-align: right;
}

/* PHASE LABEL BADGES on character chat messages */
.lesson-phase-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.lesson-phase-badge.teach {
    background: rgba(0, 217, 192, 0.15);
    color: #00d9c0;
    border: 1px solid rgba(0, 217, 192, 0.3);
}
.lesson-phase-badge.check {
    background: rgba(255, 140, 66, 0.15);
    color: #FF8C42;
    border: 1px solid rgba(255, 140, 66, 0.3);
}
.lesson-phase-badge.assess {
    background: rgba(91, 155, 213, 0.15);
    color: #5B9BD5;
    border: 1px solid rgba(91, 155, 213, 0.3);
}
.lesson-phase-badge.complete {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}
.lesson-phase-badge.learn {
    background: rgba(184, 197, 214, 0.1);
    color: #8b9cb6;
    border: 1px solid rgba(184, 197, 214, 0.2);
}

/* HELPER TEXT */
.lesson-helper-text {
    text-align: center;
    font-size: 13px;
    color: #6b7c93;
    padding: 16px 24px;
    background: rgba(13, 30, 54, 0.6);
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
}

/* CHAT INPUT AREA */
.lesson-chat-column .chat-input-area {
    background: rgba(13, 30, 54, 0.6);
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 0;
    padding: 16px 24px;
    flex-shrink: 0;
    gap: 10px;
    display: flex;
    align-items: center;
}

.lesson-chat-input-field {
    flex: 1;
    background: rgba(10, 22, 40, 0.6);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 12px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
}

.lesson-chat-input-field::placeholder {
    color: #6b7c93;
}

.lesson-chat-input-field:focus {
    outline: none;
    border-color: #00d9c0;
    box-shadow: 0 0 8px rgba(0, 217, 192, 0.15);
}

.chat-input-mic-btn,
.chat-input-send-btn {
    background: rgba(13, 30, 54, 0.6);
    border: 1px solid rgba(0, 217, 192, 0.3);
    color: #00d9c0;
    font-size: 18px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-input-mic-btn:hover:not(:disabled),
.chat-input-send-btn:hover:not(:disabled) {
    background: rgba(0, 217, 192, 0.1);
    border-color: #00d9c0;
}

.chat-input-mic-btn:disabled,
.chat-input-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* CONTINUE BUTTON (Chat Column) */
.lesson-continue-btn {
    width: 100%;
    background: linear-gradient(135deg, #00d9c0 0%, #00ffeb 100%);
    border: none;
    color: #0a1628;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.lesson-continue-btn:hover {
    box-shadow: 0 8px 24px rgba(0, 217, 192, 0.3);
    transform: translateY(-1px);
}

.lesson-continue-btn:before {
    content: '> ';
    font-weight: 700;
}

/* RIGHT SIDEBAR - xAPI Statements */
.lesson-sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    background: rgba(13, 30, 54, 0.4);
    flex-shrink: 0;
}

.lesson-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
    gap: 8px;
}

.lesson-sidebar-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.lesson-sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: #6b7c93;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

.lesson-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.lesson-sidebar-subtitle {
    font-size: 12px;
    color: #6b7c93;
}

.lesson-sidebar-badge {
    margin-left: auto;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    background: rgba(0, 217, 192, 0.15);
    color: #00d9c0;
    border: 1px solid rgba(0, 217, 192, 0.3);
    border-radius: 12px;
}

/* Session Info & Learning Objectives */
.lesson-sidebar-section {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
    font-size: 12px;
}

.lesson-sidebar-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.lesson-sidebar-info-row:last-child {
    margin-bottom: 0;
}

.lesson-sidebar-label {
    color: #6b7c93;
    min-width: 80px;
}

.lesson-sidebar-value {
    color: #ffffff;
    font-family: 'Courier New', monospace;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-sidebar-value.teal {
    color: #00d9c0;
}

.lesson-sidebar-divider {
    height: 1px;
    background: rgba(26, 58, 92, 0.5);
    margin: 8px 0;
}

.lesson-learning-objectives {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
}

.lesson-lo-title {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.lesson-lo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #6b7c93;
    margin-bottom: 6px;
}

.lesson-lo-checkbox {
    width: 14px;
    height: 14px;
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 3px;
    flex-shrink: 0;
}

.lesson-lo-item:last-child {
    margin-bottom: 0;
}

/* xAPI FEED */
.xapi-feed {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 16px;
}

.xapi-feed-item {
    padding: 12px;
    background: rgba(10, 22, 40, 0.6);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 11px;
    color: #b8c5d6;
    line-height: 1.5;
}

.xapi-feed-item:last-child {
    margin-bottom: 0;
}

.xapi-feed-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.xapi-feed-item-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    background: rgba(0, 217, 192, 0.2);
    color: rgba(0, 217, 192, 0.8);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.xapi-feed-item-time {
    font-family: 'Courier New', monospace;
    color: #00d9c0;
    font-size: 10px;
    margin-left: auto;
}

.xapi-feed-item-title {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    margin-top: 4px;
}

.xapi-feed-item-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 10px;
}

.xapi-feed-item-divider {
    height: 1px;
    background: rgba(26, 58, 92, 0.5);
    margin: 8px 0;
}

.xapi-feed-item-detail {
    font-size: 10px;
    color: #b8c5d6;
}

.xapi-feed-item-detail strong {
    color: #00d9c0;
    font-weight: 600;
}

/* Sidebar Continue Button */
.lesson-sidebar-continue {
    padding: 12px 16px;
    flex-shrink: 0;
    background: rgba(13, 30, 54, 0.8);
    border-top: 1px solid rgba(26, 58, 92, 0.5);
}

.lesson-sidebar-continue .lesson-continue-btn {
    width: 100%;
}

/* COMPARISON PANEL */
.comparison-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.comparison-card {
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.4s ease;
}

.comparison-card.active-character {
    border-color: #00d9c0;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.15);
}

.comparison-card.active-character::before {
    content: 'CURRENTLY SELECTED';
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #00d9c0;
    text-align: centre;
    margin-bottom: -4px;
}

.comparison-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 217, 192, 0.3);
    box-shadow: 0 20px 40px rgba(0, 217, 192, 0.1);
}

.comparison-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comparison-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.comparison-colour {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.comparison-detail {
    font-size: 13px;
    color: #b8c5d6;
    line-height: 1.6;
}

.comparison-detail strong {
    color: #00d9c0;
    font-weight: 600;
}

.comparison-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7c93;
    margin-top: 12px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.comparison-message-snippet {
    background: rgba(10, 22, 40, 0.5);
    border-left: 3px solid;
    padding: 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #ffffff;
    margin-bottom: 12px;
}

.comparison-voice {
    font-style: italic;
    color: #6b7c93;
    font-size: 13px;
    padding: 12px;
    background: rgba(10, 22, 40, 0.5);
    border-left: 2px solid #00d9c0;
    border-radius: 4px;
}

.comparison-badge-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.comparison-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(0, 217, 192, 0.1);
    color: #00d9c0;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* PROGRESS TRACKER */
/* Progress tracker styles moved to lesson view objectives section */

.progress-objective {
    font-size: 13px;
    color: #b8c5d6;
    line-height: 1.5;
    padding: 10px 12px;
    background: rgba(10, 22, 40, 0.5);
    border-left: 3px solid #00d9c0;
    border-radius: 4px;
    margin-bottom: 14px;
}

.progress-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7c93;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    margin-top: 12px;
}

.progress-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.progress-item.active {
    background: rgba(0, 217, 192, 0.06);
}

.progress-status-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.progress-status-dot.not-started {
    border: 2px solid rgba(107, 124, 147, 0.5);
    background: transparent;
    color: transparent;
}

.progress-status-dot.in-progress {
    border: 2px solid #FF8C42;
    background: rgba(255, 140, 66, 0.15);
    color: #FF8C42;
}

.progress-status-dot.in-progress::after {
    content: '...';
    font-size: 8px;
    letter-spacing: -1px;
}

.progress-status-dot.met {
    border: 2px solid #4CAF50;
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.progress-status-dot.met::after {
    content: '\2713';
    font-size: 11px;
}

.progress-item-text {
    flex: 1;
}

.progress-item-id {
    font-size: 11px;
    font-weight: 700;
    color: #00d9c0;
    margin-right: 4px;
}

.progress-item-label {
    font-size: 12px;
    color: #ffffff;
    line-height: 1.4;
}

.progress-item.met .progress-item-label {
    color: #4CAF50;
}

.progress-item-status-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-top: 2px;
}

.progress-item-status-text.not-started { color: #6b7c93; }
.progress-item-status-text.in-progress { color: #FF8C42; }
.progress-item-status-text.met { color: #4CAF50; }

/* XAPI STATEMENT */
/* xAPI styles now in sidebar feed */

/* RECOMMENDATIONS ENGINE */
.rec-panel { margin-bottom: 32px; }
.rec-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.rec-tab-btn { background: none; border: none; color: rgba(255,255,255,0.4); padding: 10px 20px; cursor: pointer; font-size: 13px; border-bottom: 2px solid transparent; transition: all 0.2s; }
.rec-tab-btn:hover { color: rgba(255,255,255,0.7); }
.rec-tab-btn.active { color: #00d9c0; border-bottom-color: #00d9c0; }
.rec-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.rec-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rec-priority { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.rec-priority.critical { background: rgba(255,107,107,0.15); color: #ff6b6b; }
.rec-priority.high { background: rgba(240,173,78,0.15); color: #f0ad4e; }
.rec-priority.medium { background: rgba(255,217,102,0.15); color: #ffd966; }
.rec-priority.low { background: rgba(0,217,192,0.15); color: #00d9c0; }
.rec-title { color: #ffffff; font-size: 14px; font-weight: 600; }
.rec-desc { color: rgba(255,255,255,0.6); font-size: 12px; line-height: 1.6; margin-bottom: 12px; }
.rec-meta { display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.rec-meta-item { font-size: 11px; color: rgba(255,255,255,0.4); }
.rec-meta-item strong { color: rgba(255,255,255,0.7); }
.rec-change { background: rgba(0,0,0,0.3); border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.rec-change-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.4); margin-bottom: 6px; }
.rec-change-target { font-size: 12px; color: #00d9c0; margin-bottom: 8px; }
.rec-change-text { font-size: 11px; color: rgba(255,255,255,0.7); line-height: 1.6; font-family: 'SF Mono', 'Fira Code', monospace; white-space: pre-wrap; }
.rec-impact { font-size: 11px; color: rgba(0,217,192,0.8); margin-bottom: 14px; }
.rec-actions { display: flex; gap: 8px; }
.rec-btn { padding: 7px 18px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; border: none; transition: all 0.2s; }
.rec-btn.approve { background: #00d9c0; color: #1a1a2e; }
.rec-btn.approve:hover { background: #00f0d4; }
.rec-btn.reject { background: rgba(255,107,107,0.15); color: #ff6b6b; border: 1px solid rgba(255,107,107,0.3); }
.rec-btn.reject:hover { background: rgba(255,107,107,0.25); }
.rec-approved-badge { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.rec-approved-badge.approved { background: rgba(0,217,192,0.15); color: #00d9c0; }
.rec-approved-badge.rejected { background: rgba(255,107,107,0.15); color: #ff6b6b; }
.rec-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.rec-stat-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 16px; text-align: center; }
.rec-stat-value { font-size: 24px; font-weight: 700; color: #ffffff; }
.rec-stat-label { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 4px; }
.rec-empty { text-align: center; padding: 40px; color: rgba(255,255,255,0.3); font-size: 13px; }

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: rgba(13, 30, 54, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.8);
    border-left: 4px solid #00d9c0;
    border-radius: 8px;
    padding: 16px 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 217, 192, 0.15);
    animation: toastSlide 0.4s ease-out;
    pointer-events: auto;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.error {
    border-left-color: #ff6b6b;
}

.toast.success {
    border-left-color: #4CAF50;
}

/* EMPTY STATE */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: #6b7c93;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
    line-height: 1.6;
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    .button,
    .character-selector select,
    .input-field,
    .nav-tab,
    .tab-button,
    .chat-message,
    .comparison-card,
    .toast {
        transition: none !important;
        animation: none !important;
    }
}

/* FOCUS INDICATORS */
*:focus-visible {
    outline: 2px solid #00d9c0;
    outline-offset: 2px;
}

/* CONTRAST CHECK */
@media (prefers-contrast: more) {
    .metadata-label {
        color: #ffffff;
    }
    .text-secondary {
        color: #b8c5d6;
    }
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .left-panel {
        width: 40%;
    }
    .right-panel {
        width: 60%;
    }
    .comparison-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* QUALIFICATION SELECTOR PANEL */
.qualification-selector-panel {
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qualification-selector-panel:hover {
    border-color: rgba(0, 217, 192, 0.3);
    background: rgba(13, 30, 54, 0.8);
}

.qualification-source-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: flex-end;
}

.qualification-dropdown-group,
.unit-dropdown-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qualification-selector-panel .input-label {
    margin-bottom: 0;
}

.api-connector-btn {
    padding: 12px 16px;
    background: rgba(0, 217, 192, 0.1);
    border: 1px solid rgba(0, 217, 192, 0.3);
    color: #00d9c0;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-connector-btn:hover {
    background: rgba(0, 217, 192, 0.2);
    border-color: #00d9c0;
    box-shadow: 0 0 12px rgba(0, 217, 192, 0.2);
}

.api-connector-btn:active {
    background: rgba(0, 217, 192, 0.3);
}

.readonly-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.readonly-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 8px;
    position: relative;
}

.readonly-field.full-width {
    grid-column: 1 / -1;
}

.readonly-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7c93;
    letter-spacing: 0.5px;
}

.readonly-value {
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    max-height: 60px;
    overflow-y: auto;
    word-break: break-word;
}

.edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: #00d9c0;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.edit-btn:hover {
    color: #00ffeb;
    transform: scale(1.15);
}

/* API MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.api-modal {
    background: rgba(13, 30, 54, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.8);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 217, 192, 0.2);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #b8c5d6;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #00d9c0;
}

.api-search-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.api-results {
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 12px;
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.api-result-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(13, 30, 54, 0.4);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.api-result-item:last-child {
    margin-bottom: 0;
}

.api-result-item:hover {
    background: rgba(13, 30, 54, 0.6);
    border-color: rgba(0, 217, 192, 0.3);
}

.api-result-checkbox {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(26, 58, 92, 0.8);
    background: rgba(10, 22, 40, 0.5);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.api-result-checkbox:checked {
    background: #00d9c0;
    border-color: #00d9c0;
}

.api-result-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.api-result-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 13px;
}

.api-result-meta {
    font-size: 11px;
    color: #b8c5d6;
}

/* CATEGORIES */
.unit-category {
    margin-bottom: 16px;
}

.unit-category-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #00d9c0;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.unit-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: transparent;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .qualification-source-row {
        grid-template-columns: 1fr;
    }

    .readonly-fields {
        grid-template-columns: 1fr;
    }

    .api-modal {
        width: 95%;
        padding: 24px;
    }
}

/* === LEARNING SPECIFICATIONS PAGE === */
.ls-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.ls-stat-card {
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.ls-stat-card:hover {
    border-color: rgba(0, 217, 192, 0.3);
    box-shadow: 0 8px 24px rgba(0, 217, 192, 0.08);
}

.ls-stat-label {
    color: #6b7c93;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.ls-stat-value {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}

.ls-stat-detail {
    color: #00d9c0;
    font-size: 12px;
}

.ls-search-bar {
    background: rgba(0, 217, 192, 0.03);
    border: 1px solid rgba(0, 217, 192, 0.15);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.ls-search-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.ls-search-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ls-search-input:focus {
    border-color: #00d9c0;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.15);
}

.ls-search-input::placeholder {
    color: #6b7c93;
}

.ls-search-btn {
    padding: 12px 24px;
    background: #00d9c0;
    color: #0a1628;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease;
}

.ls-search-btn:hover {
    background: #00ffeb;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.4);
}

.ls-filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.ls-filter-select {
    padding: 8px 12px;
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 6px;
    color: #b8c5d6;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.ls-filter-select:focus {
    border-color: #00d9c0;
}

.ls-clear-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 6px;
    color: #b8c5d6;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ls-clear-btn:hover {
    border-color: #00d9c0;
    color: #00d9c0;
}

.ls-result-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: rgba(10, 22, 40, 0.3);
    border-radius: 8px;
    padding: 4px;
    width: fit-content;
}

.ls-tab-btn {
    padding: 8px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6b7c93;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ls-tab-btn:hover {
    color: #b8c5d6;
}

.ls-tab-btn.active {
    background: rgba(0, 217, 192, 0.15);
    color: #00d9c0;
}

.ls-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #6b7c93;
    font-size: 13px;
}

.ls-accordion-item {
    border: 1px solid rgba(26, 58, 92, 0.3);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.ls-accordion-item:hover {
    border-color: rgba(0, 217, 192, 0.2);
}

.ls-accordion-header {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(13, 30, 54, 0.4);
    user-select: none;
    transition: background 0.2s ease;
}

.ls-accordion-header:hover {
    background: rgba(0, 217, 192, 0.05);
}

.ls-accordion-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.ls-accordion-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.ls-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
}

.ls-badge-level {
    background: rgba(0, 217, 192, 0.15);
    color: #00d9c0;
}

.ls-badge-credits {
    background: rgba(255, 255, 255, 0.08);
    color: #b8c5d6;
}

.ls-badge-sector {
    background: rgba(100, 130, 180, 0.15);
    color: #8ea8d0;
}

.ls-badge-type {
    background: rgba(180, 130, 255, 0.12);
    color: #b89cef;
}

.ls-accordion-arrow {
    color: #00d9c0;
    font-size: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.ls-accordion-arrow.open {
    transform: rotate(90deg);
}

.ls-accordion-body {
    display: none;
    padding: 0 20px 20px 20px;
    background: rgba(10, 22, 40, 0.3);
}

.ls-accordion-body.open {
    display: block;
}

.ls-lo-list, .ls-ac-list {
    margin: 12px 0;
    padding: 0;
    list-style: none;
}

.ls-lo-item, .ls-ac-item {
    padding: 8px 12px;
    margin-bottom: 4px;
    background: rgba(13, 30, 54, 0.4);
    border-radius: 6px;
    font-size: 13px;
    color: #b8c5d6;
    line-height: 1.6;
}

.ls-lo-item strong, .ls-ac-item strong {
    color: #ffffff;
    font-weight: 500;
}

.ls-section-label {
    color: #6b7c93;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 8px 0;
    font-weight: 500;
}

.ls-detail-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(0, 217, 192, 0.3);
    border-radius: 6px;
    color: #00d9c0;
    font-size: 12px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.ls-detail-btn:hover {
    background: rgba(0, 217, 192, 0.1);
    border-color: #00d9c0;
}

/* Detail Modal */
.ls-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 5000;
    display: none;
    overflow-y: auto;
    padding: 40px 20px;
    justify-content: center;
    align-items: flex-start;
}

.ls-modal-backdrop.open {
    display: flex;
}

.ls-modal-content {
    background: rgba(13, 30, 54, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 16px;
    padding: 32px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}

.ls-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 217, 192, 0.2);
}

.ls-modal-close {
    background: transparent;
    border: none;
    color: #6b7c93;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.ls-modal-close:hover {
    color: #00d9c0;
}

.ls-modal-section {
    margin-bottom: 24px;
}

.ls-modal-section-title {
    color: #00d9c0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Loading & Empty States */
.ls-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 32px;
    color: #6b7c93;
    font-size: 14px;
}

.ls-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 217, 192, 0.2);
    border-top-color: #00d9c0;
    border-radius: 50%;
    animation: lsSpin 0.8s linear infinite;
}

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

.ls-empty-state {
    text-align: center;
    padding: 64px 32px;
    color: #6b7c93;
}

.ls-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.ls-empty-title {
    color: #b8c5d6;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.ls-empty-text {
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .ls-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ls-stats-grid {
        grid-template-columns: 1fr;
    }

    .ls-search-row {
        flex-direction: column;
    }

    .ls-filter-row {
        flex-direction: column;
    }
}

/* === xAPI ANALYTICS PAGE === */
.xa-page { padding: 24px 32px; width: 100%; box-sizing: border-box; }
.xa-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid rgba(0,217,192,0.2); }
.xa-header-left { display: flex; align-items: center; gap: 16px; }
.xa-header-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(0,217,192,0.15); display: flex; align-items: center; justify-content: center; }
.xa-header h2 { color: #ffffff; font-size: 22px; margin: 0; }
.xa-header p { color: rgba(255,255,255,0.5); font-size: 13px; margin: 4px 0 0 0; }

/* Sub-tab navigation */
.xa-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: rgba(13,30,54,0.6); border-radius: 12px; padding: 4px; border: 1px solid rgba(26,58,92,0.5); overflow-x: auto; }
.xa-tab-btn { padding: 10px 20px; border: none; background: transparent; color: #6b7c93; font-size: 13px; font-weight: 500; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; font-family: inherit; }
.xa-tab-btn:hover { color: #b8c5d6; background: rgba(0,217,192,0.05); }
.xa-tab-btn.active { background: rgba(0,217,192,0.15); color: #00d9c0; font-weight: 600; }
.xa-tab-content { display: none; width: 100%; }
.xa-tab-content.active { display: block; width: 100%; }

/* KPI Cards */
.xa-kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 24px; width: 100%; }
.xa-kpi-card { background: rgba(13,30,54,0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(26,58,92,0.5); border-radius: 12px; padding: 20px; transition: all 0.3s ease; }
.xa-kpi-card:hover { border-color: rgba(0,217,192,0.3); transform: translateY(-2px); }
.xa-kpi-label { color: #6b7c93; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.xa-kpi-value { color: #ffffff; font-size: 28px; font-weight: 600; margin-bottom: 4px; }
.xa-kpi-change { font-size: 12px; font-weight: 500; }
.xa-kpi-change.positive { color: #00d9c0; }
.xa-kpi-change.negative { color: #fc8181; }
.xa-kpi-sparkline { height: 32px; margin-top: 8px; }
.xa-kpi-sparkline svg { width: 100%; height: 100%; }
.xa-kpi-sparkline path { fill: none; stroke: #00d9c0; stroke-width: 2; }
.xa-kpi-sparkline .spark-fill { fill: rgba(0,217,192,0.1); stroke: none; }

/* Glass cards */
.xa-glass { background: rgba(13,30,54,0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(26,58,92,0.5); border-radius: 16px; padding: 24px; }
.xa-glass-sm { background: rgba(13,30,54,0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(26,58,92,0.5); border-radius: 12px; padding: 16px; }
.xa-card-title { color: #ffffff; font-size: 14px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.xa-card-title svg { color: #00d9c0; }

/* Charts grid */
.xa-charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; width: 100%; }
.xa-charts-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 24px; width: 100%; }
.xa-chart-area { min-height: 200px; position: relative; }

/* Heatmap */
.xa-heatmap { display: grid; grid-template-columns: 40px repeat(24, 1fr); gap: 2px; }
.xa-heatmap-cell { aspect-ratio: 1; border-radius: 3px; background: rgba(0,217,192,0.05); transition: all 0.2s ease; cursor: pointer; min-width: 0; }
.xa-heatmap-cell:hover { transform: scale(1.3); z-index: 1; }
.xa-heatmap-cell.l1 { background: rgba(0,217,192,0.15); }
.xa-heatmap-cell.l2 { background: rgba(0,217,192,0.3); }
.xa-heatmap-cell.l3 { background: rgba(0,217,192,0.5); }
.xa-heatmap-cell.l4 { background: rgba(0,217,192,0.7); }
.xa-heatmap-cell.l5 { background: rgba(0,217,192,0.9); }
.xa-heatmap-label { color: #6b7c93; font-size: 10px; display: flex; align-items: center; }

/* Bar charts */
.xa-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.xa-bar-label { color: #b8c5d6; font-size: 12px; width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.xa-bar-track { flex: 1; height: 24px; background: rgba(0,217,192,0.08); border-radius: 6px; overflow: hidden; position: relative; }
.xa-bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #00d9c0, #00ffeb); transition: width 0.6s ease; display: flex; align-items: center; padding-left: 8px; }
.xa-bar-value { color: #0a1628; font-size: 11px; font-weight: 600; }

/* Stacked bar */
.xa-stacked-bar { display: flex; height: 32px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.xa-stacked-segment { height: 100%; transition: width 0.6s ease; position: relative; cursor: pointer; }
.xa-stacked-segment:hover { opacity: 0.85; }
.xa-bloom-1 { background: #4a5568; }
.xa-bloom-2 { background: #2d7d9a; }
.xa-bloom-3 { background: #00d9c0; }
.xa-bloom-4 { background: #00b4d8; }
.xa-bloom-5 { background: #0077b6; }
.xa-bloom-6 { background: #6c63ff; }

/* Bloom's legend */
.xa-bloom-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.xa-bloom-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #b8c5d6; }
.xa-bloom-legend-dot { width: 10px; height: 10px; border-radius: 3px; }

/* Keyword cloud */
.xa-keyword-cloud { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; min-height: 160px; padding: 16px; }
.xa-keyword { padding: 6px 14px; border-radius: 20px; background: rgba(0,217,192,0.1); color: #00d9c0; cursor: pointer; transition: all 0.3s ease; font-weight: 500; border: 1px solid transparent; }
.xa-keyword:hover { background: rgba(0,217,192,0.2); border-color: rgba(0,217,192,0.3); transform: scale(1.05); }
.xa-keyword.size-1 { font-size: 11px; }
.xa-keyword.size-2 { font-size: 13px; }
.xa-keyword.size-3 { font-size: 16px; }
.xa-keyword.size-4 { font-size: 20px; font-weight: 600; }
.xa-keyword.size-5 { font-size: 24px; font-weight: 600; }

/* Time range selector */
.xa-time-range { display: flex; gap: 4px; background: rgba(13,30,54,0.8); border-radius: 8px; padding: 3px; border: 1px solid rgba(26,58,92,0.5); }
.xa-time-btn { padding: 6px 14px; border: none; background: transparent; color: #6b7c93; font-size: 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; font-family: inherit; }
.xa-time-btn:hover { color: #b8c5d6; }
.xa-time-btn.active { background: rgba(0,217,192,0.15); color: #00d9c0; }

/* Live Feed */
.xa-feed-container { width: 100%; max-height: 600px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(0,217,192,0.3) transparent; }
.xa-feed-container::-webkit-scrollbar { width: 6px; }
.xa-feed-container::-webkit-scrollbar-thumb { background: rgba(0,217,192,0.3); border-radius: 3px; }
.xa-statement-card { width: 100%; background: rgba(13,30,54,0.4); border: 1px solid rgba(26,58,92,0.3); border-radius: 12px; padding: 16px 20px; margin-bottom: 8px; cursor: pointer; transition: all 0.3s ease; box-sizing: border-box; }
.xa-statement-card:hover { border-color: rgba(0,217,192,0.3); background: rgba(13,30,54,0.6); }
.xa-statement-card.expanded { border-color: rgba(0,217,192,0.4); background: rgba(13,30,54,0.7); }
.xa-statement-row { display: flex; align-items: center; gap: 12px; width: 100%; }
.xa-statement-actor { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.xa-statement-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(0,217,192,0.15); display: flex; align-items: center; justify-content: center; color: #00d9c0; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.xa-statement-name { color: #ffffff; font-size: 13px; font-weight: 500; }
.xa-statement-verb { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0; }
.xa-verb-remember { background: rgba(74,85,104,0.4); color: #a0aec0; }
.xa-verb-understand { background: rgba(45,125,154,0.3); color: #63b3ed; }
.xa-verb-apply { background: rgba(0,217,192,0.2); color: #00d9c0; }
.xa-verb-analyse { background: rgba(0,180,216,0.2); color: #00b4d8; }
.xa-verb-evaluate { background: rgba(0,119,182,0.3); color: #63b3ed; }
.xa-verb-create { background: rgba(108,99,255,0.3); color: #a78bfa; }
.xa-statement-object { color: #b8c5d6; font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-statement-meta { display: flex; align-items: center; gap: 16px; color: #6b7c93; font-size: 12px; flex-shrink: 0; margin-left: auto; }
.xa-statement-agent { color: #00d9c0; font-size: 12px; }
.xa-statement-time { color: #6b7c93; font-size: 12px; min-width: 60px; text-align: right; }
.xa-statement-detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(26,58,92,0.3); display: none; }
.xa-statement-card.expanded .xa-statement-detail { display: block; }
.xa-statement-json { background: rgba(10,22,40,0.8); border: 1px solid rgba(26,58,92,0.5); border-radius: 8px; padding: 12px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 11px; color: #b8c5d6; overflow-x: auto; white-space: pre-wrap; max-height: 300px; overflow-y: auto; }

/* Feed toolbar */
.xa-feed-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; width: 100%; }
.xa-feed-filter { padding: 6px 12px; border: 1px solid rgba(26,58,92,0.5); background: rgba(13,30,54,0.6); color: #b8c5d6; font-size: 12px; border-radius: 6px; cursor: pointer; font-family: inherit; }
.xa-feed-filter option { background: #0d1e36; color: #b8c5d6; }
.xa-feed-search { padding: 8px 14px; border: 1px solid rgba(26,58,92,0.5); background: rgba(13,30,54,0.6); color: #ffffff; font-size: 13px; border-radius: 8px; flex: 1; min-width: 200px; outline: none; font-family: inherit; }
.xa-feed-search:focus { border-color: rgba(0,217,192,0.4); }
.xa-feed-search::placeholder { color: #6b7c93; }
.xa-feed-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: rgba(0,217,192,0.2); color: #00d9c0; font-size: 10px; font-weight: 700; margin-left: 6px; vertical-align: middle; }
.xa-tab-btn.active .xa-feed-badge { background: rgba(0,217,192,0.3); }
.xa-feed-badge.pulse { animation: xaPulse 0.6s ease; }
@keyframes xaPulse { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
/* Summary stats bar for sub-tabs */
.xa-summary-bar { display: flex; gap: 24px; padding: 12px 20px; background: rgba(13,30,54,0.5); border: 1px solid rgba(26,58,92,0.3); border-radius: 10px; margin-bottom: 16px; width: 100%; box-sizing: border-box; }
.xa-summary-stat { display: flex; align-items: center; gap: 8px; }
.xa-summary-label { color: #6b7c93; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.xa-summary-value { color: #00d9c0; font-size: 14px; font-weight: 700; }
.xa-summary-divider { width: 1px; background: rgba(26,58,92,0.5); }
.xa-btn-teal { padding: 8px 16px; background: #00d9c0; color: #0a1628; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; font-family: inherit; }
.xa-btn-teal:hover { background: #00ffeb; box-shadow: 0 0 20px rgba(0,217,192,0.4); }
.xa-btn-outline { padding: 8px 16px; background: transparent; color: #b8c5d6; border: 1px solid rgba(26,58,92,0.5); border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; font-family: inherit; }
.xa-btn-outline:hover { border-color: #00d9c0; color: #00d9c0; }
.xa-btn-outline.active { border-color: #00d9c0; color: #00d9c0; background: rgba(0,217,192,0.1); }

/* Agent Performance */
.xa-agent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; width: 100%; }
.xa-agent-card { background: rgba(13,30,54,0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(26,58,92,0.5); border-radius: 16px; padding: 24px; transition: all 0.4s ease; width: 100%; box-sizing: border-box; }
.xa-agent-card:hover { transform: translateY(-4px); border-color: rgba(0,217,192,0.3); box-shadow: 0 12px 32px rgba(0,217,192,0.08); }
.xa-agent-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.xa-agent-avatar { width: 44px; height: 44px; border-radius: 12px; background: rgba(0,217,192,0.15); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #00d9c0; }
.xa-agent-name { color: #ffffff; font-size: 15px; font-weight: 600; }
.xa-agent-role { color: #6b7c93; font-size: 12px; }
.xa-agent-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.xa-agent-stat { text-align: center; }
.xa-agent-stat-value { color: #ffffff; font-size: 18px; font-weight: 600; }
.xa-agent-stat-label { color: #6b7c93; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.xa-agent-verbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.xa-agent-verb-tag { padding: 3px 8px; border-radius: 4px; font-size: 10px; background: rgba(0,217,192,0.1); color: #00d9c0; }
.xa-compare-checkbox { position: absolute; top: 12px; right: 12px; }

/* Kirkpatrick levels */
.xa-kirk-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.xa-kirk-label { color: #b8c5d6; font-size: 11px; width: 80px; }
.xa-kirk-track { flex: 1; height: 8px; background: rgba(0,217,192,0.08); border-radius: 4px; overflow: hidden; }
.xa-kirk-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.xa-kirk-reaction { background: #4a5568; }
.xa-kirk-learning { background: #2d7d9a; }
.xa-kirk-behaviour { background: #00d9c0; }
.xa-kirk-results { background: #6c63ff; }
.xa-kirk-value { color: #6b7c93; font-size: 11px; width: 36px; text-align: right; }

/* WONDERS Radar */
.xa-radar-container { width: 200px; height: 200px; margin: 0 auto; }

/* Learner Journeys */
.xa-learner-search { display: flex; gap: 12px; margin-bottom: 24px; width: 100%; }
.xa-journey-timeline { position: relative; padding-left: 32px; }
.xa-journey-line { position: absolute; left: 15px; top: 0; bottom: 0; width: 2px; background: rgba(0,217,192,0.2); }
.xa-journey-node { position: relative; margin-bottom: 16px; }
.xa-journey-dot { position: absolute; left: -24px; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #00d9c0; background: #0a1628; }
.xa-journey-dot.completed { background: #00d9c0; }
.xa-journey-content { background: rgba(13,30,54,0.4); border: 1px solid rgba(26,58,92,0.3); border-radius: 10px; padding: 14px; }
.xa-journey-title { color: #ffffff; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.xa-journey-desc { color: #6b7c93; font-size: 12px; }
.xa-journey-time { color: #6b7c93; font-size: 11px; margin-top: 6px; }
.xa-journey-bloom { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; margin-top: 4px; }

/* Growth trajectory chart */
.xa-trajectory-chart { height: 200px; position: relative; }
.xa-trajectory-chart svg { width: 100%; height: 100%; }
.xa-trajectory-line { fill: none; stroke: #00d9c0; stroke-width: 2; }
.xa-trajectory-area { fill: rgba(0,217,192,0.1); }
.xa-trajectory-dot { fill: #00d9c0; }

/* Statement Library */
.xa-lib-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.xa-lib-table thead th { color: #6b7c93; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(26,58,92,0.5); position: sticky; top: 0; background: rgba(13,30,54,0.95); }
.xa-lib-table tbody td { color: #b8c5d6; font-size: 13px; padding: 12px 16px; border-bottom: 1px solid rgba(26,58,92,0.2); }
.xa-lib-table tbody tr { transition: all 0.2s ease; cursor: pointer; }
.xa-lib-table tbody tr:hover { background: rgba(0,217,192,0.05); }
.xa-lib-verb-name { color: #ffffff; font-weight: 500; }
.xa-lib-iri { color: #6b7c93; font-size: 11px; font-family: 'SF Mono', 'Fira Code', monospace; }
.xa-lib-status { padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.xa-lib-status.active { background: rgba(0,217,192,0.15); color: #00d9c0; }
.xa-lib-status.available { background: rgba(107,124,147,0.2); color: #6b7c93; }
.xa-lib-status.deprecated { background: rgba(252,129,129,0.15); color: #fc8181; }
.xa-lib-count { color: #00d9c0; font-weight: 600; }
.xa-lib-scroll { max-height: 500px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(0,217,192,0.3) transparent; }
.xa-lib-scroll::-webkit-scrollbar { width: 6px; }
.xa-lib-scroll::-webkit-scrollbar-thumb { background: rgba(0,217,192,0.3); border-radius: 3px; }

/* Statement Builder */
.xa-builder-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: 100%; }
.xa-builder-form { display: flex; flex-direction: column; gap: 16px; }
.xa-form-group { display: flex; flex-direction: column; gap: 6px; }
.xa-form-label { color: #b8c5d6; font-size: 12px; font-weight: 500; }
.xa-form-input { padding: 10px 14px; border: 1px solid rgba(26,58,92,0.5); background: rgba(13,30,54,0.6); color: #ffffff; font-size: 13px; border-radius: 8px; outline: none; font-family: inherit; transition: border-color 0.2s; }
.xa-form-input:focus { border-color: rgba(0,217,192,0.4); }
.xa-form-input::placeholder { color: #6b7c93; }
.xa-form-select { padding: 10px 14px; border: 1px solid rgba(26,58,92,0.5); background: rgba(13,30,54,0.6); color: #ffffff; font-size: 13px; border-radius: 8px; outline: none; font-family: inherit; cursor: pointer; }
.xa-form-select option { background: #0d1e36; color: #b8c5d6; }
.xa-form-textarea { padding: 10px 14px; border: 1px solid rgba(26,58,92,0.5); background: rgba(13,30,54,0.6); color: #ffffff; font-size: 13px; border-radius: 8px; outline: none; font-family: inherit; resize: vertical; min-height: 80px; }
.xa-form-textarea:focus { border-color: rgba(0,217,192,0.4); }
.xa-json-preview { background: rgba(10,22,40,0.8); border: 1px solid rgba(26,58,92,0.5); border-radius: 12px; padding: 16px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; color: #00d9c0; overflow: auto; max-height: 500px; white-space: pre-wrap; }
.xa-tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
.xa-tag { padding: 4px 10px; border-radius: 6px; font-size: 11px; cursor: pointer; border: 1px solid rgba(26,58,92,0.5); background: transparent; color: #6b7c93; transition: all 0.2s ease; font-family: inherit; }
.xa-tag:hover { border-color: rgba(0,217,192,0.3); color: #b8c5d6; }
.xa-tag.selected { background: rgba(0,217,192,0.15); border-color: rgba(0,217,192,0.4); color: #00d9c0; }

/* Neurodiversity badges */
.xa-neuro-badge { padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 500; }
.xa-neuro-adhd { background: rgba(255,183,77,0.15); color: #ffb74d; }
.xa-neuro-dyslexia { background: rgba(129,199,132,0.15); color: #81c784; }
.xa-neuro-autism { background: rgba(100,181,246,0.15); color: #64b5f6; }

/* Growth mindset indicator */
.xa-growth-indicator { display: flex; align-items: center; gap: 6px; }
.xa-growth-bar { flex: 1; height: 6px; background: rgba(0,217,192,0.08); border-radius: 3px; overflow: hidden; }
.xa-growth-fill { height: 100%; background: linear-gradient(90deg, #00d9c0, #00ffeb); border-radius: 3px; transition: width 0.6s ease; }
.xa-growth-pct { color: #00d9c0; font-size: 12px; font-weight: 600; width: 40px; text-align: right; }

/* Loading & empty states */
.xa-loading { text-align: center; padding: 48px; color: #6b7c93; font-size: 14px; }
.xa-loading-spinner { width: 32px; height: 32px; border: 3px solid rgba(0,217,192,0.2); border-top-color: #00d9c0; border-radius: 50%; animation: xa-spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes xa-spin { to { transform: rotate(360deg); } }
.xa-empty { text-align: center; padding: 48px; }
.xa-empty-icon { color: #6b7c93; margin-bottom: 12px; }
.xa-empty-title { color: #ffffff; font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.xa-empty-text { color: #6b7c93; font-size: 13px; max-width: 400px; margin: 0 auto; }

/* Awaiting backend state */
.xa-awaiting { text-align: center; padding: 48px; background: rgba(0,217,192,0.03); border: 1px dashed rgba(0,217,192,0.2); border-radius: 12px; }
.xa-awaiting-icon { color: #00d9c0; margin-bottom: 12px; opacity: 0.5; }
.xa-awaiting-title { color: #ffffff; font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.xa-awaiting-text { color: #6b7c93; font-size: 13px; max-width: 500px; margin: 0 auto; }

/* Pulse indicator for live feed */
.xa-pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #00d9c0; position: relative; }
.xa-pulse::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: rgba(0,217,192,0.3); animation: xa-pulse-ring 2s ease-out infinite; }
@keyframes xa-pulse-ring { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

/* Responsive */
@media (max-width: 900px) {
    .xa-charts-grid { grid-template-columns: 1fr; }
    .xa-charts-grid-3 { grid-template-columns: 1fr; }
    .xa-builder-layout { grid-template-columns: 1fr; }
    .xa-agent-grid { grid-template-columns: 1fr; }
    .xa-kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .xa-statement-row { flex-wrap: wrap; }
}
@media (max-width: 600px) {
    .xa-kpi-grid { grid-template-columns: 1fr 1fr; }
    .xa-tabs { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .xa-pulse::before { animation: none; }
    .xa-loading-spinner { animation-duration: 0.01ms !important; }
}

/* Engagement Ring */
.xa-engagement-ring svg circle { transition: stroke-dasharray 1.5s ease; }

/* Goal Tracking */
.xa-goal-item { margin-bottom: 12px; }
.xa-goal-item:last-child { margin-bottom: 0; }
.xa-goal-label { display: flex; justify-content: space-between; margin-bottom: 4px; }
.xa-goal-name { color: #b8c5d6; font-size: 12px; }
.xa-goal-numbers { color: #6b7c93; font-size: 11px; }
.xa-goal-bar { height: 8px; background: rgba(26,58,92,0.5); border-radius: 4px; overflow: hidden; }
.xa-goal-fill { height: 100%; border-radius: 4px; transition: width 1.5s ease; }
.xa-goal-fill.on-track { background: #00d9c0; }
.xa-goal-fill.at-risk { background: #f6ad55; }
.xa-goal-fill.behind { background: #fc8181; }

/* Anomaly Alerts */
.xa-anomaly-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(26,58,92,0.3); }
.xa-anomaly-item:last-child { border-bottom: none; }
.xa-anomaly-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; }
.xa-anomaly-icon.warning { background: rgba(246,173,85,0.2); color: #f6ad55; }
.xa-anomaly-icon.alert { background: rgba(252,129,129,0.2); color: #fc8181; }
.xa-anomaly-icon.info { background: rgba(0,217,192,0.15); color: #00d9c0; }
.xa-anomaly-msg { color: #b8c5d6; font-size: 12px; line-height: 1.4; }
.xa-anomaly-time { color: #6b7c93; font-size: 10px; margin-top: 2px; }

/* Cohort Comparison */
.xa-cohort-btn.active { background: rgba(0,217,192,0.15); color: #00d9c0; border-color: rgba(0,217,192,0.3); }
.xa-cohort-card { background: rgba(13,30,54,0.4); border: 1px solid rgba(26,58,92,0.3); border-radius: 12px; padding: 16px; }
.xa-cohort-name { color: #ffffff; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.xa-cohort-stat { display: flex; justify-content: space-between; color: #6b7c93; font-size: 11px; margin-bottom: 4px; }
.xa-cohort-stat-val { color: #00d9c0; font-weight: 600; }
.xa-cohort-bloom-bar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; margin-top: 8px; gap: 1px; }

/* WONDERS Radar */
.xa-wonders-radar { width: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(26,58,92,0.3); }
.xa-wonders-radar svg { width: 100%; height: 120px; }
.xa-wonders-label { font-size: 8px; fill: #6b7c93; }
.xa-wonders-polygon { fill: rgba(0,217,192,0.15); stroke: #00d9c0; stroke-width: 1.5; }
.xa-wonders-axis { stroke: rgba(26,58,92,0.5); stroke-width: 0.5; }

/* ============================================
   JOB DESCRIPTIONS PAGE STYLES
   ============================================ */

/* Results grid */
.jd-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.jd-card {
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.jd-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 217, 192, 0.3);
    box-shadow: 0 20px 40px rgba(0, 217, 192, 0.08);
}

.jd-card.selected {
    border-color: rgba(0, 217, 192, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 217, 192, 0.2), 0 20px 40px rgba(0, 217, 192, 0.1);
}

.jd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.jd-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 4px;
}

.jd-card-org {
    font-size: 12px;
    color: #6b7c93;
}

.jd-match-badge {
    background: rgba(0, 217, 192, 0.15);
    border: 1px solid rgba(0, 217, 192, 0.3);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #00d9c0;
    white-space: nowrap;
}

.jd-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.jd-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.jd-tag.industry {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.jd-tag.level {
    background: rgba(244, 114, 182, 0.15);
    color: #f9a8d4;
    border: 1px solid rgba(244, 114, 182, 0.25);
}

.jd-tag.type {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.jd-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6b7c93;
    padding-top: 16px;
    border-top: 1px solid rgba(26, 58, 92, 0.3);
}

.jd-card-meta svg {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 4px;
}

/* JD Detail overlay */
.jd-detail-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 10, 20, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 32px;
    overflow-y: auto;
}

.jd-detail-overlay.open {
    display: flex;
}

.jd-detail-panel {
    background: #0d1e36;
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.jd-detail-panel::-webkit-scrollbar {
    width: 6px;
}

.jd-detail-panel::-webkit-scrollbar-track {
    background: transparent;
}

.jd-detail-panel::-webkit-scrollbar-thumb {
    background: rgba(26, 58, 92, 0.5);
    border-radius: 3px;
}

.jd-detail-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid rgba(26, 58, 92, 0.5);
    position: sticky;
    top: 0;
    background: #0d1e36;
    border-radius: 20px 20px 0 0;
    z-index: 2;
}

.jd-detail-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.jd-detail-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.jd-detail-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(26, 58, 92, 0.5);
    background: transparent;
    color: #6b7c93;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.jd-detail-close:hover {
    border-color: #00d9c0;
    color: #00d9c0;
}

.jd-detail-close svg {
    width: 18px;
    height: 18px;
}

.jd-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.jd-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #b8c5d6;
}

.jd-detail-meta-item svg {
    width: 16px;
    height: 16px;
    color: #00d9c0;
}

.jd-detail-divider {
    width: 1px;
    height: 16px;
    background: rgba(26, 58, 92, 0.5);
}

.jd-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.jd-btn-primary {
    background: #00d9c0;
    color: #0a1628;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.jd-btn-primary:hover {
    background: #00ffeb;
    box-shadow: 0 0 20px rgba(0, 217, 192, 0.3);
}

.jd-btn-primary svg {
    width: 16px;
    height: 16px;
}

.jd-btn-secondary {
    background: transparent;
    color: #b8c5d6;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(26, 58, 92, 0.5);
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.jd-btn-secondary:hover {
    border-color: #00d9c0;
    color: #00d9c0;
}

.jd-btn-secondary svg {
    width: 16px;
    height: 16px;
}

.jd-detail-body {
    padding: 32px;
}

.jd-detail-section {
    margin-bottom: 32px;
}

.jd-detail-section:last-child {
    margin-bottom: 0;
}

.jd-detail-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #00d9c0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jd-detail-section-title svg {
    width: 16px;
    height: 16px;
}

.jd-detail-text {
    font-size: 14px;
    color: #b8c5d6;
    line-height: 1.7;
}

.jd-qual-list {
    list-style: none;
    padding: 0;
}

.jd-qual-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: #b8c5d6;
    line-height: 1.5;
    border-bottom: 1px solid rgba(26, 58, 92, 0.2);
}

.jd-qual-list li:last-child {
    border-bottom: none;
}

.jd-qual-list li svg {
    width: 16px;
    height: 16px;
    color: #00d9c0;
    flex-shrink: 0;
    margin-top: 2px;
}

.jd-qual-essential {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.jd-qual-essential.required {
    background: rgba(0, 217, 192, 0.15);
    color: #00d9c0;
}

.jd-qual-essential.desirable {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

.jd-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jd-skill-tag {
    background: rgba(13, 30, 54, 0.8);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: #b8c5d6;
    transition: all 0.3s ease;
}

.jd-skill-tag:hover {
    border-color: rgba(0, 217, 192, 0.3);
    color: #ffffff;
}

/* Detail modal: meta grid (Department, Reports to) */
.jd-detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.jd-detail-meta-pair {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(13, 30, 54, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.4);
    border-radius: 8px;
}
.jd-meta-label {
    font-size: 11px;
    color: #6b7c93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.jd-meta-value {
    font-size: 14px;
    color: #e0e8f0;
}

/* Detail modal: skill cards with name + description */
.jd-detail-skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}
.jd-detail-skill-card {
    padding: 12px 14px;
    background: rgba(13, 30, 54, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.4);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}
.jd-detail-skill-card:hover {
    border-color: rgba(0, 217, 192, 0.3);
}
.jd-detail-skill-name {
    font-size: 13px;
    font-weight: 600;
    color: #00d9c0;
    margin-bottom: 4px;
}
.jd-detail-skill-desc {
    font-size: 12px;
    color: #8899aa;
    line-height: 1.5;
}

/* Detail modal: tech stack */
.jd-detail-tech-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
}
.jd-detail-tech-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(13, 30, 54, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.4);
    border-radius: 8px;
}
.jd-detail-tech-name {
    font-size: 13px;
    font-weight: 600;
    color: #e0e8f0;
}
.jd-detail-tech-prof {
    font-size: 11px;
    color: #6b7c93;
    max-width: 50%;
    text-align: right;
}

/* Detail modal: responsibility level grouping */
.jd-resp-level-label {
    font-size: 12px;
    font-weight: 600;
    color: #00d9c0;
    margin: 12px 0 6px 0;
    padding: 4px 10px;
    background: rgba(0, 217, 192, 0.08);
    border-radius: 4px;
    display: inline-block;
}

/* Detail modal: sub-labels */
.jd-detail-sub-label {
    font-size: 12px;
    font-weight: 600;
    color: #8899aa;
    margin: 14px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Detail modal: career progression cards */
.jd-detail-progression-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}
.jd-detail-progression-card {
    padding: 12px 14px;
    background: rgba(13, 30, 54, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.4);
    border-radius: 8px;
}
.jd-detail-progression-title {
    font-size: 13px;
    font-weight: 600;
    color: #e0e8f0;
    margin-bottom: 6px;
}
.jd-detail-progression-skills {
    font-size: 12px;
    color: #8899aa;
    line-height: 1.5;
}

/* Export dropdown */
.jd-export-menu {
    position: relative;
    display: inline-block;
}

.jd-export-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #0d1e36;
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    z-index: 10;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.jd-export-dropdown.open {
    display: block;
}

.jd-export-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #b8c5d6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jd-export-option:hover {
    background: rgba(0, 217, 192, 0.08);
    color: #ffffff;
}

.jd-export-option svg {
    width: 16px;
    height: 16px;
    color: #6b7c93;
}

/* Filter row */
.jd-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
}

.jd-filter-label {
    font-size: 12px;
    color: #6b7c93;
    font-weight: 500;
    margin-right: 4px;
}

.jd-filter-dropdown {
    background: rgba(10, 22, 40, 0.7);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    color: #b8c5d6;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7c93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.3s ease;
    min-width: 140px;
}

.jd-filter-dropdown:focus {
    border-color: rgba(0, 217, 192, 0.5);
}

.jd-filter-dropdown option {
    background: #0d1e36;
    color: #b8c5d6;
}

/* Search hints */
.jd-search-hints {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.jd-search-hint {
    font-size: 12px;
    color: #6b7c93;
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.3);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jd-search-hint:hover {
    color: #00d9c0;
    border-color: rgba(0, 217, 192, 0.3);
}

.jd-search-hint span {
    color: #6b7c93;
    opacity: 0.6;
}

/* Toast notification */
.jd-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #0d1e36;
    border: 1px solid rgba(0, 217, 192, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #ffffff;
    z-index: 200;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.4s ease;
}

.jd-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.jd-toast svg {
    width: 18px;
    height: 18px;
    color: #00d9c0;
    flex-shrink: 0;
}

/* Results header */
.jd-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.jd-results-count {
    font-size: 13px;
    color: #6b7c93;
}

.jd-results-count strong {
    color: #b8c5d6;
    font-weight: 600;
}

.jd-view-toggle {
    display: flex;
    gap: 2px;
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 8px;
    padding: 2px;
}

.jd-view-btn {
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7c93;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.jd-view-btn.active {
    background: rgba(0, 217, 192, 0.1);
    color: #00d9c0;
}

.jd-view-btn svg {
    width: 16px;
    height: 16px;
}

/* Pagination */
.jd-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.jd-page-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(26, 58, 92, 0.5);
    background: transparent;
    color: #b8c5d6;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.jd-page-btn:hover {
    border-color: #00d9c0;
    color: #00d9c0;
}

.jd-page-btn.active {
    background: rgba(0, 217, 192, 0.15);
    border-color: rgba(0, 217, 192, 0.3);
    color: #00d9c0;
    font-weight: 600;
}

.jd-page-btn svg {
    width: 16px;
    height: 16px;
}

/* Learning Specs card grid styles */
.ls-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.ls-card {
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.ls-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 217, 192, 0.3);
    box-shadow: 0 20px 40px rgba(0, 217, 192, 0.08);
}

.ls-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ls-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 4px;
}

.ls-card-org {
    font-size: 12px;
    color: #6b7c93;
}

.ls-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.ls-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.ls-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6b7c93;
    padding-top: 16px;
    border-top: 1px solid rgba(26, 58, 92, 0.3);
}

.ls-card-meta svg {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 4px;
}

/* Popularity/Usage Metrics */
.jd-pop-bar, .ls-pop-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
    gap: 2px;
}

.jd-pop-segment, .ls-pop-segment {
    height: 100%;
    border-radius: 3px;
    flex-grow: 1;
}

.pop-completed {
    background: #00d9c0;
}

.pop-in-progress {
    background: #fbbf24;
}

.pop-allocated {
    background: rgba(107, 124, 147, 0.4);
}

.jd-pop-stats, .ls-pop-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 11px;
}

.pop-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7c93;
}

.pop-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 900px) {
    .jd-results-grid,
    .ls-results-grid {
        grid-template-columns: 1fr;
    }
}

/* Print / PDF Export */
@media print {
    body > *:not(.page-container) { display: none !important; }
    .nav-header, .nav-tabs, .xa-tabs, .xa-time-range { display: none !important; }
    .xa-page { padding: 16px !important; }
    .xa-header { border-bottom: 2px solid #00d9c0 !important; }
    .xa-tab-content:not(#xa-overview) { display: none !important; }
    #xa-overview { display: block !important; }
    .xa-glass, .xa-kpi-card, .xa-cohort-card, .xa-anomaly-item { break-inside: avoid; }
    .xa-kpi-card { border: 1px solid #ccc !important; background: #f8f9fa !important; }
    .xa-kpi-value { color: #000 !important; }
    .xa-kpi-label { color: #333 !important; }
    .xa-card-title { color: #000 !important; }
    .xa-header h2 { color: #000 !important; }
    .xa-header p { color: #666 !important; }
    .xa-glass { background: #fff !important; border: 1px solid #ddd !important; backdrop-filter: none !important; }
    .xa-goal-name, .xa-anomaly-msg { color: #333 !important; }
    .xa-btn-teal, .xa-btn-outline, #xa-export-pdf-btn { display: none !important; }
}

/* ================================================================
   TEAM & ACCESS PAGE
   ================================================================ */

/* Sub-tabs */
.ta-sub-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(13,30,54,0.6);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(26,58,92,0.5);
}
.ta-sub-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #6b7c93;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}
.ta-sub-tab:hover { color: #b8c5d6; background: rgba(0,217,192,0.05); }
.ta-sub-tab.active { background: rgba(0,217,192,0.15); color: #00d9c0; }
.ta-sub-tab svg { flex-shrink: 0; }

/* Tab content panels */
.ta-tab-content { display: none; }
.ta-tab-content.active { display: block; }

/* Action bar */
.ta-action-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Search box */
.ta-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(13,30,54,0.6);
    border: 1px solid rgba(26,58,92,0.5);
    border-radius: 8px;
    padding: 8px 14px;
    flex: 1;
    min-width: 200px;
    transition: border-color 0.2s;
}
.ta-search-box:focus-within { border-color: rgba(0,217,192,0.4); }
.ta-search-box svg { color: #6b7c93; flex-shrink: 0; }
.ta-search-input {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    width: 100%;
}
.ta-search-input::placeholder { color: #6b7c93; }

/* Action buttons */
.ta-action-buttons { display: flex; gap: 8px; flex-shrink: 0; }

/* Buttons */
.ta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}
.ta-btn-primary {
    background: rgba(0,217,192,0.15);
    border: 1px solid rgba(0,217,192,0.3);
    color: #00d9c0;
}
.ta-btn-primary:hover { background: rgba(0,217,192,0.25); }
.ta-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.ta-btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
}
.ta-btn-secondary:hover { background: rgba(255,255,255,0.1); color: #ffffff; }
.ta-btn-lg { padding: 12px 24px; font-size: 14px; }

/* Summary cards */
.ta-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.ta-summary-card {
    background: rgba(0,217,192,0.05);
    border: 1px solid rgba(26,58,92,0.4);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
}
.ta-summary-value {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
}
.ta-summary-label {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table container */
.ta-table-container {
    background: rgba(13,30,54,0.4);
    border: 1px solid rgba(26,58,92,0.4);
    border-radius: 12px;
    overflow: hidden;
}
.ta-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.ta-table thead th {
    color: #6b7c93;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(26,58,92,0.5);
    font-weight: 600;
    position: sticky;
    top: 0;
    background: rgba(13,30,54,0.8);
}
.ta-table tbody td {
    color: #b8c5d6;
    font-size: 13px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(26,58,92,0.2);
    vertical-align: middle;
}
.ta-table tbody tr { transition: background 0.15s ease; }
.ta-table tbody tr:hover { background: rgba(0,217,192,0.04); }
.ta-table tbody tr:last-child td { border-bottom: none; }

/* Table checkbox */
.ta-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00d9c0;
    cursor: pointer;
}

/* Role badges */
.ta-role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ta-role-admin { background: rgba(246,173,85,0.15); color: #f6ad55; }
.ta-role-manager { background: rgba(99,179,237,0.15); color: #63b3ed; }
.ta-role-learner { background: rgba(0,217,192,0.15); color: #00d9c0; }

/* Status badges */
.ta-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}
.ta-status-active { background: rgba(72,187,120,0.15); color: #48bb78; }
.ta-status-invited { background: rgba(99,179,237,0.15); color: #63b3ed; }
.ta-status-inactive { background: rgba(107,124,147,0.2); color: #6b7c93; }

/* Source badges */
.ta-source-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    color: #6b7c93;
    background: rgba(107,124,147,0.15);
}

/* Table actions */
.ta-table-action {
    background: none;
    border: none;
    color: #6b7c93;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.15s;
}
.ta-table-action:hover { color: #00d9c0; background: rgba(0,217,192,0.1); }

/* Filter pills */
.ta-filter-pills { display: flex; gap: 6px; flex-shrink: 0; }
.ta-pill {
    padding: 6px 14px;
    border: 1px solid rgba(26,58,92,0.5);
    background: transparent;
    color: #6b7c93;
    font-size: 12px;
    font-family: inherit;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ta-pill:hover { border-color: rgba(0,217,192,0.3); color: #b8c5d6; }
.ta-pill.active { background: rgba(0,217,192,0.15); border-color: rgba(0,217,192,0.4); color: #00d9c0; }

/* Toggle switch */
.ta-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.ta-toggle input { opacity: 0; width: 0; height: 0; }
.ta-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(107,124,147,0.3);
    border-radius: 22px;
    transition: 0.3s;
}
.ta-toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.ta-toggle input:checked + .ta-toggle-slider { background: rgba(0,217,192,0.6); }
.ta-toggle input:checked + .ta-toggle-slider::before { transform: translateX(18px); }

/* Access mode select */
.ta-access-select {
    padding: 5px 10px;
    background: rgba(13,30,54,0.6);
    border: 1px solid rgba(26,58,92,0.5);
    color: #b8c5d6;
    font-size: 12px;
    font-family: inherit;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
}
.ta-access-select:focus { border-color: rgba(0,217,192,0.4); }
.ta-access-select option { background: #0d1e36; }

/* Type badge for allocation table */
.ta-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ta-type-skill { background: rgba(0,217,192,0.15); color: #00d9c0; }
.ta-type-qualification { background: rgba(124,58,237,0.15); color: #a78bfa; }
.ta-type-role { background: rgba(246,173,85,0.15); color: #f6ad55; }

/* Invite layout */
.ta-invite-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.ta-invite-column {
    background: rgba(13,30,54,0.4);
    border: 1px solid rgba(26,58,92,0.4);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.ta-invite-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(26,58,92,0.3);
}
.ta-invite-list {
    flex: 1;
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,217,192,0.3) transparent;
}
.ta-invite-list::-webkit-scrollbar { width: 5px; }
.ta-invite-list::-webkit-scrollbar-thumb { background: rgba(0,217,192,0.3); border-radius: 3px; }

/* Invite list items */
.ta-invite-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 2px;
}
.ta-invite-item:hover { background: rgba(0,217,192,0.05); }
.ta-invite-item.selected { background: rgba(0,217,192,0.1); }
.ta-invite-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #00d9c0;
    cursor: pointer;
    flex-shrink: 0;
}
.ta-invite-item-name { color: #ffffff; font-size: 13px; font-weight: 500; }
.ta-invite-item-detail { color: #6b7c93; font-size: 11px; }
.ta-invite-selected-count {
    color: #00d9c0;
    font-size: 12px;
    font-weight: 500;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(26,58,92,0.3);
}

/* Invite action */
.ta-invite-action { text-align: center; padding: 8px 0; }

/* Responsive */
@media (max-width: 768px) {
    .ta-summary-row { grid-template-columns: repeat(2, 1fr); }
    .ta-invite-layout { grid-template-columns: 1fr; }
    .ta-action-bar { flex-direction: column; align-items: stretch; }
    .ta-action-buttons { justify-content: flex-end; }
}


/* ================================================================
   ZAVMO_UI COMPONENT LIBRARY STYLES
   ================================================================ */

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    max-width: 400px;
}

.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: rgba(0, 180, 140, 0.9);
    border: 1px solid rgba(0, 217, 192, 0.3);
}

.toast-error {
    background: rgba(220, 60, 60, 0.9);
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.toast-info {
    background: rgba(45, 90, 138, 0.9);
    border: 1px solid rgba(107, 157, 199, 0.3);
}

.toast-warning {
    background: rgba(200, 140, 20, 0.9);
    border: 1px solid rgba(250, 200, 80, 0.3);
}

/* ========== UI CARDS ========== */
.ui-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.ui-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ui-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.ui-card-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.card-body {
    padding: 16px 20px;
}

/* ========== CONNECTOR CARDS ========== */
.connector-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.connector-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 217, 192, 0.2);
}

.connector-card.connected {
    border-color: rgba(0, 217, 192, 0.15);
}

.connector-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

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

.connector-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.connector-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

.connector-status {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.connector-card.connected .connector-status {
    color: #00d9c0;
}

/* ========== STAT BOX ========== */
.stat-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-change {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.stat-change.positive { color: #00d9c0; }
.stat-change.negative { color: #fc8181; }
.stat-change.neutral { color: rgba(255, 255, 255, 0.4); }

/* ========== KPI GRID & CARD ========== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}
.kpi-card {
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}
.kpi-card:hover {
    border-color: rgba(0, 217, 192, 0.3);
    transform: translateY(-2px);
}
.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 6px;
}
.kpi-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kpi-change {
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}
.kpi-change.up { color: #00d9c0; }
.kpi-change.down { color: #fc8181; }
.kpi-change.neutral { color: rgba(255, 255, 255, 0.4); }

/* ========== BLOOM'S TAXONOMY BARS ========== */
.bloom-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}
.bloom-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bloom-bar-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    min-width: 100px;
    text-align: right;
}
.bloom-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(26, 54, 93, 0.2);
    border-radius: 4px;
    overflow: hidden;
}
.bloom-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #1a365d, #4a7aaa);
    transition: width 0.6s ease;
}
.bloom-bar-count {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    min-width: 40px;
}

/* ========== DIMENSION CARD ========== */
.dimension-card {
    background: rgba(13, 30, 54, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(26, 58, 92, 0.5);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}
.dimension-card:hover {
    border-color: rgba(0, 217, 192, 0.3);
    transform: translateY(-2px);
}
.dimension-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.dimension-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}
.dimension-card-score {
    font-size: 20px;
    font-weight: 700;
    color: #00d9c0;
}
.dimension-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(26, 54, 93, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.dimension-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #1a365d, #4a7aaa);
    transition: width 0.6s ease;
}
.dimension-card-change {
    font-size: 11px;
    font-weight: 600;
    color: #00d9c0;
}
.dimension-card-detail {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* ========== UI TABLE ========== */
.ui-table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ui-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ui-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ui-table td {
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ui-table tbody tr:hover {
    background: rgba(0, 217, 192, 0.04);
}

.ui-table tbody tr:last-child td {
    border-bottom: none;
}

.ui-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* ========== FORM COMPONENTS ========== */
.ui-form-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.ui-form-group {
    margin-bottom: 16px;
}

.ui-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ui-form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.ui-form-control:focus {
    border-color: rgba(0, 217, 192, 0.5);
}

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

select.ui-form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ffffff' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

select.ui-form-control option {
    background: #0d1e36;
    color: #ffffff;
}

/* ========== SEARCH & FILTER ========== */
.ui-search-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.ui-search-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.ui-search-input:focus {
    border-color: rgba(0, 217, 192, 0.5);
}

.ui-search-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.ui-filter-select {
    padding: 10px 36px 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ffffff' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.ui-filter-select option {
    background: #0d1e36;
    color: #ffffff;
}

/* ========== STATUS PILL ========== */
.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.status-pill.status-active,
.status-pill.status-published,
.status-pill.status-connected,
.status-pill.status-ready {
    background: rgba(0, 217, 192, 0.12);
    color: #00d9c0;
}

.status-pill.status-pending,
.status-pill.status-review,
.status-pill.status-draft {
    background: rgba(200, 170, 50, 0.12);
    color: #c8aa32;
}

.status-pill.status-inactive,
.status-pill.status-paused,
.status-pill.status-disconnected {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
}

.status-pill.status-error,
.status-pill.status-failed {
    background: rgba(220, 60, 60, 0.12);
    color: #fc8181;
}

/* ========== TOGGLE SWITCH ========== */
.ui-toggle-wrapper {
    margin-bottom: 12px;
}

.ui-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.ui-toggle-input {
    display: none;
}

.ui-toggle-slider {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.ui-toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}

.ui-toggle-input:checked + .ui-toggle-slider {
    background: #00d9c0;
}

.ui-toggle-input:checked + .ui-toggle-slider::after {
    transform: translateX(16px);
}

/* ========== BUTTONS ========== */
.ui-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.ui-btn-primary {
    background: linear-gradient(135deg, #00d9c0, #00b89c);
    color: #0a1628;
}

.ui-btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 16px rgba(0, 217, 192, 0.25);
}

.ui-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ui-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.ui-btn-danger {
    background: rgba(220, 60, 60, 0.15);
    color: #fc8181;
    border: 1px solid rgba(220, 60, 60, 0.3);
}

.ui-btn-danger:hover {
    background: rgba(220, 60, 60, 0.25);
}

.ui-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
}

.ui-btn-ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

/* ========== TAB CONTAINER ========== */
.tab-container {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tab-button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-button:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.04);
}

.tab-button.active {
    color: #00d9c0;
    background: rgba(0, 217, 192, 0.08);
}

/* ========== CONTENT PAGE ========== */
.content-page-header {
    margin-bottom: 24px;
}

.content-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.content-tabs {
    /* Uses .tab-container styles above */
}

.tab-content-area {
    /* Container for rendered tab content */
}

/* ========== MODAL OVERLAY ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay .modal {
    background: #0d1e36;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* ========== FLOATING Z BUTTON ========== */
.zavmo-z-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d9c0, #00b89c);
    color: #0a1628;
    font-size: 22px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    z-index: 40000;
    box-shadow: 0 4px 20px rgba(0, 217, 192, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.zavmo-z-floating:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0, 217, 192, 0.5);
}

.zavmo-z-floating.active {
    background: rgba(255, 255, 255, 0.1);
    color: #00d9c0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ========== INTELLIGENCE PANEL ========== */
.zavmo-intel-panel {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 380px;
    max-height: 500px;
    background: #0d1e36;
    border: 1px solid rgba(0, 217, 192, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    z-index: 40001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.zavmo-intel-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.intel-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.intel-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #00d9c0;
}

.intel-panel-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.intel-panel-close:hover {
    color: #ffffff;
}

.intel-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    max-height: 340px;
}

.intel-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.intel-message p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.intel-message.intel-system p {
    color: rgba(255, 255, 255, 0.7);
}

.intel-message.intel-user {
    align-self: flex-end;
    background: rgba(0, 217, 192, 0.1);
    border-radius: 12px 12px 4px 12px;
    padding: 8px 14px;
    max-width: 85%;
}

.intel-message.intel-user p {
    color: #00d9c0;
}

.intel-panel-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.intel-panel-input input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.intel-panel-input input:focus {
    border-color: rgba(0, 217, 192, 0.4);
}

.intel-panel-input input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.intel-panel-input button {
    padding: 10px 14px;
    background: linear-gradient(135deg, #00d9c0, #00b89c);
    border: none;
    border-radius: 8px;
    color: #0a1628;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.intel-panel-input button:hover {
    opacity: 0.9;
}

/* ========== RESPONSIVE (UI COMPONENTS) ========== */
@media (max-width: 768px) {
    .content-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .zavmo-intel-panel {
        width: calc(100vw - 48px);
        right: 24px;
    }

    .ui-search-filter {
        flex-direction: column;
    }
}
