/* Custom CSS for SaaS Platform */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom button styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s ease;
}

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

/* Card hover effects */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem;
}

.card:hover {
    transform: translateY(-5px);
}

/* Navbar styling */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Hero section improvements */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    opacity: 0.1;
}

/* Section spacing */
section {
    padding: 4rem 0;
}

/* Feature icons */
.feature-icon {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Footer styling */
footer {
    margin-top: auto;
}

footer a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* Animation for fade-in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Progress bar styling */
.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */

:root {
    --sidebar-bg:     #1e2942;
    --sidebar-active: #263354;
    --dash-accent:    #0d9488;
    --dash-content-bg:#f1f5f9;
    --dash-heading:   #0f172a;
    --dash-muted:     #64748b;
    --dash-positive:  #16a34a;
    --sidebar-width:  230px;
    --header-height:  60px;
}

/* Prevent the normal body scroll on dashboard pages */
body.dashboard-body {
    overflow: hidden;
    background: var(--dash-content-bg);
    margin: 0;
    padding: 0;
}

/* Full-viewport container */
.dashboard-wrapper {
    display: block;
    min-height: 100vh;
}

/* ---- Sidebar (fixed) ---- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 230px;
    height: 100vh;
    background: #1e2942;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 200;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.25rem 1rem;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo i {
    font-size: 1.3rem;
    color: var(--dash-accent);
}

.sidebar-logo-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.sidebar-logo-sub {
    font-size: 0.68rem;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
    margin-top: 1px;
}

/* Nav links */
.sidebar-nav {
    padding: 0.5rem 0.75rem;
    flex: 1;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.875rem;
    border-radius: 0.5rem;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
    margin-bottom: 2px;
}

.sidebar-nav-link i {
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-nav-link:hover {
    background: var(--sidebar-active);
    color: #ffffff;
}

.sidebar-nav-link.active {
    background: var(--sidebar-active);
    color: #ffffff;
    border-left: 3px solid var(--dash-accent);
    padding-left: calc(0.875rem - 3px);
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-hosting {
    color: rgba(255,255,255,0.55);
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.sidebar-certs {
    color: rgba(255,255,255,0.35);
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

/* ---- Main area ---- */
.main-area {
    margin-left: 230px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ---- Header bar ---- */
.header-bar {
    height: var(--header-height);
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.header-search {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.header-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dash-muted);
    font-size: 0.875rem;
}

.header-search-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.4rem 0.75rem 0.4rem 2.25rem;
    font-size: 0.875rem;
    background: #f8fafc;
    color: var(--dash-heading);
    outline: none;
    transition: border-color 0.15s;
}

.header-search-input:focus {
    border-color: var(--dash-accent);
    background: #ffffff;
}

.header-eu-toggle {
    flex-shrink: 0;
}

.header-eu-toggle .form-check-input:checked {
    background-color: var(--dash-accent);
    border-color: var(--dash-accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.header-icon-btn {
    background: none;
    border: none;
    color: var(--dash-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}

.header-icon-btn:hover {
    color: var(--dash-heading);
}

.header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--dash-accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    flex-shrink: 0;
}

/* ---- Dashboard content ---- */
.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: var(--dash-content-bg);
}

.dashboard-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dash-heading);
}

.dashboard-page-subtitle {
    font-size: 0.875rem;
    color: var(--dash-muted);
}

/* ---- Stat cards (large) ---- */
.stat-card {
    background: #ffffff;
    border-left: 3px solid var(--dash-accent) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    border-radius: 0.75rem;
    transition: box-shadow 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: none; /* override global card hover */
}

.stat-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dash-muted);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dash-heading);
}

.stat-card-meta {
    font-size: 0.8rem;
    color: var(--dash-muted);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    background: rgba(13,148,136,0.1);
    color: var(--dash-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Override global .card hover for stat cards (no lift) */
.stat-card.card:hover {
    transform: none;
}

/* ---- Activity cards (smaller) ---- */
.activity-card {
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-radius: 0.75rem;
    transition: box-shadow 0.2s ease;
}

.activity-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.09);
}

.activity-card.card:hover {
    transform: none;
}

.activity-icon {
    width: 38px;
    height: 38px;
    border-radius: 0.5rem;
    background: rgba(13,148,136,0.1);
    color: var(--dash-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.activity-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dash-heading);
}

.activity-saving {
    font-size: 0.8rem;
    color: var(--dash-muted);
}

/* ---- Chart card ---- */
.chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-radius: 0.75rem;
}

.chart-card.card:hover {
    transform: none;
}

.chart-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dash-heading);
}

.chart-subtitle {
    font-size: 0.78rem;
    color: var(--dash-muted);
}

.chart-legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

/* ============================================================
   CHAT PAGE
   ============================================================ */

/* Override dashboard-content padding/overflow for the chat page */
.dashboard-content.chat-content {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Full-height two-column layout */
.chat-layout {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

/* ---- Chat main (left column) ---- */
.chat-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
}

/* Security badge bar */
.chat-security-bar {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.chat-security-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--dash-accent);
    background: rgba(13,148,136,0.08);
    border: 1px solid rgba(13,148,136,0.2);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
}

/* Scrollable messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #f8fafc;
}

/* Message row */
.chat-bubble-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

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

/* Bot avatar circle */
.chat-bubble-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(13,148,136,0.12);
    color: var(--dash-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Bubble */
.chat-bubble {
    max-width: 65%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.55;
}

.chat-bubble--bot {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--dash-heading);
    border-top-left-radius: 0.25rem;
}

.chat-bubble--user {
    background: var(--dash-accent);
    color: #ffffff;
    border-top-right-radius: 0.25rem;
}

/* Input bar */
.chat-input-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.chat-input-field {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--dash-heading);
    background: #f8fafc;
    outline: none;
    transition: border-color 0.15s;
}

.chat-input-field:focus {
    border-color: var(--dash-accent);
    background: #ffffff;
}

.chat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 0.625rem;
    background: var(--dash-accent);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.chat-send-btn:hover {
    background: #0b7a70;
}

/* ---- Schnell-Aktionen (right panel) ---- */
.chat-actions-panel {
    width: 280px;
    flex-shrink: 0;
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
    padding: 1.5rem 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-actions-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dash-heading);
    margin-bottom: 0;
}

.chat-actions-subtitle {
    font-size: 0.75rem;
    color: var(--dash-muted);
    margin-bottom: 0.5rem;
}

.chat-action-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-action-card:hover {
    border-color: var(--dash-accent);
    box-shadow: 0 2px 6px rgba(13,148,136,0.12);
}

.chat-action-icon {
    width: 34px;
    height: 34px;
    border-radius: 0.5rem;
    background: rgba(13,148,136,0.1);
    color: var(--dash-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.chat-action-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dash-heading);
}

.chat-actions-note {
    font-size: 0.75rem;
    color: var(--dash-muted);
    line-height: 1.4;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* ============================================================
   TEAM PAGE
   ============================================================ */

.team-invite-btn {
    background: var(--dash-accent);
    color: #ffffff;
    border: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    transition: background 0.15s;
}

.team-invite-btn:hover {
    background: #0b7a70;
    color: #ffffff;
}

/* ---- Compact stat cards ---- */
.team-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.team-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 0.5rem;
    background: rgba(13,148,136,0.1);
    color: var(--dash-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.team-stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dash-heading);
    line-height: 1.1;
}

.team-stat-label {
    font-size: 0.78rem;
    color: var(--dash-muted);
    margin-top: 2px;
}

/* ---- Members table card ---- */
.team-table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.team-table-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.team-table-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dash-heading);
}

.team-table thead th {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dash-muted);
    border-bottom: 1px solid #f1f5f9;
    padding: 0.625rem 1.25rem;
    background: #fafafa;
    white-space: nowrap;
}

.team-table tbody td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f8fafc;
    vertical-align: middle;
    font-size: 0.875rem;
}

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

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

.team-member-name {
    font-weight: 600;
    color: var(--dash-heading);
}

.team-member-email {
    color: var(--dash-muted);
}

.team-last-active {
    color: var(--dash-muted);
    font-size: 0.825rem;
}

.team-actions-cell {
    text-align: right;
    width: 40px;
}

.team-action-dots {
    background: none;
    border: none;
    color: var(--dash-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.team-action-dots:hover {
    background: #f1f5f9;
    color: var(--dash-heading);
}

/* ---- Role & status badges ---- */
.team-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    white-space: nowrap;
}

.team-badge--admin {
    background: var(--sidebar-bg);
    color: #ffffff;
}

.team-badge--user,
.team-badge--viewer {
    background: transparent;
    color: var(--dash-muted);
    border: 1px solid #cbd5e1;
}

.team-badge--active {
    background: rgba(22,163,74,0.1);
    color: #16a34a;
    border: 1px solid rgba(22,163,74,0.25);
}

.team-badge--pending {
    background: rgba(100,116,139,0.1);
    color: var(--dash-muted);
    border: 1px solid #e2e8f0;
}


/* ============================================================
   KNOWLEDGE BASE PAGE
   ============================================================ */

/* Search bar */
.kb-search-wrap {
    position: relative;
}

.kb-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dash-muted);
    font-size: 0.875rem;
    pointer-events: none;
}

.kb-search-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    font-size: 0.875rem;
    color: var(--dash-heading);
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.kb-search-input:focus {
    border-color: var(--dash-accent);
    box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
}

/* Category cards */
.kb-category-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.kb-category-card:hover {
    border-color: var(--dash-accent);
    box-shadow: 0 2px 8px rgba(13,148,136,0.12);
}

.kb-category-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: rgba(13,148,136,0.1);
    color: var(--dash-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.kb-category-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dash-heading);
}

.kb-category-count {
    font-size: 0.75rem;
    color: var(--dash-muted);
    margin-top: 1px;
}

/* RAG status card */
.kb-rag-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}

.kb-rag-header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    color: var(--dash-heading);
}

.kb-rag-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.kb-rag-body {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    color: var(--dash-muted);
    display: flex;
    align-items: center;
}

/* ============================================================
   COMPLIANCE PAGE
   ============================================================ */

/* Top stat cards */
.comp-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: 100%;
}

.comp-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    background: rgba(13,148,136,0.1);
    color: var(--dash-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.comp-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dash-heading);
    line-height: 1.15;
}

.comp-stat-label {
    font-size: 0.75rem;
    color: var(--dash-muted);
    margin-top: 2px;
}

/* Score progress bar */
.comp-score-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.comp-score-fill {
    height: 100%;
    background: var(--dash-accent);
    border-radius: 999px;
}

/* Shared card shell */
.comp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.comp-card-header {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--dash-heading);
}

.comp-card-title {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Check rows */
.comp-check-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f8fafc;
}

.comp-icon-ok {
    font-size: 1rem;
    color: #16a34a;
    flex-shrink: 0;
}

.comp-icon-warn {
    font-size: 1rem;
    color: #d97706;
    flex-shrink: 0;
}

.comp-check-text {
    flex: 1;
    min-width: 0;
}

.comp-check-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dash-heading);
}

.comp-check-desc {
    font-size: 0.775rem;
    color: var(--dash-muted);
    margin-top: 1px;
}

/* Check badges */
.comp-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.comp-badge--ok {
    background: rgba(22,163,74,0.08);
    color: #16a34a;
    border: 1px solid rgba(22,163,74,0.25);
}

.comp-badge--warn {
    background: rgba(217,119,6,0.08);
    color: #d97706;
    border: 1px solid rgba(217,119,6,0.3);
}

/* Certification pills */
.comp-cert-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
}

.comp-cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.775rem;
    font-weight: 500;
    color: var(--dash-muted);
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    background: #ffffff;
}

.comp-cert-dot {
    font-size: 0.4rem;
    color: var(--dash-accent);
}

/* Chat — error message & clear button */
.chat-error-msg {
    font-size: 0.8rem;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 0.5rem 0.875rem;
    align-self: flex-start;
}

.chat-clear-btn {
    background: none;
    border: none;
    color: var(--dash-muted);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 0.375rem;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.chat-clear-btn:hover {
    color: #b91c1c;
    background: #fef2f2;
}

/* ---- Markdown rendering inside bot chat bubbles ---- */
.chat-bubble--bot p          { margin: 0 0 0.6em; }
.chat-bubble--bot p:last-child { margin-bottom: 0; }

.chat-bubble--bot h1,
.chat-bubble--bot h2,
.chat-bubble--bot h3,
.chat-bubble--bot h4         { font-size: 0.95rem; font-weight: 700;
                                color: var(--dash-heading);
                                margin: 0.75em 0 0.35em; }

.chat-bubble--bot ul,
.chat-bubble--bot ol         { padding-left: 1.25em; margin: 0.4em 0 0.6em; }
.chat-bubble--bot li         { margin-bottom: 0.2em; }

.chat-bubble--bot code       { font-size: 0.82em;
                                background: rgba(0,0,0,0.06);
                                border-radius: 3px;
                                padding: 0.15em 0.35em; }

.chat-bubble--bot pre        { background: #1e2942;
                                border-radius: 0.5rem;
                                padding: 0.875rem 1rem;
                                overflow-x: auto;
                                margin: 0.6em 0; }
.chat-bubble--bot pre code   { background: none;
                                color: #e2e8f0;
                                font-size: 0.82em;
                                padding: 0; }

.chat-bubble--bot blockquote { border-left: 3px solid var(--dash-accent);
                                margin: 0.5em 0;
                                padding: 0.25em 0.75em;
                                color: var(--dash-muted); }

.chat-bubble--bot a          { color: var(--dash-accent); }
.chat-bubble--bot a:hover    { text-decoration: underline; }

.chat-bubble--bot strong     { font-weight: 650; }
.chat-bubble--bot hr         { border-color: #e2e8f0; margin: 0.75em 0; }

.chat-bubble--bot table      { width: 100%; border-collapse: collapse;
                                font-size: 0.82em; margin: 0.6em 0; }
.chat-bubble--bot th,
.chat-bubble--bot td         { padding: 0.35em 0.6em;
                                border: 1px solid #e2e8f0; }
.chat-bubble--bot th         { background: #f8fafc; font-weight: 600; }

/* KaTeX inside bot bubbles */
.chat-bubble--bot .katex-display {
    overflow-x: auto;
    margin: 0.5em 0;
}
.chat-bubble--bot .katex { font-size: 1em; }
