/* Base Styles */
body {
    font-family: sans-serif;
    color: #495057;
    background-color: #fff;
}

p {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 1rem;
}

li {
    font-size: 1rem;
}

/* Headings and Text Colors */
h1, h2, h3, h4, h5, h6 { 
    color: #0785F2; 
}

.text-primary { 
    color: #0785F2 !important; 
}

.text-muted-light { 
    color: #6c757d !important; 
}

/* Header Styles */
.header-title { 
    margin-bottom: 0.1rem; 
    font-size: 2rem; 
}

.header-subtitle { 
    font-size: 1.75rem; 
    font-weight: 400; 
    margin-bottom: 1rem; 
    color: #0785F2; 
}

.back-link { 
    color: #6c757d; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    margin-bottom: 1rem; 
    font-size: 0.9rem; 
}

.back-link i { 
    margin-right: 8px;
}

.back-link:hover { 
    color: #495057;
}

/* Button Styles */
.btn {
    font-size: 1rem;
}

.btn-lg {
    font-size: 1rem;
    padding: 0.35rem 0.9rem;
}

.btn-analyse-large {
    font-size: 1.2rem;
    padding: 0.75rem 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-analyse-large i {
    margin-left: 8px;
    font-size: 1.1rem;
}

/* Download Buttons */
.btn-download {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 0.3rem;
    color: white;
    text-align: left;
    line-height: 1.3;
    text-decoration: none;
    transition: opacity 0.2s ease-in-out;
}

.btn-download:hover {
    color: white;
    opacity: 0.9;
}

.btn-download i {
    font-size: 1.8rem;
    margin-left: 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.5rem;
    border-radius: 0.2rem;
    line-height: 1;
}

.btn-download-excel { background-color: #1D6F42; }
.btn-download-word { background-color: #0D6EFD; }
.btn-download-pdf { background-color: #DC3545; }

/* Card Styles */
.card { 
    border: 1px solid #e9ecef; 
    border-radius: 0.3rem; 
}

.card-body { 
    padding: 1.5rem; 
}

.card-title { 
    font-size: 1.1rem; 
    font-weight: 600; 
    margin-bottom: 1rem; 
    color: #343a40; 
}

/* Stepper Styles */
.stepper-wrapper {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
}

.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    font-weight: normal;
}

@media (max-width: 768px) {
    .stepper-item {
        font-size: 12px;
    }
}

.stepper-item::before {
    position: absolute;
    content: "";
    border-bottom: 2px solid #ACB5B8;
    width: 100%;
    top: 20px;
    left: -50%;
    z-index: 2;
}

.stepper-item::after {
    position: absolute;
    content: "";
    border-bottom: 2px solid #ACB5B8;
    width: 100%;
    top: 20px;
    left: 50%;
    z-index: 2;
}

.stepper-item .step-counter {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ccc;
    color: white;
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 6px;
}

.stepper-item .step-name {
    font-size: 20px;
    color: #ccc;
    text-align: center;
}

.stepper-item.active .step-counter {
    background-color: #0785F2;
    color: white;
}

.stepper-item.active .step-name {
    font-size: 20px;
    color: #0785F2;
    text-align: center;
}

.stepper-item.completed .step-counter {
    background-color: white;
    color: #0785F2;
    border: 2px solid #0785F2;
}

.stepper-item.completed .step-name {
    font-size: 20px;
    color: #0785F2;
    text-align: center;
}

.stepper-item.completed::after {
    position: absolute;
    content: "";
    border-bottom: 2px solid #0785F2;
    width: 100%;
    top: 20px;
    left: 50%;
    z-index: 3;
}

.stepper-item:first-child::before {
    content: none;
}

.stepper-item:last-child::after {
    content: none;
}

/* Table Styles */
.table { 
    margin-bottom: 0; 
    font-size: 0.95rem; 
}

.table thead th { 
    background-color: #f8f9fa; 
    border-bottom-width: 1px; 
    font-weight: 600; 
    color: #495057; 
    padding: 0.6rem 1rem; 
    white-space: nowrap; 
}

.table td, .table th { 
    padding: 0.6rem 1rem; 
    vertical-align: middle; 
}

.table-striped > tbody > tr:nth-of-type(odd) > * { 
    --bs-table-accent-bg: rgba(0, 0, 0, 0.02); 
}

.table td:first-child { 
    white-space: normal; 
}

/* Stats Box Styles */
.stat-box { 
    text-align: center; 
    padding: 10px 5px; 
}

.stat-number { 
    display: block; 
    font-size: 2.2rem; 
    font-weight: bold; 
    color: #0785F2; 
    line-height: 1.1; 
}

.stat-label { 
    display: block; 
    font-size: 0.85rem; 
    color: #6c757d; 
    margin-top: 5px; 
    text-transform: lowercase; 
}

/* Progress Bar Styles */
#progress-container { 
    display: none; 
    margin-top: 2rem; 
}

#progress-container h5 { 
    font-size: 1rem; 
    color: #343a40; 
    margin-bottom: 0.5rem; 
}

.progress { 
    height: 1.2rem; 
}

.progress-bar { 
    background-color: #0785F2; 
}

#status-message { 
    font-size: 0.9rem; 
    color: #6c757d; 
    margin-top: 0.5rem; 
}

/* Analysis Overview Styles */
.analysis-overview-scrollable {
    height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #dee2e6;
    border-radius: 0.3rem;
    padding: 5px;
}

.analysis-overview-scrollable > .card { 
    margin-bottom: 1rem; 
}

.analysis-overview-scrollable > .card:last-child { 
    margin-bottom: 0; 
}

/* Layout Helpers */
.button-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.download-buttons-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Collapse Styles */
.collapse-icon {
    transition: transform 0.3s ease;
}

.btn-link.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

/* Chart Styles */
.chart-thumbnail.active {
    background-color: var(--bs-primary) !important;
    color: white !important;
}

/* Upload Area Styles */
.upload-area {
    background-color: #e6f2ff;
    border: 2px dashed #99ccff;
    border-radius: 8px;
    padding: 1.25rem 0.5rem;
    text-align: center;
    width: 95%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Intro Text */
.intro-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #343a40;
}

/* Upload Tab Styles */
.nav-tabs .nav-link {
    color: #0785F2;
    border: 1px solid transparent;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    isolation: isolate;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

.tab-content {
    border: 0px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

.upload-area.highlight {
    border-color: #0785F2;
    background-color: #e6f3ff;
}