/* ShefaDash Overview page (spec §4.1) */

#sd-overview-root {
    padding: 8px 0 24px;
}

.sd-overview-loading,
.sd-overview-error,
.sd-overview-empty {
    color: #888;
    padding: 32px 12px;
    font-size: 14px;
}

.sd-overview-error {
    color: #b91c1c;
}

.sd-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1100px) {
    .sd-overview-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .sd-overview-grid { grid-template-columns: 1fr; }
}

.sd-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: transform 80ms ease-out, box-shadow 120ms ease-out, border-color 120ms ease-out;
    border-top: 3px solid var(--sd-card-accent, #d1d5db);
}

.sd-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.sd-card-acquisition { --sd-card-accent: #3b82f6; }
.sd-card-conversion  { --sd-card-accent: #10b981; }
.sd-card-retention   { --sd-card-accent: #8b5cf6; }
.sd-card-ltv         { --sd-card-accent: #f59e0b; }

.sd-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sd-card-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.sd-card-value {
    font-size: 32px;
    font-weight: 600;
    color: #111827;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.sd-card-secondary {
    font-size: 12px;
    color: #6b7280;
}

/* Card info icon + tooltip (mirrors .sd-mv2-kpi-info from members) */
.sd-card-info {
    position: relative;
    display: inline-block;
    margin-left: 4px;
    cursor: help;
    vertical-align: middle;
}
.sd-card-info-icon {
    font-size: 14px;
    color: #b0aaa2;
    line-height: 1;
}
.sd-card-info:hover .sd-card-info-icon {
    color: #6b5e4f;
}
.sd-card-tooltip {
    display: none;
    position: fixed;
    width: 240px;
    padding: 8px 10px;
    background: #1f1e1c;
    color: #f5f0eb;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 6px;
    z-index: 100000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
}
/* In card head: position icon at top-right */
.sd-card-head .sd-card-info {
    margin-left: auto;
}

.sd-card-fallback-note {
    font-size: 11px;
    font-style: italic;
    color: #9ca3af;
}

.sd-card-tag {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.sd-card-td-info {
    cursor: help;
    font-size: 12px;
    color: #b0b5bd;
    vertical-align: middle;
    margin-left: 2px;
}

.sd-card-deltas {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
    font-size: 11px;
}

.sd-delta {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

.sd-delta-arrow {
    font-weight: 700;
    width: 10px;
    display: inline-block;
}

.sd-delta-label {
    color: #9ca3af;
}

.sd-delta-good    { color: #059669; }
.sd-delta-bad     { color: #dc2626; }
.sd-delta-neutral { color: #6b7280; }

.sd-card-spark {
    margin-top: auto;
    padding-top: 4px;
}

/* A card that deliberately has no trend line: keeps the slot so the KPI row
   stays aligned, and says so rather than leaving a gap. */
.sd-card-spark-none {
    height: 36px;
    display: flex;
    align-items: center;
    color: #9ca3af;
    font-size: 12px;
    font-style: italic;
}

.sd-sparkline {
    width: 100%;
    height: 36px;
    display: block;
}

.sd-spark-pt {
    cursor: pointer;
}
