/* Professional operations dashboard */
.dash-shell {
    --dash-primary: #0866C6;
    --dash-primary-soft: #e8f2fc;
    --dash-ink: #1d2939;
    --dash-muted: #6b7a90;
    --dash-line: #e7eef6;
    --dash-bg: #f5f7fb;
    --dash-card: #ffffff;
    --dash-shadow: 0 1px 2px rgba(16, 38, 64, 0.04), 0 8px 24px rgba(16, 38, 64, 0.04);
    position: relative;
}

.dash-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--dash-card);
    border: 1px solid var(--dash-line);
    border-radius: 12px;
    box-shadow: var(--dash-shadow);
    padding: 14px 18px;
}

.dash-hero-copy {
    min-width: 220px;
}

.dash-hero-title {
    color: var(--dash-ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 2px;
}

.dash-hero-sub {
    color: var(--dash-muted);
    font-size: 13px;
    margin: 0;
}

.dash-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.dash-presets {
    display: inline-flex;
    background: #f3f6fa;
    border: 1px solid #e7eef6;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.dash-preset {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #3d4d63;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.dash-preset:hover {
    background: #fff;
    color: var(--dash-primary);
}

.dash-preset.is-active {
    background: var(--dash-primary);
    color: #fff;
}

.dash-date-group {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 0 8px;
    height: 38px;
}

.dash-date,
.dash-date-group .form-control {
    width: 138px;
    height: 36px;
    border: 0 !important;
    background: transparent;
    font-size: 13px;
    color: #1d2939;
    box-shadow: none !important;
    padding: 0 4px;
}

.dash-date:focus {
    outline: none;
    box-shadow: none;
}

.dash-date-sep {
    color: #8a97ab;
    padding: 0 6px;
    font-size: 13px;
}

.dash-section-title {
    color: var(--dash-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.dash-kpi {
    background: var(--dash-card);
    border: 1px solid var(--dash-line);
    border-radius: 12px;
    box-shadow: var(--dash-shadow);
    padding: 14px 14px 12px 16px;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.dash-kpi::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--dash-accent, var(--dash-primary));
}

.dash-kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 38, 64, 0.08);
}

.dash-kpi-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.dash-kpi-label {
    color: var(--dash-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
}

.dash-kpi-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dash-accent-soft, var(--dash-primary-soft));
    color: var(--dash-accent, var(--dash-primary));
    font-size: 13px;
    flex-shrink: 0;
}

.dash-kpi-value {
    color: var(--dash-ink);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 4px;
}

.dash-kpi-meta {
    color: #8a97ab;
    font-size: 12px;
    margin: 0;
}

.dash-kpi--blue { --dash-accent: #0866C6; --dash-accent-soft: #e8f2fc; }
.dash-kpi--teal { --dash-accent: #0f9b8e; --dash-accent-soft: #e7f7f5; }
.dash-kpi--indigo { --dash-accent: #6366f1; --dash-accent-soft: #eef0ff; }
.dash-kpi--purple { --dash-accent: #7c3aed; --dash-accent-soft: #f1e9ff; }
.dash-kpi--cyan { --dash-accent: #0891b2; --dash-accent-soft: #e6f7fb; }
.dash-kpi--navy { --dash-accent: #1d4ed8; --dash-accent-soft: #e8eefc; }
.dash-kpi--green { --dash-accent: #059669; --dash-accent-soft: #e7f7f1; }
.dash-kpi--red { --dash-accent: #dc2626; --dash-accent-soft: #fdecec; }
.dash-kpi--rose { --dash-accent: #e11d48; --dash-accent-soft: #fde8ee; }
.dash-kpi--slate { --dash-accent: #64748b; --dash-accent-soft: #eef1f6; }
.dash-kpi--amber { --dash-accent: #d97706; --dash-accent-soft: #fff4e5; }

.dash-card {
    background: var(--dash-card);
    border: 1px solid var(--dash-line);
    border-radius: 12px;
    box-shadow: var(--dash-shadow);
    height: 100%;
    overflow: hidden;
}

.dash-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--dash-line);
}

.dash-card-title {
    color: var(--dash-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
}

.dash-card-sub {
    color: var(--dash-muted);
    font-size: 12px;
    margin: 2px 0 0;
}

.dash-card-body {
    padding: 14px 16px;
}

.dash-chart {
    position: relative;
    width: 100%;
    height: 280px;
}

.dash-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.dash-chart--sm {
    height: 220px;
}

.dash-chart--lg {
    height: 320px;
}

.dash-metric-row {
    display: flex;
    gap: 10px;
}

.dash-metric {
    flex: 1;
    background: #f7f9fc;
    border-radius: 10px;
    padding: 12px;
}

.dash-metric-label {
    color: var(--dash-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
}

.dash-metric-value {
    color: var(--dash-ink);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.dash-metric-meta {
    color: #8a97ab;
    font-size: 12px;
    margin: 0;
}

.dash-table {
    width: 100%;
    margin: 0;
}

.dash-table thead th {
    background: #f7f9fc;
    border-top: 0;
    color: #6b7a90;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 16px;
    white-space: nowrap;
}

.dash-table td {
    padding: 11px 16px;
    font-size: 13px;
    color: #2b3a4d;
    vertical-align: middle;
}

.dash-table tbody tr:hover {
    background: #f8fbfe;
}

.dash-empty {
    color: #059669;
    text-align: center;
    padding: 28px 12px;
    margin: 0;
    font-size: 13px;
}

.dash-inv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.dash-inv-cell {
    background: #f7f9fc;
    border-radius: 8px;
    padding: 10px;
}

.dash-inv-cell span {
    display: block;
    color: var(--dash-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.dash-inv-cell strong {
    color: var(--dash-ink);
    font-size: 15px;
    font-weight: 700;
}

.dash-pos-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background: var(--dash-accent-soft);
    color: var(--dash-accent);
}

.dash-progress {
    height: 8px;
    background: #eef3f8;
    border-radius: 99px;
    overflow: hidden;
}

.dash-progress > span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--dash-accent, var(--dash-primary));
}

.dash-welcome {
    background: var(--dash-card);
    border: 1px solid var(--dash-line);
    border-radius: 12px;
    box-shadow: var(--dash-shadow);
    padding: 36px 32px;
}

.dash-loading {
    position: absolute;
    inset: 0;
    background: rgba(245, 247, 251, 0.45);
    z-index: 20;
}

@media (max-width: 991.98px) {
    .dash-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-hero-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .dash-pos-layout {
        flex-direction: column;
    }

    .dash-pos-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-pos-chart {
        min-width: 0;
    }

    .dash-pos-chart .dash-chart {
        height: 240px;
    }
}

.dash-iframe {
    width: 100%;
    height: 220px;
    border: 0;
    display: block;
}

.dash-card-head .btn {
    white-space: nowrap;
}

.dash-pda-grid .btn {
    min-height: 48px;
    font-weight: 600;
}

.dash-select {
    height: 38px;
    border-radius: 6px;
    border-color: #d9e2ec;
    font-size: 13px;
}

.dash-pos-layout {
    display: flex;
    align-items: stretch;
    gap: 20px;
}

.dash-pos-kpis {
    flex: 1 1 58%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.dash-pos-kpis .dash-kpi {
    padding: 10px 10px 8px 12px;
}

.dash-pos-kpis .dash-kpi-top {
    margin-bottom: 4px;
}

.dash-pos-kpis .dash-kpi-icon {
    width: 22px;
    height: 22px;
    font-size: 11px;
}

.dash-pos-kpis .dash-kpi-value {
    font-size: 16px;
    margin: 0 0 2px;
}

.dash-pos-kpis .dash-kpi-meta {
    font-size: 11px;
}

.dash-pos-chart {
    flex: 1 1 42%;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

.dash-pos-chart .dash-chart {
    flex: 1;
    height: auto;
    min-height: 220px;
}

@media (max-width: 1399.98px) {
    .dash-pos-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .dash-hero .dash-date {
        min-width: 0;
        width: 100%;
    }

    .dash-inv-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-metric-row {
        flex-direction: column;
    }

    .dash-chart,
    .dash-chart--lg {
        height: 250px;
    }
}
