/* SoftMit — KPI Dashboard Styling
   Self-contained — δεν επηρεάζει υπόλοιπο styling του προγράμματος */

#softmit-kpi-dashboard {
    margin: 0 0 22px 0;
    animation: softmit-fade-in 0.5s ease;
}

@keyframes softmit-fade-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
#softmit-kpi-dashboard .kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 0 4px;
}
#softmit-kpi-dashboard .kpi-greeting {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
    letter-spacing: -0.3px;
}
#softmit-kpi-dashboard .kpi-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,.75);
    font-weight: 500;
}
#softmit-kpi-dashboard .kpi-refresh-btn {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}
#softmit-kpi-dashboard .kpi-refresh-btn:hover {
    background: rgba(255,255,255,.22);
    transform: rotate(180deg);
}
#softmit-kpi-dashboard .kpi-refresh-btn svg {
    width: 18px; height: 18px;
}

/* Grid */
#softmit-kpi-dashboard .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

/* Card */
#softmit-kpi-dashboard .kpi-card {
    background: rgba(255,255,255,.97);
    border-radius: 16px;
    padding: 18px 20px;
    text-decoration: none;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.1);
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    animation: softmit-slide-up 0.5s ease backwards;
    cursor: pointer;
}
@keyframes softmit-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
#softmit-kpi-dashboard .kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent, #3b82f6);
    opacity: .9;
}
#softmit-kpi-dashboard .kpi-card::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: var(--accent, #3b82f6);
    opacity: .07;
    transition: opacity .3s, transform .3s;
}
#softmit-kpi-dashboard .kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,.25);
}
#softmit-kpi-dashboard .kpi-card:hover::after {
    opacity: .14;
    transform: scale(1.2);
}

/* Head row */
#softmit-kpi-dashboard .kpi-head {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}
#softmit-kpi-dashboard .kpi-icon {
    font-size: 22px;
    line-height: 1;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent, #3b82f6);
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--accent, #3b82f6) 35%, transparent);
}
#softmit-kpi-dashboard .kpi-title {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
}
/* Live pulse */
#softmit-kpi-dashboard .kpi-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,.6);
    animation: softmit-pulse 2s infinite;
}
@keyframes softmit-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
    70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Main value */
#softmit-kpi-dashboard .kpi-main {
    position: relative;
    z-index: 1;
}
#softmit-kpi-dashboard .kpi-main-val {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent, #1e293b);
    line-height: 1.05;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}
#softmit-kpi-dashboard .kpi-main-lbl {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    font-weight: 500;
}

/* Sub stats row */
#softmit-kpi-dashboard .kpi-subs {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    position: relative;
    z-index: 1;
}
#softmit-kpi-dashboard .kpi-sub {
    flex: 1;
    text-align: center;
    min-width: 0;
}
#softmit-kpi-dashboard .kpi-sub-val {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}
#softmit-kpi-dashboard .kpi-sub-lbl {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty state */
#softmit-kpi-dashboard .kpi-empty {
    background: rgba(255,255,255,.1);
    border: 1px dashed rgba(255,255,255,.25);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: rgba(255,255,255,.85);
    font-size: 14px;
    backdrop-filter: blur(8px);
}

/* Mobile */
@media (max-width: 768px) {
    #softmit-kpi-dashboard .kpi-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 10px;
    }
    #softmit-kpi-dashboard .kpi-card {
        padding: 14px 16px;
    }
    #softmit-kpi-dashboard .kpi-main-val {
        font-size: 26px;
    }
    #softmit-kpi-dashboard .kpi-greeting {
        font-size: 18px;
    }
}
