/* GENERAL STYLING */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-align: center;
    padding: 0;
    margin: 0;
    color: #333;
    background: linear-gradient(to bottom, #8b007f 0%, #006dea 450px, white 450px, white 100%);
    min-height: 100vh;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}

/* TOP SECTION */
.top-section {
    color: white;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
}

/* HEADINGS */
h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: white;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.subheading {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

/* DAYS COUNTER */
#daysCounter {
    font-size: 4.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 25px;
}

/* LOADING INDICATOR */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-indicator p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

/* TABLE CONTAINERS */
#contractsTableContainer,
#last90DaysTableContainer {
    margin: 20px auto;
    width: 100%;
}

/* TRADITIONAL TABLES */
.traditional-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 10px auto;
    display: table;
    color: #333;
}

/* TABLE HEADERS */
.traditional-table th {
    background: #f5f7fa;
    color: #0e4c92;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eaedf2;
}

/* Add specific styling for the Amount header */
.traditional-table th:first-child {
    text-align: left;
}

/* TABLE ROWS */
.traditional-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eaedf2;
    text-align: left;
}

.traditional-table tr:last-child td {
    border-bottom: none;
}

/* HOVER EFFECT */
.traditional-table tr:hover {
    background: #f9fafc;
}

/* CURRENCY FORMATTING */
.currency-cell {
    position: relative;
    white-space: nowrap;
    color: #333;
    font-family: 'Inter', monospace;
    padding-right: 16px;
    padding-left: 16px;
    font-weight: normal;
}

.dollar-sign {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: normal;
}

.currency-value {
    display: block;
    text-align: right;
    width: 100%;
}

/* CENTER TEXT */
.center-text {
    text-align: center;
}

/* SHOW MORE BUTTON */
.show-more {
    margin-top: 30px;
    margin-bottom: 30px;
}

.show-more-link {
    font-size: 16px;
    font-weight: 600;
    color: #0e4c92;
    text-decoration: none;
    transition: 0.2s;
    background-color: rgba(14, 76, 146, 0.1);
    padding: 10px 20px;
    border-radius: 6px;
    display: inline-block;
}

.show-more-link:hover {
    background-color: rgba(14, 76, 146, 0.2);
}

/* 90-DAY HEADER */
#last90DaysHeader {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0e4c92;
    margin-top: 50px;
    margin-bottom: 30px;
}

/* ERROR CONTAINER */
#errorContainer {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    margin: 20px auto;
    max-width: 800px;
    text-align: left;
    color: #d32f2f;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    body {
        background: linear-gradient(to bottom, #8b007f 0%, #006dea 400px, white 400px, white 100%);
    }
    
    .container {
        padding: 20px 10px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    #daysCounter {
        font-size: 3.5rem;
    }
    
    .traditional-table {
        font-size: 14px;
    }
    
    .traditional-table th,
    .traditional-table td {
        padding: 10px 8px;
    }
    
    /* Adjust spacing for mobile */
    #last90DaysHeader {
        margin-top: 40px;
        margin-bottom: 20px;
    }
    
    .dollar-sign {
        left: 8px;
    }
}
