/* Advanced home dashboard — professional shell.
   Scoped to Advanced mode only. Simple + POS are untouched. */

body.dc-ui-advanced:not(.dark-command-pos):has(.dc-dashboard-hero) #scrollable-container,
body.dc-ui-advanced:not(.dark-command-pos):has(.dc-dashboard-hero) .content {
    background: #f3f5f8 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero {
    background: transparent !important;
    padding: 8px 0 0 !important;
    color: #102033 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero::before,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero > .tw-relative > .tw-absolute {
    display: none !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero > .tw-px-5,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero > .tw-relative > .tw-px-5,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-toolbar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    align-items: center !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-toolbar h1,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero h1 {
    color: #0f172a !important;
    font-size: clamp(20px, 2.4vw, 28px) !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero h1::after {
    display: none !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-subtitle {
    color: #64748b !important;
    font-size: 13px !important;
    margin: 4px 0 0 !important;
    max-width: 36rem;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-toolbar__filters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-end !important;
    flex: 1 1 280px !important;
    min-width: 260px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-filter-location,
body.dc-ui-advanced:not(.dark-command-pos) #dashboard_location,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-filter-location .select2-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 260px !important;
    min-width: 220px !important;
    max-width: 100% !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .select2-container--default .select2-selection--single .select2-selection__rendered,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .select2-container--open {
    z-index: 20000 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .select2-dropdown {
    z-index: 20001 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dataTables_scrollBody {
    min-height: 140px;
}

body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .select2-container--default .select2-selection--single .select2-selection__rendered,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-main .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e2e8f0 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero #dashboard_date_filter {
    background: #f8fafc !important;
    border: 1px solid #dbe3ee !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    min-height: 40px;
    box-shadow: none !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .select2-container--default .select2-selection--single {
    background: #f8fafc !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 8px !important;
    min-height: 40px;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-adv-quickpay,
body.dc-ui-advanced:not(.dark-command-pos) #quick_payment_received_btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px !important;
    margin-top: 12px;
    background: #0f766e !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    font-weight: 650 !important;
    box-shadow: none !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .tw-grid > .tw-transition-all,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main > .tw-grid > .tw-transition-all {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    transform: none !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .tw-grid > .tw-transition-all::before,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .tw-grid > .tw-transition-all::after,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main > .tw-grid > .tw-transition-all::before {
    display: none !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .tw-grid > .tw-transition-all:hover,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main > .tw-grid > .tw-transition-all:hover {
    transform: none !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
    border-color: #cbd5e1 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .tw-grid p:first-of-type {
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .tw-grid .tw-font-mono,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .total_sell,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .net,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .invoice_due,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .total_sell_return,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .total_purchase,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .purchase_due,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .total_purchase_return,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .total_expense {
    color: #0f172a !important;
    font-size: 22px !important;
    font-weight: 750 !important;
    font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif !important;
    letter-spacing: -0.03em !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero .tw-grid .tw-rounded-full {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-pulse {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 16px;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    margin-top: 4px;
    align-items: center;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-score-ring {
    width: 64px !important;
    height: 64px !important;
    border: 4px solid #e2e8f0 !important;
    border-top-color: #1e4e8c !important;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-score {
    font-size: 16px !important;
    font-weight: 750 !important;
    color: #0f172a !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px !important;
    color: #64748b !important;
    margin: 0 0 4px !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-status {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-summary,
body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-secondary {
    color: #64748b !important;
    font-size: 13px !important;
    margin: 4px 0 0 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-metrics > div {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 10px 12px;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-metrics span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-metrics strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    color: #0f172a;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-action-box {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-action-box span {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-action {
    display: block;
    margin-top: 4px;
    color: #1e4e8c;
    font-size: 14px;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main {
    padding-top: 12px !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main h3 {
    color: #0f172a !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main .tw-border-2.tw-rounded-full {
    border-color: #e2e8f0 !important;
    background: #f8fafc !important;
    border-radius: 10px !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main .tw-h-100,
body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main .tw-border-dashed {
    background: #f8fafc !important;
    border: 1px solid #eef2f7 !important;
    border-radius: 10px !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 11px !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-color: #e2e8f0 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-main table tbody td {
    border-color: #eef2f7 !important;
    color: #1e293b !important;
}

body.dc-ui-advanced:not(.dark-command-pos) #sales_payment_dues_table,
body.dc-ui-advanced:not(.dark-command-pos) #purchase_payment_dues_table,
body.dc-ui-advanced:not(.dark-command-pos) #stock_alert_table {
    scroll-margin-top: 88px;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-adv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 4px;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-adv-actions a,
body.dc-ui-advanced:not(.dark-command-pos) .dc-adv-actions .dc-adv-quickpay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #0f172a !important;
    font-weight: 650;
    font-size: 13px;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-adv-actions a:hover,
body.dc-ui-advanced:not(.dark-command-pos) .dc-adv-actions .dc-adv-quickpay:hover {
    border-color: #1e4e8c;
    color: #1e4e8c !important;
    background: #f8fafc;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-adv-actions .dc-adv-quickpay {
    background: #0f766e !important;
    border-color: #0f766e !important;
    color: #fff !important;
    margin-top: 0 !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-kpi-go {
    margin: 6px 0 0 !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    color: #1e4e8c !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-hero a.dc-kpi-go,
body.dc-ui-advanced:not(.dark-command-pos) .dc-kpi-go a {
    color: #1e4e8c !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-shortcuts a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #0f172a !important;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none !important;
}

body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-shortcuts a.dc-pulse-go {
    background: #1e4e8c;
    border-color: #1e4e8c;
    color: #fff !important;
}

body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-adv-actions a,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-pulse-shortcuts a {
    background: #0f1a2b;
    border-color: #243247;
    color: #e2e8f0 !important;
}

@media (max-width: 899.98px) {
    body.dc-ui-advanced:not(.dark-command-pos) .dc-dashboard-pulse {
        grid-template-columns: 1fr;
    }
    body.dc-ui-advanced:not(.dark-command-pos) .dc-pulse-metrics {
        grid-template-columns: 1fr;
    }
}

/* Dark theme — still professional, not neon */
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos):has(.dc-dashboard-hero) #scrollable-container,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos):has(.dc-dashboard-hero) .content {
    background: #0b1220 !important;
}

body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-toolbar,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .tw-grid > .tw-transition-all,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-main > .tw-grid > .tw-transition-all,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-pulse {
    background: #152033 !important;
    border-color: #243247 !important;
}

body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-toolbar h1,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero h1,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .tw-font-mono,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .total_sell,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .net,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .invoice_due,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .total_sell_return,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .total_purchase,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .purchase_due,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .total_purchase_return,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .total_expense,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-pulse-status,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-pulse-score,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-pulse-metrics strong,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-main h3 {
    color: #f1f5f9 !important;
}

body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-subtitle,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero .tw-grid p:first-of-type,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-pulse-summary,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-pulse-metrics span {
    color: #94a3b8 !important;
}

body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-hero #dashboard_date_filter,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-pulse-metrics > div,
body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-main .tw-h-100 {
    background: #0f1a2b !important;
    border-color: #243247 !important;
    color: #e2e8f0 !important;
}

body.dc-ui-advanced.dc-theme-dark:not(.dark-command-pos) .dc-dashboard-main table thead th {
    background: #0f1a2b !important;
    color: #94a3b8 !important;
    border-color: #243247 !important;
}
