﻿/* =========================================================
           ALAM ERP — EXECUTIVE DASHBOARD (LIGHT THEME)
   Cohesive palette: soft slate bg, white cards, emerald accent
   ========================================================= */

.erp-dashboard {
    --dash-bg: #F4F6FB;
    --dash-surface: #FFFFFF;
    --dash-ink: #0F172A;
    --dash-ink-2: #475569;
    --dash-ink-3: #94A3B8;
    --dash-border: #E5EAF2;
    --dash-accent: #059669;
    --dash-accent-soft: #ECFDF5;
    padding: 26px 28px 34px;
    background: var(--dash-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- GREETING / PAGE HEADER ---------- */
.dash-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
    padding: 0 2px;
}

.dash-hero-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #059669;
    margin-bottom: 4px;
}

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

.dash-hero-name {
    color: #059669;
}

.dash-hero-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: #94A3B8;
    font-weight: 500;
}

    .dash-hero-meta .anticon {
        font-size: 13px;
        color: #059669;
    }

.dash-hero-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #FFFFFF;
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

    .hero-btn:hover {
        color: #059669;
        border-color: #A7F3D0;
        background: #F0FDF4;
    }

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

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

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

/* ---------- KPI CARDS ---------- */
.kpi-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    padding: 20px 20px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 152px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.22s ease;
}

    .kpi-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 3px;
        background: linear-gradient(90deg, var(--chip-c, #10B981), transparent 90%);
        opacity: 0;
        transition: opacity 0.22s ease;
    }

    .kpi-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
        border-color: #D3DCEB;
    }

        .kpi-card:hover::before {
            opacity: 1;
        }

.kpi-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.kpi-icon-chip {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chip-emerald {
    --chip-c: #10B981;
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #D1FAE5;
}

.chip-sky {
    --chip-c: #0EA5E9;
    background: #F0F9FF;
    color: #0284C7;
    border: 1px solid #E0F2FE;
}

.chip-amber {
    --chip-c: #F59E0B;
    background: #FFFBEB;
    color: #D97706;
    border: 1px solid #FEF3C7;
}

.chip-rose {
    --chip-c: #F43F5E;
    background: #FFF1F2;
    color: #E11D48;
    border: 1px solid #FFE4E6;
}

.kpi-title-lbl {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748B;
    letter-spacing: 0.01em;
}

.kpi-amount-val {
    font-size: 27px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.1;
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 18px;
}

.kpi-amount-sub {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--dash-ink-3);
}

.kpi-amount-val + .kpi-amount-sub {
    margin-top: -12px;
    margin-bottom: 18px;
}

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

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

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

    .trend-badge-txt.trend-up {
        color: #059669;
    }

    .trend-badge-txt.trend-down {
        color: #E11D48;
    }

    .trend-badge-txt.trend-warn {
        color: #D97706;
    }

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

.kpi-sparkline-box {
    width: 100px;
    height: 34px;
}

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

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

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

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

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

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

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

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

.panel {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

    .panel.h-100 {
        height: 100%;
    }

.flex-column-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Monitoring Overview + Recent Activity — both fixed 428px, chart wide 2:1 */
.panel-fixed-428 {
    height: 428px;
}

    .panel-fixed-428 .panel-head {
        height: 52px;
    }

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

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

.border-bottom-light {
    border-bottom: 1px solid #EEF2F8;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.border-bottom-subtle {
    border-bottom: 1px solid #EEF2F8;
    padding-bottom: 16px;
    margin-bottom: 6px;
}

.panel-subtitle {
    font-size: 12px;
    color: var(--dash-ink-3);
    margin-top: 3px;
    display: block;
}

.chart-legend-sub {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--dash-ink-2);
}

.cls-item {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.d-earn {
    background: #10B981;
}

.d-risk {
    background: #F43F5E;
}

.d-sky {
    background: #0EA5E9;
}

.apex-tooltip-custom {
    background: #ffffff;
    border: 1px solid #E5EAF2;
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
    font-family: 'Inter', sans-serif;
}

    .apex-tooltip-custom .tt-month {
        font-size: 11px;
        font-weight: 600;
        color: #94A3B8;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 2px;
    }

    .apex-tooltip-custom .tt-value {
        font-size: 13px;
        font-weight: 700;
        color: #059669;
    }

.action-btn-sm {
    background: #FFFFFF;
    border: 1px solid var(--dash-border);
    padding: 6px 12px;
    border-radius: 10px;
    color: var(--dash-ink-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

    .action-btn-sm:hover {
        background: #F8FAFC;
        color: #059669;
        border-color: #B7D8C9;
    }

.chip-select {
    background: var(--dash-accent-soft);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 10px;
    color: #047857;
    cursor: pointer;
    border: 1px solid #D1FAE5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- RECENT ACTIVITY ---------- */
.activity-badge-live {
    background: var(--dash-accent-soft);
    color: #059669;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #BBF7D0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #059669;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.6);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.6);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(5, 150, 105, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
    }
}

.activity-feed-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    padding-right: 2px;
}

.activity-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F8FAFD;
    border: 1px solid #EFF3FA;
    padding: 10px 14px;
    border-radius: 12px;
    min-height: 58px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

    .activity-card-item:hover {
        background: #FFFFFF;
        border-color: #D9E2F0;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
        transform: translateX(2px);
    }

.act-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.act-blue {
    background: #f0fdfa;
    color: #0d9488;
    border: 1px solid #99f6e4;
}

.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;
}

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

.act-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.act-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.act-time-badge {
    font-size: 10px;
    font-weight: 600;
    background: #F0F3FF;
    color: #4F46E5;
    padding: 3px 8px;
    border-radius: 8px;
    flex-shrink: 0;
}

.act-desc {
    font-size: 11.5px;
    color: #64748B;
    margin: 0;
    line-height: 1.4;
}

.empty-activity-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 10px;
    color: #94A3B8;
    gap: 8px;
    font-size: 12px;
}

/* ---------- RECENT TRANSACTIONS TABLE ---------- */
.modern-table-panel {
    padding: 22px;
}

.table-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #94A3B8;
    pointer-events: none;
}

.search-input-field {
    border: 1px solid var(--dash-border);
    border-radius: 10px;
    padding: 8px 12px 8px 34px;
    font-size: 12.5px;
    outline: none;
    background: #F8FAFD;
    color: #1E293B;
    width: 210px;
    transition: all 0.2s ease;
}

    .search-input-field:focus {
        background: #FFFFFF;
        border-color: #059669;
        box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
    }

.filter-btn-modern {
    background: #FFFFFF;
    border: 1px solid var(--dash-border);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12.5px;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

    .filter-btn-modern:hover {
        background: #F8FAFC;
        color: #0F172A;
        border-color: #CBD5E1;
    }

.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: #8A93A6;
        font-weight: 600;
        padding: 12px 14px;
        border-bottom: 1px solid #E5EAF2;
        font-size: 10.5px;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        background: #F8FAFD;
    }

        .modern-table th:first-child {
            border-radius: 12px 0 0 0;
        }

        .modern-table th:last-child {
            border-radius: 0 12px 0 0;
        }

.table-row-item td {
    padding: 13px 14px;
    border-bottom: 1px solid #EEF2F8;
    font-size: 13px;
    color: #334155;
    vertical-align: middle;
    transition: background 0.18s ease;
}

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

.table-row-item:last-child td {
    border-bottom: none;
}

.deal-id-badge {
    font-weight: 700;
    color: #059669;
    background: #ECFDF5;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #D1FAE5;
    font-family: 'Fira Code', monospace;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uc-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    color: #047857;
    font-weight: 700;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #A7F3D0;
    letter-spacing: 0.02em;
}

.customer-name {
    font-weight: 600;
    color: #1E293B;
}

.customer-email {
    color: #64748B;
    font-size: 12px;
}

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

.amount-text {
    font-weight: 700;
    color: #0F172A;
    font-size: 13.5px;
}

.stage-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.st-success {
    background: #DCFCE7;
    color: #15803D;
    border: 1px solid #BBF7D0;
}

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

.dot-menu-btn {
    background: none;
    border: 1px solid transparent;
    font-size: 16px;
    cursor: pointer;
    color: #94A3B8;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .dot-menu-btn:hover {
        background: #ECFDF5;
        border-color: #A7F3D0;
        color: #059669;
    }

.empty-table-cell {
    text-align: center;
    color: #94A3B8;
    padding: 24px;
    font-size: 13px;
}

.empty-state {
    color: #94A3B8;
}