:root {
    /* Paleta Médica / Científica */
    --bg-main: #f4f7f9;
    --bg-panel: #ffffff;
    --bg-sidebar: #111827;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #f9fafb;
    
    --primary: #0284c7; /* Azul Médico */
    --primary-hover: #0369a1;
    --secondary: #0f766e; /* Teal Patologia */
    
    --danger: #ef4444; /* Alto risco */
    --warning: #f59e0b; /* Risco Moderado */
    --success: #10b981; /* Baixo Risco */
    
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid #1f2937;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-header h1 span {
    color: var(--primary);
}

.subtitle {
    font-size: 0.85rem;
    color: #9ca3af;
}

.nav-links {
    list-style: none;
    padding: 20px 0;
    flex-grow: 1;
}

.nav-btn {
    width: 100%;
    text-align: left;
    padding: 15px 24px;
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 1rem;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn:hover {
    background-color: #1f2937;
    color: #fff;
}

.nav-btn.active {
    background-color: var(--primary);
    color: #fff;
    border-left: 4px solid #38bdf8;
}

.nav-btn i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    border-top: 1px solid #1f2937;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    background-color: var(--bg-panel);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: 10;
}

.top-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-actions .icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 15px;
    transition: color 0.2s;
}

.header-actions .icon-btn:hover {
    color: var(--primary);
}

.content-wrapper {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    position: relative;
}

/* Tabs */
.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

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

/* Panels */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.panel {
    background-color: var(--bg-panel);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.full-panel {
    width: 100%;
}

.panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 10px;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #4b5563;
}

select, input[type="text"], input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

select:focus, input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.input-with-btn {
    display: flex;
    gap: 10px;
}

.divider {
    text-align: center;
    margin: 15px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    position: relative;
}

.divider::before, .divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: var(--border);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

/* Molecular Viewer */
.molecule-canvas-container {
    width: 100%;
    height: 300px;
    background-color: #f9fafb;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.placeholder-text {
    color: #94a3b8;
    font-size: 0.9rem;
    font-style: italic;
}

.viewer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Prediction Grid */
.prediction-grid {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.dili-score-box {
    flex: 1;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.dili-score-box h4 {
    margin-bottom: 15px;
    color: #475569;
}

.score-gauge {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--border) 100%, transparent 0);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.score-gauge::before {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: #f8fafc;
    border-radius: 50%;
}

.score-text {
    position: relative;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.classification-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.proxies-container {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.proxy-card {
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.proxy-card .status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status.high { background-color: var(--danger); }
.status.med { background-color: var(--warning); }
.status.low { background-color: var(--success); }

/* Calculator */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.result-box {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: var(--radius);
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.big-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
    color: var(--primary);
}

.status-indicator {
    font-size: 2.5rem;
    margin: 10px 0;
    color: #94a3b8;
}

/* Pathway Simulator */
.hepatocyte-diagram {
    width: 100%;
    height: 400px;
    background-color: #fdfdfd;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
}

.cell-organelle {
    position: absolute;
    padding: 10px 15px;
    background-color: white;
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.mitochondria { top: 60%; left: 20%; border-color: #eab308; }
.er { top: 30%; left: 40%; border-color: #8b5cf6; }
.canaliculi { top: 40%; right: 10%; border-color: #10b981; }

.cell-organelle.active {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    border-color: var(--danger);
}

.drug-properties {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8fafc;
    border-radius: 6px;
    font-size: 0.85rem;
}

.drug-properties code {
    font-family: var(--font-mono);
    color: var(--secondary);
    font-weight: bold;
}
