@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #0a0a0a; /* Dark Navy Ink CTA */
    --primary-focus: #1f1f1f;
    --primary-hover: #1f1f1f;
    --primary-on-dark: #ffffff;
    --ink: #0a0a0a;
    --body: #3a3a3a;
    --body-on-dark: #ffffff;
    --body-muted: #6a6a6a;
    --ink-muted-80: #1a1a1a;
    --ink-muted-48: #9a9a9a;
    --divider-soft: #faf5e8;
    --hairline: #e5e5e5;
    --canvas: #fffaf0; /* Cream-tinted floor */
    --canvas-parchment: #faf5e8;
    --surface-pearl: #faf5e8;
    --surface-tile-1: #f5f0e0;
    --surface-tile-2: #ebe6d6;
    --surface-tile-3: #ebe6d6;
    --surface-black: #0a0a0a;
    --surface-chip-translucent: rgba(10, 10, 10, 0.08);

    /* Legacy alias mappings to ensure seamless compatibility */
    --secondary: #6a6a6a;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #fffaf0; /* Cream canvas */
    --surface: #f5f0e0;
    --text-main: #3a3a3a;
    --text-muted: #6a6a6a;
    --border: #e5e5e5;

    /* Saturated colors for cards */
    --brand-pink: #ff4d8b;
    --brand-teal: #1a3a3a;
    --brand-lavender: #b8a4ed;
    --brand-peach: #ffb084;
    --brand-ochre: #e8b94a;
    --brand-mint: #a4d4c5;
    --brand-coral: #ff6b5a;
    --surface-card: #f5f0e0;
    --surface-soft: #faf5e8;

    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: none;
    --clay-shadow-sm: none;
    --clay-shadow-md: none;
    --clay-shadow-lg: none;
    --clay-shadow-primary: none;
    --clay-shadow-pressed: none;
    --clay-shadow-primary-pressed: none;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 16px;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--hairline);
    padding: 0.85rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: none;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.02em;
}

/* Nav Pills */
.nav-pill {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.855rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px; /* Pill shape */
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-pill:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    transform: none;
    opacity: 1;
    box-shadow: none;
}

.active-nav-pill {
    background: #ffffff;
    color: var(--primary) !important;
    border: 1px solid var(--hairline);
    box-shadow: none;
    font-weight: 600; /* Apple Display/UI emphasis weight */
}

/* ===== NEW CHAT INTERFACE ===== */
.agent-chat-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 0;
    box-shadow: var(--clay-shadow-md);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    display: flex;
    height: 100%;
    min-height: 560px;
    overflow: hidden;
}

.chat-sidebar-panel {
    width: 200px;
    flex-shrink: 0;
    border-right: 1.5px solid rgba(226, 232, 240, 0.6);
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.25rem 1rem;
}

.chat-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.new-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: white;
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: var(--clay-shadow-sm);
    margin-bottom: 0.75rem;
    font-family: inherit;
}

.new-chat-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--clay-shadow-primary);
    transform: translateY(-1px);
}

.chat-sessions-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* old report-page chat item — styles in sidebar section below */

.chat-main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--hairline);
    background: var(--canvas);
}

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

.agent-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px; /* rounded.sm */
    background: var(--primary); /* Action Blue */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: none;
}

.chat-agent-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.2;
}

.chat-agent-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.15rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2.5s infinite;
    flex-shrink: 0;
}

.agent-badge {
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
    box-shadow: none;
}

.chat-messages-area {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    min-height: 200px;
}

.message-agent-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.agent-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--primary); /* Action Blue */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-message {
    padding: 0.875rem 1.1rem;
    border-radius: 11px; /* rounded.md */
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 100%;
    flex: 1;
    min-width: 0;
}

.agent-message {
    background: var(--canvas-parchment);
    color: var(--ink);
    border: 1px solid var(--hairline);
}

.user-message-wrap {
    display: flex;
    justify-content: flex-end;
}

.user-message {
    background: var(--primary); /* Action Blue */
    color: white;
    border-radius: 11px;
    flex: none;
}

.chat-attachment-preview {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1.5rem 0.5rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1.5px dashed rgba(99, 102, 241, 0.35);
    padding: 0.5rem 0.875rem;
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    width: fit-content;
}

.attachment-remove-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 0 0 0.25rem;
    line-height: 1;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.attachment-remove-btn:hover { opacity: 1; }

/* ===== CHAT INPUT BAR ===== */
.chat-input-bar {
    display: flex;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--hairline);
    align-items: center;
    background: var(--canvas);
}

/* Upload Asset Button — Apple Pearl capsule CTA style */
.upload-asset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface-pearl);
    border: 1px solid var(--hairline);
    color: var(--ink-muted-80);
    font-weight: 400;
    font-size: 0.8rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px; /* Pill shape */
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    box-shadow: none;
    font-family: inherit;
    flex-shrink: 0;
}

.upload-asset-btn:hover {
    background: var(--canvas-parchment);
    border-color: var(--ink-muted-48);
}

.upload-asset-btn:active {
    transform: scale(0.95);
}

.chat-text-input {
    flex-grow: 1;
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--hairline);
    border-radius: 9999px; /* Pill search/text input */
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    background: white;
    color: var(--text-main);
    box-shadow: none;
    transition: border-color 0.18s;
}

.chat-text-input:focus {
    border-color: var(--primary);
    outline: 2px solid var(--primary-focus);
    outline-offset: -1px;
}

.chat-send-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Circular button */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background-color 0.15s ease;
    box-shadow: none;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background-color: var(--primary-focus);
    transform: scale(1.03);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.75rem 1rem;
    background: var(--canvas-parchment);
    border-radius: 11px;
    width: fit-content;
    border: 1px solid var(--hairline);
}

.typing-indicator .dot {
    width: 7px;
    height: 7px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-6px); opacity: 1; }
}



/* --- Dashboard Layout --- */
.container.wide-container {
    max-width: 1400px;
    transition: max-width 0.5s ease-in-out;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr 320px;
    /* Enhanced widths for better readability */
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
    height: calc(100vh - 220px);
    /* Fill most of the viewport */
    min-height: 600px;
}

/* Summary Cards Grid */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-col {
    background: white;
    border-radius: 16px;
    padding: 0;
    height: 100%;
    /* Match grid height */
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.summary-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.summary-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.score-display {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.score-display.good {
    color: var(--success);
}

.score-display.medium {
    color: var(--warning);
}

.score-display.bad {
    color: var(--danger);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
    transition: width 1s ease-out;
}

.progress-fill.medium {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.progress-fill.bad {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

/* Risk Meter */
.risk-meter {
    position: relative;
    width: 200px;
    height: 100px;
    margin: 1rem auto;
}

.risk-arc {
    width: 200px;
    height: 100px;
}

.risk-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 80px;
    background: #1e293b;
    transform-origin: bottom center;
    transition: transform 1s ease-out;
    border-radius: 2px 2px 0 0;
}

.risk-needle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #1e293b;
    border-radius: 50%;
    border: 3px solid white;
}

.risk-label {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.risk-label.high {
    color: var(--danger);
}

.risk-label.medium {
    color: var(--warning);
}

.risk-label.low {
    color: var(--success);
}

.risk-probability {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Automated Rules Section */
.rules-summary {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.rules-summary h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.rules-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    background: #f8fafc;
}

.stat-box.passed {
    background: #ecfdf5;
}

.stat-box.failed {
    background: #fef2f2;
}

.stat-box.review {
    background: #fffbeb;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-number.passed {
    color: #059669;
}

.stat-number.failed {
    color: #dc2626;
}

.stat-number.review {
    color: #d97706;
}

.stat-number.na {
    color: #64748b;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Rule Item */
.rule-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    /* Reduced from 1rem */
    padding: 0.75rem;
    /* Reduced from 1rem */
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.rule-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.rule-item.failed {
    border-color: #fecaca;
    background: #fffafa;
}

.rule-item.na {
    background: #f8fafc;
    border-color: #e2e8f0;
    opacity: 0.8;
}

.rule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
}

.rule-status-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.rule-name {
    flex: 1;
    font-weight: 600;
}

.rule-expand {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.rule-item.expanded .rule-expand {
    transform: rotate(180deg);
}

.rule-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.rule-item.expanded .rule-details {
    max-height: 500px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.precedent-tag {
    display: inline-block;
    background: #eff6ff;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Risk Factors Section */
.risk-factors {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.risk-factors h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.risk-factor-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #fef2f2;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--danger);
}

.risk-factor-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.risk-factor-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Recommendations Section */
.recommendations-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.recommendations-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.recommendation-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border-left: 4px solid #0284c7;
}

.recommendation-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #0284c7;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.recommendation-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Compact Scrollbar for Columns */
.dashboard-col::-webkit-scrollbar {
    width: 5px;
}

.dashboard-col::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-col::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .dashboard-col {
        height: auto;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    .dashboard-col {
        height: auto;
        overflow-y: visible;
    }

    .rules-stats {
        grid-template-columns: 1fr;
    }
}

/* Content Breakdown Styles */
.content-breakdown {
    padding: 1.5rem;
}

.content-section {
    margin-bottom: 2rem;
}

.content-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.content-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.content-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    line-height: 1.4;
}

.content-tag.risk {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
    border-left: 3px solid #e11d48;
}

.content-tag.contra {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fee2e2;
    border-left: 3px solid #dc2626;
}

.content-major-statement {
    background: #f5f3ff;
    color: #4c1d95;
    padding: 1.25rem;
    border-radius: 14px;
    border-left: 5px solid #8b5cf6;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    box-shadow: var(--shadow-sm);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Category Header */
.category-header {
    position: sticky;
    top: 0;
    background: #fdfdfd;
    z-index: 10;
    padding-top: 1rem;
    margin-top: 0 !important;
}

/* Help Button Animation */
@keyframes pulse-subtle {
    0% {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    50% {
        box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2), 0 4px 6px -2px rgba(99, 102, 241, 0.1);
    }

    100% {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
}

.help-btn {
    animation: pulse-subtle 3s infinite;
}

.help-btn:hover {
    animation: none;
    transform: translateY(-2px);
}

/* Scrollbar for Help Modal */
#rulesHelpBody::-webkit-scrollbar {
    width: 8px;
}

#rulesHelpBody::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#rulesHelpBody::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}

#rulesHelpBody::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Manual Review Actions */
.review-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pass-btn {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

/* Qualitative Levels */
.level-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    display: inline-block;
}

.level-high {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.level-medium {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.level-low {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.level-critical {
    background: #7f1d1d;
    color: #ffffff;
    border: 1px solid #b91c1c;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(185, 28, 28, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(185, 28, 28, 0);
    }
}

.pass-btn:hover {
    background: #d1fae5;
    transform: translateY(-1px);
}

.fail-btn {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.fail-btn:hover {
    background: #fee2e2;
    transform: translateY(-1px);
}

/* Score Interpretation Tooltips */
.score-tooltip-trigger .score-tooltip {
    visibility: hidden;
    width: 320px;
    background-color: var(--text-main);
    color: #fff;
    text-align: left;
    border-radius: 12px;
    padding: 1rem;
    position: absolute;
    z-index: 1000;
    top: 100%;
    margin-top: 10px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: 400;
    pointer-events: none;
    transform: translateY(10px);
}

.score-tooltip-trigger .score-tooltip strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #a5b4fc;
}

.score-tooltip-trigger:hover .score-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.score-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 20px;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent var(--text-main) transparent;
}

/* Chat Agent Widget Styles */
.chat-widget-container {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.chat-bubble-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.chat-bubble-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.chat-window {
    width: 400px;
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: none;
    /* Toggle via JS */
    flex-direction: column;
    overflow: hidden;
    animation: chat-slide-in 0.3s ease-out;
}

@keyframes chat-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-header {
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message.agent {
    align-self: flex-start;
    background: #f1f5f9;
    color: var(--text-main);
    border-bottom-left-radius: 2px;
}

.message.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--primary);
}

.chat-send-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-send-btn:hover {
    background: var(--primary-hover);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
    background: #f1f5f9;
    width: 45px;
    border-radius: 10px;
    align-self: flex-start;
}

.dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: dot-pulse 1.5s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

@media (max-width: 500px) {
    .chat-window {
        width: calc(100vw - 2rem);
        height: 70vh;
        right: 1rem;
    }
}

/* --- Claymorphism Design System --- */
.clay-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: var(--clay-shadow-md);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clay-card:hover {
    box-shadow: var(--clay-shadow-lg);
    transform: translateY(-2px);
}

.clay-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.85rem 1.75rem;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--clay-shadow-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    outline: none;
}

.clay-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 8px 8px 22px rgba(99, 102, 241, 0.45), -8px -8px 22px rgba(255, 255, 255, 0.8);
}

.clay-btn:active {
    transform: translateY(1px);
    box-shadow: var(--clay-shadow-primary-pressed);
}

.clay-btn-secondary {
    background: #ffffff;
    color: #4f46e5;
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    box-shadow: var(--clay-shadow-sm);
}

.clay-btn-secondary:hover {
    background: #f8fafc;
    box-shadow: var(--clay-shadow-md);
}

.clay-btn-secondary:active {
    box-shadow: var(--clay-shadow-pressed);
}

.clay-input {
    background: #ffffff;
    border: 1.5px solid rgba(226, 232, 240, 0.8);
    padding: 0.85rem 1.25rem;
    border-radius: 16px;
    font-size: 0.9rem;
    color: #1e293b;
    outline: none;
    box-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.15), inset -2px -2px 5px rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.clay-input:focus {
    border-color: var(--primary);
    box-shadow: inset 3px 3px 6px rgba(99, 102, 241, 0.1), inset -3px -3px 6px rgba(255, 255, 255, 0.8), 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.clay-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25em;
    padding-right: 2.5rem;
}

.clay-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--clay-shadow-sm);
}

/* ===== FULL-PAGE CHAT AND MODERN DRAWERS COMPONENTS ===== */

/* Full-Page Chat Layout Container */
.home-chat-container {
    height: calc(100vh - 100px);
    margin-top: 0.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.home-chat-card-full {
    flex: 1;
    height: 100%;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--clay-shadow-md);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    display: flex;
    overflow: hidden;
}

/* Slide-out Report Details Drawer */
.report-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-drawer-backdrop.open {
    display: block;
    opacity: 1;
}

.report-drawer {
    position: fixed;
    top: 0;
    right: -620px;
    width: 600px;
    max-width: 90vw;
    height: 100vh;
    background: var(--surface);
    box-shadow: -10px 0 40px rgba(15, 23, 42, 0.08);
    z-index: 1060;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-left: 1.5px solid rgba(226, 232, 240, 0.8);
}

.report-drawer.open {
    right: 0;
}

.report-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1.5px solid var(--border);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.02) 0%, transparent 100%);
}

.report-drawer-title {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.report-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.report-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s;
    line-height: 1;
}

.report-drawer-close:hover {
    color: var(--danger);
}

/* CSS-Based Charts inside Chat messages */
.chat-chart-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.25rem;
    margin: 0.75rem 0;
    box-shadow: var(--clay-shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    width: 100%;
    max-width: 100%;
    text-align: left;
}

.chat-chart-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.85rem;
    border-left: 3px solid var(--primary);
    padding-left: 0.5rem;
    line-height: 1.2;
}

/* Bar Chart Rows */
.chat-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.78rem;
}

.chat-bar-label {
    width: 110px;
    text-align: right;
    padding-right: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-bar-track {
    flex: 1;
    background: #f1f5f9;
    height: 18px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.chat-bar-fill {
    background: linear-gradient(90deg, var(--primary), #a855f7);
    height: 100%;
    border-radius: 5px;
    display: flex;
    align-items: center;
    padding-left: 0.5rem;
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Donut Chart Layout */
.chat-donut-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 0.5rem 0;
}

.chat-donut-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: relative;
    box-shadow: var(--clay-shadow-sm);
    flex-shrink: 0;
}

.chat-donut-mask {
    position: absolute;
    inset: 18px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.06);
}

.chat-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.chat-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.chat-legend-color {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    flex-shrink: 0;
}

.chat-legend-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Chat Inline Compliance Form Card */
.chat-compliance-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    padding: 1.5rem;
    box-shadow: var(--clay-shadow-sm);
    width: 100%;
    max-width: 520px;
    margin: 0.75rem 0;
    text-align: left;
}

.chat-compliance-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Grid of initial suggested operations when starting a chat */
.chat-suggestions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.25rem;
    width: 100%;
    max-width: 520px;
}

.chat-suggest-card {
    background: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    box-shadow: var(--clay-shadow-sm);
    padding: 1rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chat-suggest-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: var(--clay-shadow-md);
}

.chat-suggest-icon {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.chat-suggest-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
}

.chat-suggest-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Inline Edit input for chat sessions renaming */
.rename-input {
    background: #ffffff;
    border: 1.5px solid var(--primary);
    border-radius: 6px;
    padding: 0.15rem 0.35rem;
    font-size: 0.78rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    width: 80%;
    box-shadow: var(--clay-shadow-sm);
}

/* Chat Markdown Tables styling */
.chat-table-container {
    width: 100%;
    overflow-x: auto;
    margin: 0.75rem 0;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: var(--clay-shadow-sm);
}

.chat-markdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
    background: #ffffff;
}

.chat-markdown-table th {
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text-main);
    font-weight: 700;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.chat-markdown-table td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
    color: #475569;
}

.chat-markdown-table tr:last-child td {
    border-bottom: none;
}

.chat-markdown-table tr:hover td {
    background: #f8fafc;
}

/* --- Antigravity 3-Pane Interface styles --- */
.workspace-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.left-pane {
    width: 280px;
    height: 100%;
    background: var(--canvas-parchment);
    border-right: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: none;
    z-index: 10;
}

.left-pane.collapsed {
    margin-left: -280px;
}

.left-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--hairline);
}

.left-pane-header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
}

.left-pane-actions {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    border-bottom: 1px solid var(--hairline);
}

.new-chat-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    border-radius: 9999px; /* Pill */
    font-weight: 400;
    font-size: 0.82rem;
    cursor: pointer;
    border: none;
    background: var(--primary); /* Action Blue */
    color: white;
    box-shadow: none;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.new-chat-btn:hover {
    background-color: var(--primary-focus);
}

.new-chat-btn:active {
    transform: scale(0.95);
}

.new-proj-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.75rem;
    border-radius: 9999px; /* Pill */
    font-weight: 400;
    cursor: pointer;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    transition: transform 0.15s ease, background-color 0.15s ease;
    flex-shrink: 0;
}

.new-proj-btn:hover {
    background: var(--surface-pearl);
}

.new-proj-btn:active {
    transform: scale(0.95);
}

/* Search bar */
.left-pane-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem 0.5rem;
    padding: 0.55rem 0.75rem;
    background: var(--canvas);
    border-radius: 9999px; /* Pill input */
    border: 1px solid var(--hairline);
    transition: border-color 0.15s;
}

.left-pane-search:focus-within {
    border-color: var(--primary);
    outline: 2px solid var(--primary-focus);
    outline-offset: -1px;
}

.left-pane-search svg { opacity: 0.4; flex-shrink: 0; }

.left-pane-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--text-main);
    outline: none;
}

.left-pane-search input::placeholder { color: var(--ink-muted-48); }

.left-pane-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.section-title {
    font-size: 0.67rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink-muted-48);
    letter-spacing: 0.08em;
    padding: 0.75rem 0.5rem 0.35rem;
}

.sessions-sublist {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Chat session item — clean capsule pill format */
.chat-session-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 9999px; /* Pill */
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-main);
    transition: background 0.12s, border-color 0.12s;
    position: relative;
    min-width: 0;
    border: 1px solid transparent;
}

.chat-session-item:hover {
    background: var(--surface-pearl);
    color: var(--ink);
}

.chat-session-item.active {
    background: var(--canvas);
    color: var(--primary) !important;
    font-weight: 600;
    border-color: var(--hairline);
    box-shadow: none;
}

.session-title-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Item action buttons (hidden until parent hover) */
.item-actions {
    display: flex;
    align-items: center;
    gap: 1px;
    opacity: 0;
    transition: opacity 0.12s;
    flex-shrink: 0;
}

.chat-session-item:hover .item-actions,
.project-title-row:hover .item-actions {
    opacity: 1;
}

.item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 5px;
    border: none;
    background: transparent;
    color: var(--body-muted);
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

.item-btn:hover { background: var(--surface-soft); color: var(--primary); }
.item-btn.danger:hover { background: rgba(255, 77, 139, 0.15); color: var(--danger); }

/* Compliance run nested under a chat */
.run-nested-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem 0.35rem 1.8rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--body-muted);
    transition: background 0.12s;
}

.run-nested-item:hover { background: var(--surface-soft); }
.run-nested-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.run-score-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.sidebar-empty-hint,
.empty-proj-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    padding: 0.35rem 0.5rem;
    font-style: italic;
}


.left-pane-footer {
    padding: 1rem;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.settings-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--clay-shadow-sm);
    transition: all 0.15s;
}

.settings-btn:hover {
    background: #f8fafc;
    color: var(--primary);
}

/* Collapsible handles */
.pane-collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.6;
    padding: 0.35rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pane-collapse-btn:hover {
    background: #f1f5f9;
    opacity: 1;
}

.pane-expand-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 48px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 100;
    font-size: 0.7rem;
    transition: background 0.15s;
}

.pane-expand-btn:hover {
    background: #f8fafc;
    color: var(--primary);
}

.pane-expand-btn.left-expand {
    left: 0;
}

.pane-expand-btn.right-expand {
    right: 0;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.05);
}

/* Resizer Styles for Adjustable Sidebar Panes */
.resizer {
    width: 6px;
    background: transparent;
    cursor: col-resize;
    position: relative;
    z-index: 20;
    flex-shrink: 0;
    user-select: none;
    transition: background 0.15s;
}

.resizer:hover,
.resizer.dragging {
    background: rgba(99, 102, 241, 0.25);
}

.resizing-active {
    transition: none !important;
}

/* Middle Pane layout */
.middle-pane {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fafc;
    position: relative;
}

.workspace-view {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
}

.workspace-view.active-view {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

/* Welcome and compliance views need scroll + padding */
#welcomeView.active-view,
#complianceView.active-view {
    overflow-y: auto;
    padding: 1.5rem;
}

/* Right Pane: Timeline operational logs */
.right-pane {
    width: 320px;
    height: 100%;
    background: var(--canvas-parchment);
    border-left: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: none;
    z-index: 10;
}

.right-pane.collapsed {
    margin-right: -320px;
}

.right-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--hairline);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.right-pane-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--canvas-parchment);
}

.timeline-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: center;
    padding: 1.5rem 0.5rem;
    border-bottom: 1px dashed var(--hairline);
    margin-bottom: 1rem;
}

/* Timelines styling */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-left: 1.25rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    font-size: 0.78rem;
    line-height: 1.4;
}

.timeline-dot {
    position: absolute;
    left: -23px;
    top: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid white;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

.timeline-dot.dot-info { background: #3b82f6; }
.timeline-dot.dot-success { background: #10b981; }
.timeline-dot.dot-warning { background: #f59e0b; }
.timeline-dot.dot-error { background: #ef4444; }

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.timeline-agent {
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.timeline-task {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.timeline-time {
    font-size: 0.65rem;
    color: #94a3b8;
}

.timeline-message {
    color: #475569;
    background: white;
    border: 1px solid rgba(0,0,0,0.02);
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    box-shadow: var(--clay-shadow-sm);
}

/* Projects rendering UI */
.project-group {
    border-radius: 10px;
    background: transparent;
    margin-bottom: 2px;
}

.project-title-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-main);
    border-radius: 8px;
    transition: background 0.12s;
}

.project-title-row:hover { background: #f1f5f9; }

.project-name-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.project-children {
    display: flex;
    flex-direction: column;
    padding-left: 0.5rem;
    gap: 1px;
    margin-top: 1px;
}

.project-children.collapsed { display: none; }

/* Prompt chips — inline horizontal row of quick-action buttons */
.chat-suggestions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.prompt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: 1.5px solid var(--hairline);
    background: var(--surface-soft);
    color: var(--ink);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.prompt-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.chip-icon { font-size: 0.9rem; }


/* Settings Modal styling */
/* Settings Modal styling - Apple sheet overlay style */
.settings-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3); /* Softer transparent backdrop overlay */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.settings-modal-card {
    background: var(--canvas);
    width: 95%;
    max-width: 1024px;
    height: 85vh;
    border-radius: 18px; /* rounded.lg */
    box-shadow: none;
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "header header"
        "sidebar body";
    overflow: hidden;
    border: 1px solid var(--hairline);
}

.settings-modal-header {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--hairline);
    background: var(--canvas);
}

.settings-modal-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ink-muted-48);
    transition: color 0.15s;
}

.close-modal-btn:hover {
    color: var(--danger);
}

.settings-modal-tabs {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    background: var(--canvas-parchment);
    border-right: 1px solid var(--hairline);
    border-bottom: none;
    padding: 1.25rem 0.75rem;
    gap: 0.35rem;
    overflow-y: auto;
}

.settings-tab-btn {
    background: none;
    border: none;
    padding: 0.65rem 0.85rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 9999px; /* Pill capsule tabs */
    transition: all 0.15s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
}

.settings-tab-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--ink);
}

.settings-tab-btn.active {
    background: var(--canvas);
    color: var(--primary) !important;
    border-color: var(--hairline);
    box-shadow: none;
}

.settings-modal-body {
    grid-area: body;
    flex: 1;
    overflow-y: auto;
    background: var(--canvas);
    padding: 1.5rem;
}

.settings-tab-content {
    display: none;
    height: 100%;
}

.settings-tab-content.active {
    display: block;
}

/* History items in Settings */
.settings-history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.history-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--clay-shadow-sm);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-card-item:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--clay-shadow-md);
}

/* Project select modal styling */
.project-select-dialog {
    padding: 1.5rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--clay-shadow-md);
    max-width: 400px;
    width: 90%;
}

.project-select-dialog select {
    width: 100%;
    padding: 0.65rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin: 1rem 0;
    font-family: inherit;
}

/* ===================== Execution Log Styles ===================== */
.log-session-divider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin: 0.5rem 0;
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.log-session-divider::before,
.log-session-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.log-entry {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 3px;
    border-left: 2px solid transparent;
    background: var(--canvas-parchment);
    transition: background 0.12s;
}

.log-entry:hover { background: var(--surface-soft); }
.log-entry.log-info { border-left-color: var(--brand-lavender); }
.log-entry.log-success { border-left-color: var(--brand-mint); }
.log-entry.log-warning { border-left-color: var(--brand-ochre); }
.log-entry.log-error { border-left-color: var(--brand-pink); }

.log-entry-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.log-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.log-dot-info { background: var(--brand-lavender); }
.log-dot-success { background: var(--brand-mint); }
.log-dot-warning { background: var(--brand-ochre); }
.log-dot-error { background: var(--brand-pink); }

.log-agent {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ink);
}

.log-task {
    font-size: 0.68rem;
    color: var(--body-muted);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-elapsed {
    font-size: 0.62rem;
    color: var(--body-muted);
    font-family: monospace;
    flex-shrink: 0;
}

.log-message {
    font-size: 0.72rem;
    color: var(--body);
    padding-left: 1rem;
    line-height: 1.4;
}

/* SQL collapsible block */
.sql-details {
    margin-top: 0.4rem;
    margin-left: 1rem;
}

.sql-summary {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--brand-lavender);
    cursor: pointer;
    user-select: none;
    list-style: none;
    padding: 0.2rem 0;
}

.sql-summary::-webkit-details-marker { display: none; }

.sql-copy-btn {
    margin-left: auto;
    font-size: 0.62rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--hairline);
    background: transparent;
    color: var(--body-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.sql-copy-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

.sql-block {
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.72rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    margin-top: 0.35rem;
}

.sql-kw { color: #c792ea; font-weight: 700; }
.sql-str { color: #c3e88d; }

.sql-meta {
    font-size: 0.65rem;
    color: #64748b;
    padding: 0.2rem 0;
    font-family: monospace;
}

/* Custom Styles for System Documentation */
.doc-reader-pane {
    padding: 0 1rem 1rem 0;
}
.doc-reader-pane h3 {
    margin-top: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.doc-reader-pane h4 {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}
.doc-reader-pane ul, .doc-reader-pane ol {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}
.doc-reader-pane li {
    margin-bottom: 0.35rem;
}

/* Custom Styles for Operations History logs */
.op-log-item {
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: box-shadow 0.15s;
}
.op-log-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.op-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}
.op-log-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}
.op-log-badge.info { background: #e0f2fe; color: #0369a1; }
.op-log-badge.success { background: #d1fae5; color: #047857; }
.op-log-badge.warning { background: #fef3c7; color: #b45309; }
.op-log-badge.error { background: #fee2e2; color: #b91c1c; }

/* Custom Styles for rules accordion */
.rule-accordion-header {
    cursor: pointer;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.85rem;
    border-radius: 12px;
    transition: background 0.15s;
    user-select: none;
}
.rule-accordion-header:hover {
    background: #f1f5f9;
}
.rule-accordion-header.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #f1f5f9;
}
.rule-accordion-content {
    display: none;
    border: 1px solid #e2e8f0;
    border-top: none;
    padding: 1.25rem;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    background: white;
}
.rule-accordion-content.active {
    display: block;
}

/* ============================================================================
   CLAY DESIGN SYSTEM OVERRIDES & COMPONENTS
   ============================================================================ */

/* Buttons */
button, 
.btn,
.button-primary,
.chat-input-bar button,
.action-btn,
.nav-pill {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    border-radius: 12px !important; /* rounded.md */
}

/* Primary buttons */
.btn-primary,
.button-primary,
.chat-input-bar button[type="submit"] {
    background-color: var(--primary) !important;
    color: var(--primary-on-dark) !important;
    border: none !important;
    transition: background-color 0.2s ease;
}
.btn-primary:hover,
.button-primary:hover {
    background-color: var(--primary-focus) !important;
}

/* Secondary/Outline buttons */
.btn-secondary,
.button-secondary {
    background-color: var(--canvas) !important;
    color: var(--ink) !important;
    border: 1px solid var(--hairline) !important;
    transition: background-color 0.2s ease;
}
.btn-secondary:hover,
.button-secondary:hover {
    background-color: var(--surface-soft) !important;
}

/* Inputs */
input, 
textarea, 
select, 
.chat-text-input,
.clay-input,
.rename-input {
    font-family: 'Inter', sans-serif !important;
    border-radius: 12px !important; /* rounded.md */
    border: 1px solid var(--hairline) !important;
    background-color: var(--canvas) !important;
    color: var(--ink) !important;
    padding: 12px 16px !important;
    outline: none !important;
    transition: border-color 0.2s ease !important;
}
input:focus, 
textarea:focus, 
select:focus,
.chat-text-input:focus,
.clay-input:focus {
    border-color: var(--primary) !important;
}

/* Navbar */
.navbar {
    background: var(--canvas) !important;
    height: 64px !important;
    border-bottom: 1px solid var(--hairline) !important;
    display: flex;
    align-items: center;
    padding: 0 2rem !important;
}

/* Sidebar & Left panes */
.chat-sidebar-panel, 
.left-pane {
    background: var(--surface-soft) !important;
    border-right: 1px solid var(--hairline) !important;
}

/* Chat container card */
.agent-chat-card {
    background: var(--canvas) !important;
    border-radius: 24px !important; /* rounded.xl */
    border: 1px solid var(--hairline) !important;
}

/* Category tabs / Nav pills */
.nav-pill {
    border-radius: 9999px !important; /* rounded.pill */
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
}
.nav-pill:hover {
    background: var(--surface-soft) !important;
    color: var(--ink) !important;
}
.active-nav-pill,
.nav-pill.active {
    background: var(--surface-card) !important;
    color: var(--ink) !important;
    border: 1px solid var(--hairline) !important;
}

/* Standard Content Cards */
.card,
.summary-card,
.testimonial-card,
.pricing-tier-card,
.product-mockup-card,
.expert-card,
.compliance-rules-card {
    background: var(--canvas) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 16px !important; /* rounded.lg */
    padding: 24px !important; /* spacing.lg */
}

/* Saturated Feature Cards */
.feature-card-pink {
    background: var(--brand-pink) !important;
    color: var(--on-primary) !important;
    border-radius: 24px !important; /* rounded.xl */
    padding: 32px !important;
}
.feature-card-teal {
    background: var(--brand-teal) !important;
    color: var(--on-dark) !important;
    border-radius: 24px !important; /* rounded.xl */
    padding: 32px !important;
}
.feature-card-lavender {
    background: var(--brand-lavender) !important;
    color: var(--ink) !important;
    border-radius: 24px !important; /* rounded.xl */
    padding: 32px !important;
}
.feature-card-peach {
    background: var(--brand-peach) !important;
    color: var(--ink) !important;
    border-radius: 24px !important; /* rounded.xl */
    padding: 32px !important;
}
.feature-card-ochre {
    background: var(--brand-ochre) !important;
    color: var(--ink) !important;
    border-radius: 24px !important; /* rounded.xl */
    padding: 32px !important;
}
.feature-card-cream {
    background: var(--surface-card) !important;
    color: var(--ink) !important;
    border-radius: 24px !important; /* rounded.xl */
    padding: 32px !important;
}

/* Pricing Tier Featured Card */
.pricing-tier-card-featured {
    background: var(--brand-teal) !important;
    color: var(--on-dark) !important;
    border-radius: 16px !important; /* rounded.lg */
    padding: 32px !important;
}

/* Spacing Rhythm */
.section-band {
    padding-top: 96px !important; /* spacing.section */
    padding-bottom: 96px !important;
}

/* Pre-footer and Footer */
.cta-band-illustrated {
    background: var(--surface-soft) !important;
    border-radius: 24px !important;
    padding: 80px !important;
}
.footer-band {
    background: var(--surface-soft) !important;
    color: var(--body) !important;
    padding: 80px 2rem !important;
}

/* ==========================================
   LANDING PAGE (MLR COMPLIANCE TRACKER)
   ========================================== */
.landing-page-container {
    background-color: var(--background);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    overflow-y: auto;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 50;
    scroll-behavior: smooth;
    display: block; /* Shown by default */
}

/* Landing Page Navbar */
.lp-navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--hairline);
    padding: 1rem 3rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lp-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--ink);
}

.lp-btn-launch {
    background: var(--ink);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lp-btn-launch:hover {
    background: var(--primary-focus);
    transform: translateY(-1px);
}

/* Hero Section */
.lp-hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem 4rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.lp-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 77, 139, 0.1);
    border: 1px solid rgba(255, 77, 139, 0.2);
    color: var(--brand-pink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.lp-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--ink) 30%, var(--brand-pink) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lp-hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
}

.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.lp-btn-primary {
    background: var(--ink);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.lp-btn-primary:hover {
    background: var(--primary-focus);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

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

/* Interactive App Screenshot Mockup */
.lp-screenshot-section {
    padding: 0 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.lp-window-mockup {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--hairline);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06), 0 5px 15px rgba(0,0,0,0.02);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lp-window-titlebar {
    background: #f1f5f9;
    border-bottom: 1px solid var(--hairline);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    position: relative;
}

.lp-window-buttons {
    display: flex;
    gap: 0.5rem;
    position: absolute;
    left: 1.25rem;
}

.lp-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.lp-dot.red { background: #ff5f56; }
.lp-dot.yellow { background: #ffbd2e; }
.lp-dot.green { background: #27c93f; }

.lp-window-title {
    margin: 0 auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.lp-window-content {
    display: grid;
    grid-template-columns: 220px 1.4fr 0.9fr;
    height: 520px;
    background: var(--background);
}

/* Mock Sidebar (Left) */
.lp-mock-sidebar {
    background: var(--canvas-parchment);
    border-right: 1px solid var(--hairline);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.lp-mock-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.lp-dot-status {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.lp-mock-sidebar-item {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--body-muted);
    cursor: default;
}

.lp-mock-sidebar-item.active {
    background: white;
    color: var(--ink);
    border: 1px solid var(--hairline);
}

.lp-mock-sidebar-section {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding-left: 0.75rem;
}

.lp-mock-sidebar-item.sub-item {
    font-weight: 500;
    padding-left: 1.25rem;
    font-size: 0.78rem;
}

.lp-mock-sidebar-item.sub-item.active {
    color: var(--brand-pink);
    font-weight: 600;
}

/* Mock Workspace (Middle) */
.lp-mock-workspace {
    background: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--hairline);
}

.lp-mock-workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--hairline);
}

.lp-mock-drug-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
}

.lp-mock-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
}

.lp-mock-badge.danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.lp-mock-scroll-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lp-mock-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.lp-mock-summary-card {
    background: var(--surface-soft);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lp-card-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lp-card-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
}

.lp-card-value.text-red {
    color: #b91c1c;
}

.lp-mock-finding-card {
    background: white;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border-left: 4px solid #b91c1c;
}

.lp-mock-finding-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.lp-finding-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.lp-finding-badge.critical {
    background: #fee2e2;
    color: #b91c1c;
}

.lp-finding-badge.warn {
    background: #fffeb3;
    color: #92400e;
}

.lp-finding-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
}

.lp-finding-desc {
    font-size: 0.78rem;
    color: var(--body);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.lp-finding-evidence {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.50rem;
}

.lp-evidence-box {
    background: var(--background);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.72rem;
    color: var(--body-muted);
    border: 1px solid var(--hairline);
}

.lp-evidence-box strong {
    display: block;
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

/* Mock Logs (Right) */
.lp-mock-logs {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lp-mock-logs-header {
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lp-mock-logs-content {
    flex: 1;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.72rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    line-height: 1.4;
}

.lp-log-line { color: #38bdf8; }
.lp-log-line.success { color: #4ade80; }
.lp-log-line.warn { color: #fbbf24; }
.lp-log-line.info { color: #94a3b8; }

/* Capabilities Grid */
.lp-capabilities {
    padding: 6rem 2rem;
    background: var(--surface-soft);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.lp-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.lp-section-header h2 {
    font-size: 2.25rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--ink);
}

.lp-section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.5;
}

.lp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.lp-card {
    background: white;
    border: 1px solid var(--hairline);
    border-radius: 18px;
    padding: 2.25rem 2rem;
    transition: all 0.2s ease;
}

.lp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.03);
}

.lp-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.lp-card-icon.pink { background: rgba(255, 77, 139, 0.1); }
.lp-card-icon.lavender { background: rgba(184, 164, 237, 0.1); }
.lp-card-icon.peach { background: rgba(255, 176, 132, 0.1); }
.lp-card-icon.mint { background: rgba(164, 212, 197, 0.1); }

.lp-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--ink);
}

.lp-card p {
    font-size: 0.9rem;
    color: var(--body);
    line-height: 1.5;
}

/* Workflow Section */
.lp-workflow-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.lp-workflow-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.lp-workflow-eyebrow {
    color: var(--brand-pink);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    display: block;
}

.lp-workflow-text h2 {
    font-size: 2.25rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.lp-workflow-text p {
    color: var(--body);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.lp-bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lp-bullet-list li {
    font-size: 0.95rem;
    color: var(--body);
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.lp-bullet-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.lp-workflow-image-container {
    background: var(--surface-soft);
    border-radius: 24px;
    border: 1px solid var(--hairline);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-workflow-image {
    max-height: 280px;
    object-fit: contain;
}

/* CTA Band */
.lp-cta-band {
    background: var(--ink);
    color: white;
    text-align: center;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #1a1a1a;
}

.lp-cta-band h2 {
    font-size: 2.5rem;
    font-weight: 500;
    color: white;
    letter-spacing: -0.03em;
}

.lp-cta-band p {
    color: #9a9a9a;
    font-size: 1.15rem;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.lp-cta-band .lp-btn-primary {
    background: white;
    color: var(--ink);
}

.lp-cta-band .lp-btn-primary:hover {
    background: #e2e8f0;
}

/* Footer */
.lp-footer {
    background: var(--surface-soft);
    color: var(--body-muted);
    padding: 4rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    border-top: 1px solid var(--hairline);
}

.lp-footer p {
    margin-bottom: 0.5rem;
}

.lp-footer-sub {
    font-size: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.75;
    line-height: 1.5;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .lp-window-content {
        grid-template-columns: 180px 1.2fr 0.8fr;
        height: 480px;
    }
}

@media (max-width: 768px) {
    .lp-navbar {
        padding: 1rem 1.5rem;
    }
    
    .lp-hero {
        padding: 4rem 1.5rem 3rem;
    }
    
    .lp-window-content {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .lp-mock-sidebar, .lp-mock-logs {
        display: none;
    }
    
    .lp-workflow-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .lp-workflow-image-container {
        order: -1;
    }
    
    .lp-capabilities, .lp-workflow-section, .lp-cta-band, .lp-footer {
        padding: 4rem 1.5rem;
    }
}
