/* Offline Financial Analyzer Styles */
.ofa-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ofa-header {
    text-align: center;
    margin-bottom: 40px;
}

.ofa-header h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.2em;
}

.ofa-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ofa-progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 20%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.ofa-step-indicator {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6c757d;
    transition: all 0.3s ease;
}

.step.active {
    background: #4CAF50;
    color: white;
}

.step.completed {
    background: #28a745;
    color: white;
}

.ofa-step {
    margin-bottom: 30px;
}

.ofa-step h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5em;
}

.ofa-radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.ofa-radio-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: block;
}

.ofa-radio-card:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.ofa-radio-card input[type="radio"] {
    display: none;
}

.ofa-radio-card input[type="radio"]:checked + .card-content {
    color: #4CAF50;
}

.ofa-radio-card input[type="radio"]:checked {
    & + .card-content {
        color: #4CAF50;
    }
    &:checked + .card-content::before {
        content: "✓ ";
        font-weight: bold;
    }
}

.card-content strong {
    display: block;
    font-size: 1.2em;
    margin-bottom: 8px;
}

.card-content p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9em;
}

.ofa-select-wrapper {
    margin-bottom: 20px;
}

.ofa-select-wrapper select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.ofa-select-wrapper select:focus {
    outline: none;
    border-color: #4CAF50;
}

.ofa-data-input {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.input-method-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.method-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.method-option:hover {
    border-color: #4CAF50;
}

.method-option input[type="radio"]:checked + span {
    color: #4CAF50;
    font-weight: bold;
}

.ofa-data-input textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

.ofa-data-input input[type="file"] {
    width: 100%;
    padding: 15px;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.file-info {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 8px;
}

.ofa-commentary {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.ofa-commentary textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
}

.commentary-help {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 10px;
    font-style: italic;
}

.ofa-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 15px;
}

.ofa-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ofa-btn-primary {
    background: #4CAF50;
    color: white;
}

.ofa-btn-primary:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.ofa-btn-secondary {
    background: #6c757d;
    color: white;
}

.ofa-btn-secondary:hover {
    background: #5a6268;
}

.ofa-btn-success {
    background: #28a745;
    color: white;
    font-size: 18px;
    padding: 15px 30px;
}

.ofa-btn-success:hover {
    background: #218838;
    transform: scale(1.05);
}

.ofa-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e9ecef;
    border-top: 6px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ofa-results {
    margin-top: 40px;
}

.ofa-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.analysis-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.meta-item {
    background: #e3f2fd;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #1976d2;
}

.ratios-table-wrapper {
    margin-bottom: 40px;
}

.ofa-ratios-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ofa-ratios-table th,
.ofa-ratios-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.ofa-ratios-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.ratio-name {
    font-weight: 600;
    color: #2c3e50;
}

.ratio-value,
.benchmark-value {
    font-family: monospace;
    font-size: 1.1em;
    font-weight: bold;
}

.status-cell {
    text-align: center;
}

.status-indicator {
    font-size: 1.5em;
    padding: 5px;
    border-radius: 50%;
    display: inline-block;
}

.interpretation {
    font-size: 0.9em;
    color: #6c757d;
    max-width: 200px;
}

.commentary-insights {
    margin-bottom: 40px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.insight-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border-left: 5px solid;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 15px;
}

.insight-positive {
    border-left-color: #28a745;
}

.insight-warning {
    border-left-color: #ffc107;
}

.insight-critical {
    border-left-color: #dc3545;
}

.insight-caution {
    border-left-color: #fd7e14;
}

.insight-info {
    border-left-color: #17a2b8;
}

.insight-neutral {
    border-left-color: #6c757d;
}

.insight-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.insight-content h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.insight-content p {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
}

.ofa-actions {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
    gap: 15px;
    display: flex;
    justify-content: center;
}

@media (max-width: 768px) {
    .ofa-wrapper {
        padding: 20px;
        margin: 10px;
    }
    
    .ofa-radio-group {
        grid-template-columns: 1fr;
    }
    
    .analysis-meta {
        flex-direction: column;
        align-items: center;
    }
    
    .ofa-ratios-table {
        font-size: 0.9em;
    }
    
    .ofa-ratios-table th,
    .ofa-ratios-table td {
        padding: 10px 8px;
    }
    
    .ofa-navigation {
        flex-direction: column;
    }
    
    .ofa-actions {
        flex-direction: column;
    }
}