/* public/assets/css/widgets.css */

.swepearl-bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 24px;
    width: 100%;
    align-items: start;
}

@media (max-width: 1400px) {
    .swepearl-bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .masonry-grid-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .swepearl-bento-grid {
        grid-template-columns: 1fr;
    }
}

/* Masonry 2-column layout */
.masonry-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: start;
    width: 100%;
}
@media (max-width: 1400px) {
    .masonry-grid-container {
        grid-template-columns: 1fr;
    }
}

.swepearl-stack-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}
.swepearl-stack-layout .widget-card {
    width: 100% !important; /* Override bento spans */
}

/* Sizing spans for flexible grid layouts (MD is minimum size) */
.widget-card.widget-size-xs,
.widget-card.widget-size-sm,
.widget-card.widget-size-md {
    grid-column: span 3;
}
.widget-card.widget-size-lg {
    grid-column: span 4;
}
.widget-card.widget-size-xl {
    grid-column: span 6;
}

@media (max-width: 1400px) {
    .widget-card.widget-size-xs,
    .widget-card.widget-size-sm,
    .widget-card.widget-size-md,
    .widget-card.widget-size-lg,
    .widget-card.widget-size-xl {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .widget-card.widget-size-xs,
    .widget-card.widget-size-sm,
    .widget-card.widget-size-md,
    .widget-card.widget-size-lg,
    .widget-card.widget-size-xl {
        grid-column: span 1;
    }
}

/* Notion-like elegant bordered dashboard containers -> Now Premium Bento Cards */
.widget-card {
    background: var(--light, #f9fafb);
    border: none;
    border-radius: 12px;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 140px;
    overflow: hidden;
}
.dark-theme .widget-card {
    background: rgba(255, 255, 255, 0.03);
    border: none;
}
.widget-card.widget-size-lg {
    min-height: 240px;
}
.widget-card.widget-size-md {
    min-height: 240px;
}

/* Skeleton loader shimmers */
.widget-card.loading-skeleton {
    cursor: default;
    pointer-events: none;
}
.widget-card.loading-skeleton .skeleton-bar {
    background: linear-gradient(90deg, var(--border) 25%, var(--hover) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite linear;
    border-radius: 4px;
}
.widget-card.loading-skeleton .skeleton-circle {
    background: var(--border);
    border-radius: 50%;
    width: 24px;
    height: 24px;
}
.widget-skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.widget-card.loading-skeleton .title-bar {
    width: 120px;
    height: 14px;
}
.widget-card.loading-skeleton .value-bar {
    width: 150px;
    height: 28px;
    margin-top: 16px;
}
.widget-card.loading-skeleton .subtitle-bar {
    width: 180px;
    height: 12px;
    margin-top: 10px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Custom styling inside resolved widgets */
.widget-inner-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    gap: 14px;
}
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}
.widget-title {
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}
.widget-info-icon {
    font-size: 16px;
    color: var(--muted);
    cursor: help;
}
.widget-content-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Metric content widgets formatting */
/* AI Insight Center */
.ai-insight-card {
    background: var(--light, #f9fafb);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-insight-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-insight-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.ai-icon {
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-insight-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.ai-insight-body {
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(0,0,0,0.03);
}

.ai-insight-message {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
}

.ai-insight-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-insight-points li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.ai-insight-points li .material-symbols-rounded {
    font-size: 16px;
    color: var(--success);
}

.ai-insight-recommendation {
    background: #f0fdf4; /* Light green tint */
    border: 1px solid #dcfce7;
    border-radius: 8px;
    padding: 16px;
}

.rec-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.ai-insight-recommendation p {
    margin: 0;
    font-size: 14px;
    color: #166534;
    line-height: 1.5;
}

.metric-widget-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
}
.metric-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}
.metric-card-main-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
}
.metric-card-sub-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.metric-split-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.metric-kpi-block {
    display: flex;
    flex-direction: column;
}
.coupon-types-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-radius: 8px;
}
.coupon-type-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
}
.coupon-type-tag .material-symbols-rounded {
    font-size: 16px;
    color: var(--primary);
}
.coupon-type-tag strong {
    color: var(--text-main);
    font-weight: 700;
}
.metric-sub-pills {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-surface);
    border-radius: 8px;
    margin-bottom: 12px;
}
.metric-sub-pills.no-padding,
.metric-sub-pills.p-0 {
    padding: 0;
    background: transparent;
}
.metric-sub-pill-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.metric-sub-pill-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.metric-sub-pill-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}
.metric-insight-callout {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.metric-insight-callout.callout-primary {
    background: rgba(99, 102, 241, 0.06);
    color: var(--primary);
}
.metric-insight-callout.callout-success {
    background: rgba(16, 185, 129, 0.06);
    color: #10b981;
}
.metric-insight-callout.callout-warning {
    background: rgba(245, 158, 11, 0.06);
    color: #d97706;
}
.metric-insight-callout .material-symbols-rounded {
    font-size: 18px;
}
.badge-trend-success {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-weight: 600;
}
.badge-trend-muted {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--text-muted);
}
.badge-category-marketing {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    font-weight: 600;
}
.badge-category-synced {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 600;
}
.metric-widget-card .metric-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.metric-widget-card .metric-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.03);
    width: fit-content;
}
.metric-widget-card .metric-trend.success {
    color: var(--success);
}
.metric-widget-card .metric-trend.danger {
    color: var(--danger);
}
.metric-widget-card .metric-trend.muted {
    color: var(--muted);
}
.metric-widget-card .metric-trend span.material-symbols-rounded {
    font-size: 16px;
}

/* Chart Widget Styling */
.chart-widget-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.chart-widget-header {
    margin-bottom: 4px;
}
.chart-widget-title {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: var(--text);
}
.chart-widget-desc {
    margin: 2px 0 0 0;
    font-size: var(--fs-sm);
    color: var(--muted);
}

/* Error states */
.widget-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    width: 100%;
    padding: 16px;
    text-align: center;
}
.widget-error-state p {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--muted);
    font-weight: var(--fw-medium);
}
.widget-error-state span.material-symbols-rounded {
    font-size: 32px;
}
.widget-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: var(--fs-sm);
    padding: 32px;
    text-align: center;
    height: 100%;
}

/* Premium viewport-correlated tooltip */
.premium-tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.95); /* Deep slate glassmorphic */
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    line-height: 1.4;
    max-width: 320px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.premium-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.premium-tooltip-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    margin-left: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
    font-weight: 600;
    color: #f8fafc;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    line-height: 1;
}

/* Premium Widget Segment Controller */
.widget-segment-control {
    display: flex;
    align-self: flex-end;
    background: var(--hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
    margin-bottom: 4px;
    width: fit-content;
    box-sizing: border-box;
}
.widget-segment-control .segment-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}
.widget-segment-control .segment-btn:hover {
    color: var(--text);
}
.widget-segment-control .segment-btn.active {
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Premium Widget Inner Skeleton / Loading Overlay */
.widget-inner-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    gap: 8px;
    color: var(--muted);
}
.widget-inner-loading .spin {
    animation: spin 1s linear infinite;
    font-size: 24px;
}

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

/* Bento Widget Activity List Styles (Replacing standard tables) */
.widget-activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}
.activity-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.activity-list-item:last-child {
    border-bottom: none;
}
.activity-item-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.activity-item-title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--text);
}
.activity-item-subtitle {
    font-size: var(--fs-xs);
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.activity-item-value {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}
.activity-item-amount {
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--text);
}
.activity-item-progress-wrapper {
    width: 60px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.activity-item-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}
.activity-item-progress-fill.success { background: var(--success); }
.activity-item-progress-fill.warning { background: var(--warning); }
/* --- Premium Insights & Packaging Styles --- */
.insight-inner-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    flex: 1;
}
.dark-theme .insight-inner-card {
    /* No longer need background/border overrides */
}

/* Modern segmented progress bar */
.segmented-progress {
    display: flex;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    gap: 2px;
}
.segment-fill {
    height: 100%;
    transition: width 0.3s ease;
}

/* Dot Legends */
.dot-legend-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.dot-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}
.dot-legend-color {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* Insight text box */
.insight-message-box {
    background: #fbf5ff;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: rgb(38,38,38);
    line-height: 1.5;
    margin-top: auto; /* Pushes to bottom */
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.insight-message-box .material-symbols-rounded {
    font-size: 20px;
    color: #a855f7;
    flex-shrink: 0;
    margin-top: -1px;
}
.insight-message-box span:not(.material-symbols-rounded) {
    flex: 1;
}
.insight-message-box strong {
    color: #9333ea;
    font-weight: 600;
}
.insight-message-box.success,
.widget-insight-banner.success {
    background: #f0fdf4 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 8px;
    padding: 12px 16px;
    color: #166534 !important;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 0 !important;
}
.insight-message-box.success .material-symbols-rounded,
.widget-insight-banner.success .material-symbols-rounded,
.widget-insight-banner.success .widget-insight-icon {
    font-size: 20px;
    color: #16a34a !important;
    flex-shrink: 0;
    margin-top: -1px;
}
.insight-message-box.success strong,
.widget-insight-banner.success strong,
.widget-insight-banner.success .widget-insight-text strong {
    color: #15803d !important;
    font-weight: 600;
}

.insight-message-box.info,
.widget-insight-banner.info {
    background: rgba(0, 0, 0, 0.035) !important;
    color: #475569 !important;
}
.dark-theme .insight-message-box.info,
.dark-theme .widget-insight-banner.info {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted, #94a3b8) !important;
}
.insight-message-box.info .material-symbols-rounded,
.widget-insight-banner.info .material-symbols-rounded,
.widget-insight-banner.info .widget-insight-icon {
    color: #64748b !important;
}
.insight-message-box.info strong,
.widget-insight-banner.info strong,
.widget-insight-banner.info .widget-insight-text strong {
    color: #334155 !important;
}
.dark-theme .insight-message-box.info strong,
.dark-theme .widget-insight-banner.info strong,
.dark-theme .widget-insight-banner.info .widget-insight-text strong {
    color: #cbd5e1 !important;
}

/* Override metric trend to be a pill */
.metric-widget-card .metric-trend {
    padding: 4px 8px;
    border-radius: 100px;
    background: rgba(0,0,0,0.03);
    width: fit-content;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
.metric-widget-card .metric-trend.success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}
.dark-theme .metric-widget-card .metric-trend.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
.metric-widget-card .metric-trend.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}
.dark-theme .metric-widget-card .metric-trend.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Modernize widget card header */
.widget-header {
    margin-bottom: 8px;
}
.widget-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-title-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.035);
    color: var(--text-muted, #64748b);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 4px;
    border: none;
    margin-left: 2px;
    line-height: 1.2;
    vertical-align: middle;
}
.dark-theme .widget-title-tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted, #94a3b8);
}
.widget-title-icon {
    display: flex;
    align-items: center;
    color: var(--muted);
    font-size: 20px;
}

.widget-subtitle {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    margin-top: 2px;
}

/* Subtle clean table design */
.clean-insight-table {
    width: 100%;
    border-collapse: collapse;
}
.clean-insight-table th {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    text-align: left;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}
.clean-insight-table th.text-right {
    text-align: right;
}
.clean-insight-table td {
    padding: 10px 0;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}
.clean-insight-table tr:not(:last-child) td {
    border-bottom: 1px solid rgba(0,0,0,0.02);
}
.dark-theme .clean-insight-table tr:not(:last-child) td {
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

/* --- Premium Mockup Layouts --- */
.widget-hero-section {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
    margin-bottom: 24px;
}
.widget-hero-number {
    font-size: 28px;
    font-weight: 700;
    color: rgb(38,38,38);
    line-height: 1;
    letter-spacing: -0.02em;
}
.widget-hero-trend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

/* =============================================================================
   📊 WIDGET BOTTOM METRICS ARCHITECTURE (Clean, Reusable & Transparent)
   ============================================================================= */
.widget-bottom-metrics {
    display: flex;
    background: rgba(0, 0, 0, 0.025);
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 14px;
    border-top: none;
    gap: 16px;
    justify-content: space-between;
}

.dark-theme .widget-bottom-metrics {
    background: rgba(255, 255, 255, 0.03);
    border: none;
}

.widget-metric-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    background: transparent;
}
.widget-metric-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 28px;
    background: var(--border-color, rgba(0, 0, 0, 0.08));
}
.widget-metric-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}
.widget-metric-label .material-symbols-rounded,
.widget-metric-label span.material-symbols-rounded {
    font-size: 14px;
}
.widget-metric-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}
.widget-metric-sub,
.widget-metric-subtext {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.widget-insight-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(145deg, #ffffff, #fafafa);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 16px 24px;
    margin-top: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}
.widget-insight-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
}
.widget-insight-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 24px;
}
.widget-insight-banner-text {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.5;
}
.widget-insight-banner-text strong {
    color: var(--primary);
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}
.widget-footer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}
.widget-footer-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Two Column Layout */
.dashboard-two-column-layout {
    display: flex;
    gap: 24px;
    width: 100%;
}
.dashboard-main-column {
    flex: 1;
    min-width: 0;
}
.dashboard-sidebar-column {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
    align-self: flex-start;
}
@media (max-width: 1024px) {
    .dashboard-two-column-layout {
        flex-direction: column;
    }
    .dashboard-sidebar-column {
        width: 100%;
    }
}
/* --- Reusable Action Menu Styling (Right-hand side) --- */
.action-menu-group {
    margin-bottom: 32px;
}
.action-menu-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted, #8c8c8c);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 16px;
    margin-left: 4px;
}
.action-menu-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    height: 36px;
    padding: 0 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-bottom: 12px;
    text-decoration: none;
}
.action-menu-btn:hover {
    background: #e5e7eb;
}
.action-menu-btn:active {
    transform: scale(0.98);
}
.action-menu-btn .material-symbols-rounded {
    font-size: 18px;
    color: #374151;
}

/* Action Menu QR Component */
.action-menu-text {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 16px;
    line-height: 1.5;
    margin-left: 4px;
}
.action-menu-qr-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.action-menu-qr-wrapper {
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.action-menu-qr-wrapper canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.action-menu-qr-card .action-menu-btn {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* =============================================================================
   📊 SALES BREAKDOWN & CHANNEL DISTRIBUTION WIDGET STYLES
   ============================================================================= */
.sales-channel-breakdown-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0 0 0;
}
.breakdown-title-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.channel-progress-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.channel-progress-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.channel-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 6px;
}
.channel-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main, #1e293b);
    font-weight: 500;
}
.channel-icon {
    font-size: 16px;
    color: var(--text-muted, #64748b);
}
.channel-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.channel-pct {
    color: var(--text-muted, #64748b);
    font-size: 12px;
}
.channel-bar-wrapper {
    width: 100%;
    height: 7px;
    background: var(--bg-surface, rgba(0, 0, 0, 0.04));
    border-radius: 10px;
    overflow: hidden;
}
.channel-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease-in-out;
}
.channel-bar-fill.channel-pos {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}
.channel-bar-fill.channel-selfservice {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}
.channel-bar-fill.channel-coupon {
    background: linear-gradient(90deg, #10b981, #059669);
}
.channel-bar-fill.channel-giftcard {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}
.channel-bar-fill.channel-wallet {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

/* ==========================================
 * Prepayment Reconciliation Summary Box (No borders, no inline styles)
 * ========================================== */
.reconciliation-container {
    margin-top: 16px;
    padding-top: 14px;
}

.reconciliation-title {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
}

.reconciliation-title-icon {
    font-size: 16px;
    color: #16a34a;
}

.reconciliation-summary-box {
    background: rgba(34, 197, 94, 0.05);
    border-radius: 8px;
    padding: 12px 14px;
}

.reconciliation-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 6px;
}

.reconciliation-label-primary {
    color: var(--text-heading, #111827);
    font-weight: 600;
}

.reconciliation-val-positive {
    font-weight: 700;
    color: #16a34a;
}

.reconciliation-unit-tag {
    font-size: 10px;
    font-weight: normal;
    color: var(--text-muted, #64748b);
}

.reconciliation-row-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted, #64748b);
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.reconciliation-divider {
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.reconciliation-label-secondary {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-strong, #374151);
}

.reconciliation-footer-text {
    font-size: 11px;
    color: var(--text-muted, #64748b);
    margin-top: 8px;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reconciliation-footer-icon {
    font-size: 16px;
    color: #16a34a;
    flex-shrink: 0;
}

.reconciliation-summary-box-info {
    background: var(--primary-light, rgba(59, 66, 159, 0.05));
    border-radius: 8px;
    padding: 12px 14px;
}

.reconciliation-val-info {
    font-weight: 700;
    color: var(--primary, #3b429f);
}

.reconciliation-footer-icon-info {
    font-size: 16px;
    color: var(--primary, #3b429f);
    flex-shrink: 0;
}
