.dashboard-container {
    max-width: 59%;
    padding: 0 1rem;
    margin: 0 auto;
}

.dashboard-list {
    margin-top: 1.5rem;
}

.dashboard-card {
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    overflow: hidden;
}

.dashboard-card+.dashboard-card {
    margin-top: 0.85rem;
}

.dashboard-link-row {
    display: flex;
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.dashboard-link-row .dashboard-card {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 0;
}

.dashboard-card-disabled {
    opacity: 0.5;
}

.dashboard-card-disabled:hover {
    transform: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.dashboard-card-disabled .dashboard-toggle {
    cursor: not-allowed;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.dashboard-toggle {
    width: 100%;
    border: none;
    background: transparent;
    padding: 1.15rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
}

.dashboard-chevron {
    font-size: 1.75rem;
    font-weight: 700;
    transition: transform 0.18s ease;
}

.dashboard-toggle[aria-expanded="true"] .dashboard-chevron {
    transform: rotate(90deg);
}

.dashboard-panel {
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    padding: 1.1rem 1.75rem 1.25rem;
    background: #fff;
}

.dashboard-card-payments .dashboard-panel {
    padding: 0.6rem 1.25rem 0.7rem;
}

.dashboard-panel p {
    margin-bottom: 1rem;
    color: #64748b;
}

.payments-metrics {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.dashboard-card-payments .payments-metrics {
    gap: 1rem;
}

.metric-card {
    flex: 1 1 140px;
    text-align: center;
}

.dashboard-card-payments .metric-card {
    flex: 1 1 110px;
}

.metric-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.55rem;
}

.dashboard-card-payments .metric-title {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.cash-card .cash-amount {
    min-height: 88px;
    border-radius: 20px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    color: #0f172a;
    box-shadow: none;
    align-items: center;
}

.dashboard-card-payments .cash-card .cash-amount {
    min-height: 44px;
    border-radius: 14px;
    padding: 0.4rem 0.6rem;
}

.cash-icon {
    width: 34px;
    height: 34px;
    display: inline-block;
    object-fit: contain;
    align-self: center;
}

.dashboard-card-payments .cash-icon {
    width: 34px;
    height: 34px;
}

.cash-currency {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

#cashOnHand {
    font-size: 2.2rem;
    font-weight: 700;
}

.dashboard-card-payments .cash-currency,
.dashboard-card-payments #cashOnHand {
    font-size: 1.4rem;
}

.metric-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: #10b981;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-card-payments .metric-ring {
    width: 60px;
    height: 60px;
}

.metric-ring:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 4px;
}

.metric-ring.is-unpaid {
    background: #ef4444;
}

.metric-ring.is-zero {
    background: #10b981;
}

.metric-ring::after {
    content: "";
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
    z-index: 0;
}

.dashboard-card-payments .metric-ring::after {
    width: 34px;
    height: 34px;
}

.metric-ring span {
    position: relative;
    z-index: 1;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-card-payments .metric-ring span {
    font-size: 1rem;
}

.unallocated-card .metric-box {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 22px;
    background: #ef4444;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: #000;
}

.dashboard-card-payments .unallocated-card .metric-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    font-size: 1.2rem;
}

.unallocated-card .metric-box.is-zero {
    background: #b6e388;
    color: #0f172a;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.12);
}

.dash-sales-wrap {
    display: flex;
    gap: 1.25rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.dash-sales-chart {
    flex: 2 1 420px;
    min-width: 320px;
    height: 260px;
    /* important for Chart.js when maintainAspectRatio=false */
}

.dash-sales-stats {
    flex: 1 1 220px;
    min-width: 220px;
}

.dash-sales-monthnav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.dash-sales-month {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    min-width: 5.5rem;
    text-align: center;
}

.dash-sales-navbtn {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-sales-navbtn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.9);
}

.dash-sales-navbtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dash-sales-graphbtn {
    width: 32px;
    height: 28px;
    flex: 0 0 auto;
    margin-left: 0.25rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-sales-graphbtn:hover {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.9);
}

.daily-sales-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.daily-sales-month {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.daily-sales-toggle-group {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.daily-sales-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 10px;
    background: #fff;
    padding: 0.3rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.daily-sales-toggle:hover {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.9);
}

.daily-sales-toggle-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 auto;
}

.daily-sales-chart-wrap {
    position: relative;
    height: 340px;
    width: 100%;
}

.unpaid-docs-table-wrap {
    display: flex;
    justify-content: center;
}

.unpaid-docs-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.unpaid-docs-total {
    color: inherit;
    white-space: nowrap;
}

.unpaid-docs-separator {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

#unpaidDocsModal .modal-dialog {
    max-width: none;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

#unpaidDocsModal .modal-content {
    width: fit-content;
    max-width: 95vw;
}

.unpaid-docs-table {
    width: max-content;
    table-layout: auto;
    display: inline-table;
}

.unpaid-docs-table th,
.unpaid-docs-table td {
    white-space: nowrap;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.dash-sales-row {
    display: flex;
    gap: 0.75rem;
}

.dash-sales-row .dash-sales-metric {
    flex: 1 1 0;
}

.dash-sales-metric {
    margin-bottom: 1rem;
}

.dash-sales-metric-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.dash-sales-metric-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dash-sales-metric-value--money {
    font-size: 2.1rem;
}

.dash-sales-total-value {
    font-size: 1.8rem;
    font-weight: 800;
}

.dash-sales-money {
    font-size: 1.15rem;
    line-height: 1.1;
}