/* ============================================
   BD Live Dashboard - Complete Stylesheet
   ============================================ */

:root {
    --bd-primary: #006a4e;
    --bd-secondary: #f42a41;
    --bd-accent: #1a73e8;
    --bd-bg: #f0f2f5;
    --bd-card-bg: #ffffff;
    --bd-text: #1a1a2e;
    --bd-text-light: #6b7280;
    --bd-up: #16a34a;
    --bd-down: #dc2626;
    --bd-stable: #6b7280;
    --bd-radius: 12px;
    --bd-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --bd-shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
}

/* ডার্ক মোড সাপোর্ট */
@media (prefers-color-scheme: dark) {
    :root {
        --bd-bg: #1a1a2e;
        --bd-card-bg: #16213e;
        --bd-text: #e2e8f0;
        --bd-text-light: #94a3b8;
        --bd-shadow: 0 2px 12px rgba(0,0,0,0.3);
    }
}

.bd-dashboard {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', sans-serif;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    color: var(--bd-text);
}

/* ---- হেডার ---- */
.bd-dash__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bd-primary), #004d38);
    border-radius: var(--bd-radius);
    color: #fff;
}

.bd-dash__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.bd-dash__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.bd-dash__live-dot {
    width: 10px;
    height: 10px;
    background: #ff4444;
    border-radius: 50%;
    animation: bd-pulse 1.5s infinite;
}

@keyframes bd-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.bd-dash__live-text {
    font-weight: 700;
    color: #ff4444;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bd-dash__refresh-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s;
    color: #fff;
}

.bd-dash__refresh-btn:hover {
    transform: rotate(180deg);
    background: rgba(255,255,255,0.3);
}

.bd-dash__refresh-btn.spinning {
    animation: bd-spin 1s linear infinite;
}

@keyframes bd-spin {
    100% { transform: rotate(360deg); }
}

/* ---- গ্রিড ---- */
.bd-dash__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

/* ---- কার্ড ---- */
.bd-dash__card {
    background: var(--bd-card-bg);
    border-radius: var(--bd-radius);
    box-shadow: var(--bd-shadow);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.bd-dash__card:hover {
    box-shadow: var(--bd-shadow-hover);
    transform: translateY(-2px);
}

.bd-dash__card--wide {
    grid-column: 1 / -1;
}

.bd-dash__card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 2px solid var(--bd-bg);
}

.bd-dash__card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.bd-dash__icon {
    font-size: 1.4rem;
}

/* ---- আবহাওয়া কার্ড ---- */
.bd-dash__card--weather {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.bd-dash__card--weather .bd-dash__card-header {
    border-bottom-color: rgba(255,255,255,0.2);
}

.bd-dash__weather-body {
    padding: 20px;
    text-align: center;
}

.bd-dash__temp {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.bd-dash__condition {
    font-size: 1.1rem;
    margin: 8px 0 12px;
    opacity: 0.9;
}

.bd-dash__weather-details {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ---- টেবিল ---- */
.bd-dash__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.bd-dash__table th,
.bd-dash__table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--bd-bg);
}

.bd-dash__table thead th {
    background: var(--bd-bg);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--bd-text-light);
}

.bd-dash__table tbody tr:hover {
    background: rgba(0,106,78,0.04);
}

.bd-dash__highlight {
    font-weight: 700;
    color: var(--bd-primary);
}

/* ---- DSE কার্ড ---- */
.bd-dash__dse-body {
    padding: 20px;
}

.bd-dash__dse-main {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--bd-bg);
    margin-bottom: 16px;
}

.bd-dash__dse-label {
    display: block;
    font-size: 0.85rem;
    color: var(--bd-text-light);
}

.bd-dash__dse-value {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--bd-text);
}

.bd-dash__dse-change {
    font-size: 1.1rem;
    font-weight: 700;
}

.bd-dash__dse-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.bd-dash__dse-stat small {
    display: block;
    color: var(--bd-text-light);
    font-size: 0.75rem;
}

.bd-dash__dse-stat strong {
    font-size: 0.95rem;
}

/* ---- জ্বালানি তেল ---- */
.bd-dash__fuel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

.bd-dash__fuel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--bd-bg);
    border-radius: 8px;
}

.bd-dash__fuel-icon {
    font-size: 1.5rem;
}

.bd-dash__fuel-name {
    font-size: 0.85rem;
    color: var(--bd-text-light);
    margin: 4px 0;
}

.bd-dash__fuel-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bd-primary);
}

/* ---- রেমিট্যান্স ---- */
.bd-dash__remittance-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
}

.bd-dash__rem-stat {
    text-align: center;
    padding: 12px;
    background: var(--bd-bg);
    border-radius: 8px;
}

.bd-dash__rem-stat small {
    display: block;
    color: var(--bd-text-light);
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.bd-dash__rem-stat strong {
    font-size: 1rem;
    color: var(--bd-accent);
}

/* ---- পরিবর্তন রং ---- */
.bd-dash__up { color: var(--bd-up); }
.bd-dash__down { color: var(--bd-down); }
.bd-dash__stable { color: var(--bd-stable); }

/* ---- ফুটার ---- */
.bd-dash__footer {
    text-align: center;
    padding: 16px;
    color: var(--bd-text-light);
    font-size: 0.8rem;
    margin-top: 16px;
}

/* ---- কম্প্যাক্ট স্টাইল ---- */
.bd-dashboard--compact .bd-dash__grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.bd-dashboard--compact .bd-dash__card-header {
    padding: 10px 14px;
}

.bd-dashboard--compact .bd-dash__card-header h3 {
    font-size: 0.9rem;
}

/* ---- রেসপন্সিভ ---- */
@media (max-width: 768px) {
    .bd-dash__header {
        flex-direction: column;
        text-align: center;
    }

    .bd-dash__title {
        font-size: 1.2rem;
    }

    .bd-dash__grid {
        grid-template-columns: 1fr;
    }

    .bd-dash__dse-details,
    .bd-dash__remittance-body {
        grid-template-columns: 1fr;
    }

    .bd-dash__fuel-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bd-dash__table {
        font-size: 0.8rem;
    }

    .bd-dash__table th,
    .bd-dash__table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .bd-dashboard {
        padding: 0 8px;
    }

    .bd-dash__temp {
        font-size: 2.2rem;
    }

    .bd-dash__dse-value {
        font-size: 1.6rem;
    }
}

/* ---- লোডিং স্টেট ---- */
.bd-dash__loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.bd-dash__loading::after {
    content: '⏳ আপডেট হচ্ছে...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 10;
}