﻿/* =========================================
   SIDEBAR — suppress dropdown arrows on submenu child links
========================================= */

.submenu .sidebar-item .sidebar-link::after {
    display: none !important;
}

/* Tooltip styling */

.tooltip.mazer-tooltip .tooltip-inner {
    background-color: #f9f9f9;
    color: #25396f;
    padding: .35rem .6rem;
    border-radius: .35rem;
    font-size: .85rem;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    border: 1px solid #e6eaee;
}

.tooltip.mazer-tooltip .tooltip-arrow::before {
    border-top-color: #f9f9f9;
    border-right-color: #f9f9f9;
    border-bottom-color: #f9f9f9;
    border-left-color: #f9f9f9;
}

/* TokenSmith / Mazer Toastify styling */

.toastify.tokensmith-toast {
    border-radius: .75rem;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
    font-family: "Nunito", sans-serif;
    font-size: .95rem;
    font-weight: 700;
    padding: .85rem 1rem;
    min-width: 320px;
    letter-spacing: .2px;
    /* entrance animation */
    opacity: 0;
    transform: translateX(24px);
    animation: tokensmith-toast-in .35s cubic-bezier(.16,.84,.44,1) forwards;
}

/* SUCCESS gradient (dark → light from right to left) */
.toastify.tokensmith-toast-success {
    background: linear-gradient(to left, #0f5132, #20c997) !important;
}

/* ERROR gradient (dark → light from right to left) */
.toastify.tokensmith-toast-error {
    background: linear-gradient(to left, #842029, #f05252) !important;
}

@keyframes tokensmith-toast-in {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================================
   DASHBOARD — KPI CARDS
========================================= */

.ts-kpi-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ts-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10) !important;
}

.ts-kpi-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
}

/* Text column next to the icon — must declare min-width: 0 so the flex child
   can shrink below its content size and allow text-overflow to engage. */
.ts-kpi-text {
    min-width: 0;
    flex: 1 1 0%;
}

/* Indigo — Active Subscriptions */
.ts-kpi-indigo {
    background-color: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

/* Teal — Billed This Month */
.ts-kpi-teal {
    background-color: rgba(20, 184, 166, 0.12);
    color: #0d9488;
}

/* Green — Paid This Month */
.ts-kpi-green {
    background-color: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

/* Amber — Outstanding Invoices */
.ts-kpi-amber {
    background-color: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

/* Purple — Commissions Due */
.ts-kpi-purple {
    background-color: rgba(168, 85, 247, 0.12);
    color: #9333ea;
}

/* Cyan — Active Referral Codes */
.ts-kpi-cyan {
    background-color: rgba(6, 182, 212, 0.12);
    color: #0e7490;
}

.ts-kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.15;
    color: #25396f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-kpi-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #435ebe;
    margin-top: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ts-kpi-sub {
    font-size: 0.78rem;
    color: #8a9ab5;
    margin-top: 0.1rem;
}

/* =========================================
   DASHBOARD — FINANCE HEALTH PANEL (Chunk 2)
========================================= */

/* Metric row inside the Finance Health right-side panel */
.ts-finance-metric {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ts-finance-metric:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ts-finance-metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.ts-finance-metric-icon.ts-fmi-amber {
    background-color: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.ts-finance-metric-icon.ts-fmi-red {
    background-color: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.ts-finance-metric-body {
    min-width: 0;
    flex: 1 1 0%;
}

.ts-finance-metric-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #25396f;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-finance-metric-value.ts-fmv-warning {
    color: #b45309;
}

.ts-finance-metric-value.ts-fmv-danger {
    color: #dc2626;
}

.ts-finance-metric-sub {
    font-size: 0.8rem;
    font-weight: 600;
    color: #8a9ab5;
    margin-top: 0.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-finance-metric-label {
    font-size: 0.75rem;
    color: #aab4c8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
}

/* Collection rate radial chart container */
.ts-radial-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0 0.25rem;
}

.ts-radial-label {
    font-size: 0.78rem;
    color: #8a9ab5;
    text-align: center;
    margin-top: 0.15rem;
}

/* =========================================
   DASHBOARD — SUBSCRIPTION HEALTH PANEL (Chunk 3)
========================================= */

.ts-sub-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
}

.ts-sub-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ts-sub-stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.15;
    color: #25396f;
}

.ts-sub-stat-value.ts-ssv-danger  { color: #dc2626; }
.ts-sub-stat-value.ts-ssv-warning { color: #b45309; }
.ts-sub-stat-value.ts-ssv-success { color: #16a34a; }
.ts-sub-stat-value.ts-ssv-muted   { color: #8a9ab5; }

.ts-sub-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8a9ab5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ts-sub-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Divider row inside the sub-health panel */
.ts-panel-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin: 0.85rem 0;
}

/* =========================================
   DASHBOARD — REFERRAL OVERVIEW PANEL (Chunk 3)
========================================= */

.ts-ref-stat-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ts-ref-stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ts-ref-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.ts-ref-icon-purple {
    background-color: rgba(168, 85, 247, 0.12);
    color: #9333ea;
}

.ts-ref-icon-cyan {
    background-color: rgba(6, 182, 212, 0.12);
    color: #0e7490;
}

.ts-ref-icon-teal {
    background-color: rgba(20, 184, 166, 0.12);
    color: #0d9488;
}

.ts-ref-icon-amber {
    background-color: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.ts-ref-stat-body {
    min-width: 0;
    flex: 1 1 0%;
}

.ts-ref-stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #25396f;
    line-height: 1.2;
}

.ts-ref-stat-label {
    font-size: 0.75rem;
    color: #8a9ab5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

/* =========================================
   DASHBOARD — ACTION NEEDED PANEL (Chunk 3)
========================================= */

.ts-action-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ts-action-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
}

.ts-action-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

a.ts-action-item:hover {
    background-color: rgba(67, 94, 190, 0.04);
    color: inherit;
    border-radius: 6px;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    margin-left: -0.4rem;
    margin-right: -0.4rem;
}

.ts-action-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.ts-action-dot.ts-dot-danger  { background-color: #dc2626; }
.ts-action-dot.ts-dot-warning { background-color: #b45309; }
.ts-action-dot.ts-dot-info    { background-color: #0e7490; }

.ts-action-body {
    min-width: 0;
    flex: 1 1 0%;
}

.ts-action-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.1rem;
}

.ts-action-category.ts-cat-danger  { color: #dc2626; }
.ts-action-category.ts-cat-warning { color: #b45309; }
.ts-action-category.ts-cat-info    { color: #0e7490; }

.ts-action-desc {
    font-size: 0.87rem;
    color: #3d4966;
    line-height: 1.4;
}

.ts-action-chevron {
    color: #c2cad8;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 3px;
}

.ts-action-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    color: #aab4c8;
}

.ts-action-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

/* =========================================
   DASHBOARD — RECENT ACTIVITY TABLES (Chunk 4)
========================================= */

/* Shared table polish for recent-activity panels */
.ts-recent-table {
    font-size: 0.875rem;
}

.ts-recent-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a9ab5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    white-space: nowrap;
}

.ts-recent-table tbody tr {
    transition: background-color 0.12s ease;
}

.ts-recent-table tbody tr:last-child td {
    border-bottom: none;
}

.ts-recent-table tbody td {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    vertical-align: middle;
}

/* Invoice number monospace link */
.ts-inv-link {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-weight: 600;
    font-size: 0.83rem;
    color: #435ebe;
    text-decoration: none;
}

.ts-inv-link:hover {
    color: #3249a8;
    text-decoration: underline;
}

/* Tenant name link */
.ts-tenant-link {
    display: inline;
    color: #3d4966;
    text-decoration: none;
    font-weight: 500;
}

.ts-tenant-link:hover {
    color: #435ebe;
    text-decoration: underline;
}

/* Amount column */
.ts-amount-cell {
    font-weight: 700;
    color: #25396f;
    white-space: nowrap;
}

/* Payment method badges */
.ts-badge-gateway {
    display: inline-block;
    background-color: rgba(67, 94, 190, 0.10);
    color: #435ebe;
    border: 1px solid rgba(67, 94, 190, 0.20);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.ts-badge-manual {
    display: inline-block;
    background-color: rgba(107, 114, 128, 0.10);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.20);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Reference truncation — must be inline-block for max-width and text-overflow to apply */
.ts-ref-cell {
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 0.78rem;
    color: #8a9ab5;
}

/* Date cell */
.ts-date-cell {
    white-space: nowrap;
    color: #8a9ab5;
    font-size: 0.82rem;
}

/* Actions column — tight */
.ts-actions-cell {
    white-space: nowrap;
    text-align: end;
}

/* Empty state inside activity cards */
.ts-activity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    text-align: center;
    color: #aab4c8;
}

.ts-activity-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
    opacity: 0.35;
}