/* ===========================================
   SIMULAITE ENGINE — Addon Styles
   Extends existing styles.css for Simulaite
   wizard steps inside the main SPA
   =========================================== */

/* ===== Dosing Mode Toggle ===== */
.sim-dosing-mode {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.sim-dosing-mode .sim-radio-card {
    flex: 1;
}

/* ===== Extract Config ===== */
.sim-extract-config {
    animation: fadeIn 0.3s ease;
}

.sim-extract-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.sim-effective-dose {
    font-weight: 600;
    color: var(--color-accent);
    white-space: nowrap;
}

.sim-extract-total {
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: rgba(13, 148, 136, 0.06);
    border-radius: 6px;
    font-size: 0.88rem;
    color: #475569;
}

/* ===== Simulaite Progress Bar ===== */
.sim-progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: 1.5rem 0 0.75rem;
    overflow: hidden;
}

.sim-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    width: 25%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sim-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.sim-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.sim-step.active {
    opacity: 1;
}

.sim-step.completed {
    opacity: 0.8;
}

.sim-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.sim-step.active .sim-step-number {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.sim-step.completed .sim-step-number {
    background: var(--color-accent);
    color: white;
}

.sim-step-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

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

/* ===== Simulaite Form Steps ===== */
.sim-form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.sim-form-step.active {
    display: block;
}

/* Keep the Find button compact (override global btn-primary flex:1) */
.sim-search-box-inline .btn-primary {
    flex: 0 0 auto;
}

/* Right-align nav buttons to match R&D Agent style */
.sim-form-step .button-group {
    justify-content: flex-end;
}

.sim-form-step .button-group .btn-primary {
    flex: 0 0 auto;
}


/* ===== Search Section ===== */
.sim-search-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.sim-search-box-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease;
}

.sim-search-box-inline:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.sim-search-box-inline i {
    color: #94a3b8;
}

.sim-search-box-inline input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    color: #0f172a;
    padding: 0.35rem 0;
}

.sim-search-box-inline input::placeholder {
    color: #94a3b8;
}

.sim-search-alt-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

.sim-smiles-row {
    display: flex;
    gap: 0.5rem;
}

.sim-smiles-field {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    color: #0f172a;
}

.sim-smiles-field:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* ===== Status Messages ===== */
.sim-status-msg {
    min-height: 0;
    transition: all 0.3s ease;
    font-size: 0.88rem;
    border-radius: 8px;
}

.sim-status-msg.loading {
    padding: 0.75rem 1rem;
    background: rgba(13, 148, 136, 0.08);
    color: var(--color-accent);
}

.sim-status-msg.error {
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.sim-status-msg.success {
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}

/* ===== GNN Info Banner ===== */
.sim-gnn-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.06) 0%, rgba(26, 54, 93, 0.06) 100%);
    border-radius: 8px;
    border-left: 3px solid var(--color-accent);
    margin-bottom: 1.5rem;
}

.sim-gnn-info i {
    color: var(--color-accent);
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.sim-gnn-info span {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.55;
}

/* ===== Molecule Grid ===== */
.sim-molecule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.sim-molecule-card {
    padding: 1rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    animation: fadeIn 0.3s ease;
}

.sim-molecule-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.15);
}

.sim-molecule-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.3rem;
}

.sim-molecule-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.sim-molecule-smiles {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

.sim-molecule-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.sim-mol-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.sim-mol-btn-add:hover {
    background: var(--color-primary-light);
}

.sim-mol-btn-del {
    background: transparent;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.sim-mol-btn-del:hover {
    background: #fef2f2;
}

.sim-empty-msg {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    grid-column: 1 / -1;
}

.sim-empty-msg i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.35;
}

/* ===== Recipe Buttons ===== */
.sim-recipe-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

/* ===== Ingredients Table ===== */
.sim-ingredients-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.sim-ingredients-table {
    width: 100%;
    border-collapse: collapse;
}

.sim-ingredients-table th {
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.sim-ingredients-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.sim-ingredients-table tr:last-child td {
    border-bottom: none;
}

.sim-ingredient-name {
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sim-ingredient-name i {
    color: var(--color-accent);
}

.sim-ingredient-dose {
    width: 100px;
    padding: 0.4rem 0.6rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: right;
    transition: border-color 0.2s ease;
}

.sim-ingredient-dose:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.sim-btn-remove {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.sim-btn-remove:hover {
    background: #fef2f2;
    color: #ef4444;
}

.sim-empty-ingredients {
    text-align: center;
    padding: 2.5rem;
    color: #94a3b8;
}

.sim-empty-ingredients i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.4;
}

/* ===== Delivery & Formulation Type ===== */
.sim-delivery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.sim-col-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.sim-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sim-radio-card {
    display: block;
    cursor: pointer;
}

.sim-radio-card input {
    display: none;
}

.sim-radio-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #475569;
}

.sim-radio-content i {
    font-size: 1.1rem;
    color: #94a3b8;
    transition: color 0.2s ease;
    width: 20px;
    text-align: center;
}

.sim-radio-card input:checked + .sim-radio-content {
    border-color: var(--color-accent);
    background: rgba(13, 148, 136, 0.05);
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.sim-radio-card input:checked + .sim-radio-content i {
    color: var(--color-accent);
}

.sim-radio-card:hover .sim-radio-content {
    border-color: var(--color-accent-light);
}

/* ===== Formulation Parameters ===== */
.sim-params-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
    animation: fadeIn 0.3s ease;
}

.sim-params-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sim-params-title i {
    color: var(--color-accent);
}

.sim-param-group {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.75rem;
    animation: fadeIn 0.3s ease;
}

.sim-param-group h4 {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.sim-param-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.sim-param-row .input-group {
    flex: 1;
    min-width: 120px;
}

/* ===== Population ===== */
.sim-pop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sim-slider-field {
    grid-column: 1 / -1;
}

.sim-slider-field label strong {
    color: var(--color-accent);
}

.pop-default-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 400;
    font-style: italic;
}

.pop-reset-link {
    font-size: 0.78rem;
    color: var(--color-accent);
    font-weight: 500;
    cursor: pointer;
    margin-left: 0.4rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pop-reset-link:hover {
    color: #0f766e;
}

.sim-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    margin-top: 0.5rem;
}

.sim-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
    transition: transform 0.2s ease;
}

.sim-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.sim-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

.sim-dual-range {
    position: relative;
    height: 30px;
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.sim-dual-range .sim-range {
    position: absolute;
    width: 100%;
    pointer-events: none;
    background: transparent;
    margin-top: 0;
}

.sim-dual-range .sim-range::-webkit-slider-thumb {
    pointer-events: all;
}

.sim-dual-range .sim-range::-moz-range-thumb {
    pointer-events: all;
}

/* ===== Modal ===== */
.sim-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.sim-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.sim-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.sim-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.sim-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

.sim-recipe-card {
    padding: 1rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.sim-recipe-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.15);
}

.sim-recipe-card h4 {
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.3rem;
}

.sim-recipe-card p {
    font-size: 0.82rem;
    color: #64748b;
}

.sim-recipe-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ===== Toast ===== */
.sim-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-primary);
    color: white;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.sim-toast.visible {
    transform: translateX(-50%) translateY(0);
}

/* ===== Sub-panels (Step 1: Ingredients) ===== */
.sim-sub-panel {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s ease;
}

.sim-sub-panel:hover {
    border-color: #cbd5e1;
}

.sim-sub-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sim-sub-panel-title i {
    color: var(--color-accent);
    font-size: 0.95rem;
}

.sim-sub-panel-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 0.75rem 0;
}

/* ===== Extract Molecule Picker ===== */
.sim-extract-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.sim-pick-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
    font-family: inherit;
    transition: all 0.2s ease;
}

.sim-pick-chip i {
    font-size: 0.7rem;
    color: var(--color-accent);
}

.sim-pick-chip:hover {
    border-color: var(--color-accent);
    background: rgba(13, 148, 136, 0.05);
    color: #0f172a;
}

/* Sub-rows for extract active dose breakdown */
.sim-sub-row td {
    background: #f8fafc;
    border-top: none !important;
    padding-top: 0.15rem !important;
    padding-bottom: 0.15rem !important;
}

/* ===== Formulation Tabs ===== */
.sim-formulation-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
    overflow-x: auto;
}

.sim-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 8px 8px 0 0;
    border: 2px solid transparent;
    border-bottom: none;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    bottom: -2px;
}

.sim-tab:hover {
    background: #e2e8f0;
    color: #334155;
}

.sim-tab.active {
    background: white;
    color: var(--color-accent);
    border-color: #e2e8f0;
    border-bottom-color: white;
}

.sim-tab-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 2px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.sim-tab-close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.sim-tab-add {
    background: transparent;
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
    padding: 0.6rem 0.75rem;
    border-bottom: none;
}

.sim-tab-add:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(13, 148, 136, 0.05);
}

/* ===== Styled Selects (all dropdowns in Simulaite) ===== */

/* Base styling for ALL selects in sim-form-step */
.sim-form-step select,
.sim-pop-grid select {
    width: 100%;
    padding: 0.7rem 2.2rem 0.7rem 0.85rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    color: #0f172a;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E") no-repeat right 0.85rem center;
    background-size: 10px 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
}

.sim-form-step select:hover,
.sim-pop-grid select:hover {
    border-color: #cbd5e1;
    background-color: white;
}

.sim-form-step select:focus,
.sim-pop-grid select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
    background-color: white;
}

/* Recipe selector — has left icon, so extra left padding */
.sim-recipe-selector-wrap {
    margin-bottom: 1.5rem;
}

.sim-recipe-selector-wrap > label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 0.5rem;
}

.sim-recipe-selector-wrap > label i {
    color: var(--color-accent);
    font-size: 0.85rem;
}

.sim-select-styled {
    position: relative;
    display: flex;
    align-items: center;
}

.sim-select-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--color-accent);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.sim-select-arrow {
    position: absolute;
    right: 0.85rem;
    color: #94a3b8;
    font-size: 0.75rem;
    pointer-events: none;
    transition: transform 0.2s ease;
}

/* Override padding for selects with left icon */
.sim-select-styled select {
    padding-left: 2.5rem;
}

/* ===== Bioavailability Target Checkboxes (Step 4) ===== */
.sim-bio-targets {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.sim-bio-target-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.sim-bio-target-item:hover {
    border-color: #cbd5e1;
    background: white;
}

.sim-bio-target-item input[type="checkbox"] {
    display: none;
}

.sim-bio-target-check {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: transparent;
    font-size: 0.7rem;
}

.sim-bio-target-item input:checked ~ .sim-bio-target-check {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.sim-bio-target-item input:checked ~ .sim-bio-target-check ~ .sim-bio-target-icon {
    color: var(--color-accent);
}

.sim-bio-target-icon {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.sim-bio-target-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: #0f172a;
}

/* ===== Results Panel ===== */
#simResultsPanel {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.sim-results-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.25rem 0;
}

.sim-results-header h3 i {
    color: var(--color-accent);
}

.sim-results-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1.25rem 0;
}

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

.sim-result-card {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sim-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sim-result-card.baseline {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fbbf24;
}

.sim-result-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.sim-result-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
}

.sim-result-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #fbbf24;
    color: #78350f;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.sim-result-f {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.sim-result-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}

.sim-result-value.sim-result-na {
    font-size: 0.9rem;
    font-weight: 500;
    color: #94a3b8;
}

.sim-result-sd {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.sim-result-cv {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.sim-result-fold {
    font-size: 0.82rem;
    color: #059669;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sim-result-fold.baseline-label {
    color: #b45309;
}

.sim-results-note {
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ===== Formulation Content ===== */
.sim-formulation-content {
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sim-formulation-content .input-group label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 0.35rem;
    display: block;
}

.sim-formulation-content .input-group input[type="text"],
.sim-formulation-content .input-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.sim-formulation-content .input-group input[type="text"]:focus,
.sim-formulation-content .input-group select:focus {
    border-color: var(--color-accent);
    outline: none;
}

.sim-params-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sim-params-title i {
    color: var(--color-accent);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sim-delivery-grid {
        grid-template-columns: 1fr;
    }

    .sim-pop-grid {
        grid-template-columns: 1fr;
    }

    .sim-molecule-grid {
        grid-template-columns: 1fr;
    }

    .sim-formulation-tabs {
        flex-wrap: wrap;
    }

    .sim-formulation-content {
        padding: 1rem;
    }
}
