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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #111827;
    color: #F3F4F6;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
header {
    margin-bottom: 2rem;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.2s;
}

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

.back-link svg {
    width: 1.5rem;
    height: 1.5rem;
}

.lang-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.lang-btn.inactive {
    background-color: #1F2937;
    color: #D1D5DB;
}

.lang-btn.inactive:hover {
    background-color: #374151;
}

.lang-btn.active {
    background-color: #2563EB;
    color: #FFFFFF;
}

h1 {
    font-size: 2.25rem;
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #9CA3AF;
    font-size: 1rem;
}

/* Card Styles */
.card {
    background-color: #1F2937;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #374151;
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

/* Table Styles */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #111827;
}

th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tbody tr {
    border-top: 1px solid #374151;
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #1F2937;
}

td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
}

.checkpoint-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #F3F4F6;
}

.checkpoint-code {
    font-size: 0.875rem;
    color: #6B7280;
}

/* Mobile Responsive Table */
@media (max-width: 767px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead {
        display: none;
    }
    
    tbody tr {
        margin-bottom: 1rem;
        background-color: #111827;
        border: 1px solid #374151;
        border-radius: 0.5rem;
        padding: 1rem;
    }
    
    tbody tr:hover {
        background-color: #1F2937;
    }
    
    td {
        padding: 0.5rem 0;
        text-align: left;
        border: none;
        white-space: normal;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* First cell (checkpoint) takes full width without label */
    td:first-child {
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
        border-bottom: 1px solid #374151;
        display: block;
    }
    
    td:first-child:before {
        display: none;
    }
    
    .checkpoint-name {
        font-size: 1rem;
        margin-bottom: 0.25rem;
        text-align: left;
    }
    
    .checkpoint-code {
        font-size: 0.75rem;
        text-align: left;
    }
    
    /* Other cells show label */
    td:not(:first-child):before {
        content: attr(data-label);
        font-weight: 600;
        color: #9CA3AF;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
        margin-right: 1rem;
    }
    
    .no-data {
        text-align: center;
        padding: 2rem 1rem;
    }
}

.badge {
    padding: 0.25rem 0.75rem;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge.green {
    background-color: #064E3B;
    color: #6EE7B7;
}

.badge.yellow {
    background-color: #78350F;
    color: #FCD34D;
}

.badge.red {
    background-color: #7F1D1D;
    color: #FCA5A5;
}

.badge.gray {
    background-color: #374151;
    color: #D1D5DB;
}

.last-updated {
    font-size: 0.875rem;
    color: #9CA3AF;
}

.no-data {
    padding: 1.5rem;
    text-align: center;
    color: #6B7280;
}

/* Chart Controls */
.chart-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-controls label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9CA3AF;
    margin-bottom: 0.25rem;
}

.chart-controls select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: #374151;
    border: 1px solid #4B5563;
    color: #F3F4F6;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.chart-controls select:focus {
    outline: none;
    ring: 2px;
    ring-color: #3B82F6;
    border-color: #3B82F6;
}

/* Home Page Styles */
.home-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.home-header {
    padding: 1.5rem;
}

.home-header .container {
    display: flex;
    justify-content: flex-end;
}

.home-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.home-content {
    max-width: 56rem;
    width: 100%;
}

.home-title {
    text-align: center;
    margin-bottom: 3rem;
}

.home-title h1 {
    font-size: 3rem;
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.home-title p {
    font-size: 1.25rem;
    color: #9CA3AF;
}

.direction-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.direction-card {
    background-color: #1F2937;
    border: 2px solid #374151;
    border-radius: 1rem;
    padding: 2rem;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.direction-card:hover {
    transform: scale(1.05);
    background-color: #1F2937;
}

.direction-card.blue:hover {
    border-color: #3B82F6;
}

.direction-card.green:hover {
    border-color: #10B981;
}

.direction-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.direction-card-icon {
    margin-bottom: 1.5rem;
}

.direction-card-icon svg {
    width: 6rem;
    height: 6rem;
    transition: color 0.3s;
}

.direction-card.blue .direction-card-icon svg {
    color: #3B82F6;
}

.direction-card.blue:hover .direction-card-icon svg {
    color: #60A5FA;
}

.direction-card.green .direction-card-icon svg {
    color: #10B981;
}

.direction-card.green:hover .direction-card-icon svg {
    color: #34D399;
}

.direction-card h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.direction-card-subtitle {
    color: #9CA3AF;
    margin-bottom: 1rem;
}

.direction-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: gap 0.3s;
}

.direction-card:hover .direction-indicator {
    gap: 1rem;
}

.direction-card.blue .direction-indicator {
    color: #3B82F6;
}

.direction-card.green .direction-indicator {
    color: #10B981;
}

.direction-indicator svg {
    width: 1.5rem;
    height: 1.5rem;
}

.footer {
    padding: 1.5rem;
    text-align: center;
    color: #6B7280;
    font-size: 0.875rem;
}

/* Mobile Header Adjustments */
@media (max-width: 767px) {
    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .lang-switcher {
        width: 100%;
        justify-content: flex-end;
    }
    
    h1 {
        font-size: 1.875rem;
    }
    
    .home-title h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card h2 {
        font-size: 1.25rem;
    }
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    .direction-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .chart-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
    
    .chart-filter {
        flex: 0 0 auto;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .home-title h1 {
        font-size: 3.75rem;
    }
}

@media (min-width: 640px) {
    .chart-filters-row {
        flex-direction: row;
    }
}

.chart-filters-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.chart-filter {
    flex: 1;
}

@media (min-width: 768px) {
    .chart-filters-row {
        width: auto;
    }
    
    .chart-filter {
        flex: 0 0 auto;
        min-width: 200px;
    }
}

/* Chart Container */
#chart {
    margin-top: 1rem;
    min-height: 300px;
}

@media (max-width: 767px) {
    #chart {
        margin-left: -1rem;
        margin-right: -1rem;
    }
    
    .chart-controls h2 {
        font-size: 1.25rem;
    }
}

/* Utility Classes */
.mb-8 {
    margin-bottom: 2rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

