/**
 * WEAM Dashboard
 *
 * @since 2.2.2.36
 */

/* Body */
.weam-dash-body {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 24px 28px 28px;
    min-height: 420px;
    position: relative;
}

/* Row labels */
.weam-dash-row-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin: 20px 0 10px;
    padding: 0 2px;
}
.weam-dash-row-label:first-child { margin-top: 0; }

/* Card grid */
.weam-dash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 8px;
}

/* ═══ Overview card ═══ */
.weam-dash-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 16px;
}
.weam-dash-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* Card tinted backgrounds */
.weam-dash-card.t-green { background: rgba(34,197,94,0.05); border-color: rgba(34,197,94,0.14); }
.weam-dash-card.t-amber { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.14); }
.weam-dash-card.t-red   { background: rgba(239,68,68,0.05); border-color: rgba(239,68,68,0.14); }

/* Circle ring */
.weam-dash-ring {
    width: 52px;
    height: 52px;
    position: relative;
    flex-shrink: 0;
}
.weam-dash-ring svg { transform: rotate(-90deg); }
.weam-dash-ring-track { fill: none; stroke: #f1f5f9; stroke-width: 3.5; }
.weam-dash-ring-fill { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.weam-dash-ring-fill.green { stroke: #22c55e; }
.weam-dash-ring-fill.amber { stroke: #f59e0b; }
.weam-dash-ring-fill.red   { stroke: #ef4444; }

.weam-dash-ring-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}
.weam-dash-ring-num.green { color: #16a34a; }
.weam-dash-ring-num.amber { color: #d97706; }
.weam-dash-ring-num.red   { color: #dc2626; }

.weam-dash-card-text { flex: 1; }
.weam-dash-card-title { font-size: 14px; font-weight: 600; color: #1e293b; }
.weam-dash-card-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.weam-dash-card-chev { color: #cbd5e1; font-size: 16px; flex-shrink: 0; transition: color 0.15s; }
.weam-dash-card:hover .weam-dash-card-chev { color: #64748b; }

.weam-dash-pro {
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    background: #7c3aed;
    color: #fff;
    vertical-align: middle;
    margin-left: 3px;
}

/* ═══ Expand/collapse animation ═══ */
.weam-dash-grid.fading,
.weam-dash-row-label.fading {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.weam-dash-detail {
    animation: weamDashFadeIn 0.3s ease;
}
@keyframes weamDashFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Back button */
.weam-dash-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    margin-bottom: 16px;
    border: none;
    background: none;
    padding: 4px 0;
    transition: color 0.15s;
}
.weam-dash-back:hover { color: #1e293b; }

/* Detail header */
.weam-dash-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.weam-dash-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.weam-dash-icon svg { width: 22px; height: 22px; }
.weam-dash-icon.green { background: #f0fdf4; color: #16a34a; }
.weam-dash-icon.amber { background: #fffbeb; color: #d97706; }
.weam-dash-icon.red   { background: #fef2f2; color: #dc2626; }

.weam-dash-detail-title { font-size: 17px; font-weight: 700; color: #1e293b; }
.weam-dash-detail-sub { font-size: 12px; color: #64748b; margin-top: 2px; }
.weam-dash-detail-count { margin-left: auto; text-align: right; }
.weam-dash-detail-num { font-size: 30px; font-weight: 800; line-height: 1; }
.weam-dash-detail-num.green { color: #16a34a; }
.weam-dash-detail-num.amber { color: #d97706; }
.weam-dash-detail-num.red   { color: #dc2626; }
.weam-dash-detail-unit { font-size: 11px; color: #94a3b8; }

/* ═══ Sub-cards (detail view) ═══ */
.weam-dash-sub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex: 1;
    align-content: start;
}

/* Detail tabs (Products / Variations) */
.weam-dash-detail-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}
.weam-dash-dtab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s;
}
.weam-dash-dtab:hover { color: #64748b; }
.weam-dash-dtab.active { color: #1e293b; border-bottom-color: #1e293b; }
.weam-dash-dtab-cnt {
    display: inline-block;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}
.weam-dash-dtab-cnt.has-issues { background: #fee2e2; color: #dc2626; }
.weam-dash-dtab-cnt.clean { background: #dcfce7; color: #16a34a; }

/* Tab panels */
.weam-dash-tab-panel { display: none; }
.weam-dash-tab-panel.active {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex: 1;
    align-content: start;
}

.weam-dash-sub {
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: border-color 0.15s, box-shadow 0.2s, transform 0.15s;
}
.weam-dash-sub:hover {
    border-color: #94a3b8;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* Sub-card tinted backgrounds */
.weam-dash-sub.t-green { background: rgba(34,197,94,0.05); border-color: rgba(34,197,94,0.14); }
.weam-dash-sub.t-amber { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.14); }
.weam-dash-sub.t-red   { background: rgba(239,68,68,0.05); border-color: rgba(239,68,68,0.14); }

.weam-dash-sub-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.weam-dash-sub-dot.red { background: #dc2626; }
.weam-dash-sub-dot.amber { background: #d97706; }
.weam-dash-sub-dot.green { background: #16a34a; }

.weam-dash-sub-label { font-size: 14px; color: #334155; font-weight: 600; }
.weam-dash-sub-desc { font-size: 11px; color: #94a3b8; margin-top: 2px; }

.weam-dash-sub-count { margin-left: auto; font-size: 22px; font-weight: 700; min-width: 40px; text-align: right; }
.weam-dash-sub-count.red { color: #dc2626; }
.weam-dash-sub-count.amber { color: #d97706; }
.weam-dash-sub-count.green { color: #16a34a; }

.weam-dash-sub-link { font-size: 11px; color: #6366f1; font-weight: 500; width: 40px; text-align: right; flex-shrink: 0; }

/* ═══ Quick actions ═══ */
.weam-dash-quick {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}
.weam-dash-quick-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 10px;
}
.weam-dash-quick-row { display: flex; gap: 8px; flex-wrap: wrap; }

.weam-dash-qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #e2e4e7;
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-decoration: none;
}
.weam-dash-qa-btn:hover { border-color: #94a3b8; background: #f8fafc; }
.weam-dash-qa-cnt { font-weight: 600; }
.weam-dash-qa-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.weam-dash-qa-dot.red { background: #dc2626; }
.weam-dash-qa-dot.amber { background: #d97706; }

/* Scan info */
.weam-dash-scan-info {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 14px;
}

/* Responsive */
@media (max-width: 960px) {
    .weam-dash-grid { grid-template-columns: repeat(2, 1fr); }
    .weam-dash-sub-grid { grid-template-columns: 1fr; }
}
