/* MFT OS — Design System Global (SaaS Navy Comfort / Viver de IA Style) */

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

:root {
    /* Cores do Sistema: Dark Theme (SaaS Navy Comfort) */
    --bg-main: #0b0f19;
    --bg-sidebar: #0f172a;
    --bg-card: #111827;
    --bg-active: rgba(255, 255, 255, 0.04);
    --bg-active-hover: rgba(255, 255, 255, 0.08);
    
    /* Tipografia e Cores de Texto */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    /* Branding & Accent Colors */
    --primary: #007bff;
    --primary-hover: #0056b3;
    --accent-indigo: #6366f1;
    --accent-pink: #ec4899;
    --accent-violet: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #007bff 100%);
    --accent-gradient-hover: linear-gradient(135deg, #00b8e6 0%, #0056b3 100%);
    
    /* Status Operacional */
    --success: #10b981;
    --success-border: rgba(16, 185, 129, 0.2);
    --success-bg: rgba(16, 185, 129, 0.04);
    
    --danger: #ef4444;
    --danger-border: rgba(239, 68, 68, 0.2);
    --danger-bg: rgba(239, 68, 68, 0.04);
    
    --warning: #f59e0b;
    --warning-border: rgba(245, 158, 11, 0.2);
    --warning-bg: rgba(245, 158, 11, 0.04);
    
    /* Elementos Visuais e Linhas */
    --border-subtle: #1e293b;
    --border-active: #334155;
    
    /* Raios de Arredondamento */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    
    /* Efeitos de Transição Premium */
    --transition-fast: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Shadows Confortáveis */
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-deep: 0 16px 40px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.05);
    
    color-scheme: dark;
}

.light-theme {
    /* Cores do Sistema: Light Theme (SaaS Slate Comfort) */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a; /* Sidebar permanece escura para contraste híbrido */
    --bg-active: #f1f5f9;
    --bg-active-hover: #e2e8f0;
    
    /* Tipografia e Cores de Texto */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Branding & Accent adaptados */
    --primary: #007bff;
    --primary-hover: #0056b3;
    --accent-indigo: #4f46e5;
    --accent-pink: #db2777;
    --accent-violet: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #007bff 100%);
    
    /* Elementos Visuais e Linhas */
    --border-subtle: #e2e8f0;
    --border-active: #cbd5e1;
    
    /* Shadows Confortáveis */
    --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-deep: 0 12px 28px rgba(15, 23, 42, 0.08);

    color-scheme: light;
}

/* Ajustes de Inputs minimalistas para o Modo Claro */
.light-theme input[type="text"],
.light-theme input[type="number"],
.light-theme input[type="email"],
.light-theme input[type="password"],
.light-theme select,
.light-theme textarea {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-soft) !important;
}

.light-theme input[type="text"]:focus,
.light-theme input[type="number"]:focus,
.light-theme input[type="email"]:focus,
.light-theme input[type="password"]:focus,
.light-theme select:focus,
.light-theme textarea:focus {
    border-color: var(--border-active) !important;
    background: var(--bg-main) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05) !important;
}

.light-theme select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Ajustes de Botões minimalistas para o Modo Claro */
.light-theme .btn-primary {
    background: var(--text-primary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-soft) !important;
    border: none !important;
}

.light-theme .btn-primary:hover {
    background: var(--primary-hover) !important;
}

.light-theme .btn-secondary {
    background: #ffffff !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-soft) !important;
}

.light-theme .btn-secondary:hover {
    background: var(--bg-main) !important;
    border-color: var(--border-active) !important;
}

/* Efeito desativado de orbes de fundo no Modo Claro para máxima legibilidade */
.light-theme .orb {
    display: none !important;
}

.light-theme .grid-overlay {
    opacity: 0.3 !important;
}

/* Cards no Modo Claro — conceito minimalista com sombras suaves */
.light-theme .card {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    backdrop-filter: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.light-theme .card:hover {
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03) !important;
}

.light-theme .card-title {
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Alertas no Modo Claro */
.light-theme .alert-success {
    background-color: rgba(16, 185, 129, 0.06) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #047857 !important;
}

.light-theme .alert-error {
    background-color: rgba(244, 63, 94, 0.06) !important;
    border-color: rgba(244, 63, 94, 0.2) !important;
    color: #be123c !important;
}

/* Tabelas no Modo Claro — minimalistas com linhas finas horizontais */
.light-theme table th {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.light-theme table td {
    color: #0f172a !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.light-theme .table-container {
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

/* Feed items no Modo Claro */
.light-theme .feed-item {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    border-left-width: 4px !important;
    backdrop-filter: none !important;
}

.light-theme .feed-item.risk { border-left-color: var(--danger) !important; background: rgba(244, 63, 94, 0.01) !important; }
.light-theme .feed-item.warning { border-left-color: var(--warning) !important; background: rgba(245, 158, 11, 0.01) !important; }
.light-theme .feed-item.danger { border-left-color: var(--danger) !important; background: rgba(244, 63, 94, 0.02) !important; }
.light-theme .feed-item.success { border-left-color: var(--success) !important; background: rgba(16, 185, 129, 0.01) !important; }

/* Health/Calibração Cards no Modo Claro */
.light-theme .health-card-lobby {
    background: var(--bg-main) !important;
    border: 1px solid var(--border-subtle) !important;
}

.light-theme .health-card-lobby::before {
    display: none !important;
}

.light-theme .health-lobby-bar-container {
    background: var(--border-subtle) !important;
}

/* Ajustes do Chat no Modo Claro */
.light-theme .chat-header {
    background-color: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.light-theme .chat-input-container {
    background-color: rgba(255, 255, 255, 0.85) !important;
    border-top: 1px solid #e2e8f0 !important;
}

.light-theme .chat-form {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.light-theme .message-row.user .message-bubble {
    background-color: var(--text-primary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-soft) !important;
}

.light-theme .message-row.assistant .message-bubble {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    backdrop-filter: none !important;
    color: #0f172a !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* Welcome title gradient adaptação para Modo Claro */
.light-theme .welcome-title,
.light-theme .page-title {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background: none !important;
}

/* List items no Modo Claro */
.light-theme .list-item {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
}

.light-theme .list-item:hover {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

/* Action cards no Modo Claro */
.light-theme .action-card {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

.light-theme .action-card:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

/* Prompt pills ergonômicas no Modo Claro */
.light-theme .prompt-pill {
    background: var(--bg-main) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
}

.light-theme .prompt-pill:hover {
    background: var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

/* Goal strips no Modo Claro */
.light-theme .goal-strip {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
}

.light-theme .goal-strip:hover {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

/* Context items e badges no Modo Claro */
.light-theme .context-item-card {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
}

.light-theme .context-item-card:hover {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

/* Calibration stats no Modo Claro */
.light-theme .calibration-stat-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.light-theme .calibration-stat-card:hover {
    background: #f1f5f9 !important;
}

/* System status pill no Modo Claro */
.light-theme .system-status {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #f1f5f9 !important;
}

/* Sidebar status container adaptado ao Modo Claro (permanece dark) */
.light-theme .sidebar-status-container {
    background: transparent !important;
    border: none !important;
}

/* Conversation items no Modo Claro (sidebar permanece escura) */
.light-theme .conversation-item:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Botão de toggle de tema */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 0 16px 12px;
    margin-top: auto !important; /* Empurra o rodapé para a base da sidebar */
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'Plus Jakarta Sans', sans-serif;
    user-select: none;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}

/* Transições Suaves globais para mudança de Tema */
body, .card, .lobby-content, .content-area, .chat-area, .chat-header, .chat-input-container, .list-item, .feed-item, table, th, td, input, textarea, select, .action-card, .btn-logout, .btn {
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Sidebar Híbrida Premium Contrastante (Sempre Escura) */
.sidebar {
    background-color: #09090b !important;
    border-right: 1px solid #27272a !important;
    box-shadow: var(--shadow-soft) !important;
    
    /* Forçando variáveis Dark para garantir leitura dentro da Sidebar mesmo no Light Mode */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-subtle: #27272a;
    --bg-active: rgba(255, 255, 255, 0.05);
    --accent-indigo: #fafafa;
}

.sidebar .nav-item {
    color: #a1a1aa !important;
}

/* Blindagem de Botões da Sidebar contra o Tema Claro */
.sidebar .btn-primary {
    background: #fafafa !important;
    color: #09090b !important;
    border: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

.sidebar .btn-primary:hover {
    background: #e4e4e7 !important;
}

.sidebar .nav-item:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: #f8fafc !important;
}

.sidebar .nav-item.active {
    background-color: rgba(99, 102, 241, 0.1) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
    color: #f8fafc !important;
}

.sidebar .nav-item.active svg {
    color: #818cf8 !important;
}

.sidebar .company-badge {
    background: rgba(255, 255, 255, 0.01) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.sidebar .company-name {
    color: #f8fafc !important;
}

.sidebar .company-segment {
    color: #64748b !important;
}

.sidebar .health-card-sidebar {
    background: transparent !important;
}

.sidebar .health-title-sidebar {
    color: #94a3b8 !important;
}

/* Reset Moderno */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.55;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

/* Scrollbar Estilo Vercel / Linear */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: var(--transition-fast);
}

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

/* Background Effects removidos para estilo SaaS limpo */

/* --- Estilos Globais de Formulário --- */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 16px !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.9rem !important;
    outline: none !important;
    transition: var(--transition-fast) !important;
    box-shadow: none !important;
}

::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: #00d2ff !important;
    background: var(--bg-card) !important;
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1) !important;
}

.light-theme input[type="text"],
.light-theme input[type="number"],
.light-theme input[type="email"],
.light-theme input[type="password"],
.light-theme select,
.light-theme textarea {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.light-theme input[type="text"]:focus,
.light-theme input[type="number"]:focus,
.light-theme input[type="email"]:focus,
.light-theme input[type="password"]:focus,
.light-theme select:focus,
.light-theme textarea:focus {
    border-color: #007bff !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}

select option {
    background: var(--bg-main);
    color: var(--text-primary);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    user-select: none;
}

/* --- Botões Modernos --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #00d2ff 0%, #007bff 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.3);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-active) !important;
    border-color: var(--border-active) !important;
}

.light-theme .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #0f172a !important;
}

.light-theme .btn-secondary:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(244, 63, 94, 0.1);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.3);
    transform: translateY(-1px);
}

/* --- Painéis Modulares (Cards) --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: var(--transition-normal);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: var(--shadow-deep), 0 0 40px rgba(99, 102, 241, 0.03);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 650;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

/* --- Sidebar Unificada de Alto Padrão --- */
.sidebar {
    width: 280px;
    background-color: #0f172a !important; /* Sidebar Híbrida Premium */
    border-right: 1px solid #1e293b !important;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    z-index: 20;
    position: relative;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    height: 64px;
    padding: 0 24px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-mark {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #00d2ff 0%, #007bff 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 210, 255, 0.2);
}

.logo-mark svg {
    width: 16px;
    height: 16px;
    color: #ffffff;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.04em;
    font-family: 'Inter', sans-serif;
}

.nav-menu {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    color: #94a3b8 !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    text-decoration: none;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    transition: var(--transition-fast);
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #ffffff !important;
}

.nav-item.active {
    background-color: rgba(0, 210, 255, 0.08) !important;
    border-color: rgba(0, 210, 255, 0.2) !important;
    color: #00d2ff !important;
    font-weight: 600;
}

.nav-item.active svg {
    color: #00d2ff !important;
}

.sidebar-status-container {
    padding: 8px 16px;
    margin: 0 16px;
    margin-bottom: 16px;
    background: transparent !important;
    border: none !important;
}

/* Sidebar Footer & Badges */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-subtle);
    background-color: rgba(4, 5, 10, 0.3);
}

.company-badge {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    position: relative;
    box-shadow: none !important;
}

.company-name {
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.company-segment {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.btn-logout {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    color: var(--danger);
    background: rgba(244, 63, 94, 0.1);
}

/* --- Alertas Modernos --- */
.alert {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 14px;
    border-width: 1px;
    border-style: solid;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    animation: alertSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.alert-success {
    background-color: var(--success-bg);
    border-color: var(--success-border);
    color: #a7f3d0;
}

.alert-error {
    background-color: var(--danger-bg);
    border-color: var(--danger-border);
    color: #fecdd3;
}

/* Indicador de Status Geral */
.system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid var(--border-subtle);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.4; }
}

/* Health / Calibration Score progress bar */
.health-card-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.health-header-sidebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.health-title-sidebar {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.health-value-sidebar {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--success);
}

.health-bar-container-sidebar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.health-bar-fill-sidebar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-indigo) 0%, var(--accent-pink) 100%);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Novos Estilos Adaptativos e Aceleradores do MFT OS --- */

/* Aceleradores de Prompts ergonômicos */
.prompt-accelerators-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.prompt-pill {
    background: var(--bg-active);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prompt-pill:hover {
    background: var(--border-subtle);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.prompt-pill:active {
    transform: translateY(0);
}

/* Badges e tags industriais de domínio */
.badge-domain {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.badge-domain.accent {
    background: rgba(236, 72, 153, 0.08);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.2);
}

.badge-domain.info {
    background: rgba(6, 182, 212, 0.08);
    color: #22d3ee;
    border-color: rgba(6, 182, 212, 0.25);
}

/* Grid de Informações Detalhadas de Calibração */
.calibration-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.calibration-stat-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
    transition: var(--transition-fast);
}

.calibration-stat-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

.calibration-stat-num {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.calibration-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Detalhes de metas ativas ergonômicos */
.goal-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.goal-strip:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateX(4px);
}

.goal-strip-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    flex-shrink: 0;
}

.goal-strip-content {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
}

/* --- Top Header Premium --- */
.top-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin: 0 -48px 24px -48px;
    height: 64px;
    padding: 0 48px;
    border-bottom: 1px solid var(--border-subtle);
    
    position: sticky;
    top: 0;
    z-index: 100;
    
    background: rgba(9, 9, 11, 0.85); /* Efeito glassmorphism dark */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.light-theme .top-header {
    background: rgba(250, 250, 250, 0.85); /* Efeito glassmorphism light */
}

.header-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    box-shadow: var(--shadow-soft);
}

.header-icon-btn:hover {
    background: var(--bg-active);
    color: var(--text-primary);
    border-color: var(--border-active);
}

.header-icon-btn svg {
    width: 18px;
    height: 18px;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-soft);
}

.header-profile:hover {
    background: var(--bg-active);
    border-color: var(--border-active);
}

.header-profile img {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
}

.header-profile span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-profile svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

/* --- Utilitários --- */
.hidden { display: none !important; }

/* --- Componentes Compartilhados (Landing & Pricing) --- */
:root {
    --nav-height: 60px;
}

.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    transition: var(--transition-fast);
}

.light-theme .landing-header {
    background-color: var(--bg-main);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-box {
    width: 24px;
    height: 24px;
    background: var(--text-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-box svg {
    width: 14px;
    height: 14px;
    color: var(--bg-main);
}

.logo-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

.nav-link {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

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

.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-active);
}

.theme-toggle-btn svg {
    width: 16px;
    height: 16px;
}
