body {
    font-family: Arial, sans-serif;
    margin: 40px;
    background: #fff;
    line-height: 1.6;
}

h1,
h2,
h3 {
    color: #333;
}

.stats-container {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Stats table styles */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.stats-table th,
.stats-table td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.stats-table th {
    background-color: #e9e9e9;
    font-weight: bold;
}

.stats-table td strong {
    font-weight: bold;
}

.highlight {
    font-weight: bold;
    color: #d14;
}

/* Table container - no fixed height needed */
.table-container {
    margin-bottom: 40px;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

/* Sticky header styles - relative to viewport */
thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

th {
    background-color: #f2f2f2;
    border-bottom: 2px solid #ddd; /* Add a more distinct border */
}

/* Row background color styles - using very light pastel colors */
.bg-graduated {
    background-color: #e6ffee;
    /* very light green */
}

.bg-dropped-out {
    background-color: #ffebeb;
    /* very light red */
}

.bg-passed-probation {
    background-color: #e6f7ff;
    /* very light blue */
}

.bg-not-passed-probation {
    background-color: #fff9e6;
    /* very light yellow */
}

.bg-on-leave {
    background-color: #f2f2f2;
    /* very light gray */
}

.strikethrough {
    text-decoration: line-through;
}

.year-header {
    background: #e9e9e9;
    font-weight: bold;
}

.probation-date {
    color: #ff6600;
    /* orange */
    font-weight: bold;
}

/* Style for "No Data" probation */
.probation-no-data {
    color: #888; /* gray */
    font-weight: bold;
    font-style: italic;
}

/* Style for "Not Started" probation */
.probation-not-started {
    color: #3366cc; /* blue */
    font-weight: bold;
    font-style: italic;
}

/* Legend styles - moved outside table */
.legend-container {
    margin: 20px 0 30px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.legend-color {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: inline-block;
    border: 1px solid #ddd;
}

.legend-graduated {
    background-color: #e6ffee;
}

.legend-dropped-out {
    background-color: #ffebeb;
}

.legend-passed-probation {
    background-color: #e6f7ff;
}

.legend-not-passed-probation {
    background-color: #fff9e6;
}

.legend-on-leave {
    background-color: #f2f2f2;
}

#last-updated {
    font-size: 0.8em;
    color: #888;
    text-align: right;
}

/* Table links inherit text style */
.table-link {
    color: inherit;
    text-decoration: none;
}

.table-link:hover {
    color: #1a4fb0;
    font-weight: 700;
}

/* ---------- Timeline Page ---------- */
.page-shell {
    max-width: 900px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    text-decoration: none;
    color: #3366cc;
    font-weight: bold;
}

.timeline-header {
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #f5f7fb;
    border: 1px solid #e0e6f1;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.timeline-header h1 {
    margin: 0 0 8px 0;
}

.timeline-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.95em;
    color: #555;
}

.timeline {
    position: relative;
    margin: 20px 0 40px 0;
    padding-left: 64px; /* extra space for line + marker */
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 32px; /* vertical line position */
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, #c7d7f7 0%, #a4b8e8 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 18px;
    padding: 12px 16px 12px 18px;
    background: #fff;
    border: 2px solid #e7ecf5;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.timeline-item::before {
    display: none; /* replaced by icon element for better control */
}

.timeline-item.pass {
    border-color: #bfe3cd;
    background: #f5fff8;
}

.timeline-item.fail {
    border-color: #f1b5b5;
    background: #fff5f5;
}

.timeline-item.pending {
    border-color: #f7d9b0;
    background: #fffaf0;
}

.timeline-item.default {
    border-color: #e7ecf5;
    background: #fff;
}

.timeline-icon {
    position: absolute;
    left: -46px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #c7d7f7;
    background: #fff;
}

.icon-default {
    color: #6b8ce9;
}

.icon-convert {
    color: #6dc5a3;
}

.icon-pass {
    color: #4da167;
}

.icon-fail {
    color: #d9534f;
}

.icon-pending {
    color: #f2a154;
}

.timeline-item h3 {
    margin: 0 0 4px 0;
}

.timeline-item .date {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 6px;
}

.timeline-item .note {
    font-size: 0.95em;
    color: #444;
}

.empty-state {
    padding: 16px;
    border: 1px dashed #c7d7f7;
    border-radius: 8px;
    background: #f7f9fe;
    color: #5770b5;
}
