/* --- GLOBAL VARIABLES & FONTS --- */
:root {
    --brand-green: #0A2D22; /* Deep forest green from footer/buttons */
    --brand-gold: #C2A677;  /* Soft gold accent */
    --brand-bg: #F9FAFA;    /* Very light gray background */
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--brand-bg);
    color: #333333;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.drag-icon {
    height: 20px;
    opacity: 0.3;
}

/* --- COLORS --- */
.text-primary { color: var(--brand-green) !important; }
.bg-primary { background-color: var(--brand-green) !important; }
.border-primary { border-color: var(--brand-gold) !important; }

/* --- HEADINGS (Serif Font) --- */
.drag-handle span, #graph-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: var(--brand-green);
}

/* --- BUTTONS (Flat & Elegant) --- */
.btn-primary {
    background: var(--brand-green);
    color: #ffffff;
    border-radius: 0; /* Square edges to match site buttons */
    box-shadow: none;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 1px;
}
.btn-primary:hover {
    background: #114233;
    transform: none;
    box-shadow: none;
}

/* --- MINIMALIST CARDS --- */
.dashboard-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 4px; /* Minimal rounding */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04); /* Very soft shadow */
    border: 1px solid #f0f0f0;
    overflow: hidden;
    position: relative;
}

/* --- DRAG HANDLE --- */
.drag-handle {
    cursor: grab;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.drag-handle:active { cursor: grabbing; }

/* --- AG GRID OVERRIDES --- */
#rateGrid {
    height: 100%;
    width: 100%;
    --ag-borders: none;
    --ag-header-background-color: #ffffff;
    --ag-row-hover-color: #fafafa;
    --ag-row-border-color: #f4f4f4;
    font-family: 'Lato', sans-serif;
}

.ag-header-cell-label {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.ag-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.ag-row.active, .ag-row-selected, .ag-row:focus {
    background: #f6f8f7 !important; /* Faint green tint */
    border-left: 3px solid var(--brand-gold) !important;
}

.rate-name {
    color: var(--brand-green);
    font-weight: 700;
}

/* --- GRID STACK OVERRIDES --- */
.grid-stack-item-content {
    background: transparent !important;
    inset: 12px !important;
}

/* --- CHART & TABS --- */
.chart-container {
    flex-grow: 1;
    min-height: 0;
    position: relative;
    padding: 16px;
}
canvas { width: 100% !important; height: 100% !important; }

#chart-tabs {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.tab-btn {
    transition: all 0.2s;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
    background: #ffffff !important;
}

.tab-btn.text-primary {
    color: var(--brand-green) !important;
    font-weight: 700;
    border-bottom: 2px solid var(--brand-gold) !important; /* Gold underline */
}

/* --- POWERED BY ATTRIBUTION --- */
.powered-by-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 20px;
    margin-top: 8px;
}

.powered-by-text {
    font-family: 'Lato', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.dl-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}