/* MLOps Audit Calculator Styles */

/* Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    margin: 0;
    padding: 0;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 5rem 0 2rem 0;
    margin-top: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Navigation Tabs */
.nav-tabs {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 60px; /* Account for site navigation */
    z-index: 100;
}

.nav-tabs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.nav-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

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

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

.nav-tab span {
    font-size: 1.1rem;
    display: inline-block;
    line-height: 1;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

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

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

/* Section */
.section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.section h3 {
    color: var(--dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Maturity Assessment Styles */
.maturity-questions {
    margin: 2rem 0;
}

.dimension-section {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #dbeafe;
}

.dimension-section h3 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.questions-grid {
    display: grid;
    gap: 1.5rem;
}

.question-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.question-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.question-item label {
    font-weight: 500;
    color: var(--dark);
}

.question-item select {
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    min-width: 180px;
    transition: border-color 0.2s;
}

.question-item select:focus {
    outline: none;
    border-color: var(--primary);
}

.score-indicator {
    background: var(--border);
    color: var(--dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 30px;
    text-align: center;
}

.score-indicator.score-excellent { 
    background: linear-gradient(135deg, #10b981, #059669); 
    color: white; 
}
.score-indicator.score-good { 
    background: linear-gradient(135deg, #3b82f6, #2563eb); 
    color: white; 
}
.score-indicator.score-fair { 
    background: linear-gradient(135deg, #f59e0b, #d97706); 
    color: white; 
}
.score-indicator.score-poor { 
    background: linear-gradient(135deg, #ef4444, #dc2626); 
    color: white; 
}
.score-indicator.score-critical { 
    background: linear-gradient(135deg, #991b1b, #7f1d1d); 
    color: white; 
}

.dimension-score {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dbeafe;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.dimension-score .score-value {
    font-size: 1.5rem;
    color: var(--primary);
}

.score-value.score-excellent { color: #10b981; }
.score-value.score-good { color: #3b82f6; }
.score-value.score-fair { color: #f59e0b; }
.score-value.score-poor { color: #ef4444; }
.score-value.score-critical { color: #991b1b; }

/* Overall Maturity Score */
.overall-maturity-score {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.overall-maturity-score h3 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.score-gauge {
    width: 100%;
    height: 60px;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 30px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}

.score-fill.score-excellent { 
    background: linear-gradient(90deg, #10b981, #059669); 
}
.score-fill.score-good { 
    background: linear-gradient(90deg, #3b82f6, #2563eb); 
}
.score-fill.score-fair { 
    background: linear-gradient(90deg, #f59e0b, #d97706); 
}
.score-fill.score-poor { 
    background: linear-gradient(90deg, #ef4444, #dc2626); 
}
.score-fill.score-critical { 
    background: linear-gradient(90deg, #991b1b, #7f1d1d); 
}

.maturity-level {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: white;
    border-radius: 25px;
    display: inline-block;
}

.maturity-level.level-excellent { 
    color: #10b981; 
    border: 2px solid #10b981; 
}
.maturity-level.level-good { 
    color: #3b82f6; 
    border: 2px solid #3b82f6; 
}
.maturity-level.level-fair { 
    color: #f59e0b; 
    border: 2px solid #f59e0b; 
}
.maturity-level.level-poor { 
    color: #ef4444; 
    border: 2px solid #ef4444; 
}
.maturity-level.level-critical { 
    color: #991b1b; 
    border: 2px solid #991b1b; 
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Assessment Tables */
.assessment-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow-x: auto;
    display: block;
}

.assessment-table th {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.assessment-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.assessment-table tr:hover {
    background: var(--light);
}

.assessment-table input,
.assessment-table select {
    width: 100%;
    min-width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.remove-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.remove-btn:hover {
    background: #dc2626;
}

/* Score Display */
.score-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.score-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.score-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.score-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

/* Gap Score */
.gap-score {
    font-weight: bold;
    text-align: center;
}

.gap-score.low { 
    color: #10b981; 
}
.gap-score.medium { 
    color: #f59e0b; 
}
.gap-score.high { 
    color: #ef4444; 
}

/* Button Group */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.alert-info {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    color: #1e40af;
}

.alert-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .question-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .dimension-score {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .nav-tabs-container {
        padding: 0 1rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .assessment-table {
        font-size: 0.9rem;
    }
    
    .assessment-table th,
    .assessment-table td {
        padding: 0.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}