/* ============================================
   THIKAA ENHANCED DASHBOARD
   Actionable insights, quick actions, stats
   ============================================ */

.tk-dashboard {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1200px;
    animation: tkDashFadeIn 0.4s ease;
}

@keyframes tkDashFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- SECTION --- */
.tk-dash-section {
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tk-dash-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tk-dash-section-title i {
    color: #075E54;
    font-size: 14px;
}

/* --- SUMMARY CARDS --- */
.tk-dash-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.tk-dash-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.tk-dash-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tk-dash-card-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.tk-dash-card-info {
    min-width: 0;
}

.tk-dash-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    transition: all 0.3s;
}

.tk-dash-value-updated {
    color: #075E54;
    transform: scale(1.05);
}

.tk-dash-card-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- QUICK ACTIONS --- */
.tk-dash-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.tk-dash-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-align: left;
}

.tk-dash-action-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.tk-dash-action-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.tk-dash-action-btn span {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

/* --- TWO-COLUMN ROW --- */
.tk-dash-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tk-dash-half {
    min-height: 200px;
}

/* --- CHANNEL HEALTH --- */
.tk-dash-channels {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tk-dash-channel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    transition: background 0.2s;
}

.tk-dash-channel:hover {
    background: #f1f5f9;
}

.tk-dash-ch-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.tk-dash-ch-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

.tk-dash-ch-status {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tk-ch-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.tk-ch-connected .tk-ch-dot {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.tk-ch-connected .tk-dash-ch-status {
    color: #16a34a;
}

.tk-ch-disconnected .tk-ch-dot {
    background: #e2e8f0;
}

.tk-ch-disconnected .tk-dash-ch-status {
    color: #94a3b8;
}

.tk-dash-no-channels {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.tk-dash-no-channels i {
    margin-right: 6px;
}

/* --- ALERTS / ACTION ITEMS --- */
.tk-dash-alerts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tk-dash-no-alerts {
    padding: 24px;
    text-align: center;
    color: #22c55e;
    font-size: 14px;
}

.tk-dash-no-alerts i {
    margin-right: 6px;
    font-size: 16px;
}

.tk-dash-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

.tk-dash-alert.tk-alert-warn {
    background: #fef3c7;
    color: #92400e;
}

.tk-dash-alert.tk-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.tk-dash-alert.tk-alert-info {
    background: #dbeafe;
    color: #1e3a5f;
}

.tk-dash-loading {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .tk-dash-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .tk-dash-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .tk-dash-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tk-dashboard {
        padding: 8px;
        gap: 10px;
    }

    .tk-dash-section {
        padding: 14px;
        border-radius: 10px;
    }

    .tk-dash-cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .tk-dash-card {
        padding: 12px;
        gap: 10px;
    }

    .tk-dash-card-value {
        font-size: 20px;
    }

    .tk-dash-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .tk-dash-action-btn {
        padding: 10px 12px;
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
}
