/* 
 * PeerEval - Modern CSS Styling
 * Clean, Professional, No Annoying Animations
 */

/* ===== CSS Variables ===== */
:root {
    --primary: #4B2E83;
    --primary-light: #6B4E9E;
    --primary-dark: #3A2366;
    --secondary: #E8E3F3;
    --accent: #00C9A7;
    --dark: #1a1a2e;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* ===== Base Styles ===== */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
}

main {
    flex: 1;
}

.container {
    max-width: 1200px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--gray-800);
}

.lead {
    font-weight: 400;
    color: var(--gray-500);
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: white;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    color: white;
    border-bottom: none;
}

.card-body {
    padding: 1.5rem;
}

/* ===== Buttons ===== */
.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.25rem;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e4606d 100%);
    border: none;
}

/* ===== Forms ===== */
.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(75, 46, 131, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Range Inputs */
input[type="range"] {
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--gray-200);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    cursor: pointer;
    border: none;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.range-labels span {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.range-labels span.active {
    color: var(--primary);
    font-weight: 700;
}

/* ===== Alerts ===== */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #e7f3ff 0%, #cce5ff 100%);
    color: #004085;
}

.alert-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, rgba(75, 46, 131, 0.15) 100%);
    color: var(--primary-dark);
}

/* ===== Tables ===== */
.table {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-700);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-color: var(--gray-200);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(75, 46, 131, 0.04);
}

/* ===== Accordion ===== */
.accordion-item {
    border: none;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-button {
    font-weight: 600;
    padding: 1rem 1.25rem;
    background: white;
    color: var(--gray-800);
}

.accordion-button:not(.collapsed) {
    background: var(--secondary);
    color: var(--primary);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--gray-200);
}

.accordion-button::after {
    background-size: 1rem;
}

.accordion-body {
    padding: 1.25rem;
    background: white;
}

/* ===== Navigation Tabs ===== */
.nav-tabs {
    border-bottom: 2px solid var(--gray-200);
}

.nav-tabs .nav-link {
    color: var(--gray-500);
    font-weight: 500;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    font-weight: 600;
    background: white;
    border-bottom: 3px solid var(--primary);
}

/* ===== Badges ===== */
.badge {
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 6px;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffcd39 100%) !important;
    color: #212529;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e4606d 100%) !important;
}

/* ===== Progress Bars ===== */
.progress {
    height: 10px;
    border-radius: 5px;
    background: var(--gray-200);
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 5px;
}

/* ===== Insights Section ===== */
.insights-content {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 0.75rem;
}

.insight-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.insight-section:last-child {
    margin-bottom: 0;
}

.insight-section h6 {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.insight-section p, .insight-section ul {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin-bottom: 0;
}

.insight-section ul {
    padding-left: 1.25rem;
}

.insight-section ul li {
    margin-bottom: 0.25rem;
}

/* ===== Stat Cards ===== */
.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: white;
    font-size: 1.25rem;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ===== Loading States ===== */
.spinner-border {
    color: var(--primary);
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    h4 {
        font-size: 1.2rem;
    }
    
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .btn, 
    .accordion-button,
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
    }
    
    input[type="range"]::-moz-range-thumb {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .row > [class*="col-"] {
        margin-bottom: 0.75rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar, .footer-modern, .btn, form, .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    
    .card-header {
        background: #f8f9fa !important;
        color: #000 !important;
    }
    
    .accordion-collapse {
        display: block !important;
    }
    
    .collapse:not(.show) {
        display: block !important;
    }
    
    .container {
        max-width: 100% !important;
        width: 100% !important;
    }
}
