/* ============================================================ */
/* ROOT VARIABLES                                                */
/* ============================================================ */
:root {
    --primary: #086bd4;
    --success: #43a140;
    --danger: #ff0000;
    --warning: #ffb700;
    --dark: #000000;
}

/* ============================================================ */
/* RESET & BODY                                                  */
/* ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    padding: 20px;
    color: #1a1a2e;
}

/* ============================================================ */
/* CONTAINER                                                     */
/* ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* ============================================================ */
/* NAV TABS                                                     */
/* ============================================================ */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1rem;
}

.nav-tabs .nav-link {
    color: #ff6400;
    font-weight: 600;
    border: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 13px;
}

.nav-tabs .nav-link:hover {
    color: #0d6efd;
    border: none;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background: transparent;
    border-bottom: 3px solid #0d6efd;
}

/* ============================================================ */
/* TIME PRESET BUTTONS                                          */
/* ============================================================ */
.time-preset-btn {
    margin: 0 3px;
    border-radius: 6px;
    font-size: 11px;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
}

.time-preset-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================================ */
/* CHART CONTAINER                                              */
/* ============================================================ */
.chart-container {
    min-height: 400px;
    position: relative;
}

#chart-container {
    min-height: auto !important;
    width: 100% !important;
}

#price-canvas {
    height: 300px !important;
    width: 100% !important;
    display: block !important;
}

/* ============================================================ */
/* TABLE STYLES                                                 */
/* ============================================================ */
.table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

.table thead th {
    position: sticky;
    top: 0;
    background: #43a140 !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #43a140;
    font-size: 12px;
}

tbody td {
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    font-size: 12px;
}

tbody tr:hover {
    background: #f5f5f5;
}

.positive-cell {
    color: #10b981;
    font-weight: 600;
}

.negative-cell {
    color: #ef4444;
    font-weight: 600;
}

/* ============================================================ */
/* HELPER TEXT                                                  */
/* ============================================================ */
.helper-text {
    margin-top: 15px;
    padding: 10px 15px;
    background: #e8f5e9;
    border-left: 4px solid #43a140;
    border-radius: 5px;
    color: #2e7d32;
    font-weight: 600;
    text-align: center;
    font-size: 12px;
}

/* ============================================================ */
/* BUTTONS                                                      */
/* ============================================================ */
.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-custom {
    background-color: #ffffff;
    color: #ff6600;
    border: 1px solid #4747a1;
    transition: all 0.3s ease;
    padding: 6px 12px;
    font-size: 13px;
}

.btn-custom:hover {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

/* ============================================================ */
/* FORM CONTROLS                                                */
/* ============================================================ */
.form-control:focus,
.form-select:focus,
.btn:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

.form-control,
.form-select {
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
    padding: 6px 10px;
    font-size: 13px;
}

/* ============================================================ */
/* DROPDOWN FIXES                                               */
/* ============================================================ */
#year-filter-chart,
#month-filter-chart {
    color: #333 !important;
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    width: auto !important;
    min-width: 25px !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    display: inline-block !important;
    font-size: 12px !important;
}

#year-filter-chart {
    margin-right: 10px !important;
}

/* ============================================================ */
/* FOOTER                                                       */
/* ============================================================ */
footer {
    background-color: var(--dark);
    color: white;
    padding: 1rem 0;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 13px;
}

/* ============================================================ */
/* SECTION DIVIDER & HR                                         */
/* ============================================================ */
.section-divider {
    border-top: 1px dashed #d0d0d0;
    margin: 25px 0;
}

.section-title {
    margin-bottom: 3px;
}

hr {
    margin: 20px 0;
    border: 0;
    border-top: 2px solid #f0f0f0;
}

/* ============================================================ */
/* PIVOT BOX & LTP DISPLAY                                      */
/* ============================================================ */
.pivot-box {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid #ff6400;
}

.pivot-box p {
    margin: 3px 0;
}

.pivot-box strong {
    color: #1a237e;
}

.ltp-display {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1rem;
}

.ltp-display span {
    font-weight: bold;
    color: #0d47a1;
    font-size: 1.2rem;
}

