.dashboard-shell {
    --dashboard-surface: #ffffff;
    --dashboard-page: #f4f7fb;
    --dashboard-soft: #f8fafc;
    --dashboard-ink: #0f172a;
    --dashboard-muted: #64748b;
    --dashboard-border: rgba(148, 163, 184, 0.32);
    --dashboard-border-strong: rgba(100, 116, 139, 0.22);
    --dashboard-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    --dashboard-shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.07);
    --dashboard-purple: #7c3aed;
    --dashboard-blue: #2563eb;
    --dashboard-green: #16a34a;
    --dashboard-amber: #d97706;
    --dashboard-red: #dc2626;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding: 1rem 1.5rem 2rem;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    animation: dashboard-fade 0.45s ease-out;
}

@keyframes dashboard-fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-hero {
    position: relative;
    border-radius: 1.4rem;
    padding: 1.25rem;
    color: #eef2ff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 45%, rgba(91, 33, 182, 0.94) 100%);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr);
    gap: 1.25rem;
    box-shadow: var(--dashboard-shadow);
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.18), transparent 24rem),
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07));
    pointer-events: none;
}

.hero-copy,
.hero-profile {
    position: relative;
    z-index: 1;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    margin-bottom: 0.8rem;
}

.hero-logo {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: grid;
    place-items: center;
    color: #f8fafc;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background-size: cover;
    background-position: center;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
}

.hero-logo-fallback {
    font-size: 0.8rem;
}

.hero-titles {
    display: flex;
    flex-direction: column;
}

.hero-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.72);
}

.hero-copy h2 {
    margin: 0.25rem 0 0;
    font-size: clamp(1.45rem, 2.2vw, 2.05rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    max-width: 760px;
    margin: 0 0 1rem;
    color: rgba(226, 232, 240, 0.82);
    line-height: 1.5;
}

.hero-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.meta-item {
    min-width: 150px;
    padding: 0.58rem 0.85rem;
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.meta-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(226, 232, 240, 0.62);
}

.meta-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
}

.hero-profile {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: stretch;
}

.dashboard-shell .profile-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.dashboard-shell .profile-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #f8fafc;
    color: #5b21b6;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

.dashboard-shell .profile-avatar.has-photo {
    background-size: cover;
    background-position: center;
    color: transparent;
}

.dashboard-shell .profile-name {
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
}

.dashboard-shell .profile-role {
    font-size: 0.82rem;
    color: rgba(226, 232, 240, 0.78);
}

.dashboard-shell .profile-email {
    margin-top: 0.2rem;
    font-size: 0.74rem;
    color: rgba(226, 232, 240, 0.66);
}

.hero-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    border-radius: 0.75rem;
    min-height: 38px;
    font-weight: 700;
}

.dashboard-review-cta,
.dashboard-my-notes-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #4338ca !important;
    border: 1px solid rgba(255, 255, 255, 0.64) !important;
}

.dashboard-review-cta span,
.dashboard-my-notes-cta span {
    min-width: 20px;
    height: 20px;
    padding: 0 0.45rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 0.72rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 0.9rem;
}

.kpi-card,
.analytics-kpi-card {
    appearance: none;
    border: 1px solid var(--dashboard-border);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 1rem;
    padding: 0.9rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: var(--dashboard-shadow-soft);
}

.kpi-card:hover,
.analytics-kpi-card.actionable:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.36);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.11);
}

.kpi-card.accent {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 72%, #db2777 100%);
}

.kpi-icon,
.analytics-kpi-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 1.08rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--dashboard-blue);
}

.kpi-card.accent .kpi-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.kpi-body,
.analytics-kpi-body {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.kpi-label,
.analytics-kpi-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: #64748b;
}

.kpi-card.accent .kpi-label,
.kpi-card.accent .kpi-sub {
    color: rgba(255, 255, 255, 0.78);
}

.kpi-value,
.analytics-kpi-value {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
    color: var(--dashboard-ink);
}

.kpi-card.accent .kpi-value {
    color: #fff;
}

.kpi-sub,
.analytics-kpi-sub {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-command-grid,
.dashboard-insights-grid,
.dashboard-analytics-grid,
.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-command-grid .panel-review {
    grid-column: span 7;
}

.dashboard-command-grid .panel-activity {
    grid-column: span 5;
}

.dashboard-insights-grid .panel-document-mix {
    grid-column: span 4;
}

.dashboard-insights-grid .panel-chart.wide {
    grid-column: span 8;
}

.dashboard-shell .panel,
.dashboard-detail {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 1.15rem;
    border: 1px solid var(--dashboard-border);
    box-shadow: var(--dashboard-shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-shell .panel-priority {
    border-color: rgba(124, 58, 237, 0.22);
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(255, 255, 255, 0.98) 42%),
        #ffffff;
}

.dashboard-shell .panel-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.8rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.dashboard-shell .panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dashboard-ink);
}

.dashboard-shell .panel-header p {
    margin: 0.18rem 0 0;
    font-size: 0.78rem;
    color: var(--dashboard-muted);
}

.dashboard-shell .panel-pill {
    padding: 0.3rem 0.68rem;
    border-radius: 999px;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    white-space: nowrap;
}

.dashboard-shell .panel-pill-alert {
    color: #6d28d9;
    background: rgba(124, 58, 237, 0.12);
}

.dashboard-shell .panel-link {
    background: transparent;
    border: none;
    color: #6d28d9;
    font-weight: 700;
    cursor: pointer;
    font: inherit;
}

.dashboard-shell .panel-link.has-review-alert {
    position: relative;
    padding-right: 1rem;
}

.dashboard-shell .panel-link.has-review-alert::after,
.nav-item[data-section="review-section"] a.has-review-alert .nav-icon::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
    animation: dashboard-review-pulse 1.4s ease-in-out infinite;
}

.dashboard-shell .panel-link.has-review-alert::after {
    top: 1px;
    right: 0;
    width: 8px;
    height: 8px;
}

.nav-item[data-section="review-section"] a.has-review-alert .nav-icon {
    position: relative;
}

.nav-item[data-section="review-section"] a.has-review-alert .nav-icon::after {
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
}

.dashboard-shell .panel-body {
    padding: 1rem 1.1rem 1.1rem;
    min-height: 250px;
}

.dashboard-shell .panel-review .panel-body {
    min-height: 310px;
}

.dashboard-priority-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0.82rem 0.9rem;
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-left: 4px solid #dc2626;
    border-radius: 0.75rem;
    background: #fff5f5;
    color: #991b1b;
}

.dashboard-priority-banner.is-hidden {
    display: none;
}

.dashboard-priority-banner i {
    margin-top: 0.1rem;
    color: #dc2626;
}

.dashboard-priority-banner strong,
.dashboard-priority-banner span {
    display: block;
}

.dashboard-priority-banner strong {
    font-size: 0.88rem;
}

.dashboard-priority-banner span {
    margin-top: 0.18rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.dashboard-shell .panel-activity .panel-body {
    min-height: 310px;
}

.dashboard-insights-grid .panel-body {
    min-height: 300px;
}

.review-reminder-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.review-reminder-strip div {
    padding: 0.72rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.review-reminder-strip span {
    display: block;
    font-size: 1.08rem;
    font-weight: 700;
    color: #4c1d95;
}

.review-reminder-strip small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    color: var(--dashboard-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-discount-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(220, 38, 38, 0.18);
    background: #fffafa;
}

.dashboard-discount-card > div {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.dashboard-discount-title {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-discount-card strong {
    color: #991b1b;
    font-size: 1rem;
}

.dashboard-discount-card span {
    color: #b91c1c;
    font-size: 0.76rem;
    font-weight: 700;
}

.review-queue {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.review-queue-count {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #4c1d95;
}

.review-queue-label {
    font-size: 0.8rem;
    color: var(--dashboard-muted);
}

.review-queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 208px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.review-queue-item {
    width: 100%;
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #ffffff;
    border-radius: 0.9rem;
    padding: 0.78rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.review-queue-item:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 58, 237, 0.34);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.review-queue-item.is-high-priority {
    border-color: rgba(220, 38, 38, 0.34);
    background: #fff7f7;
    box-shadow: inset 4px 0 0 #dc2626;
}

.review-queue-vendor {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    font-weight: 700;
    color: var(--dashboard-ink);
}

.review-queue-vendor small {
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.66rem;
    font-weight: 700;
}

.dashboard-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.46rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.review-queue-meta,
.review-queue-route {
    margin-top: 0.18rem;
    font-size: 0.73rem;
    color: rgba(100, 116, 139, 0.9);
}

.review-queue-route {
    color: rgba(71, 85, 105, 0.72);
}

.review-queue-priority-note {
    margin-top: 0.35rem;
    color: #b91c1c;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
}

.review-queue-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.review-queue-age {
    font-size: 0.7rem;
    color: #b45309;
    font-weight: 700;
}

.review-queue-status {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    text-transform: capitalize;
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.review-queue-status.approved {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
}

.review-queue-status.rejected {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.review-queue-empty {
    padding: 1rem;
    border-radius: 0.9rem;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    text-align: center;
    font-size: 0.84rem;
    color: var(--dashboard-muted);
    background: rgba(255, 255, 255, 0.68);
}

.dashboard-shell .activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.dashboard-shell .activity-item {
    display: flex;
    gap: 0.72rem;
    align-items: flex-start;
    padding: 0.68rem;
    border-radius: 0.85rem;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.dashboard-shell .activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
}

.dashboard-shell .activity-body {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.dashboard-shell .activity-title {
    font-weight: 700;
    color: var(--dashboard-ink);
    font-size: 0.83rem;
}

.dashboard-shell .activity-meta {
    font-size: 0.74rem;
    color: var(--dashboard-muted);
}

.dashboard-shell .panel-body canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.dashboard-analytics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-analytics-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.dashboard-analytics-header h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--dashboard-ink);
}

.dashboard-analytics-header p {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: var(--dashboard-muted);
}

.dashboard-analytics-filters {
    display: flex;
    gap: 0.55rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.analytics-filter {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 160px;
}

.analytics-filter span {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--dashboard-muted);
}

.analytics-filter select {
    min-height: 38px;
    border-radius: 0.7rem;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: minmax(320px, 520px);
    gap: 0.9rem;
}

.analytics-kpi-card {
    cursor: default;
}

.analytics-kpi-card.highlight {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(120px, 150px);
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.1), #ffffff 62%);
}

.analytics-kpi-card.actionable {
    cursor: pointer;
}

.analytics-kpi-icon.exception {
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
}

.analytics-kpi-icon.approved {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
}

.analytics-trend.up {
    color: #166534;
}

.analytics-trend.down {
    color: #b91c1c;
}

.analytics-trend.flat {
    color: #475569;
}

.analytics-sparkline {
    width: 100%;
    max-width: 150px;
    justify-self: end;
}

.analytics-sparkline canvas {
    height: 56px !important;
}

.dashboard-shell .panel-analytics {
    grid-column: span 6;
}

.dashboard-shell .panel-analytics.wide {
    grid-column: span 12;
}

.analytics-combo-body {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1rem;
    min-height: 300px;
}

.analytics-chart-wrap {
    min-height: 220px;
}

.analytics-subheader {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    align-self: start;
}

.analytics-subheader h4 {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(30, 41, 59, 0.92);
}

.analytics-subheader .form-control {
    width: 140px;
    max-width: 100%;
}

.analytics-combo-body .analytics-chart-wrap:last-child {
    grid-column: 2;
    min-height: 220px;
}

.dashboard-shell .panel-analytics:not(.wide) .panel-body {
    min-height: 280px;
}

#review-nav-badge.review-alert-badge {
    background: #ef4444;
    min-width: 18px;
    height: 18px;
    padding: 0 0.38rem;
    font-size: 0.68rem;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.42);
    animation: dashboard-review-pulse 1.4s ease-in-out infinite;
}

@keyframes dashboard-review-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
    }
    70% {
        transform: scale(1.06);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.dashboard-detail {
    padding: 1.15rem;
    display: block;
}

.dashboard-detail.is-hidden {
    display: none;
}

.dashboard-detail .detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.dashboard-detail .detail-header h3 {
    margin: 0 0 0.2rem;
    font-size: 1.05rem;
}

.dashboard-detail .detail-header p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--dashboard-muted);
}

.dashboard-detail .detail-actions {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-detail .detail-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: var(--dashboard-soft);
}

.dashboard-detail .detail-search input {
    border: none;
    background: transparent;
    outline: none;
    min-width: 180px;
    font-size: 0.84rem;
}

.dashboard-detail .detail-table {
    width: 100%;
    overflow-x: auto;
}

.dashboard-detail .detail-table table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-detail .detail-table thead th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 0.5rem;
    color: var(--dashboard-muted);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.dashboard-detail .detail-table tbody td {
    padding: 0.82rem 0.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 0.84rem;
    color: var(--dashboard-ink);
}

.dashboard-detail .detail-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

.dashboard-detail .detail-empty {
    display: none;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--dashboard-muted);
}

.dashboard-detail .detail-empty.is-visible {
    display: block;
}

.dashboard-review-modal.is-hidden {
    display: none;
}

.dashboard-review-modal {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.dashboard-review-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(4px);
}

.dashboard-review-dialog {
    position: relative;
    width: min(760px, 96vw);
    max-height: min(720px, 92vh);
    overflow: hidden;
    border-radius: 1.2rem;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
}

.dashboard-review-dialog-header {
    padding: 1.2rem 1.3rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    color: #ffffff;
    background: linear-gradient(135deg, #0e0e0f 0%, #1f1d4e 54%, #3d1a74 100%);linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, #111827 45%, rgba(91, 33, 182, 0.94) 100%);
}

.dashboard-review-eyebrow {
    display: block;
    margin-bottom: 0.22rem;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(226, 232, 240, 0.76);
}

.dashboard-review-dialog-header h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.dashboard-review-dialog-header p {
    margin: 0.25rem 0 0;
    color: rgba(226, 232, 240, 0.78);
}

.dashboard-review-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    cursor: pointer;
}

.dashboard-review-dialog-body {
    padding: 1.2rem 1.3rem;
    overflow-y: auto;
}

.review-modal-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.review-modal-summary-card {
    padding: 0.85rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: #f8fafc;
}

.review-modal-summary-card.primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), #ffffff);
    border-color: rgba(37, 99, 235, 0.22);
}

.review-modal-summary-card span,
.review-modal-details span {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--dashboard-muted);
}

.review-modal-summary-card strong {
    display: block;
    margin-top: 0.18rem;
    font-size: 1.04rem;
    color: var(--dashboard-ink);
    word-break: break-word;
}

.review-modal-summary-card small {
    display: block;
    margin-top: 0.2rem;
    color: var(--dashboard-muted);
}

.review-modal-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.review-modal-details div {
    padding: 0.78rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.review-modal-details strong {
    display: block;
    margin-top: 0.18rem;
    font-size: 0.9rem;
    color: var(--dashboard-ink);
    word-break: break-word;
}

.review-modal-note {
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: 0.95rem;
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.86rem;
}

.dashboard-review-dialog-footer {
    padding: 1rem 1.3rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
    background: #f8fafc;
}

@media (max-width: 1400px) {
    .kpi-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 1180px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-command-grid .panel-review,
    .dashboard-command-grid .panel-activity,
    .dashboard-insights-grid .panel-document-mix,
    .dashboard-insights-grid .panel-chart.wide,
    .dashboard-shell .panel-analytics,
    .dashboard-shell .panel-analytics.wide {
        grid-column: span 12;
    }

    .analytics-combo-body {
        grid-template-columns: 1fr;
    }

    .analytics-subheader,
    .analytics-combo-body .analytics-chart-wrap:last-child {
        grid-column: 1;
    }
}

@media (max-width: 820px) {
    .dashboard-shell {
        padding: 0.9rem;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .hero-brand,
    .hero-actions,
    .dashboard-analytics-header,
    .dashboard-analytics-filters {
        align-items: stretch;
    }

    .hero-actions .btn,
    .analytics-filter,
    .dashboard-analytics-filters .btn {
        width: 100%;
    }

    .review-reminder-strip,
    .review-modal-summary,
    .review-modal-details {
        grid-template-columns: 1fr;
    }

    .review-queue-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .review-queue-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .analytics-kpi-card.highlight {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .analytics-sparkline {
        grid-column: 1 / -1;
        justify-self: stretch;
        max-width: none;
    }

    .dashboard-review-dialog-footer {
        flex-direction: column-reverse;
    }

    .dashboard-review-dialog-footer .btn {
        width: 100%;
    }
}

.dashboard-chart-clickable {
    cursor: pointer;
}

body.dashboard-drilldown-open {
    overflow: hidden;
}

.dashboard-drilldown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 20% 15%, rgba(124, 58, 237, 0.18), transparent 28%),
        radial-gradient(circle at 82% 20%, rgba(14, 165, 233, 0.16), transparent 30%),
        rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.dashboard-drilldown-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.dashboard-drilldown-panel {
    width: min(1080px, calc(100vw - 2rem));
    max-height: min(760px, calc(100vh - 3rem));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.26);
    transform: translateY(16px) scale(0.98);
    transition: transform 180ms ease;
}

.dashboard-drilldown-backdrop.show .dashboard-drilldown-panel {
    transform: translateY(0) scale(1);
}

.dashboard-drilldown-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--drilldown-accent, #7c3aed) 16%, transparent), rgba(239, 246, 255, 0.88)),
        #ffffff;
}

.dashboard-drilldown-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--drilldown-accent, #7c3aed), #2563eb);
    box-shadow: 0 16px 34px color-mix(in srgb, var(--drilldown-accent, #7c3aed) 32%, transparent);
    font-size: 1.35rem;
}

.dashboard-drilldown-kicker {
    display: inline-flex;
    margin-bottom: 0.25rem;
    color: var(--drilldown-accent, #7c3aed);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-drilldown-hero h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 700;
}

.dashboard-drilldown-hero p {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.94rem;
}

.dashboard-drilldown-close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 14px;
    color: #334155;
    background: rgba(255, 255, 255, 0.86);
    transition: transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.dashboard-drilldown-close:hover {
    color: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.dashboard-drilldown-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.88);
}

.dashboard-drilldown-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 999px;
    color: #334155;
    background: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
}

.dashboard-drilldown-summary span:first-child {
    color: var(--drilldown-accent, #7c3aed);
    border-color: color-mix(in srgb, var(--drilldown-accent, #7c3aed) 28%, #dbeafe);
    background: color-mix(in srgb, var(--drilldown-accent, #7c3aed) 10%, #ffffff);
}

.dashboard-drilldown-table-wrap {
    min-height: 260px;
    overflow: auto;
    padding: 1rem 1.5rem 1.4rem;
}

.dashboard-drilldown-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    background: #ffffff;
}

.dashboard-drilldown-table th,
.dashboard-drilldown-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    text-align: left;
    vertical-align: middle;
}

.dashboard-drilldown-table th {
    color: #64748b;
    background: linear-gradient(180deg, #f8fafc, #eef4ff);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-drilldown-table td {
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 700;
}

.dashboard-drilldown-table tbody tr:hover td {
    background: #f8fbff;
}

.dashboard-drilldown-table tbody tr:last-child td {
    border-bottom: 0;
}

.dashboard-drilldown-empty {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.55rem;
    border: 1px dashed rgba(148, 163, 184, 0.72);
    border-radius: 20px;
    color: #64748b;
    background: #f8fafc;
    text-align: center;
}

.dashboard-drilldown-empty i {
    color: var(--drilldown-accent, #7c3aed);
    font-size: 1.8rem;
}

.dashboard-drilldown-empty strong {
    color: #0f172a;
    font-size: 1rem;
}

@media (max-width: 720px) {
    .dashboard-drilldown-backdrop {
        padding: 0.75rem;
    }

    .dashboard-drilldown-panel {
        width: 100%;
        border-radius: 22px;
    }

    .dashboard-drilldown-hero {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dashboard-drilldown-close {
        grid-column: 1 / -1;
        justify-self: end;
    }
}
/* Dashboard Flash News ticker */
.dashboard-flash-news {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 46px;
    margin: 12px 0;
    padding: 7px 10px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.dashboard-flash-news.is-hidden {
    display: none;
}

.flash-news-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.flash-news-label i {
    color: #facc15;
}

.flash-news-viewport {
    min-width: 0;
    overflow: hidden;
}

.flash-news-track {
    display: inline-flex;
    align-items: center;
    gap: 88px;
    min-width: max-content;
    animation: flash-news-scroll var(--flash-news-duration, 28s) linear infinite;
    will-change: transform;
}

.dashboard-flash-news:hover .flash-news-track {
    animation-play-state: paused;
}

.flash-news-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: min(70vw, 720px);
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.flash-news-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 999px;
    background: var(--flash-news-color, #2563eb);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.flash-news-title {
    color: var(--flash-news-color, #2563eb);
    font-weight: 900;
}

.flash-news-action {
    border: 0;
    background: transparent;
    color: var(--flash-news-color, #2563eb);
    font-size: 12px;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

@keyframes flash-news-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

body.dark-theme .dashboard-flash-news,
.dark-theme .dashboard-flash-news {
    border-color: rgba(148, 163, 184, 0.26);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
}

body.dark-theme .flash-news-item,
.dark-theme .flash-news-item {
    color: #e2e8f0;
}

@media (max-width: 760px) {
    .dashboard-flash-news {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .flash-news-label {
        width: fit-content;
    }

    .flash-news-track {
        gap: 56px;
    }

    .flash-news-item {
        max-width: 84vw;
        font-size: 12px;
    }
}
