﻿.erp-dashboard {
    --bg-main: #F8FAFC;
    --surface: #FFFFFF;
    --ink-primary: #0F172A;
    --ink-secondary: #475569;
    --ink-muted: #94A3B8;
    --border-color: #E2E8F0;
    padding: 24px;
    background: var(--bg-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dash-title {
    font-size: 22px;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
    letter-spacing: -0.02em;
}

.dash-subtitle {
    font-size: 13px;
    color: #64748B;
}

/* KPI GRID - 4 CARDS IN 1 ROW */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@@media (max-width: 640px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    min-height: 145px;
}

    .kpi-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        border-color: #D1D5DB;
    }

.kpi-amount-val {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    line-height: 1.1;
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.kpi-amount-sub {
    font-size: 13px;
    font-weight: 400;
    color: #6B7280;
}

.kpi-title-lbl {
    font-size: 13px;
    font-weight: 400;
    color: #6B7280;
    margin-top: 4px;
}

.kpi-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 16px;
}

.kpi-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trend-badge-txt {
    font-size: 12.5px;
    font-weight: 600;
}

    .trend-badge-txt.green {
        color: #16A34A;
    }

    .trend-badge-txt.orange {
        color: #F97316;
    }

.trend-sub-lbl {
    font-size: 11px;
    color: #9CA3AF;
    font-weight: 400;
}

.kpi-sparkline-box {
    width: 105px;
    height: 38px;
}

    .kpi-sparkline-box svg {
        width: 100%;
        height: 100%;
        display: block;
    }

/* GRID LAYOUTS */
.dash-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dash-col-8 {
    grid-column: span 8;
}

.dash-col-4 {
    grid-column: span 4;
}

.dash-col-12 {
    grid-column: span 12;
}

@@media (max-width: 992px) {
    .dash-col-8, .dash-col-4 {
        grid-column: span 12;
    }
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

    .panel-head h3 {
        font-size: 16px;
        font-weight: 700;
        margin: 0;
        color: var(--ink-primary);
    }

.border-bottom-subtle {
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 14px;
}

.panel-subtitle {
    font-size: 11.5px;
    color: var(--ink-muted);
}

/* QUICK SHORTCUTS GRID */
.admin-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding-top: 14px;
}

@@media (max-width: 640px) {
    .admin-shortcuts-grid {
        grid-template-columns: 1fr;
    }
}

.shortcut-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .shortcut-card:hover {
        background: #FFFFFF;
        border-color: #CBD5E1;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
        transform: translateY(-2px);
    }

.short-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.act-blue {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.act-emerald {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.act-amber {
    background: #FFFBEB;
    color: #D97706;
    border: 1px solid #FDE68A;
}

.act-purple {
    background: #F5F3FF;
    color: #7C3AED;
    border: 1px solid #DDD6FE;
}

.short-content {
    flex: 1;
    min-width: 0;
}

.short-title {
    font-size: 13px;
    font-weight: 600;
    color: #1E293B;
    display: block;
}

.short-desc {
    font-size: 11px;
    color: #64748B;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.short-arrow {
    color: #94A3B8;
    font-size: 12px;
}

/* INFRASTRUCTURE STATUS */
.infra-status-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 14px;
}

.infra-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.infra-info {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 600;
}

.infra-label {
    color: #334155;
}

.infra-val {
    font-size: 12px;
}

    .infra-val.green {
        color: #16A34A;
    }

    .infra-val.blue {
        color: #059669;
    }

    .infra-val.purple {
        color: #7C3AED;
    }

.infra-progress-bg {
    width: 100%;
    height: 6px;
    background: #F1F5F9;
    border-radius: 10px;
    overflow: hidden;
}

.infra-progress-fill {
    height: 100%;
    border-radius: 10px;
}

/* SECURITY AUDIT TABLE */
.table-responsive {
    overflow-x: auto;
    margin-top: 8px;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

    .modern-table th {
        color: #64748B;
        font-weight: 600;
        padding: 12px 14px;
        border-bottom: 1px solid #E2E8F0;
        font-size: 11px;
        letter-spacing: 0.05em;
        background: #F8FAFC;
    }

.table-row-item td {
    padding: 14px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 13px;
    color: #334155;
    vertical-align: middle;
}

.table-row-item:hover td {
    background: #F8FAFC;
}

.event-msg-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-high {
    background: #EF4444;
}

.dot-warning {
    background: #F97316;
}

.dot-info {
    background: #10B981;
}

.event-msg-txt {
    font-weight: 600;
    color: #1E293B;
}

.source-badge {
    background: #F1F5F9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 500;
}

.date-text {
    color: #64748B;
    font-size: 12px;
}

.stage-pill {
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}

.st-high {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.st-warning {
    background: #FFEDD5;
    color: #9A3412;
    border: 1px solid #FDBA74;
}

.st-info {
    background: #E0F2FE;
    color: #0369A1;
    border: 1px solid #BAE6FD;
}

.dot-menu-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #94A3B8;
    padding: 2px 8px;
    border-radius: 6px;
}

    .dot-menu-btn:hover {
        background: #F1F5F9;
        color: #1E293B;
    }

.activity-badge-live {
    background: #F0FDF4;
    color: #16A34A;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #BBF7D0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #16A34A;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    animation: pulse 1.6s infinite;
}

@@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

.filter-btn-modern {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .filter-btn-modern:hover {
        background: #F8FAFC;
        color: #1E293B;
    }

.action-btn-sm {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 8px;
    color: var(--ink-secondary);
    cursor: pointer;
}
