/* =========================
   DASHBOARD WRAP
========================= */

.dashboard-wrap {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 12px 18px 24px;
}

/* =========================
   HEADER
========================= */

.dashboard-header {
    margin-bottom: 10px;
}

.dashboard-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
}

.dashboard-subtitle {
    font-size: 11.5px;
    color: #64748b;
}

/* =========================
   QUICK ACTIONS
========================= */

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--dh-gap-grid, 10px);
}

.dashboard-action-card {
    height: 46px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--dh-card-radius, 12px);
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: .18s ease;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .03),
        0 4px 12px rgba(15, 23, 42, .03);
    min-width: 0;
}

.dashboard-action-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .07);
    border-color: #cbd5e1;
}

.dashboard-action-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.dashboard-action-icon i,
.dashboard-action-icon svg {
    width: 15px;
    height: 15px;
}

.dashboard-action-card span {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ACTION COLORS */
.dashboard-action-card.sale .dashboard-action-icon {
    background: #10b981;
}

.dashboard-action-card.purchase .dashboard-action-icon {
    background: #2563eb;
}

.dashboard-action-card.collection .dashboard-action-icon {
    background: #7c3aed;
}

.dashboard-action-card.import .dashboard-action-icon {
    background: #ea580c;
}

.dashboard-action-card.stock .dashboard-action-icon {
    background: #dc2626;
}

/* =========================================
   DASHBOARD SECTIONS
========================================= */

.dashboard-section {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 12px 16px;
    margin-top: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .03);
}

.dashboard-section.snapshot {
    background: linear-gradient(
        180deg,
        #FFFFFF,
        #FCFCFF
    );
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
}

.section-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.2px;
}

.section-header span {
    font-size: 11px;
    color: #64748B;
}

.dashboard-section-head {
    margin-bottom: 10px;
}

.dashboard-section-head h2 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.2px;
}

/* =========================
   KPI GRID
========================= */

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--dh-gap-grid, 10px);
}

.dashboard-kpi-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: var(--dh-card-radius, 12px);
    padding: 8px 12px;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .03),
        0 3px 10px rgba(15, 23, 42, .03);
    min-width: 0;
}

.kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.kpi-icon i,
.kpi-icon svg {
    width: 16px;
    height: 16px;
}

.kpi-icon.sales {
    background: #2563eb;
}

.kpi-icon.collection {
    background: #16a34a;
}

.kpi-icon.orders {
    background: #7c3aed;
}

.kpi-icon.stock {
    background: #ea580c;
}

.kpi-icon.expiry {
    background: #dc2626;
}

.kpi-label {
    display: block;
    font-size: 10.5px;
    color: #64748b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.kpi-content h3 {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================
   ATTENTION GRID
========================= */

.attention-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--dh-gap-grid, 10px);
}

.attention-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: var(--dh-card-radius, 12px);
    padding: 10px 12px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .03),
        0 3px 10px rgba(15, 23, 42, .03);
}

.attention-card-head {
    margin-bottom: 8px;
}

.attention-card-head h3 {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.attention-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.attention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
}

.attention-item.warning {
    background: #fff7ed;
}

.attention-item.danger {
    background: #fef2f2;
}

.attention-item.success {
    background: #ecfdf5;
}

.attention-item.info {
    background: #eff6ff;
}

.attention-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.attention-icon i,
.attention-icon svg {
    width: 15px;
    height: 15px;
}

.warning .attention-icon {
    background: #f97316;
}

.danger .attention-icon {
    background: #dc2626;
}

.success .attention-icon {
    background: #16a34a;
}

.info .attention-icon {
    background: #2563eb;
}

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

.attention-content span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 1px;
    line-height: 1.25;
}

.attention-content small {
    font-size: 10.5px;
    color: #64748b;
    line-height: 1.3;
}

/* =========================
   LIVE ACTIVITY
========================= */

.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--dh-gap-grid, 10px);
}

.activity-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: var(--dh-card-radius, 12px);
    padding: 10px 12px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .03),
        0 3px 10px rgba(15, 23, 42, .03);
}

.activity-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.activity-card-head h3 {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.activity-card-head button {
    height: 24px;
    padding: 0 9px;
    border: none;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.activity-card-head button:hover {
    background: #dbeafe;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
}

.activity-table thead th {
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.activity-table tbody td {
    padding: 6px 0;
    border-top: 1px solid #f1f5f9;
    font-size: 11.5px;
    color: #0f172a;
}

/* =========================
   RESPONSIVE BREAKPOINTS
========================= */

@media (max-width: 1280px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .dashboard-action-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .attention-grid,
    .activity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dashboard-wrap {
        padding: 10px 12px 20px;
    }
    .dashboard-kpi-grid,
    .dashboard-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 2000px) {
    .dashboard-wrap {
        max-width: 2200px;
    }
}