/* AgriDecisions Operating Dashboard Premium Styles */
:root {
    --bg-glass: rgba(22, 28, 18, 0.45);
    --border-glass: rgba(143, 188, 143, 0.12);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --gold: #dfb76c;
    --gold-glow: rgba(223, 183, 108, 0.2);
    --green-brand: #4a7c20;
    --green-light: #8fbc8f;
    --red-alert: #ff6b6b;
    --card-bg: #1c221a;
}

/* Dashboard Container Styles */
.dashboard-wrapper {
    padding-top: 140px;
    padding-bottom: 80px;
    background: radial-gradient(circle at 10% 20%, rgba(20, 30, 15, 0.8) 0%, rgba(10, 15, 8, 0.95) 90%);
    min-height: 100vh;
    color: #e2e8f0;
}

/* Premium KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    backdrop-filter: blur(8px);
}

.kpi-card:hover {
    transform: translateY(-5px);
    border-color: rgba(143, 188, 143, 0.3);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--green-brand), var(--green-light));
}

.kpi-card.kpi-gold::before {
    background: linear-gradient(90deg, var(--gold), #f3e5ab);
}

.kpi-label {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f8fafc;
    font-family: var(--font-serif);
}

.kpi-subtext {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Glassmorphism Section Layouts */
.dash-section {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(12px);
    margin-bottom: 2.5rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

/* AgIndexes Widget Tickers */
.index-ticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ticker-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.2s ease;
}

.ticker-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ticker-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
}

.ticker-val-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.ticker-val {
    font-size: 1.25rem;
    font-weight: 700;
}

.ticker-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.change-up {
    color: #818cf8;
    background: rgba(129, 140, 248, 0.15);
}

.change-down {
    color: #34d399;
    background: rgba(52, 211, 153, 0.15);
}

.change-stable {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.15);
}

/* Seasonal Alert Panel */
.alert-card {
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--green-brand);
    padding: 1rem;
    border-radius: 0 12px 12px 0;
    margin-bottom: 1rem;
    position: relative;
}

.alert-card.alert-warning {
    border-left-color: var(--gold);
}

.alert-card.alert-danger {
    border-left-color: var(--red-alert);
}

.alert-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.alert-body {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* Custom interactive sliders & toggles */
.slider-group {
    margin-bottom: 1.5rem;
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.slider-val-box {
    color: var(--gold);
    font-weight: 700;
}

.custom-range-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.custom-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 0 10px var(--gold-glow);
    transition: transform 0.1s ease;
}

.custom-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Tabs & Tool Layouts */
.tool-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}

.tool-tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tool-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.tool-tab-btn.active {
    background: var(--green-brand);
    color: #ffffff;
    border-color: var(--green-brand);
    box-shadow: 0 4px 15px rgba(74, 124, 32, 0.3);
}

/* Calculator Card & Layouts */
.calculator-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

@media (max-width: 768px) {
    .calculator-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.calculator-results {
    background: rgba(74, 124, 32, 0.05);
    border: 1px dashed rgba(143, 188, 143, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 0.9rem;
    color: #94a3b8;
}

.result-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
}

.result-value.highlight-gold {
    color: var(--gold);
    font-size: 1.8rem;
    font-family: var(--font-serif);
}

/* Saved Calculation Items */
.saved-calc-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.saved-calc-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.saved-calc-item:hover {
    border-color: var(--green-light);
}

.saved-calc-meta h5 {
    margin: 0;
    font-size: 0.9rem;
    color: #f8fafc;
}

.saved-calc-meta span {
    font-size: 0.75rem;
    color: #64748b;
}

/* SVG Line graphs or visualizers */
.svg-chart-container {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-top: 1rem;
}

/* Form inputs styling override */
.form-input-premium {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.75rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input-premium:focus {
    border-color: var(--green-light);
}
