@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a,
.btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* .content padding removed to prevent conflicts */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none !important;
    visibility: hidden !important;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.download-link {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #28a745 !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid #28a745;
    transition: all 0.3s ease;
    margin: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.download-link:hover {
    background-color: #218838 !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Connector Logos Grid - fixed 5-column layout */
.connector-logos-grid {
    display: grid;
    grid-template-columns: repeat(5, 100px);
    gap: 12px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin: 20px 0 32px 0;
}

.connector-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    overflow: hidden;
}

.connector-logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #0071c1;
    text-decoration: none;
    color: #0071c1;
}

/* Fixed-size container for logo image */
.connector-logo .logo-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

/* SVG/image scales to fit inside the fixed box */
.connector-logo .logo-box img,
.connector-logo .logo-box svg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.connector-logo span {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive: 4 columns on smaller screens */
@media (max-width: 600px) {
    .connector-logos-grid {
        grid-template-columns: repeat(4, 80px);
        gap: 8px;
        padding: 12px;
    }

    .connector-logo {
        width: 80px;
        height: 80px;
    }

    .connector-logo .logo-box {
        width: 40px;
        height: 40px;
    }

    .connector-logo span {
        font-size: 10px;
    }
}

/* ============================================
   Header Center Promo
   ============================================ */

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-promo {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px 6px 16px;
    border-radius: 24px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.header-promo:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.header-promo .promo-text {
    color: white;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
}

.header-promo .promo-cta {
    background: white;
    color: #002F49;
    padding: 4px 12px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.2s ease;
}

.header-promo:hover .promo-cta {
    background: #f0f8ff;
}

/* ============================================
   Knowledge Browser Styles
   ============================================ */

/* Full-width layout for Knowledge Browser (no sidebar) */
.kb-full-width {
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.frame-content-full {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Ensure Knowledge Browser fills the full-width container */
.frame-content-full .knowledge-browser {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Knowledge Browser Container */
.knowledge-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    position: relative;
}

/* Error Banner */
.kb-error-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #fee2e2;
    border-bottom: 1px solid #fca5a5;
    color: #991b1b;
}

.kb-error-text {
    font-size: 14px;
}

.kb-error-dismiss {
    background: transparent;
    border: none;
    color: #991b1b;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
}

.kb-error-dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Toast Notification */
.kb-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: kb-toast-slide-in 0.3s ease-out;
    font-size: 14px;
    font-weight: 500;
}

@keyframes kb-toast-slide-in {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Overlay */
.kb-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 100;
}

.kb-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #002F49;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Stats Bar */
.kb-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    background: #002F49;
    color: white;
}

.kb-stat {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.kb-stat-divider {
    color: rgba(255, 255, 255, 0.4);
}

/* Search Bar */
.kb-search-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: white;
    border-bottom: 1px solid #D4DBF2;
}

.kb-search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.kb-search-bar input[type="text"] {
    flex: 1;
    padding: 10px 16px;
    padding-right: 36px;
    font-size: 14px;
    border: 1px solid #D4DBF2;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kb-search-bar input[type="text"]:focus {
    border-color: #8676FF;
    box-shadow: 0 0 0 3px rgba(134, 118, 255, 0.1);
}

.kb-search-bar input[type="text"]::placeholder {
    color: #7F97A4;
}

.kb-clear-search {
    position: absolute;
    right: 12px;
    background: #7F97A4;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-clear-search:hover {
    background: #002F49;
}

/* Filter Checkbox */
.kb-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    color: #4a4a6a;
    font-size: 13px;
}

.kb-filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #8676FF;
    cursor: pointer;
}

.kb-filter-checkbox:hover {
    color: #1a1a2e;
}

/* Main Content */
.kb-main-content {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Sidebar */
.kb-sidebar {
    width: 340px;
    background: white;
    border-right: 1px solid #D4DBF2;
    overflow-y: auto;
    flex-shrink: 0;
}

.kb-sidebar h2 {
    margin: 0;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #4a4a6a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #D4DBF2;
    background: #F3F5FB;
}

/* Category List */
.kb-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kb-category-item {
    border-bottom: 1px solid #D4DBF2;
}

.kb-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.kb-category-header:hover {
    background: #F3F5FB;
}

.kb-expand-icon {
    color: #7F97A4;
    font-family: monospace;
    font-size: 12px;
    width: 24px;
}

.kb-category-name {
    flex: 1;
    font-weight: 500;
    color: #1a1a2e;
}

.kb-category-count {
    color: #7F97A4;
    font-size: 13px;
}

/* System List */
.kb-system-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #F3F5FB;
}

.kb-system-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 10px 48px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.kb-system-item:hover {
    background: rgba(134, 118, 255, 0.08);
}

.kb-system-item.selected {
    background: rgba(134, 118, 255, 0.15);
    border-left: 3px solid #8676FF;
    padding-left: 45px;
}

.kb-system-name {
    font-size: 13px;
    color: #1a1a2e;
}

/* Search Results */
.kb-search-results-header {
    padding: 12px 16px;
    font-weight: 500;
    color: #8676FF;
    background: rgba(134, 118, 255, 0.08);
    border-bottom: 1px solid #D4DBF2;
}

.kb-search-results .kb-system-item {
    padding-left: 16px;
}

.kb-search-results .kb-system-item.selected {
    padding-left: 13px;
}

.kb-no-results {
    padding: 20px 16px;
    color: #7F97A4;
    text-align: center;
    font-style: italic;
}

/* Status Badges */
.kb-status-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kb-status-badge.complete,
.kb-status-badge.verified {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
}

.kb-status-badge.in_progress {
    background: rgba(234, 179, 8, 0.15);
    color: #EAB308;
}

.kb-status-badge.not_started {
    background: rgba(148, 163, 184, 0.15);
    color: #94A3B8;
}

.kb-status-badge.large {
    font-size: 11px;
    padding: 4px 12px;
}

/* Detail Panel */
.kb-detail-panel {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #F3F5FB;
}

/* System Details */
.kb-system-details {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(134, 118, 255, 0.1);
    overflow: hidden;
}

.kb-system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #002F49;
    color: white;
}

.kb-system-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* Share Button */
.kb-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.kb-share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.kb-share-btn svg {
    flex-shrink: 0;
}

/* System Info */
.kb-system-info {
    padding: 20px 24px;
    border-bottom: 1px solid #D4DBF2;
}

.kb-info-row {
    display: flex;
    padding: 8px 0;
}

.kb-info-label {
    width: 140px;
    color: #7F97A4;
    font-size: 13px;
}

.kb-info-value {
    flex: 1;
    color: #1a1a2e;
}

/* Tab Bar */
.kb-tabs {
    display: flex;
    border-bottom: 2px solid #D4DBF2;
    margin: 0;
    padding: 0 24px;
    background: #fff;
}

.kb-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 14px;
    color: #4a4a6a;
    transition: all 0.15s;
    font-family: inherit;
}

.kb-tab:hover {
    color: #8676FF;
}

.kb-tab.active {
    border-bottom-color: #8676FF;
    color: #8676FF;
    font-weight: 600;
}

/* No Sources State */
.kb-no-sources {
    padding: 40px 24px;
    text-align: center;
    color: #7F97A4;
}

.kb-no-sources p {
    margin: 0;
    font-size: 14px;
}

/* Sources Section */
.kb-sources-section {
    padding: 20px 24px;
    border-bottom: 1px solid #D4DBF2;
    background: #FAFBFD;
}

.kb-sources-section h3 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a4a6a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kb-source-group {
    margin-bottom: 16px;
}

.kb-source-group:last-child {
    margin-bottom: 0;
}

.kb-source-process {
    font-size: 12px;
    font-weight: 600;
    color: #8676FF;
    margin: 0 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #E8EAFF;
}

.kb-source-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kb-source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.kb-source-link {
    color: #1a1a2e;
    text-decoration: none;
    font-size: 13px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-source-link:hover {
    color: #8676FF;
    text-decoration: underline;
}

.kb-source-type {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.kb-source-type.official_docs {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
}

.kb-source-type.community {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.kb-source-type.technical {
    background: rgba(134, 118, 255, 0.15);
    color: #8676FF;
}

.kb-source-type.erd_diagram {
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
}

.kb-source-type.blog {
    background: rgba(236, 72, 153, 0.15);
    color: #EC4899;
}

.kb-source-type.video {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.kb-source-type.github {
    background: rgba(30, 30, 30, 0.15);
    color: #1e1e1e;
}

/* Processes Section */
.kb-processes-section {
    padding: 20px 24px;
    border-bottom: 1px solid #D4DBF2;
}

.kb-processes-section h3 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a4a6a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kb-processes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.kb-process-card {
    background: #F3F5FB;
    border: 1px solid #D4DBF2;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.kb-process-card:hover {
    border-color: #8676FF;
    box-shadow: 0 2px 8px rgba(134, 118, 255, 0.1);
}

.kb-process-card.selected {
    border-color: #8676FF;
    background: rgba(134, 118, 255, 0.08);
}

.kb-process-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.kb-process-id {
    font-weight: 600;
    color: #8676FF;
}

.kb-process-tables {
    font-size: 11px;
    color: #7F97A4;
}

.kb-process-name {
    font-size: 12px;
    color: #1a1a2e;
}

.kb-process-module {
    font-size: 11px;
    color: #7F97A4;
    margin-top: 4px;
}

/* Tables Section */
.kb-tables-section {
    padding: 20px 24px;
}

.kb-tables-section h3 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a4a6a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kb-tables-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb-table-item {
    background: #F3F5FB;
    border: 1px solid #D4DBF2;
    border-radius: 6px;
    padding: 12px 16px;
}

.kb-table-item.core {
    border-left: 3px solid #22C55E;
}

.kb-table-item.secondary {
    border-left: 3px solid #3B82F6;
}

.kb-table-item.reference {
    border-left: 3px solid #EAB308;
}

.kb-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.kb-table-name {
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #1a1a2e;
}

.kb-importance-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.kb-importance-badge.core {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
}

.kb-importance-badge.secondary {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.kb-importance-badge.reference {
    background: rgba(234, 179, 8, 0.15);
    color: #EAB308;
}

.kb-table-description {
    font-size: 13px;
    color: #4a4a6a;
    padding-bottom: 8px;
}

/* Table Accordion & Column View */
.kb-table-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    transition: background 0.2s;
}

.kb-table-item {
    border-bottom: 1px solid #eee;
    padding: 4px 12px;
    transition: all 0.3s ease;
}

.kb-table-item:hover {
    background: rgba(134, 118, 255, 0.02);
}

.kb-table-item.expanded {
    background: rgba(134, 118, 255, 0.04);
    border-left: 3px solid #8676FF;
    margin: 8px 0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 47, 73, 0.05);
}

.kb-table-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kb-table-expand-icon {
    font-size: 10px;
    color: #7F97A4;
    width: 16px;
    display: flex;
    justify-content: center;
}

.kb-table-item.expanded .kb-table-expand-icon {
    color: #8676FF;
}

.kb-table-details {
    margin-top: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    animation: kb-slide-down 0.3s ease-out;
}

.kb-columns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.kb-columns-table th {
    background: #F8FAFC;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #64748B;
    border-bottom: 2px solid #E2E8F0;
}

.kb-columns-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #F1F5F9;
    color: #334155;
}

.kb-columns-table tr:hover td {
    background: #F8FAFC;
}

.kb-col-key {
    width: 40px;
    text-align: center;
}

.kb-col-name {
    width: 250px;
}

.kb-col-name code {
    background: rgba(134, 118, 255, 0.08);
    color: #8676FF;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
}

.kb-no-cols {
    text-align: center;
    padding: 24px !important;
    color: #7F97A4;
    font-style: italic;
}

@keyframes kb-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Selection State (Hero & Stats) */
.kb-no-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 40px;
    min-height: 100%;
    background: radial-gradient(circle at top right, rgba(134, 118, 255, 0.05), transparent),
        radial-gradient(circle at bottom left, rgba(0, 47, 73, 0.02), transparent);
}

.kb-welcome {
    text-align: center;
    max-width: 800px;
    margin-bottom: 60px;
    animation: kb-fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.kb-welcome h2 {
    margin: 0 0 16px 0;
    font-size: 42px;
    font-weight: 800;
    color: #002F49;
    letter-spacing: -1px;
    line-height: 1.1;
}

.kb-welcome p {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: #4a4a6a;
    opacity: 0.9;
}

/* Knowledge Stats Grid */
.kb-knowledge-stats {
    width: 100%;
    max-width: 900px;
}

.kb-knowledge-stats h3 {
    margin: 0 0 24px 0;
    font-size: 12px;
    font-weight: 700;
    color: #7F97A4;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.kb-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.kb-stat-row {
    display: flex;
    align-items: stretch;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(212, 219, 242, 0.5);
    box-shadow: 0 4px 12px rgba(0, 47, 73, 0.04);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: kb-fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.kb-stat-row:hover {
    box-shadow: 0 8px 24px rgba(0, 47, 73, 0.08);
    transform: translateY(-2px);
}

/* Specific Row Delays */
.kb-stat-row.systems {
    animation-delay: 0.1s;
}

.kb-stat-row.mappings {
    animation-delay: 0.2s;
}

.kb-stat-row.tables {
    animation-delay: 0.3s;
}

.kb-stat-row.columns {
    animation-delay: 0.4s;
}

.kb-stat-card {
    position: relative;
    padding: 28px 32px;
    text-align: center;
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(212, 219, 242, 0.5);
}

/* Colored left accent bar for each row type */
.kb-stat-row.systems .kb-stat-card {
    background: linear-gradient(135deg, rgba(134, 118, 255, 0.08) 0%, rgba(134, 118, 255, 0.03) 100%);
    border-left: 4px solid #8676FF;
}

.kb-stat-row.mappings .kb-stat-card {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(234, 179, 8, 0.03) 100%);
    border-left: 4px solid #EAB308;
}

.kb-stat-row.tables .kb-stat-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.03) 100%);
    border-left: 4px solid #22C55E;
}

.kb-stat-row.columns .kb-stat-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-left: 4px solid #3B82F6;
}

.kb-stat-value {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.kb-stat-row.systems .kb-stat-value {
    color: #8676FF;
}

.kb-stat-row.mappings .kb-stat-value {
    color: #B8860B;
}

.kb-stat-row.tables .kb-stat-value {
    color: #22C55E;
}

.kb-stat-row.columns .kb-stat-value {
    color: #3B82F6;
}

.kb-stat-label {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 2px;
}

.kb-stat-sublabel {
    font-size: 10px;
    color: #7F97A4;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kb-stat-info {
    flex-grow: 1;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kb-stat-info h4 {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 700;
    color: #002F49;
}

.kb-stat-info p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.55;
    color: #4a4a6a;
}

.kb-stat-examples {
    font-size: 12px;
    font-weight: 500;
    color: #5a6a7a;
    font-style: italic;
}

/* Color-matched example text */
.kb-stat-row.systems .kb-stat-examples {
    color: #6a5acd;
}

.kb-stat-row.mappings .kb-stat-examples {
    color: #9a7a0a;
}

.kb-stat-row.tables .kb-stat-examples {
    color: #1a9a4a;
}

.kb-stat-row.columns .kb-stat-examples {
    color: #2a6ad6;
}

/* Contact CTA */
.kb-contact-cta {
    margin-bottom: 24px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(134, 118, 255, 0.06) 0%, rgba(134, 118, 255, 0.02) 100%);
    border: 1px solid rgba(134, 118, 255, 0.15);
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    color: #4a4a6a;
}

.kb-contact-cta a {
    color: #6B5BFF;
    font-weight: 600;
    text-decoration: none;
    margin: 0 4px;
}

.kb-contact-cta a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes kb-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Processes State */
.kb-no-processes {
    padding: 40px 24px;
    text-align: center;
}

.kb-no-processes p {
    margin: 0 0 8px 0;
    color: #4a4a6a;
}

.kb-no-processes .hint {
    color: #7F97A4;
    font-size: 13px;
}

/* Back Link */
.kb-back-link {
    padding: 12px 24px;
    background: #F3F5FB;
    border-bottom: 1px solid #D4DBF2;
}

.kb-back-link a {
    color: #8676FF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
}

.kb-back-link a:hover {
    color: #7566ee;
    text-decoration: underline;
}

/* ============================================
   Process Mining Panel (Right Sidebar in KB)
   ============================================ */

.kb-process-panel {
    width: 380px;
    flex-shrink: 0;
    background: #f8f9fa;
    border-left: 1px solid #D4DBF2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kb-pp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #D4DBF2;
    background: white;
}

.kb-pp-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #002F49;
}

.kb-pp-view-all {
    font-size: 13px;
    color: #0066CC;
    text-decoration: none;
}

.kb-pp-view-all:hover {
    text-decoration: underline;
}

.kb-pp-search {
    padding: 12px 16px;
    background: white;
}

.kb-pp-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #D4DBF2;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kb-pp-search input:focus {
    border-color: #8676FF;
    box-shadow: 0 0 0 3px rgba(134, 118, 255, 0.1);
}

.kb-pp-search input::placeholder {
    color: #7F97A4;
}

.kb-pp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
    background: white;
    border-bottom: 1px solid #D4DBF2;
}

.kb-pp-filters button {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid #D4DBF2;
    border-radius: 14px;
    background: white;
    cursor: pointer;
    color: #4a4a6a;
    transition: all 0.15s;
}

.kb-pp-filters button:hover {
    border-color: #8676FF;
    color: #8676FF;
}

.kb-pp-filters button.active {
    background: #0066CC;
    color: white;
    border-color: #0066CC;
}

.kb-pp-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 12px;
    color: #666;
    background: #f0f2f5;
    border-bottom: 1px solid #D4DBF2;
}

.kb-pp-stats-divider {
    color: #ccc;
}

.kb-pp-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.kb-pp-card {
    display: block;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.kb-pp-card:hover {
    border-color: #0066CC;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}

.kb-pp-short {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #0066CC;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kb-pp-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.kb-pp-counts {
    display: block;
    font-size: 12px;
    color: #7F97A4;
}

.kb-pp-no-results {
    text-align: center;
    padding: 20px;
    color: #7F97A4;
    font-size: 14px;
}

/* Responsive: hide process panel on narrow screens */
@media (max-width: 1200px) {
    .kb-process-panel {
        display: none;
    }
}

/* ============================================
   Process Mining Library Styles
   ============================================ */

/* Full-width layout for Process Mining Library (no sidebar) */
.pml-full-width {
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.frame-content-full .process-library-browser {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Process Library Browser Container */
.process-library-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    position: relative;
    background: #F3F5FB;
}

/* Error Banner */
.pml-error-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #fee2e2;
    border-bottom: 1px solid #fca5a5;
    color: #991b1b;
}

.pml-error-text {
    font-size: 14px;
}

.pml-error-dismiss {
    background: transparent;
    border: none;
    color: #991b1b;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
}

.pml-error-dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Loading Overlay */
.pml-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 100;
}

.pml-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #002F49;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Toast Notification */
.pml-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: pml-toast-slide-in 0.3s ease-out;
    font-size: 14px;
    font-weight: 500;
}

@keyframes pml-toast-slide-in {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Main Content */
.pml-main-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Grid View */
.pml-grid-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Hero Section */
.pml-hero {
    text-align: center;
    margin-bottom: 40px;
    animation: pml-fade-in-up 0.6s ease-out;
}

.pml-hero h1 {
    margin: 0 0 16px 0;
    font-size: 36px;
    font-weight: 800;
    color: #002F49;
    letter-spacing: -1px;
}

.pml-hero p {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: #4a4a6a;
    max-width: 700px;
    margin: 0 auto;
}

/* Search Bar */
.pml-search-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    align-items: center;
}

.pml-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.pml-search-bar input[type="text"] {
    width: 100%;
    padding: 12px 20px;
    padding-right: 40px;
    font-size: 15px;
    border: 2px solid #D4DBF2;
    border-radius: 30px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pml-search-bar input[type="text"]:focus {
    border-color: #8676FF;
    box-shadow: 0 0 0 4px rgba(134, 118, 255, 0.1);
}

.pml-search-bar input[type="text"]::placeholder {
    color: #7F97A4;
}

.pml-clear-search {
    position: absolute;
    right: 14px;
    background: #7F97A4;
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pml-clear-search:hover {
    background: #002F49;
}

/* Category Filter */
.pml-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.pml-filter-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: white;
    border: 1px solid #D4DBF2;
    border-radius: 20px;
    color: #4a4a6a;
    cursor: pointer;
    transition: all 0.2s;
}

.pml-filter-btn:hover {
    border-color: #8676FF;
    color: #8676FF;
}

.pml-filter-btn.active {
    background: #8676FF;
    border-color: #8676FF;
    color: white;
}

/* Stats Summary */
.pml-stats-summary {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 40px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 47, 73, 0.05);
}

.pml-stat {
    text-align: center;
}

.pml-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #8676FF;
    line-height: 1;
}

.pml-stat-label {
    display: block;
    font-size: 13px;
    color: #4a4a6a;
    margin-top: 8px;
}

/* Process Cards Grid */
.pml-process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.pml-process-card {
    background: white;
    border: 1px solid #D4DBF2;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.pml-process-card:hover {
    border-color: #8676FF;
    box-shadow: 0 8px 24px rgba(134, 118, 255, 0.15);
    transform: translateY(-2px);
}

.pml-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pml-card-short-name {
    font-size: 12px;
    font-weight: 700;
    color: #8676FF;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pml-card-category {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    background: rgba(134, 118, 255, 0.1);
    color: #6B5BFF;
    border-radius: 12px;
}

.pml-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #002F49;
}

.pml-card-description {
    margin: 0 0 16px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #4a4a6a;
    flex: 1;
}

.pml-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #7F97A4;
    padding-top: 12px;
    border-top: 1px solid #F0F2FA;
}

.pml-card-divider {
    color: #D4DBF2;
}

/* No Results */
.pml-no-results {
    text-align: center;
    padding: 40px;
    color: #7F97A4;
}

.pml-no-results p {
    margin: 0;
    font-size: 16px;
}

/* Detail View */
.pml-detail-view {
    background: white;
    min-height: 100%;
}

.pml-back-link {
    padding: 16px 32px;
    background: #F3F5FB;
    border-bottom: 1px solid #D4DBF2;
}

.pml-back-link a {
    color: #8676FF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}

.pml-back-link a:hover {
    color: #7566ee;
    text-decoration: underline;
}

.pml-process-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 32px;
}

.pml-process-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.pml-process-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pml-process-header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    color: #002F49;
}

.pml-short-name {
    font-size: 14px;
    font-weight: 700;
    color: #8676FF;
    background: rgba(134, 118, 255, 0.1);
    padding: 6px 14px;
    border-radius: 16px;
}

/* Share Button */
.pml-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #F3F5FB;
    border: 1px solid #D4DBF2;
    border-radius: 8px;
    color: #4a4a6a;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.pml-share-btn:hover {
    background: #E8EAFF;
    border-color: #8676FF;
    color: #8676FF;
}

.pml-share-btn svg {
    flex-shrink: 0;
}

.pml-process-description {
    margin: 0 0 16px 0;
    font-size: 16px;
    line-height: 1.7;
    color: #4a4a6a;
}

.pml-category-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    background: #002F49;
    color: white;
    border-radius: 16px;
    margin-bottom: 32px;
}

/* Insights Section */
.pml-insights-section {
    margin-bottom: 48px;
}

.pml-insights-section h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #002F49;
}

.pml-section-intro {
    margin: 0 0 24px 0;
    font-size: 14px;
    color: #7F97A4;
}

.pml-insights-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pml-insight-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: #F8F9FC;
    border: 1px solid #E8EAFF;
    border-radius: 12px;
    transition: all 0.2s;
}

.pml-insight-card:hover {
    background: #F0F2FA;
    border-color: #D4DBF2;
}

.pml-insight-rank {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8676FF 0%, #6B5BFF 100%);
    color: white;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pml-insight-content {
    flex: 1;
}

.pml-insight-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #002F49;
}

.pml-insight-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #4a4a6a;
}

.pml-insight-category {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pml-insight-category.efficiency {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.pml-insight-category.cost {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
}

.pml-insight-category.compliance {
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
}

.pml-insight-category.quality {
    background: rgba(168, 85, 247, 0.15);
    color: #A855F7;
}

.pml-insight-category.cashflow {
    background: rgba(234, 179, 8, 0.15);
    color: #B8860B;
}

.pml-insight-category.customer {
    background: rgba(236, 72, 153, 0.15);
    color: #EC4899;
}

/* KPIs Section */
.pml-kpis-section {
    margin-bottom: 48px;
}

.pml-kpis-section h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #002F49;
}

.pml-kpi-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 47, 73, 0.05);
}

.pml-kpi-table th {
    text-align: left;
    padding: 14px 20px;
    background: #002F49;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pml-kpi-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #F0F2FA;
    font-size: 14px;
    color: #4a4a6a;
}

.pml-kpi-table tbody tr:hover {
    background: #F8F9FC;
}

.pml-kpi-table tbody tr:last-child td {
    border-bottom: none;
}

.pml-kpi-name {
    font-weight: 600;
    color: #002F49;
}

.pml-kpi-improvement {
    color: #22C55E;
    font-weight: 600;
}

/* Activities Section */
.pml-activities-section {
    margin-bottom: 48px;
}

.pml-activities-section h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #002F49;
}

.pml-phase-group {
    margin-bottom: 32px;
}

.pml-phase-title {
    font-size: 16px;
    font-weight: 600;
    color: #002F49;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #0ea5e9;
    display: inline-block;
}

.pml-activities-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.pml-activity-item {
    background: white;
    border: 1px solid #E5E7F0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.pml-activity-item:hover {
    border-color: #0ea5e9;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
}

.pml-activity-item.milestone {
    border-left: 4px solid #22C55E;
    background: linear-gradient(to right, rgba(34, 197, 94, 0.03), white);
}

.pml-activity-name {
    font-weight: 600;
    color: #002F49;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pml-milestone-badge {
    background: #22C55E;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.pml-activity-desc {
    color: #64748b;
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.5;
}

/* Case Attributes Section */
.pml-attributes-section {
    margin-bottom: 48px;
}

.pml-attributes-section h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #002F49;
}

.pml-attribute-group {
    margin-bottom: 32px;
}

.pml-attribute-category {
    font-size: 16px;
    font-weight: 600;
    color: #002F49;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #8b5cf6;
    display: inline-block;
}

.pml-attribute-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 47, 73, 0.05);
}

.pml-attribute-table th {
    text-align: left;
    padding: 12px 16px;
    background: #002F49;
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pml-attribute-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #F0F2FA;
    font-size: 13px;
    color: #4a4a6a;
    vertical-align: top;
}

.pml-attribute-table tbody tr:hover {
    background: #F8F9FC;
}

.pml-attribute-table tbody tr:last-child td {
    border-bottom: none;
}

.pml-attribute-table tbody tr.required {
    background: linear-gradient(to right, rgba(14, 165, 233, 0.03), white);
}

.pml-attr-name {
    font-weight: 600;
    color: #002F49;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pml-required-badge {
    background: #0ea5e9;
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.pml-attr-type {
    color: #8b5cf6;
    font-weight: 500;
    font-size: 12px;
}

.pml-attr-examples {
    font-style: italic;
    color: #64748b;
    font-size: 12px;
}

/* Tab Navigation */
.pml-tabs {
    display: flex;
    gap: 0;
    margin: 24px 0;
    border-bottom: 2px solid #e2e8f0;
}

.pml-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.pml-tab:hover {
    color: #334155;
}

.pml-tab.active {
    color: #3b82f6;
}

.pml-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
}

/* Supported Systems Section */
.pml-systems-section {
    margin-top: 32px;
}

.pml-systems-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.pml-systems-category {
    margin-bottom: 32px;
}

.pml-systems-category h3 {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.pml-systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.pml-system-card {
    display: block;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pml-system-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.pml-system-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.pml-system-vendor {
    font-size: 12px;
    color: #64748b;
}

.pml-system-module {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.pml-no-systems {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 8px;
}

.pml-no-systems p {
    margin: 0;
}

/* Animations */
@keyframes pml-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .pml-hero h1 {
        font-size: 28px;
    }

    .pml-stats-summary {
        flex-direction: column;
        gap: 24px;
    }

    .pml-process-grid {
        grid-template-columns: 1fr;
    }

    .pml-process-header {
        flex-direction: column;
        gap: 16px;
    }

    .pml-insight-card {
        flex-direction: column;
    }

    .pml-insight-category {
        align-self: flex-start;
    }

    .pml-kpi-table {
        display: block;
        overflow-x: auto;
    }

    .pml-activities-list {
        grid-template-columns: 1fr;
    }

    .pml-attribute-table {
        display: block;
        overflow-x: auto;
    }
}