/* ============================================
   ImportPanel v5.1 - Dashboard Page
   Widget grid layout with drag-and-drop
   ============================================ */

/* ---- Widget Grid System ---- */
.dash-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin-bottom: 28px;
}

/* Widget container */
.dash-widget {
    position: relative;
    border-radius: 12px;
    transition: box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

/* Column span classes */
.dash-widget--col2 {
    grid-column: span 2;
}

.dash-widget--col1 {
    grid-column: span 1;
}

/* ---- Widget Header (drag handle + title + collapse) ---- */
.dash-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border-light, #e2e8f0);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.dash-widget-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--color-text-muted, #94a3b8);
    cursor: grab;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
    flex-shrink: 0;
}

.dash-widget-drag-handle:hover {
    color: var(--color-text, #111827);
    background-color: var(--color-bg-hover, rgba(0, 0, 0, 0.04));
}

.dash-widget-drag-handle:active {
    cursor: grabbing;
}

.dash-widget-drag-handle svg {
    width: 16px;
    height: 16px;
}

.dash-widget-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted, #94a3b8);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-widget-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    color: var(--color-text-muted, #94a3b8);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
    flex-shrink: 0;
}

.dash-widget-collapse-btn:hover {
    color: var(--color-text, #111827);
    background-color: var(--color-bg-hover, rgba(0, 0, 0, 0.04));
}

.dash-widget-collapse-btn svg {
    width: 14px;
    height: 14px;
}

/* ---- Widget Body ---- */
.dash-widget-body {
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    max-height: 2000px;
    opacity: 1;
}

/* ---- Collapsed state ---- */
.dash-widget--collapsed .dash-widget-header {
    border-radius: 10px;
    border-bottom: 1px solid var(--color-border-light, #e2e8f0);
}

.dash-widget--collapsed .dash-widget-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* ---- Dragging states ---- */
.dash-widget--dragging {
    opacity: 0.4;
    transform: scale(0.98);
    box-shadow: none !important;
}

.dash-widget--dragging .dash-widget-header {
    border-color: var(--color-primary, #1e3a5f);
}

/* Drop target highlight */
.dash-widget--drop-target {
    box-shadow: 0 0 0 2px var(--color-primary, #1e3a5f);
    border-radius: 12px;
}

/* Placeholder element shown during drag */
.dash-widget-placeholder {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(30, 58, 95, 0.06) 8px,
        rgba(30, 58, 95, 0.06) 16px
    );
    border: 2px dashed var(--color-primary, #1e3a5f);
    border-radius: 12px;
    grid-column: span 2;
    min-height: 80px;
    transition: height 0.2s ease;
    opacity: 0.6;
}

/* ---- Layout Actions (Reset button) ---- */
.dash-layout-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Override add-widget card styles when button is inside header actions */
.dash-layout-actions .dash-add-widget-btn {
    width: auto;
    min-height: 0;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    background: var(--color-primary, #1e3a5f);
    color: #fff;
}

.dash-reset-layout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted, #94a3b8);
    border: 1px solid var(--color-border-light, #e2e8f0);
    border-radius: 6px;
    padding: 6px 12px;
    background: var(--color-surface, #ffffff);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.dash-reset-layout-btn:hover {
    color: var(--color-text, #111827);
    border-color: var(--color-border, #cbd5e1);
    background-color: var(--color-bg-hover, rgba(0, 0, 0, 0.02));
}

.dash-reset-layout-btn svg {
    flex-shrink: 0;
}

/* Override page-header to allow space-between for reset button */
.dash-greeting-header {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px;
}

.dash-greeting-header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-greeting-header h1 {
    font-size: 24px;
    line-height: 1.3;
}

/* Gradient text effect on username span inside greeting */
.dash-greeting-header h1 .greeting-username {
    background: linear-gradient(135deg, var(--color-primary, #1e3a5f), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dash-greeting-date {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
}

/* ---- Section Headers with accent dot ---- */
.dash-deliveries-header h3,
.dash-activity-header h3,
.dash-shipping-header h3,
.dash-top-suppliers-header h3,
.dash-goals-header h3,
.chart-card .chart-header h3,
.recent-imports .card-header h3 {
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-deliveries-header h3::before,
.dash-activity-header h3::before,
.dash-shipping-header h3::before,
.dash-top-suppliers-header h3::before,
.dash-goals-header h3::before,
.chart-card .chart-header h3::before,
.recent-imports .card-header h3::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background-color: var(--color-primary, #1e3a5f);
    flex-shrink: 0;
}

/* ---- Date Range Picker Bar ---- */
.dash-date-range-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 28px;
    background-color: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border-light, #e2e8f0);
    border-radius: 10px;
    flex-wrap: wrap;
}

.dash-date-presets {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dash-date-preset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary, #64748b);
    background-color: transparent;
    border: 1px solid var(--color-border-light, #e2e8f0);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.3;
}

.dash-date-preset:hover {
    color: var(--color-primary, #1e3a5f);
    border-color: var(--color-primary, #1e3a5f);
    background-color: rgba(30, 58, 95, 0.04);
}

.dash-date-preset.active {
    color: #ffffff;
    background-color: var(--color-primary, #1e3a5f);
    border-color: var(--color-primary, #1e3a5f);
    font-weight: 600;
}

.dash-date-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.dash-date-input-label {
    font-size: 12px;
    color: var(--color-text-muted, #94a3b8);
    font-weight: 500;
}

.dash-date-input {
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid var(--color-border-light, #e2e8f0);
    border-radius: 6px;
    background-color: var(--color-surface, #ffffff);
    color: var(--color-text, #111827);
    width: 130px;
    line-height: 1.4;
}

.dash-date-input:focus {
    outline: none;
    border-color: var(--color-primary, #1e3a5f);
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12);
}

.dash-date-apply {
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-date-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary, #64748b);
    padding: 4px 12px;
    background-color: rgba(30, 58, 95, 0.05);
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.5;
}

/* ---- Last Updated Timestamp ---- */
.dash-last-updated {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-muted);
    padding: 6px 12px;
    background-color: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border-light, #e2e8f0);
    border-radius: 6px;
}

.dash-updated-label {
    font-weight: 500;
}

.dash-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-text-muted, #94a3b8);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.dash-refresh-btn:hover {
    color: var(--color-primary, #1e3a5f);
    background-color: rgba(30, 58, 95, 0.06);
}

.dash-refresh-btn svg {
    transition: transform 0.6s ease;
}

.dash-refresh-btn.dash-refresh-spinning svg {
    animation: dashRefreshSpin 0.8s ease;
}

@keyframes dashRefreshSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---- Dashboard Financial Cards (uses fin-card from imports.css) ---- */
.dash-fin-cards {
    gap: 20px;
    margin-bottom: 0;
}

/* Allow fin-card values to wrap instead of truncating */
.dash-fin-cards .fin-card-value {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    line-height: 1.2;
}

/* Inline sparkline in fin-cards */
.fin-card-sparkline {
    display: inline-block;
    vertical-align: middle;
    margin-left: 12px;
    opacity: 0.7;
}

/* Counter animation wrapper */
.fin-card-amount {
    font-variant-numeric: tabular-nums;
}

/* ---- Chart Row ---- */
.chart-row {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 28px;
    margin-bottom: 0;
}

.chart-card {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--color-border-light, #ebeef3);
    background-color: var(--color-surface, #ffffff);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.03));
}

.chart-card .chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.chart-card .chart-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.chart-card .chart-body {
    padding: 20px 24px 24px;
    position: relative;
}

.chart-card .chart-body canvas {
    width: 100% !important;
    max-height: 280px;
}

/* Doughnut chart legend */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 0 24px 20px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Secondary Chart Row (Supplier + Country) ---- */
.chart-row-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 0;
}

/* ---- Upcoming Deliveries Widget ---- */
.dash-deliveries-card {
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.dash-deliveries-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-light);
}

.dash-deliveries-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.dash-deliveries-count {
    font-size: 12px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    padding: 0 7px;
    font-weight: 600;
}

.dash-deliveries-list {
    padding: 0;
}

.dash-delivery-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--color-border-light);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-delivery-item:last-child {
    border-bottom: none;
}

.dash-delivery-item:hover {
    background-color: rgba(30, 58, 95, 0.02);
    transform: translateX(2px);
}

/* Urgency variants */
.dash-delivery-urgent {
    border-left-color: var(--color-danger);
}

.dash-delivery-soon {
    border-left-color: var(--color-warning);
}

.dash-delivery-normal {
    border-left-color: var(--color-success);
}

/* Date block */
.dash-delivery-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    background-color: var(--color-bg-secondary, #f1f3f7);
    border-radius: 8px;
    padding: 6px 4px;
}

.dash-delivery-day {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-text);
}

.dash-delivery-month {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

/* Info block */
.dash-delivery-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.dash-delivery-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-delivery-supplier {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Countdown block */
.dash-delivery-countdown {
    text-align: right;
    flex-shrink: 0;
    min-width: 72px;
}

.dash-delivery-days {
    font-size: 13px;
    font-weight: 600;
}

/* Countdown colors by urgency */
.dash-delivery-urgent .dash-delivery-days {
    color: var(--color-danger);
}

.dash-delivery-soon .dash-delivery-days {
    color: var(--color-warning);
}

.dash-delivery-normal .dash-delivery-days {
    color: var(--color-success);
}

/* Empty state */
.dash-deliveries-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* ---- Recent Activity Widget ---- */
.dash-activity-card {
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.dash-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-light);
}

.dash-activity-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.dash-activity-list {
    padding: 0;
}

.dash-activity-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

.dash-activity-timeline {
    padding: 16px 24px 8px;
}

/* Single activity item */
.dash-activity-item {
    display: flex;
    gap: 14px;
    cursor: pointer;
    padding: 6px 8px 6px 0;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.dash-activity-item:hover {
    background-color: var(--color-bg-hover, rgba(0, 0, 0, 0.025));
}

/* Timeline line + dot column */
.dash-activity-line-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20px;
    min-width: 20px;
    padding-top: 3px;
    position: relative;
}

.dash-activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-primary, #1e3a5f);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 3px var(--color-surface, #fff), 0 0 0 5px rgba(30, 58, 95, 0.08);
}

/* Dot color variants */
.dash-activity-dot--status {
    background-color: var(--color-info, #3b82f6);
}

.dash-activity-dot--payment {
    background-color: var(--color-success, #22c55e);
}

.dash-activity-dot--date {
    background-color: var(--color-warning, #f59e0b);
}

.dash-activity-line {
    width: 2px;
    flex: 1;
    background-color: var(--color-border-light, #e2e8f0);
    min-height: 16px;
}

/* Hide the line on the last item */
.dash-activity-item:last-child .dash-activity-line {
    display: none;
}

/* Content column */
.dash-activity-content {
    flex: 1;
    min-width: 0;
    padding-bottom: 14px;
}

.dash-activity-item:last-child .dash-activity-content {
    padding-bottom: 4px;
}

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

.dash-activity-field {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.dash-activity-time {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-activity-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

.dash-activity-old {
    color: var(--color-text-muted);
    text-decoration: line-through;
    text-decoration-color: var(--color-text-muted);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-activity-arrow {
    color: var(--color-text-muted);
    font-size: 11px;
    flex-shrink: 0;
}

.dash-activity-new {
    color: var(--color-text);
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-activity-import {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Activity Feed (scrollable container) ---- */
.activity-feed {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-light, #e2e8f0) transparent;
}

.activity-feed::-webkit-scrollbar {
    width: 5px;
}

.activity-feed::-webkit-scrollbar-track {
    background: transparent;
}

.activity-feed::-webkit-scrollbar-thumb {
    background-color: var(--color-border-light, #e2e8f0);
    border-radius: 4px;
}

/* Single activity feed item */
.activity-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--color-border-light, #f1f5f9);
    position: relative;
}

/* Left timeline connector line between feed icons */
.activity-feed-item::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 46px;
    bottom: -2px;
    width: 2px;
    background-color: var(--color-border-light, #ebeef3);
}

.activity-feed-item:last-child {
    border-bottom: none;
}

.activity-feed-item:last-child::before {
    display: none;
}

.activity-feed-item:hover {
    background-color: var(--color-bg-hover, rgba(0, 0, 0, 0.025));
}

/* Icon circle by action type */
.activity-feed-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
}

.activity-feed-icon svg {
    width: 14px;
    height: 14px;
}

.activity-feed-icon--status {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.activity-feed-icon--payment {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.activity-feed-icon--create {
    background-color: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.activity-feed-icon--edit {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Content area */
.activity-feed-content {
    flex: 1;
    min-width: 0;
}

.activity-feed-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

/* Empty state */
.activity-feed-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    color: var(--color-text-muted, #94a3b8);
    font-size: 14px;
}

/* Footer with "Zobacz wiecej" link */
.activity-feed-footer {
    padding: 12px 24px;
    text-align: center;
    border-top: 1px solid var(--color-border-light, #e2e8f0);
}

.activity-feed-footer-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary, #1e3a5f);
    text-decoration: none;
    transition: color 0.15s ease;
}

.activity-feed-footer-link:hover {
    color: var(--color-primary-hover, #2d5a8e);
    text-decoration: underline;
}

/* ---- Shipping Insights Widget ---- */
.dash-shipping-card {
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.dash-shipping-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-light);
}

.dash-shipping-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-shipping-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.dash-shipping-icon svg {
    width: 18px;
    height: 18px;
}

.dash-shipping-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.dash-shipping-body {
    padding: 0;
}

.dash-shipping-loading {
    padding: 40px 24px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

.dash-shipping-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
}

.dash-shipping-chart-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    border-right: 1px solid var(--color-border-light);
}

.dash-shipping-chart-wrap canvas {
    width: 100% !important;
    max-width: 200px;
    max-height: 200px;
}

.dash-shipping-chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.dash-shipping-chart-legend .chart-legend-item {
    font-size: 12px;
}

.dash-shipping-stats {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dash-shipping-sub-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Average delivery time rows */
.dash-shipping-avg-section {
    display: flex;
    flex-direction: column;
}

.dash-shipping-avg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.dash-shipping-avg-row:last-child {
    border-bottom: none;
}

.dash-shipping-avg-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text);
    font-weight: 500;
}

.dash-shipping-avg-icon {
    display: inline-flex;
    align-items: center;
    width: 20px;
    flex-shrink: 0;
}

.dash-shipping-avg-icon svg {
    width: 16px;
    height: 16px;
}

.dash-shipping-avg-values {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-shipping-avg-days {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.dash-shipping-avg-count {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* On-time vs delayed section */
.dash-shipping-ontime-section {
    display: flex;
    flex-direction: column;
}

.dash-shipping-ontime-bar {
    height: 10px;
    background-color: var(--color-danger, #ef4444);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dash-shipping-ontime-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-success, #22c55e), #34d399);
    border-radius: 20px;
    transition: width 0.6s ease;
    min-width: 2px;
}

.dash-shipping-ontime-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dash-shipping-ontime-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-secondary, var(--color-text-muted));
}

.dash-shipping-ontime-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-shipping-ontime-dot--ok {
    background-color: var(--color-success, #22c55e);
}

.dash-shipping-ontime-dot--late {
    background-color: var(--color-danger, #ef4444);
}

/* ---- Recent Imports ---- */
.recent-imports {
    margin-bottom: 0;
}

.recent-imports .card-header {
    padding: 20px 24px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-border-light);
}

.recent-imports .card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.recent-imports .table-wrapper {
    border: none;
    border-radius: 0;
}

.recent-imports table {
    margin: 0;
}

/* ---- Clickable Stat Cards (drill-down) ---- */
.dash-fin-clickable[data-drilldown] {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.dash-fin-clickable[data-drilldown]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1));
}

.dash-fin-clickable[data-drilldown]:active {
    transform: translateY(0);
}

/* Drill-down hint text that appears on hover */
.drill-down-hint {
    font-size: 11px;
    color: var(--color-text-muted, #94a3b8);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dash-fin-clickable[data-drilldown]:hover .drill-down-hint {
    opacity: 1;
}

/* Clickable chart segments cursor */
.chart-card canvas {
    cursor: default;
}

/* Clickable chart legend items */
.chart-legend-item[style*="cursor"] {
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
    transition: background-color 0.15s ease;
}

.chart-legend-item[style*="cursor"]:hover {
    background-color: var(--color-bg-hover, rgba(0, 0, 0, 0.04));
}

/* Supplier items drill-down hover */
.dash-supplier-item[style*="cursor"]:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .dash-supplier-item[style*="cursor"]:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .chart-legend-item[style*="cursor"]:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

/* ---- Dashboard Skeleton Loading ---- */
/* Skeleton cards now use inline styles on .skeleton divs inside .fin-card */

/* ---- KPI Row (Avg Delivery, Sparkline, Upcoming) ---- */
.dash-kpi-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 28px;
    margin-bottom: 0;
}

.dash-kpi-card {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

.dash-kpi-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 12px;
}

.dash-kpi-label svg {
    flex-shrink: 0;
    color: var(--color-primary, #1e3a5f);
    opacity: 0.7;
}

.dash-kpi-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.1;
    margin-bottom: 8px;
}

.dash-kpi-unit {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-muted);
}

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

.dash-kpi-range {
    font-size: 12px;
    color: var(--color-text-secondary, var(--color-text-muted));
}

.dash-kpi-sample {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Sparkline wrapper */
.dash-sparkline-wrap {
    flex: 1;
    min-height: 60px;
    max-height: 80px;
    position: relative;
}

.dash-sparkline-wrap canvas {
    width: 100% !important;
}

/* ---- Top Suppliers Widget ---- */
.dash-top-suppliers-card {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.dash-top-suppliers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-light);
}

.dash-top-suppliers-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.dash-top-suppliers-body {
    padding: 0;
}

.dash-top-suppliers-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

.dash-supplier-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--color-border-light);
    transition: background-color 0.15s ease;
}

.dash-supplier-item:last-child {
    border-bottom: none;
}

.dash-supplier-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.dash-supplier-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
}

.dash-supplier-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-supplier-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dash-supplier-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-supplier-count {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-supplier-bar-row {
    width: 100%;
}

.dash-supplier-bar {
    height: 6px;
    background-color: var(--color-border-light, #e2e8f0);
    border-radius: 20px;
    overflow: hidden;
}

.dash-supplier-bar-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.6s ease;
    min-width: 4px;
}

.dash-supplier-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dash-supplier-total {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
}

.dash-supplier-avg {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* ---- Dark Mode ---- */
[data-theme="dark"] .dash-widget-header {
    background-color: var(--color-surface, #1a1a2e);
    border-color: var(--color-border-light, #2a2a4a);
}

[data-theme="dark"] .dash-widget-drag-handle:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .dash-widget-collapse-btn:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .dash-widget--drop-target {
    box-shadow: 0 0 0 2px var(--color-primary, #3b82f6);
}

[data-theme="dark"] .dash-widget-placeholder {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(59, 130, 246, 0.08) 8px,
        rgba(59, 130, 246, 0.08) 16px
    );
    border-color: var(--color-primary, #3b82f6);
}

[data-theme="dark"] .dash-reset-layout-btn {
    background-color: var(--color-surface, #1a1a2e);
    border-color: var(--color-border-light, #2a2a4a);
}

[data-theme="dark"] .dash-reset-layout-btn:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--color-border, #3a3a5a);
}

[data-theme="dark"] .dash-shipping-icon {
    background-color: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .dash-delivery-item:hover,
[data-theme="dark"] .dash-shipping-avg-row {
    border-bottom-color: var(--color-border-light);
}

[data-theme="dark"] .dash-supplier-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .dash-delivery-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ---- Monthly Goals ---- */
.dash-goals-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 0;
    border-radius: 12px;
}

.dash-goals-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-light);
}

.dash-goals-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.dash-goals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 24px;
    background-color: var(--color-bg-secondary, #f1f3f7);
    border-radius: 0 0 12px 12px;
}

.dash-goal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background-color: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border-light, #e2e8f0);
    border-radius: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dash-goal-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dash-goal-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary, #64748b);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dash-goal-ring-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-goal-ring {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.dash-goal-ring-bg {
    color: var(--color-border-light, #e2e8f0);
}

.dash-goal-ring-progress {
    transition: stroke-dashoffset 1s ease-out;
}

.dash-goal-percent {
    position: absolute;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    z-index: 1;
}

.dash-goal-values {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.dash-goal-current {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
}

.dash-goal-target {
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
}

/* Goals modal form */
.dash-goals-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0;
}

.dash-goals-modal-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-goals-modal-form .input-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.dash-goals-modal-form .form-input {
    width: 100%;
}

/* ---- Widget Gallery ---- */
.widget-gallery-info {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    padding: 8px 12px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    text-align: center;
}

.widget-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.widget-gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background-color: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border-light, #e2e8f0);
    border-radius: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.widget-gallery-item:not(.widget-gallery-item--disabled):hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.widget-gallery-item--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.widget-gallery-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.1), rgba(30, 58, 95, 0.2));
    color: var(--color-primary, #1e3a5f);
}

.widget-gallery-icon svg {
    width: 28px;
    height: 28px;
}

.widget-gallery-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
}

.widget-gallery-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.4;
}

.widget-gallery-btn {
    min-width: 80px;
}

/* ---- Widget Actions ---- */
.dash-widget-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.dash-widget-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    color: var(--color-text-muted, #94a3b8);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
    flex-shrink: 0;
}

.dash-widget-remove-btn:hover {
    color: var(--color-danger, #ef4444);
    background-color: rgba(239, 68, 68, 0.1);
}

/* ---- Custom Widget Cards ---- */
.widget-card {
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
}

.widget-card-body {
    padding: 24px;
}

/* Currency Widget */
.widget-currency-card .widget-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.currency-widget-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.currency-widget-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.currency-widget-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background-color: var(--color-surface, #ffffff);
    color: var(--color-text);
    text-align: right;
}

.currency-widget-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12);
}

.currency-widget-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.currency-widget-rate {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
    padding: 6px;
    background-color: rgba(30, 58, 95, 0.05);
    border-radius: 6px;
}

/* Notes Widget */
.widget-notes-textarea {
    width: 100%;
    min-height: 180px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background-color: var(--color-surface, #ffffff);
    color: var(--color-text);
    resize: vertical;
    font-family: inherit;
}

.widget-notes-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12);
}

/* Links Widget */
.widget-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 100px;
}

.widget-links-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.widget-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background-color: rgba(30, 58, 95, 0.05);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: background-color 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.widget-link-item:hover {
    background-color: rgba(30, 58, 95, 0.1);
    border-color: var(--color-primary);
}

.widget-link-icon {
    display: flex;
    align-items: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.widget-link-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-link-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.widget-link-item:hover .widget-link-remove {
    opacity: 1;
}

.widget-link-remove:hover {
    background: var(--color-danger);
    color: #ffffff;
}

.widget-links-add-btn {
    width: 100%;
}

/* Weather Widget */
.widget-weather-loading {
    padding: 40px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
}

.widget-weather-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.widget-weather-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: rgba(30, 58, 95, 0.05);
    border-radius: 8px;
}

.widget-weather-city {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.widget-weather-temp {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}

.widget-weather-condition {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Tasks Widget */
.widget-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 100px;
}

.widget-tasks-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.widget-task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background-color: rgba(30, 58, 95, 0.05);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.widget-task-item.checked {
    opacity: 0.6;
}

.widget-task-item.checked .widget-task-text {
    text-decoration: line-through;
    color: var(--color-text-muted);
}

.widget-task-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.widget-task-text {
    flex: 1;
    font-size: 13px;
    color: var(--color-text);
}

.widget-task-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.widget-task-item:hover .widget-task-remove {
    opacity: 1;
}

.widget-task-remove:hover {
    background: var(--color-danger);
    color: #ffffff;
}

.widget-tasks-add-form {
    display: flex;
    gap: 8px;
}

.widget-tasks-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background-color: var(--color-surface, #ffffff);
    color: var(--color-text);
}

.widget-tasks-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12);
}

.widget-tasks-add-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

/* Clock Widget */
.widget-clock-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget-clock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: rgba(30, 58, 95, 0.05);
    border-radius: 8px;
}

.widget-clock-city {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.widget-clock-time {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}

/* Add Widget Button - dashed card style */
.dash-add-widget-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 120px;
    padding: 24px;
    border: 2px dashed var(--color-border, #dfe3ea);
    border-radius: 12px;
    background-color: transparent;
    color: var(--color-text-muted, #9ca3af);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.dash-add-widget-btn:hover {
    border-color: var(--color-primary, #1e3a5f);
    color: var(--color-primary, #1e3a5f);
    background-color: rgba(30, 58, 95, 0.03);
}

.dash-add-widget-btn svg {
    width: 20px;
    height: 20px;
}

/* ---- Responsive ---- */
@media (max-width: 1300px) {
    .dash-fin-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 900px) {
    .dash-date-range-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .dash-date-custom {
        margin-left: 0;
        flex-wrap: wrap;
    }

    .dash-date-label {
        text-align: center;
    }

    .dash-kpi-row {
        grid-template-columns: 1fr 1fr;
    }

    .dash-widget-grid {
        grid-template-columns: 1fr;
    }

    .dash-widget--col2,
    .dash-widget--col1 {
        grid-column: span 1;
    }

    .dash-widget-placeholder {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .dash-date-presets {
        gap: 4px;
    }

    .dash-date-preset {
        padding: 5px 10px;
        font-size: 11px;
    }

    .dash-date-input {
        width: 110px;
        font-size: 11px;
    }

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

    .dash-goals-grid {
        grid-template-columns: 1fr;
    }

    .dash-goals-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .dash-goals-header h3 {
        text-align: center;
    }

    #dash-goals-set-btn {
        width: 100%;
    }

    .dash-kpi-row {
        grid-template-columns: 1fr;
    }

    .dash-kpi-card {
        padding: 16px;
    }

    .dash-kpi-value {
        font-size: 26px;
    }

    .chart-row {
        grid-template-columns: 1fr;
    }

    .chart-row-secondary {
        grid-template-columns: 1fr;
    }

    .dash-top-suppliers-header {
        padding: 16px;
    }

    .dash-supplier-item {
        padding: 12px 16px;
    }

    .dash-activity-timeline {
        padding: 12px 16px 4px;
    }

    .dash-activity-header {
        padding: 16px 16px;
    }

    .dash-activity-old,
    .dash-activity-new {
        max-width: 100px;
    }

    .activity-feed-item {
        padding: 10px 16px;
    }

    .activity-feed-footer {
        padding: 10px 16px;
    }

    .dash-shipping-grid {
        grid-template-columns: 1fr;
    }

    .dash-shipping-chart-wrap {
        border-right: none;
        border-bottom: 1px solid var(--color-border-light);
        padding: 20px 16px;
    }

    .dash-shipping-chart-wrap canvas {
        max-width: 160px;
        max-height: 160px;
    }

    .dash-shipping-stats {
        padding: 20px 16px;
    }

    .dash-shipping-header {
        padding: 16px;
    }

    .dash-shipping-ontime-labels {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .dash-greeting-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .dash-layout-actions {
        width: 100%;
    }

    .dash-reset-layout-btn {
        width: 100%;
        justify-content: center;
    }

    .dash-widget-header {
        padding: 6px 10px;
    }

    .dash-widget-title {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .dash-fin-cards {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Welcome Tour / Onboarding Overlay
   ============================================ */

/* Backdrop overlay */
.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
}

.tour-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9990;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

/* Highlight cutout - placed over the target element */
.tour-highlight {
    position: fixed;
    z-index: 9991;
    border-radius: 12px;
    box-shadow:
        0 0 0 4px rgba(30, 58, 95, 0.5),
        0 0 0 9999px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-highlight--pulse {
    animation: tourPulse 2s ease-in-out infinite;
}

@keyframes tourPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.5), 0 0 0 9999px rgba(0, 0, 0, 0.55); }
    50% { box-shadow: 0 0 0 8px rgba(30, 58, 95, 0.3), 0 0 0 9999px rgba(0, 0, 0, 0.55); }
}

/* Welcome step - centered, no highlight */
.tour-highlight--welcome {
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    border-radius: 0;
}

/* Tooltip card */
.tour-tooltip {
    position: fixed;
    z-index: 9992;
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border-light, #e2e8f0);
    border-radius: 16px;
    padding: 28px 28px 20px;
    width: 380px;
    max-width: calc(100vw - 32px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    animation: tourTooltipIn 0.35s ease-out;
}

@keyframes tourTooltipIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Tooltip arrow */
.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border-light, #e2e8f0);
    transform: rotate(45deg);
    z-index: -1;
}

.tour-tooltip--arrow-top::before {
    top: -8px;
    left: 32px;
    border-bottom: none;
    border-right: none;
}

.tour-tooltip--arrow-bottom::before {
    bottom: -8px;
    left: 32px;
    border-top: none;
    border-left: none;
}

.tour-tooltip--arrow-left::before {
    left: -8px;
    top: 28px;
    border-top: none;
    border-right: none;
}

.tour-tooltip--arrow-right::before {
    right: -8px;
    top: 28px;
    border-bottom: none;
    border-left: none;
}

/* No arrow for centered welcome / final step */
.tour-tooltip--center::before {
    display: none;
}

/* Icon in tooltip */
.tour-tooltip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--color-primary-light, #edf2f7);
    color: var(--color-primary, #1e3a5f);
    margin-bottom: 16px;
}

.tour-tooltip-icon svg {
    width: 26px;
    height: 26px;
}

/* Title */
.tour-tooltip-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text, #111827);
    margin: 0 0 8px;
    line-height: 1.3;
}

/* Description */
.tour-tooltip-desc {
    font-size: 14px;
    color: var(--color-text-secondary, #4b5563);
    line-height: 1.6;
    margin: 0 0 20px;
}

/* Step counter */
.tour-tooltip-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.tour-tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border-light, #e2e8f0);
    transition: background 0.25s ease, transform 0.25s ease;
}

.tour-tooltip-dot--active {
    background: var(--color-primary, #1e3a5f);
    transform: scale(1.25);
}

.tour-tooltip-dot--done {
    background: var(--color-primary, #1e3a5f);
    opacity: 0.4;
}

/* Buttons row */
.tour-tooltip-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-light, #e2e8f0);
}

.tour-tooltip-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-btn-skip {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted, #9ca3af);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.tour-btn-skip:hover {
    color: var(--color-text-secondary, #4b5563);
    background: var(--color-bg-hover, rgba(0, 0, 0, 0.04));
}

.tour-btn-next {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: var(--color-primary, #1e3a5f);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tour-btn-next:hover {
    background: var(--color-primary-hover, #2a4f7f);
}

.tour-btn-next:active {
    transform: scale(0.97);
}

.tour-btn-next svg {
    width: 14px;
    height: 14px;
}

/* Step counter text */
.tour-step-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted, #9ca3af);
    letter-spacing: 0.5px;
}

/* Welcome step special styling */
.tour-tooltip--welcome-step {
    text-align: center;
}

.tour-tooltip--welcome-step .tour-tooltip-icon {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-primary, #1e3a5f), var(--color-primary-hover, #2a4f7f));
    color: #ffffff;
}

.tour-tooltip--welcome-step .tour-tooltip-icon svg {
    width: 32px;
    height: 32px;
}

.tour-tooltip--welcome-step .tour-tooltip-title {
    font-size: 22px;
}

.tour-tooltip--welcome-step .tour-tooltip-actions {
    justify-content: center;
}

/* Final step special styling */
.tour-tooltip--final-step {
    text-align: center;
}

.tour-tooltip--final-step .tour-tooltip-icon {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

.tour-tooltip--final-step .tour-tooltip-icon svg {
    width: 32px;
    height: 32px;
}

.tour-tooltip--final-step .tour-tooltip-title {
    font-size: 20px;
}

.tour-tooltip--final-step .tour-tooltip-actions {
    justify-content: center;
    border-top: none;
    padding-top: 4px;
}

.tour-btn-finish {
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tour-btn-finish:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.tour-btn-finish:active {
    transform: scale(0.97);
}

/* Confetti animation for final step */
.tour-confetti {
    position: fixed;
    inset: 0;
    z-index: 9993;
    pointer-events: none;
    overflow: hidden;
}

.tour-confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: tourConfettiFall 2.5s ease-in forwards;
}

@keyframes tourConfettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Dark theme overrides */
[data-theme="dark"] .tour-highlight {
    box-shadow:
        0 0 0 4px rgba(99, 148, 211, 0.5),
        0 0 0 9999px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .tour-highlight--welcome {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
}

@keyframes tourPulseDark {
    0%, 100% { box-shadow: 0 0 0 4px rgba(99, 148, 211, 0.5), 0 0 0 9999px rgba(0, 0, 0, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(99, 148, 211, 0.3), 0 0 0 9999px rgba(0, 0, 0, 0.7); }
}

[data-theme="dark"] .tour-highlight--pulse {
    animation: tourPulseDark 2s ease-in-out infinite;
}

[data-theme="dark"] .tour-tooltip {
    background: var(--color-surface, #1a1a2e);
    border-color: var(--color-border-light, #2a2a3e);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tour-tooltip::before {
    background: var(--color-surface, #1a1a2e);
    border-color: var(--color-border-light, #2a2a3e);
}

[data-theme="dark"] .tour-tooltip-icon {
    background: rgba(99, 148, 211, 0.15);
    color: #6394d3;
}

[data-theme="dark"] .tour-tooltip--welcome-step .tour-tooltip-icon {
    background: linear-gradient(135deg, #1e3a5f, #2a5a8f);
}

[data-theme="dark"] .tour-tooltip-dot--active {
    background: #6394d3;
}

[data-theme="dark"] .tour-tooltip-dot--done {
    background: #6394d3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tour-tooltip {
        width: 320px;
        padding: 20px 20px 16px;
    }

    .tour-tooltip-title {
        font-size: 16px;
    }

    .tour-tooltip--welcome-step .tour-tooltip-title {
        font-size: 19px;
    }

    .tour-tooltip-desc {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .tour-tooltip {
        width: calc(100vw - 24px);
        left: 12px !important;
        right: 12px;
    }
}

/* ============================================
   Mobile Responsiveness - Dashboard
   ============================================ */

/* Tablet: adjust widget grid */
@media (max-width: 992px) {
    .dash-widget-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dash-widget--col2,
    .dash-widget--col1 {
        grid-column: span 1;
    }

    .chart-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-row-secondary {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Mobile: comprehensive dashboard improvements */
@media (max-width: 768px) {
    /* Greeting header: stack layout */
    .dash-greeting-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

    .dash-greeting-header h1 {
        font-size: 18px;
    }

    .dash-layout-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Date range bar: stack on mobile */
    .dash-date-range-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        gap: 12px;
    }

    .dash-date-presets {
        flex-wrap: wrap;
        width: 100%;
        gap: 6px;
    }

    .dash-date-preset {
        flex: 1 1 calc(33.333% - 4px);
        min-width: 0;
        padding: 8px 10px;
        font-size: 11px;
    }

    .dash-date-custom {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .dash-date-input {
        flex: 1;
        min-width: calc(50% - 4px);
    }

    .dash-date-apply {
        width: 100%;
    }

    /* Widget headers: adjust sizing */
    .dash-widget-header {
        padding: 10px 14px;
    }

    .dash-widget-title {
        font-size: 10px;
    }

    /* Financial cards: 2-column grid */
    .dash-fin-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .fin-card {
        padding: 14px;
    }

    .fin-card-value {
        font-size: 18px;
    }

    .fin-card-label {
        font-size: 11px;
    }

    /* Chart cards: better mobile layout */
    .chart-card .chart-header {
        padding: 16px 18px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .chart-card .chart-header h3 {
        font-size: 14px;
    }

    .chart-card .chart-body {
        padding: 16px 18px 18px;
    }

    .chart-card .chart-body canvas {
        max-height: 240px !important;
    }

    .chart-legend {
        flex-wrap: wrap;
        gap: 12px;
        padding: 0 18px 16px;
    }

    .chart-legend-item {
        font-size: 12px;
    }

    /* Deliveries widget: better spacing */
    .dash-deliveries-header {
        padding: 16px 18px;
    }

    .dash-deliveries-header h3 {
        font-size: 14px;
    }

    .dash-delivery-item {
        padding: 12px 18px;
        gap: 12px;
    }

    .dash-delivery-icon {
        width: 36px;
        height: 36px;
    }

    .dash-delivery-info h4 {
        font-size: 13px;
    }

    .dash-delivery-info .delivery-meta {
        font-size: 11px;
    }

    .dash-delivery-eta {
        font-size: 12px;
    }

    /* Activity feed: scrollable */
    .dash-activity-feed {
        max-height: 350px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dash-activity-item {
        padding: 12px 18px;
    }

    .dash-activity-icon {
        width: 32px;
        height: 32px;
    }

    .dash-activity-desc {
        font-size: 13px;
    }

    .dash-activity-time {
        font-size: 11px;
    }

    /* Goals widget: better mobile layout */
    .dash-goals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .dash-goal-item {
        padding: 14px;
    }

    .dash-goal-label {
        font-size: 11px;
    }

    .dash-goal-values {
        font-size: 13px;
    }

    .dash-goal-ring {
        width: 60px;
        height: 60px;
    }

    /* Stats cards: 2 columns on mobile */
    .stats-row,
    .stat-cards,
    .stats-grid,
    .dashboard-stats {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .stat-icon svg {
        width: 16px;
        height: 16px;
    }

    /* Ensure charts don't overflow */
    .dash-widget-body {
        overflow-x: hidden;
    }
}

/* Small mobile: further optimizations */
@media (max-width: 480px) {
    .dash-greeting-header h1 {
        font-size: 16px;
    }

    .dash-greeting-date {
        font-size: 12px;
    }

    /* Financial cards: 1 column on very small screens */
    .dash-fin-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Date presets: 2 per row */
    .dash-date-preset {
        flex: 1 1 calc(50% - 3px);
        font-size: 10px;
        padding: 7px 8px;
    }

    /* Stats cards: keep 2 columns but smaller */
    .stats-row,
    .stat-cards,
    .stats-grid,
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 16px;
    }

    .stat-icon {
        width: 28px;
        height: 28px;
    }

    .stat-icon svg {
        width: 14px;
        height: 14px;
    }

    /* Widget grid: tighter spacing */
    .dash-widget-grid {
        gap: 16px;
        margin-bottom: 20px;
    }

    /* Chart body: smaller on small screens */
    .chart-card .chart-body canvas {
        max-height: 200px !important;
    }

    /* Goals: 1 column on very small screens */
    .dash-goals-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Deliveries: more compact */
    .dash-delivery-item {
        padding: 10px 16px;
    }

    .dash-delivery-icon {
        width: 32px;
        height: 32px;
    }

    /* Activity feed: more compact */
    .dash-activity-item {
        padding: 10px 16px;
    }

    /* Page header */
    .page-header h1 {
        font-size: 18px;
    }
}

/* Landscape mobile: optimize for horizontal space */
@media (max-width: 768px) and (orientation: landscape) {
    .dash-fin-cards {
        grid-template-columns: repeat(4, 1fr);
    }

    .stats-row,
    .stat-cards,
    .stats-grid,
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr) !important;
    }

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

/* Activity feed: always scrollable on mobile */
@media (max-width: 768px) {
    .dash-activity-feed,
    .dash-deliveries-list {
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   DATA QUALITY WIDGET
   ============================================ */

.dash-dq-card {
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--color-border-light, #ebeef3);
    background-color: var(--color-surface, #ffffff);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.03));
    overflow: hidden;
}

.dash-dq-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 260px;
}

/* ---- Gauge Section ---- */
.dash-dq-gauge-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 24px;
    border-right: 1px solid var(--color-border-light, #ebeef3);
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.02), rgba(59, 130, 246, 0.03));
}

.dash-dq-gauge {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 16px;
}

.dash-dq-gauge-svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.dash-dq-gauge-bg {
    fill: none;
    stroke: var(--color-border-light, #e2e8f0);
    stroke-width: 8;
}

.dash-dq-gauge-fill {
    fill: none;
    stroke: #22c55e;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s ease;
}

.dash-dq-gauge-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.dash-dq-gauge-pct {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text, #111827);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dash-dq-gauge-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gauge Legend */
.dash-dq-gauge-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.dash-dq-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--color-text-muted, #94a3b8);
}

.dash-dq-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-dq-legend-good .dash-dq-legend-dot {
    background-color: #22c55e;
}

.dash-dq-legend-ok .dash-dq-legend-dot {
    background-color: #f59e0b;
}

.dash-dq-legend-poor .dash-dq-legend-dot {
    background-color: #ef4444;
}

/* ---- Details Section ---- */
.dash-dq-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dash-dq-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-text-muted, #94a3b8);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-dq-section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background-color: var(--color-primary, #1e3a5f);
    flex-shrink: 0;
}

/* ---- Category Breakdown Bars ---- */
.dash-dq-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-dq-bar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-dq-bar-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-dq-bar-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary, #64748b);
}

.dash-dq-bar-pct {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text, #111827);
    font-variant-numeric: tabular-nums;
}

.dash-dq-bar-track {
    width: 100%;
    height: 6px;
    background-color: var(--color-bg-secondary, #f1f5f9);
    border-radius: 3px;
    overflow: hidden;
}

.dash-dq-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2px;
}

/* ---- Weakest Fields List ---- */
.dash-dq-weak-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-dq-weak-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    background-color: var(--color-bg-secondary, #f8fafc);
    transition: background-color 0.15s ease;
}

.dash-dq-weak-item:hover {
    background-color: var(--color-bg-hover, rgba(0, 0, 0, 0.03));
}

.dash-dq-weak-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-dq-weak-good {
    color: #22c55e;
}
.dash-dq-weak-good.dash-dq-weak-dot {
    background-color: #22c55e;
}

.dash-dq-weak-ok {
    color: #f59e0b;
}
.dash-dq-weak-ok.dash-dq-weak-dot {
    background-color: #f59e0b;
}

.dash-dq-weak-poor {
    color: #ef4444;
}
.dash-dq-weak-poor.dash-dq-weak-dot {
    background-color: #ef4444;
}

.dash-dq-weak-name {
    font-size: 12px;
    color: var(--color-text-secondary, #64748b);
    flex: 1;
}

.dash-dq-weak-pct {
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dash-dq-empty {
    font-size: 13px;
    color: var(--color-text-muted, #94a3b8);
    text-align: center;
    padding: 24px 0;
}

.dash-dq-all-good {
    font-size: 12px;
    color: #22c55e;
    font-weight: 500;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-dq-all-good::before {
    content: '\2713';
    font-size: 14px;
    font-weight: 700;
}

/* ---- Data Quality Widget Responsive ---- */
@media (max-width: 768px) {
    .dash-dq-layout {
        grid-template-columns: 1fr;
    }

    .dash-dq-gauge-wrap {
        border-right: none;
        border-bottom: 1px solid var(--color-border-light, #ebeef3);
        padding: 20px;
    }

    .dash-dq-gauge {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }

    .dash-dq-gauge-svg {
        width: 100px;
        height: 100px;
    }

    .dash-dq-gauge-pct {
        font-size: 22px;
    }

    .dash-dq-gauge-legend {
        flex-direction: row;
        gap: 12px;
        justify-content: center;
    }

    .dash-dq-details {
        padding: 16px;
    }
}
