/* Styling system for O Hermeneuta MVP */

:root {
    --bg-dark: #090d16; /* Clean deep slate navy */
    --bg-dark-90: rgba(9, 13, 22, 0.9);
    --bg-panel: rgba(22, 28, 45, 0.45);
    --bg-panel-solid: #161c2d;
    --bg-primary: var(--bg-dark);
    --primary: #6366f1; /* Premium Indigo */
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --accent: #8b5cf6; /* Premium Purple */
    --text-main: #f3f4f6; /* Crisp off-white */
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    --text-primary: var(--text-main);
    --text-secondary: var(--text-muted);
    --border-color: rgba(255, 255, 255, 0.05); /* Keep it ultra-thin and minimal! */
    --border-hover: rgba(255, 255, 255, 0.12);
    --radius-sm: 8px; /* Clean modern corner roundness */
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

body.light-theme {
    --bg-dark: #f5f5f7; /* Apple warm light gray canvas */
    --bg-dark-90: rgba(245, 245, 247, 0.95);
    --bg-panel: #ffffff; /* Pure white paper sheet */
    --bg-panel-solid: #ffffff;
    --bg-primary: #ffffff;
    --text-main: #1d1d1f; /* Apple charcoal */
    --text-muted: #515154; /* Apple secondary gray */
    --text-primary: var(--text-main);
    --text-secondary: var(--text-muted);
    --primary: #0071e3; /* Apple active blue */
    --primary-hover: #0077ed;
    --primary-glow: rgba(0, 113, 227, 0.08);
    --accent: #86868b; /* Apple gray */
    --border-color: rgba(0, 0, 0, 0.08); /* Crisp clean borders */
    --border-hover: rgba(0, 0, 0, 0.16);
}

/* Light Theme Overrides */
body.light-theme .blur-blob {
    opacity: 0.04; /* Extra subtle blobs in light mode */
}

body.light-theme .app-container {
    background: #ffffff; /* White application container */
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08); /* Clean drop shadow */
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .sidebar {
    background: #f8fafc; /* Subtle light background for sidebar */
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .chat-area {
    background: #ffffff; /* White chat background */
}

body.light-theme .chat-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .message.ai .msg-bubble {
    background: #f1f5f9; /* Slate 100 bubble for AI */
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

body.light-theme .messages-container {
    background: #ffffff;
}

body.light-theme .chat-footer {
    background: #ffffff;
}

body.light-theme .input-group input {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .mirror-textarea-wrapper,
body.light-theme .chat-form {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme #mirror-input,
body.light-theme .chat-form textarea {
    color: #0f172a;
}

body.light-theme .msg-bubble strong {
    color: #000000;
}

body.light-theme .card-body {
    color: #334155;
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

body.light-theme .config-card,
body.light-theme .journey-card {
    background: #f1f5f9; /* Slate 100 cards in light sidebar */
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .step-num {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
}

body.light-theme .badge {
    color: var(--primary);
    background: var(--primary-glow);
    border-color: rgba(0, 113, 227, 0.2);
}

/* Light Mockups (RAG, Chat, Checklist) overrides */
body.light-theme .hero-mockup {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

body.light-theme .mockup-lens-card {
    background: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .rag-search-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.04);
}

body.light-theme .search-header {
    background: #f5f5f7;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .search-title {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .search-query {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

body.light-theme .search-query .query-label {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .search-match {
    background: #f5f5f7;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

body.light-theme .spanish-text {
    color: #1d1d1f;
}

body.light-theme .portuguese-translation {
    color: #515154;
    border-left: 2px solid var(--primary);
}

body.light-theme .chat-mockup-window {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

body.light-theme .chat-mockup-header {
    background: #f5f5f7;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .mock-bubble.user .inner {
    background: var(--primary);
    color: #ffffff;
}

body.light-theme .mock-bubble.ai .inner {
    background: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
}

body.light-theme .mock-dot {
    background: rgba(0, 0, 0, 0.3);
}

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

html, body {
    min-height: 100vh;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 0;
}

/* Decorative Blur Blobs */
.background-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.blur-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    opacity: 0.15;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background-color: var(--primary);
    top: -5%;
    left: 10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background-color: var(--accent);
    bottom: -10%;
    right: 5%;
}

/* Layout Container */
.app-container {
    display: flex;
    width: 95vw;
    height: auto;
    min-height: 90vh;
    max-width: 1400px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Sidebar styling */
.sidebar {
    width: 380px;
    border-right: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
}

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

.sidebar-slogan {
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--text-muted);
    font-style: italic;
    letter-spacing: 0.01em;
    margin: 0 0 24px 0;
    padding: 10px 0 0 0;
    border-top: 1px solid var(--border-color);
    opacity: 0.85;
}

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

.logo-icon {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-glow);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-text .subtitle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 500;
}

.badge {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Configuration Card */
.config-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.config-card h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    margin-bottom: 6px;
    font-weight: 600;
}

.config-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.input-group input {
    flex: 1;
    background: rgba(9, 13, 22, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition-fast);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Toggle switch styling */
.simulation-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(14px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Journey steps */
.journey-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    flex-shrink: 0;
}

.journey-card h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    margin-bottom: 16px;
    font-weight: 600;
}

.journey-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    gap: 16px;
    opacity: 0.5;
    transition: var(--transition-smooth);
}

.step.active {
    opacity: 1;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-heading);
    transition: var(--transition-smooth);
}

.step.active .step-num {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.step-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
    font-weight: 600;
}

.step-info p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.sidebar-menu-links {
    margin-top: auto;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    border-top: 1px solid var(--border-color);
}

.sidebar-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-link-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

body.light-theme .sidebar-link-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.sidebar-link-item .link-icon {
    font-size: 14px;
}

.sidebar-footer {
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sidebar-footer p {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    max-width: 180px;
    line-height: 1.4;
}

.theme-toggle-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
}

.theme-toggle-btn:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

.theme-toggle-btn span {
    font-size: 16px;
    line-height: 1;
}

/* Chat Area styling */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(9, 13, 22, 0.3);
    min-height: 0;
}

.chat-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mentor-meta h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.status-indicator {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.01em;
    opacity: 0.7;
    margin-top: 2px;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background-color: #10b981; /* Green */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Message board container */
.messages-container {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Message bubbles */
.message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    animation: messageFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.message.user {
    align-self: flex-end;
}

.message.ai {
    align-self: flex-start;
}

.msg-sender {
    font-family: var(--font-heading);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 600;
}

.message.user .msg-sender {
    align-self: flex-end;
    color: var(--primary);
}

.message.ai .msg-sender {
    align-self: flex-start;
    color: var(--accent);
}

.msg-bubble {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    line-height: 1.6;
    font-size: 14.5px;
    word-wrap: break-word;
}

.message.user .msg-bubble {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-top-right-radius: 2px;
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.4);
}

.message.ai .msg-bubble {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-top-left-radius: 2px;
}

/* AI formatting details */
.msg-bubble p {
    margin-bottom: 12px;
}

.msg-bubble p:last-child {
    margin-bottom: 0;
}

.msg-bubble strong {
    color: #fff;
    font-weight: 600;
}

/* Typing indicator */
.typing-indicator-wrapper {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 0 30px 15px 30px;
    animation: fadeIn 0.2s ease;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: 20px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-text {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* Chat Footer / Input area */
.chat-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    background: rgba(9, 13, 22, 0.4);
}

.chat-form {
    display: flex;
    background: rgba(9, 13, 22, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    gap: 12px;
    align-items: center;
    transition: var(--transition-fast);
}

.chat-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.chat-form textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
    padding: 8px 4px;
    max-height: 120px;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    padding: 0;
}

/* Animations */
@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes typingPulse {
    0%, 80%, 100% { 
        transform: scale(0);
    } 
    40% { 
        transform: scale(1.0);
    }
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}




/* View switcher */
.view-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Important for flex child scrolling */
}

/* Espelho de Texto View */
#mirror-view {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mirror-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.mirror-input-pane {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mirror-instruction {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Step Intro — editorial header for each wizard step */
.step-intro {
    text-align: center;
    padding: 20px 16px 28px;
    margin-bottom: 8px;
}

.step-intro-number {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 60px;
    font-weight: 400;
    line-height: 1;
    display: block;
    margin-bottom: 6px;
    opacity: 0.35;
    letter-spacing: -0.03em;
    color: #2563eb;
}

.step-intro h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-main);
}

.step-intro-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    opacity: 0.75;
}

.mirror-textarea-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.mirror-textarea-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

#mirror-input {
    width: 100%;
    min-height: 140px;
    background: none;
    border: none;
    color: var(--text-main);
    padding: 16px;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.mirror-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 8px;
}

/* Results Pane */
.mirror-results-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 16px;
    animation: fadeIn 0.4s ease forwards;
}
.mirror-results-header {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    margin-bottom: 8px;
}

.mirror-results-header h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

.mirror-results-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.mirror-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.result-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.result-card[data-lens="circunstância"] { border-left: 3px solid #ef4444; }
.result-card[data-lens="perspectiva"] { border-left: 3px solid #3b82f6; }
.result-card[data-lens="crença"] { border-left: 3px solid #10b981; }
.result-card[data-lens="vocação"] { border-left: 3px solid #f59e0b; }
.result-card[data-lens="razão"] { border-left: 3px solid #8b5cf6; }
.result-card[data-lens="reescrita"] { border-left: 3px solid #ec4899; }

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-header h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.card-body {
    font-size: 13.5px;
    line-height: 1.6;
    color: #e5e7eb;
    white-space: pre-wrap;
}

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

/* Responsive breakpoint */
@media (max-width: 1024px) {
    body {
        height: auto;
        overflow: auto;
        padding: 20px 0;
    }
    .app-container {
        flex-direction: column;
        width: 95vw;
        height: auto;
        min-height: 90vh;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .chat-area {
        height: 600px;
    }
}

/* ==========================================================================
   AUTHENTICATION STYLING (BMAD WORKFLOW)
   ========================================================================== */

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 9999;
    overflow-y: auto;
    box-sizing: border-box;
    transition: opacity var(--transition-smooth);
}

.login-card {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    box-sizing: border-box;
}

.login-header {
    margin-bottom: 30px;
}

.login-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 15px;
    display: inline-block;
    text-shadow: 0 0 10px rgba(197, 168, 128, 0.15);
}

.login-card h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.login-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.login-input-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 15px;
    transition: var(--transition-fast);
    outline: none;
    text-align: center;
}

body.light-theme .login-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
}

body.light-theme .login-input-group input {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.18);
    color: #0f172a;
}

body.light-theme .login-input-group input::placeholder {
    color: #94a3b8;
}

.login-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.login-input-group button {
    padding: 14px;
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.error-msg {
    color: #ef4444;
    font-size: 12px;
    margin-top: 10px;
    font-weight: 500;
}

.login-quote {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-quote p {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 8px;
}

.login-quote span {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sidebar Actions & Logout Button */
.sidebar-actions {
    display: flex;
    gap: 8px;
}

.logout-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
    color: var(--text-muted);
}

.logout-btn:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

body.light-theme .logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* ==========================================================================
   SUPABASE INTEGRATION UI
   ========================================================================== */

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.auth-tab:hover {
    color: var(--text-main);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-message {
    font-size: 12px;
    margin-top: 10px;
    font-weight: 500;
    line-height: 1.4;
}

.auth-message.success {
    color: #10b981;
}

.auth-message.error {
    color: #ef4444;
}

/* History Card */
.history-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

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

.history-header h3 {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.new-chat-btn {
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: var(--transition-fast);
}

.new-chat-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 8px var(--primary);
}

.history-list-container {
    overflow-y: auto;
    flex: 1;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 12px;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border-color: var(--border-color);
}

body.light-theme .history-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.history-item.active {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 500;
}

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

.delete-chat-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: var(--transition-fast);
    border-radius: 4px;
}

.history-item:hover .delete-chat-btn {
    opacity: 1;
}

.delete-chat-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* User Profile Info */
.user-profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 140px;
    overflow: hidden;
}

.user-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    font-weight: 500;
}

body.light-theme .user-email {
    color: var(--text-muted);
}

/* Card de Travamento / Destravamento */
.unlock-narrative-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    margin: 30px auto;
    text-align: center;
    max-width: 600px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.unlock-narrative-card.fade-out {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.unlock-narrative-card .lock-icon {
    font-size: 32px;
    display: inline-block;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    animation: lockPulse 2s infinite ease-in-out;
}

@keyframes lockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.unlock-narrative-card h3 {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 700;
}

.unlock-narrative-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.unlock-narrative-card .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    box-shadow: 0 4px 15px var(--primary-glow);
    padding: 12px 28px;
    font-size: 14px;
}

.unlock-narrative-card .btn-primary:hover {
    box-shadow: 0 6px 20px var(--primary-glow);
    transform: translateY(-2px);
}

/* Seção Nobre: Nova Narrativa */
.noble-narrative-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    animation: slideUpFade 0.6s ease forwards;
}

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

.noble-section-header {
    text-align: center;
    margin-bottom: 30px;
}

.noble-header-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.noble-section-header h2 {
    font-size: 28px;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Bloco de Citação Nobre */
.noble-citation {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 30px 40px;
    margin: 0 auto 40px auto;
    max-width: 850px;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.noble-citation p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 18px;
    line-height: 1.8;
    color: #e2e8f0;
    position: relative;
    z-index: 2;
    text-align: center;
    white-space: pre-wrap;
}

.noble-citation .quote-mark {
    font-family: Georgia, serif;
    font-size: 90px;
    position: absolute;
    color: rgba(99, 102, 241, 0.1);
    line-height: 1;
    z-index: 1;
    user-select: none;
}

.noble-citation .quote-mark:not(.end) {
    top: -10px;
    left: 15px;
}

.noble-citation .quote-mark.end {
    bottom: -55px;
    right: 15px;
}

/* Grid de Ações e Leituras */
.noble-narrative-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .noble-narrative-grid {
        grid-template-columns: 1fr;
    }
}

.noble-panel {
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    backdrop-filter: blur(10px);
}

.noble-panel h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.noble-panel .panel-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Checklist de Ações */
.actions-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
    transition: color 0.2s ease;
}

.action-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-top: 2px;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.action-item input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.action-item input[type="checkbox"]:checked::after {
    content: "✓";
    font-size: 11px;
    color: white;
    font-weight: bold;
}

.action-item span {
    transition: all 0.2s ease;
}

.action-item input[type="checkbox"]:checked + span {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.65;
}

/* Biblioteca de Apoio */
.recommended-books-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.book-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: all 0.2s ease;
}

.book-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.book-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.book-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.book-author {
    font-size: 12px;
    color: #a5b4fc;
    font-weight: 600;
}

.book-badge {
    font-size: 8px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.book-justification {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.book-footer {
    display: flex;
    justify-content: flex-end;
}

.book-buy-btn {
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 600;
}

.book-buy-btn:hover {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

/* Temas Clássicos Light */
body.light-theme .unlock-narrative-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .unlock-narrative-card h3 {
    color: #1e293b;
}

body.light-theme .noble-citation {
    background: #f8fafc;
    border-left-color: var(--primary);
}

body.light-theme .noble-citation p {
    color: #334155;
}

body.light-theme .noble-panel {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .noble-panel h3 {
    color: #1e293b;
}

body.light-theme .book-card {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.03);
}

body.light-theme .book-card:hover {
    background: #f1f5f9;
}

body.light-theme .book-title {
    color: #1e293b;
}

body.light-theme .book-author {
    color: var(--primary);
}

body.light-theme .action-item {
    color: #334155;
}

body.light-theme .action-item input[type="checkbox"] {
    border-color: rgba(0, 0, 0, 0.2);
}

/* Collapsed Narrative Banner */
.collapsed-narrative-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 41, 59, 0.45);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeInDown 0.3s ease;
}

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

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    flex: 1;
}

.banner-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.story-title-editor {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.story-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    opacity: 0.7;
    flex-shrink: 0;
}

.story-title-input {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-main);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 2px 8px;
    flex: 1;
    min-width: 150px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.story-title-input:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.story-title-input:focus {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 2px var(--primary-glow);
    cursor: text;
    outline: none;
}

body.light-theme .story-title-input:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .story-title-input:focus {
    background: #ffffff;
    border-color: var(--primary, #2563eb);
}

.story-edit-badge {
    font-size: 13px;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.story-title-editor:hover .story-edit-badge {
    opacity: 0.85;
}

.banner-text {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Make step clickable in sidebar */
.journey-steps .step {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    padding: 8px;
}

.journey-steps .step:hover {
    background: rgba(255, 255, 255, 0.03);
}

.journey-steps .step:active {
    transform: scale(0.98);
}

/* Lombada visual nos livros e visual premium */
.book-card {
    border-left: 4px solid var(--primary) !important;
    padding-left: 18px;
}

/* Tema Claro Light overrides */
body.light-theme .collapsed-narrative-banner {
    background: rgba(241, 245, 249, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .collapsed-narrative-banner .banner-text {
    color: #1e293b;
}

body.light-theme .journey-steps .step:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Recommended Videos styling */
.recommended-videos-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.video-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: all 0.2s ease;
    border-left: 4px solid var(--accent) !important;
    padding-left: 18px;
}

.video-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(244, 63, 94, 0.2);
    transform: translateY(-1px);
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.video-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.video-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.video-channel {
    font-size: 12px;
    color: #f43f5e; /* Rose accent */
    font-weight: 600;
}

.video-badge {
    font-size: 8px;
    font-weight: 700;
    color: #10b981; /* Emerald green */
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.video-justification {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.video-footer {
    display: flex;
    justify-content: flex-end;
}

.video-watch-btn {
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ef4444 !important; /* YouTube Red */
    border-color: rgba(239, 68, 68, 0.2) !important;
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 600;
}

.video-watch-btn:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
}

/* Light theme overrides */
body.light-theme .video-card {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.03);
}

body.light-theme .video-card:hover {
    background: #f1f5f9;
}

body.light-theme .video-title {
    color: #1e293b;
}

body.light-theme .video-channel {
    color: var(--accent);
}

body.light-theme .video-badge {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.15);
    color: #059669;
}

/* Examples Dropdown */
.example-dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    margin-top: 6px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 100;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeInDropdown 0.2s ease;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 10px 16px;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
}

/* Light Theme overrides */
body.light-theme .dropdown-menu {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

body.light-theme .dropdown-item {
    color: #334155;
}

body.light-theme .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--primary);
}

/* ==========================================================================
   LANDING PAGE & AUTH MODAL STYLING
   ========================================================================== */

/* Auth Modal Overlay */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeInModal 0.25s ease forwards;
}

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

/* Close Button on Modal */
.close-auth-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.close-auth-btn:hover {
    color: var(--accent);
}

/* Navbar */
.lp-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 6%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.lp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-logo-icon {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(197, 168, 128, 0.15);
}

.lp-logo-text {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.lp-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.lp-nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.lp-nav-link:hover {
    color: var(--primary);
}

/* Hero Section */
.lp-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 80px 6%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.lp-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.lp-hero-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.lp-hero h1 {
    font-family: var(--font-heading);
    font-size: 64px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -2px;
}

.highlight-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lp-hero p {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 35px;
}

.lp-hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.lp-cta-btn {
    padding: 16px 32px !important;
    font-size: 16px !important;
}

.lp-sec-btn {
    padding: 16px 28px !important;
    font-size: 16px !important;
    text-decoration: none;
}

/* Mockup UI style */
.lp-hero-mockup-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-mockup {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mockup-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-dot.red { background: #ef4444; }
.mockup-dot.yellow { background: #f59e0b; }
.mockup-dot.green { background: #10b981; }

.mockup-title {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 10px;
    font-weight: 500;
}

.mockup-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.mockup-lens-card {
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: var(--radius-sm);
}

.mockup-lens-card.card-circunstancia {
    border-color: #ef4444;
}

.mockup-lens-card.card-crenca {
    border-color: #10b981;
}

.mockup-lens-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.mockup-lens-icon {
    font-size: 14px;
}

.mockup-lens-card strong {
    font-size: 12px;
    color: var(--text-main);
}

.mockup-lens-card p {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

/* ==========================================================================
   Jornada — 4 Etapas (Editorial Layout)
   ========================================================================== */
/* ==========================================================================
   Jornada — 4 Etapas (Editorial Layout - Opção 3 Azul Sereno)
   ========================================================================== */
.lp-jornada {
    width: 100%;
    background: linear-gradient(180deg, #f0f4f9 0%, #e8eef7 100%);
    border-top: 1px solid rgba(59, 130, 246, 0.10);
    border-bottom: 1px solid rgba(59, 130, 246, 0.10);
    padding: 100px 24px;
    box-sizing: border-box;
}

.lp-jornada-container {
    max-width: 1120px;
    margin: 0 auto;
}

.lp-jornada .lp-section-header {
    text-align: center;
    margin-bottom: 64px;
}

.lp-jornada .lp-section-header h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: #0f172a;
}

.lp-jornada .lp-section-header p {
    font-size: 17px;
    color: #475569;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.65;
}

.lp-jornada-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.lp-jornada-step {
    text-align: center;
    padding: 36px 20px 28px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.04);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.lp-jornada-step:hover {
    transform: translateY(-4px);
    background: #ffffff;
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 16px 36px rgba(30, 58, 138, 0.08);
}

.jornada-number {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 68px;
    font-weight: 400;
    line-height: 1;
    display: block;
    margin-bottom: 14px;
    color: #2563eb;
    opacity: 0.38;
    letter-spacing: -0.04em;
}

.lp-jornada-step h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 23px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.lp-jornada-step p {
    font-size: 14px;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

@media (max-width: 900px) {
    .lp-jornada {
        padding: 70px 20px;
    }
    .lp-jornada-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .jornada-number {
        font-size: 56px;
    }
}

@media (max-width: 540px) {
    .lp-jornada-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Footer link for changelog */
.lp-footer-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.5;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.lp-footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==========================================================================
   5 Lentes Existenciais Section (legacy — kept for reference)
   ========================================================================== */
/* Legacy: .lp-lentes styles — no longer used in HTML */
/*
.lp-lentes {
    padding: 100px 6%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.lp-section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
}

.lp-section-header h2 {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 14px;
    letter-spacing: -0.8px;
}

.lp-section-header p {
    font-size: 15px;
    color: var(--text-muted);
}

.lp-lentes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 50px;
}

.lp-lente-card {
    background: rgba(22, 28, 45, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: transform var(--transition-smooth), border-color var(--transition-fast), box-shadow var(--transition-smooth);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.light-theme .lp-lente-card {
    background: rgba(248, 250, 252, 0.7);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.lp-lente-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

body.light-theme .lp-lente-card:hover {
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.05);
}

.lente-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lente-icon {
    font-size: 24px;
    background: var(--primary-glow);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.lente-header h3 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.lp-lente-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

*/

/* ==========================================================================
   RAG Feature Section
   ========================================================================== */
.lp-rag-section {
    padding: 100px 6%;
    background: rgba(99, 102, 241, 0.01);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

body.light-theme .lp-rag-section {
    background: rgba(99, 102, 241, 0.005);
    border-color: rgba(0, 0, 0, 0.03);
}

.lp-rag-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.lp-section-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    display: inline-block;
}

.lp-rag-content h2 {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.8px;
}

.lp-rag-content p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 15px;
}

.lp-rag-visual {
    display: flex;
    justify-content: center;
}

.rag-search-box {
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,0.4);
}

body.light-theme .rag-search-box {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.search-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.search-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-query {
    padding: 18px 20px;
    font-size: 13.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--primary);
    font-weight: 600;
}

.search-query .query-label {
    color: rgba(255, 255, 255, 0.3);
    margin-right: 6px;
    font-weight: 400;
}

.search-results {
    padding: 20px;
}

.search-match {
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px;
}

.match-meta {
    font-size: 10px;
    color: #10b981;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
}

.spanish-text {
    font-size: 14.5px;
    font-style: italic;
    color: #f3f4f6;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.portuguese-translation {
    font-size: 12.5px;
    color: #9ca3af;
    line-height: 1.5;
    margin: 0;
    border-left: 2px solid rgba(99, 102, 241, 0.4);
    padding-left: 10px;
}

/* ==========================================================================
   Bússola Prática & Biblioteca Section
   ========================================================================== */
.lp-bussola-section {
    padding: 100px 6%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.lp-bussola-container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.lp-bussola-content h2 {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.8px;
}

.lp-bussola-content p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.lp-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lp-benefits-list li {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    position: relative;
    padding-left: 24px;
}

.lp-benefits-list li::before {
    content: "⚡";
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent);
}

.bussola-mockup {
    background: rgba(22, 28, 45, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

body.light-theme .bussola-mockup {
    background: rgba(248, 250, 252, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
}

.mockup-header-simple {
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 18px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.bussola-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    border-top: none;
}

.bussola-checklist-panel {
    padding: 24px;
    border-right: 1px solid var(--border-color);
}

.bussola-checklist-panel h4, .bussola-library-panel h4 {
    font-size: 12px;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
    font-weight: 700;
}

.mock-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mock-checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.mock-checklist li .checkbox {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
    flex-shrink: 0;
}

.mock-checklist li.checked .checkbox {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.mock-checklist li.checked .text {
    text-decoration: line-through;
    opacity: 0.6;
}

.mock-checklist li.hover-active {
    transition: color 0.3s ease;
}

.bussola-mockup:hover .mock-checklist li.hover-active .checkbox {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
    content: "✓";
}
.bussola-mockup:hover .mock-checklist li.hover-active .checkbox::after {
    content: "✓";
}
.bussola-mockup:hover .mock-checklist li.hover-active .text {
    text-decoration: line-through;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.bussola-library-panel {
    padding: 24px;
}

.mock-book-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.book-cover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    width: 48px;
    height: 64px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.3);
}

.book-info h5 {
    font-size: 11px;
    color: var(--text-main);
    margin: 0 0 4px 0;
    font-weight: 600;
}

.book-info p {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

/* ==========================================================================
   Mentor Socrático Section
   ========================================================================== */
.lp-mentor-section {
    padding: 100px 6%;
    background: rgba(139, 92, 246, 0.01);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

body.light-theme .lp-mentor-section {
    background: rgba(139, 92, 246, 0.005);
    border-color: rgba(0, 0, 0, 0.03);
}

.lp-mentor-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.lp-mentor-content h2 {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.8px;
}

.lp-mentor-content p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 15px;
}

.lp-mentor-visual {
    display: flex;
    justify-content: center;
}

.chat-mockup-window {
    background: #0c101b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

body.light-theme .chat-mockup-window {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.chat-mockup-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.chat-meta {
    display: flex;
    flex-direction: column;
}

.chat-meta strong {
    font-size: 12.5px;
    color: var(--text-main);
}

.chat-meta span {
    font-size: 10px;
    color: #10b981;
    font-weight: 500;
}

.chat-mockup-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mock-bubble {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.mock-bubble .role {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.mock-bubble .inner {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.5;
}

.mock-bubble.user {
    align-self: flex-end;
}

.mock-bubble.user .role {
    text-align: right;
}

.mock-bubble.user .inner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.mock-bubble.ai {
    align-self: flex-start;
}

.mock-bubble.ai .role {
    color: var(--accent);
}

.mock-bubble.ai .inner {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    min-width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Typing Dots Animation inside Mockup */
.mock-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.mock-dots .dot {
    width: 5px;
    height: 5px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: mockDots 1.2s infinite ease-in-out;
}

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

@keyframes mockDots {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1.1); opacity: 1; }
}

/* ==========================================================================
   Changelog Section (Landing Page Widget)
   ========================================================================== */
.lp-changelog-section {
    padding: 100px 6%;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.lp-changelog-wrapper {
    background: rgba(22, 28, 45, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-top: 40px;
    backdrop-filter: blur(10px);
}

body.light-theme .lp-changelog-wrapper {
    background: rgba(248, 250, 252, 0.7);
    border-color: rgba(0, 0, 0, 0.06);
}

.lp-changelog-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

body.light-theme .lp-changelog-item {
    border-top-color: rgba(0, 0, 0, 0.04);
}

.lp-changelog-item:first-child {
    border-top: none;
    padding-top: 0;
}

.lp-changelog-item .version {
    font-size: 11px;
    font-weight: 700;
    background: var(--primary-glow);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
}

.lp-changelog-item .content {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.changelog-more {
    text-align: center;
    margin-top: 30px;
}

.loading-spinner-lp {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.spinner-lp {
    border: 2px solid rgba(99, 102, 241, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border-left-color: var(--primary);
    animation: spin-lp 1s linear infinite;
    margin: 0 auto 10px auto;
}

@keyframes spin-lp {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Quote Section */
.lp-quote-section {
    padding: 80px 6%;
    background: rgba(99, 102, 241, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    text-align: center;
}

.lp-quote {
    max-width: 800px;
    margin: 0 auto;
}

.lp-quote p {
    font-family: var(--font-heading);
    font-size: 26px;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 16px;
}

.lp-quote span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary);
    text-transform: uppercase;
}

/* Final CTA Section */
.lp-final-cta {
    padding: 100px 6%;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.lp-final-cta h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 14px;
}

.lp-final-cta p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.6;
}

/* Footer */
.lp-footer {
    padding: 40px 6%;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    text-align: center;
}

.lp-footer p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* Light Theme overrides */
body.light-theme .login-overlay {
    background: #f8fafc;
}

body.light-theme .lp-logo-text,
body.light-theme .lp-hero h1,
body.light-theme .lp-section-header h2,
body.light-theme .lp-pillar-card h3,
body.light-theme .lp-quote p,
body.light-theme .lp-final-cta h2 {
    color: #1e293b;
}

body.light-theme .lp-pillar-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .lp-pillar-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
}

body.light-theme .hero-mockup {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.15);
}

body.light-theme .mockup-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

body.light-theme .mockup-lens-card {
    background: rgba(0, 0, 0, 0.01);
}

body.light-theme .mockup-lens-card strong {
    color: #1e293b;
}

body.light-theme .lp-quote-section {
    background: rgba(99, 102, 241, 0.01);
    border-color: rgba(0, 0, 0, 0.03);
}

body.light-theme .lp-footer {
    border-top-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .auth-modal {
    background: rgba(241, 245, 249, 0.5);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .lp-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 40px;
        gap: 30px;
    }
    .lp-hero-content {
        align-items: center;
    }
    .lp-hero h1 {
        font-size: 44px;
    }
    .lp-hero-actions {
        justify-content: center;
    }
    .lp-rag-container,
    .lp-bussola-container,
    .lp-mentor-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .lp-rag-content,
    .lp-bussola-content,
    .lp-mentor-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .lp-quote p {
        font-size: 20px;
    }
    .bussola-split {
        grid-template-columns: 1fr;
    }
    .bussola-checklist-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* --- Wizard Stepper Transitions --- */
.wizard-step {
    opacity: 0;
    transform: translateX(20px);
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
    pointer-events: none;
    z-index: 1;
}

.wizard-step.active {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    position: relative;
    pointer-events: auto;
    z-index: 2;
}

.mirror-container {
    position: relative;
    overflow: visible;
    min-height: 500px;
}

.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* ==========================================================================
   HORIZONTAL STEPPER & LENS TABS STYLING
   ========================================================================== */

/* --- Stepper Horizontal --- */
.stepper-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

body.light-theme .stepper-horizontal {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.12);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.04);
}

.stepper-horizontal .step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.stepper-horizontal .step:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

body.light-theme .stepper-horizontal .step:hover {
    background: rgba(99, 102, 241, 0.05);
}

.stepper-horizontal .step.active {
    color: var(--primary);
    font-weight: 600;
}

.stepper-horizontal .step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.stepper-horizontal .step.active .step-badge {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 15px var(--primary-glow);
}

.stepper-horizontal .step-divider {
    flex: 1;
    height: 1px;
    background: var(--border-color);
    margin: 0 20px;
    position: relative;
}

/* --- Lens Tabs (Step 2 Redesign) --- */
.lens-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.lens-tabs::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.lens-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

body.light-theme .lens-tab {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.1);
}

.lens-tab:hover {
    color: var(--text-main);
    border-color: var(--border-hover);
}

/* Custom colors for each lens on active state */
.lens-tab[data-lens="circunstancia"].active {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.lens-tab[data-lens="perspectiva"].active {
    color: #3b82f6;
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.lens-tab[data-lens="crenca"].active {
    color: #10b981;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.lens-tab[data-lens="vocacao"].active {
    color: #f59e0b;
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.lens-tab[data-lens="razao"].active {
    color: #8b5cf6;
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

/* Lens Content & Panes */
.lens-content {
    position: relative;
    width: 100%;
}

.lens-pane {
    display: none;
    width: 100%;
    animation: fadeInPane 0.3s ease forwards;
}

.lens-pane.active {
    display: flex;
}

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

/* ======================================================
   ETAPA 4 — MENTORIA EXISTENCIAL
   ====================================================== */

/* CTA block at bottom of Step 3 */
.mentoria-cta-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 32px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 16px;
    animation: fadeInUp 0.5s ease forwards;
}

.mentoria-cta-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.mentoria-cta-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.mentoria-cta-block h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mentoria-cta-block p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Make Step 4 fill the available flex space so no void appears */
#step-4 {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Main Mentoria Container */
.mentoria-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 500px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Header */
.mentoria-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.mentoria-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mentoria-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.mentoria-header h3 {
    margin: 0 0 2px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mentoria-subtitle {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Messages scroll area */
.mentoria-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.mentoria-messages::-webkit-scrollbar {
    width: 4px;
}
.mentoria-messages::-webkit-scrollbar-track {
    background: transparent;
}
.mentoria-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

/* Message Bubbles */
.mentoria-bubble {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 78%;
    animation: fadeInUp 0.35s ease forwards;
}

.mentoria-bubble.ai {
    align-self: flex-start;
}

.mentoria-bubble.user {
    align-self: flex-end;
}

.mentoria-bubble-inner {
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

.mentoria-bubble.ai .mentoria-bubble-inner {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.mentoria-bubble.user .mentoria-bubble-inner {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.mentoria-bubble-role {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary, var(--text-secondary));
    padding: 0 2px;
}

.mentoria-bubble.ai .mentoria-bubble-role {
    text-align: left;
    color: #8b5cf6;
}

.mentoria-bubble.user .mentoria-bubble-role {
    text-align: right;
}

/* Typing / thinking indicator */
.mentoria-thinking .mentoria-bubble-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
}

.mentoria-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: mentoriaDot 1.2s infinite ease-in-out;
}
.mentoria-dot:nth-child(2) { animation-delay: 0.2s; }
.mentoria-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes mentoriaDot {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1;   }
}

/* Input Row */
.mentoria-input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.mentoria-textarea {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    padding: 10px 16px;
    resize: none;
    max-height: 140px;
    overflow-y: auto;
    transition: border-color 0.2s;
}

.mentoria-textarea:focus {
    outline: none;
    border-color: #6366f1;
}

.mentoria-textarea::placeholder {
    color: var(--text-secondary);
}

.mentoria-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, opacity 0.15s;
}

.mentoria-send-btn:hover:not(:disabled) {
    transform: scale(1.08);
}

.mentoria-send-btn:active:not(:disabled) {
    transform: scale(0.94);
}

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

/* Light theme overrides */
body.light-theme .mentoria-container {
    background: #f8f9fc;
}

body.light-theme .mentoria-header {
    background: #ffffff;
}

body.light-theme .mentoria-bubble.ai .mentoria-bubble-inner {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}

body.light-theme .mentoria-textarea {
    background: #ffffff;
}

body.light-theme .mentoria-input-row {
    background: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .mentoria-cta-block {
        flex-direction: column;
        align-items: flex-start;
    }

    .mentoria-cta-block .btn {
        width: 100%;
    }

    .mentoria-container {
        border-radius: 12px;
    }

    .mentoria-bubble {
        max-width: 92%;
    }
}

/* Ortega RAG Quote Box */
.ortega-quote-container {
    background: rgba(99, 102, 241, 0.04);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 16px 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-left-width: 4px;
    border-left-color: var(--primary);
}

body.light-theme .ortega-quote-container {
    background: rgba(99, 102, 241, 0.02);
    border-color: rgba(99, 102, 241, 0.08);
    border-left-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.02);
}

.ortega-quote {
    margin: 0;
    position: relative;
}

.ortega-quote p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-muted) !important;
    font-style: italic;
    margin: 0 0 10px 0;
}

.ortega-quote cite {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-style: normal;
    display: block;
}

/* ==========================================================================
   APP NAVIGATION TABS (Diálogo & Diagnóstico vs Mapa da Circunstância)
   ========================================================================== */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.app-nav-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.light-theme .app-nav-tabs {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.app-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
}

.app-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

body.light-theme .app-tab-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

.app-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    box-shadow: 0 4px 14px var(--primary-glow);
    border-color: rgba(255, 255, 255, 0.15);
}

body.light-theme .app-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
}

.tab-btn-icon {
    font-size: 14px;
}

.tab-badge {
    font-size: 10px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 2px;
}

/* ==========================================================================
   MAPA DA CIRCUNSTÂNCIA VIEW
   ========================================================================== */
#mapa-view {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    animation: fadeIn 0.3s ease-out;
}

.mapa-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Empty State */
.mapa-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    background: var(--bg-panel);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    margin: 40px auto;
    max-width: 580px;
}

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

.mapa-empty-state h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--text-main);
    margin: 0 0 10px 0;
}

.mapa-empty-state p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 24px 0;
}

/* Hero Card (Tese & Manifesto) */
.mapa-hero-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.light-theme .mapa-hero-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-color: rgba(99, 102, 241, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.mapa-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.mapa-hero-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.mapa-hero-title-group h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.mapa-hero-stats {
    display: flex;
    gap: 12px;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 85px;
}

body.light-theme .stat-pill {
    background: rgba(0, 0, 0, 0.03);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

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

.mapa-tese-quote {
    margin: 0;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--primary);
}

.mapa-tese-quote p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-main);
    font-style: italic;
    margin: 0;
}

/* Sections in Mapa */
.mapa-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

.section-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Grid de Frentes de Ação */
.frentes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.frente-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all var(--transition-smooth);
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.frente-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.frente-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.frente-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.frente-status {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.frente-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.frente-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

.frente-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

body.light-theme .frente-progress {
    background: rgba(0, 0, 0, 0.06);
}

.frente-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Lista de Marcos */
.marcos-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.marco-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

body.light-theme .marco-item {
    background: rgba(0, 0, 0, 0.015);
}

.marco-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

body.light-theme .marco-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.marco-item.completed {
    opacity: 0.65;
}

.marco-item.completed .marco-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.marco-checkbox {
    margin-top: 3px;
    accent-color: var(--primary);
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.marco-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-main);
}

.btn-confrontar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: auto;
}

.btn-confrontar:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Recursos Rápidos do Mapa */
.mapa-recursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.recursos-subpanel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.recursos-subpanel h4 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 14px 0;
}

.mapa-mini-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mini-resource-card {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

body.light-theme .mini-resource-card {
    background: rgba(0, 0, 0, 0.02);
}

.mini-resource-card h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

.mini-resource-card p {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--text-muted);
    margin: 0;
}

/* Linha do Tempo de Confrontos */
.mapa-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    padding-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.06);
    margin-left: 8px;
}

body.light-theme .mapa-timeline-list {
    border-left-color: rgba(0, 0, 0, 0.08);
}

.timeline-entry {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    position: relative;
    transition: all var(--transition-fast);
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-dark);
    box-shadow: 0 0 8px var(--primary);
}

body.light-theme .timeline-entry::before {
    border-color: #ffffff;
}

.timeline-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-entry-date {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-entry-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.timeline-entry-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 768px) {
    #mapa-view {
        padding: 16px;
    }
    
    .chat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .app-nav-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .frentes-grid {
        grid-template-columns: 1fr;
    }
    
    .mapa-hero-header {
        flex-direction: column;
    }
}

/* ==========================================================================
   LIVROS VITAIS & CAPÍTULOS DE CIRCUNSTÂNCIA STYLES (v1.3.0+)
   ========================================================================== */

/* Estilização de lombadas de livros na sidebar */
.history-item {
    position: relative;
    padding-left: 18px !important;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 99px;
    background: var(--primary);
    opacity: 0.5;
    transition: all var(--transition-fast);
}

.history-item.active::before {
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 1;
    width: 4px;
}

/* Seletor de Capítulos / Linha do Tempo no Mapa */
.mapa-chapters-timeline {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 4px 12px 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
    scrollbar-width: thin;
}

.mapa-chapter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-smooth);
}

.mapa-chapter-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.mapa-chapter-btn.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.mapa-chapter-btn.obsolete {
    opacity: 0.6;
    border-style: dashed;
}

.mapa-chapter-btn.obsolete.active {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--accent);
    color: var(--text-main);
    opacity: 1;
}

.chapter-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.mapa-chapter-btn.active .chapter-badge {
    background: var(--primary);
    color: #ffffff;
}

.mapa-chapter-btn.obsolete .chapter-badge {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
}

/* Alerta de Obsolescência / Virar a Página */
.obsolescence-alert-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

body.light-theme .obsolescence-alert-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.04) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-color: rgba(239, 68, 68, 0.15);
}

.alert-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-banner-icon {
    font-size: 24px;
}

.alert-banner-text h4 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 2px 0;
}

.alert-banner-text p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* Capítulo Obsoleto (Modo leitura/arquivado) */
.mapa-container.obsolete-chapter-view .frente-card {
    opacity: 0.75;
    background: rgba(22, 28, 45, 0.25);
    border-color: rgba(255, 255, 255, 0.03);
    pointer-events: none; /* Desabilita interações nos cards arquivados */
}

body.light-theme .mapa-container.obsolete-chapter-view .frente-card {
    background: rgba(0, 0, 0, 0.015);
}

.mapa-container.obsolete-chapter-view .btn-confrontar {
    display: none; /* Esconde botões de confronto de capítulos obsoletos */
}

.mapa-container.obsolete-chapter-view .marco-checkbox {
    pointer-events: none;
}

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

/* Sidebar Projects and Chapters Styles */
.sidebar-chapters-list {
    list-style: none;
    padding: 4px 0 4px 12px;
    margin: 0 0 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .sidebar-chapters-list {
    border-left-color: rgba(0, 0, 0, 0.08);
}

.sidebar-chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.sidebar-chapter-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

body.light-theme .sidebar-chapter-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.sidebar-chapter-item.active {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 500;
}

.sidebar-chapter-item.obsolete {
    opacity: 0.7;
}

.sidebar-chapter-item.obsolete:hover {
    opacity: 1;
}

.sidebar-chapter-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: left;
}

.sidebar-chapter-badge {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    margin-right: 6px;
    flex-shrink: 0;
}

body.light-theme .sidebar-chapter-badge {
    background: rgba(0, 0, 0, 0.04);
}

.sidebar-chapter-item.active .sidebar-chapter-badge {
    background: var(--primary);
    color: #fff;
}

.sidebar-chapter-item.add-chapter-item {
    color: var(--primary);
    font-style: italic;
    border: 1px dashed rgba(99, 102, 241, 0.2);
    justify-content: center;
    padding: 4px 8px;
    margin-top: 4px;
}

body.light-theme .sidebar-chapter-item.add-chapter-item {
    border-color: rgba(0, 113, 227, 0.2);
}

.sidebar-chapter-item.add-chapter-item:hover {
    background: var(--primary-glow);
    border-style: solid;
    border-color: var(--primary);
}

/* Rename Chat Button */
.rename-chat-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 11px;
    line-height: 1;
    opacity: 0;
    transition: var(--transition-fast);
    border-radius: 4px;
    margin-right: 2px;
}

.history-item:hover .rename-chat-btn {
    opacity: 0.6;
}

.rename-chat-btn:hover {
    color: var(--primary);
    background: var(--primary-glow);
    opacity: 1 !important;
}
