/* KPI Dashboard — Sections: Billing, Collections, Revenue, Advertisers, Charts */

/* ================================================================
   BILLING AUTOMATION
   ================================================================ */
.billing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.metric-card {
    background: rgba(13, 17, 26, 0.4);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.08), 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.metric-card.span-2 {
    grid-column: span 2;
}

.billing-chart-card {
    align-items: stretch;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* Collections & AR Aging — compact 2-column layout */
.collections-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
    align-items: start;
}

.collections-chart-wrap {
    min-height: 0;
}

.delivery-chart-wrap {
    min-height: 0;
}

.chart-container-fixed {
    position: relative;
    width: 100%;
    height: 200px;
}

/* Billing Insights Strip — below chart */
.billing-insights-strip {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-top: 16px;
    padding: 14px 8px 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.insight-item {
    text-align: center;
    flex: 1;
}

.insight-value {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.insight-label {
    font-size: 13px;
    color: var(--text);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.insight-detail {
    font-size: 13px;
    color: rgba(148, 163, 184, 0.75);
    margin-top: 3px;
    font-weight: 500;
}

.insight-divider {
    width: 1px;
    height: 36px;
    background: rgba(148, 163, 184, 0.1);
    flex-shrink: 0;
}

.teal-text {
    color: var(--teal);
}

/* Billing Activity Feed — below insights strip */
.billing-activity-feed {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.activity-feed-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 10px;
}

.activity-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.04);
}

.activity-entry:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-dot.success {
    background: var(--green);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.activity-dot.warning {
    background: var(--amber);
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.4);
}

.activity-dot.info {
    background: var(--blue);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.activity-desc {
    flex: 1;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.activity-desc strong {
    color: var(--text);
    font-weight: 600;
}

.activity-ago {
    font-size: 13px;
    color: rgba(148, 163, 184, 0.5);
    white-space: nowrap;
    font-weight: 500;
}

.ring-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 12px;
}

.progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 6px rgba(20, 184, 166, 0.3));
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 6;
}

.ring-fill {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 2s cubic-bezier(.22, 1, .36, 1);
    filter: drop-shadow(0 0 8px currentColor);
}

.green-ring {
    stroke: var(--green);
    color: var(--green);
}

.teal-ring {
    stroke: var(--teal);
    color: var(--teal);
}

.blue-ring {
    stroke: var(--blue);
    color: var(--blue);
}

.ring-container {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 12px;
    animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.15);
    }
}

.ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    text-shadow: 0 0 12px rgba(20, 184, 166, 0.3);
}

.metric-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.metric-label.mb-12 {
    margin-bottom: 12px;
}

.metric-big-number {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.amber-text {
    color: var(--amber);
}

.teal-text {
    color: var(--teal);
}

.green-text {
    color: var(--green);
}

.blue-text {
    color: var(--blue);
}

.purple-text {
    color: var(--purple);
}

.metric-sub {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 4px;
    text-align: center;
}

/* Billing Health Card */
.billing-health-card {
    align-items: stretch;
    text-align: left;
}

.health-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.health-stat {
    text-align: center;
    flex: 1;
}

.health-number {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
}

.health-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.exception-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.exception-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}

.exception-item:last-child {
    border-bottom: none;
}

.exception-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.exception-dot.warning {
    background: var(--amber);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.exception-dot.error {
    background: var(--red);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.exception-text {
    flex: 1;
    color: var(--text-muted);
}

.exception-time {
    color: var(--text-dim);
    font-size: 13px;
    white-space: nowrap;
}

/* ================================================================
   COLLECTIONS & AR AGING
   ================================================================ */
.collections-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.collections-chart-wrap {
    min-height: 300px;
}

.delinquent-panel {
    background: rgba(13, 17, 26, 0.4);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.panel-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.delinquent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.delinquent-item:last-child {
    border-bottom: none;
}

.delinquent-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.delinquent-days {
    font-size: 13px;
    color: var(--text-muted);
}

.delinquent-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
}

#delinquentTable code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.25);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* ================================================================
   AI INSIGHTS / ACTIONS
   ================================================================ */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.action-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
    cursor: pointer;
}

.action-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.action-priority {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.action-priority.urgent {
    background: var(--red-glow);
    color: var(--red);
}

.action-priority.high {
    background: var(--amber-glow);
    color: var(--amber);
}

.action-priority.medium {
    background: var(--blue-glow);
    color: var(--blue);
}

.action-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.action-desc {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 16px;
    font-weight: 400;
}

.action-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.action-source {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

/* P&L Clickable Cards */
.pl-clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.pl-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.4);
}

.pl-clickable::after {
    content: 'Click for details';
    display: block;
    font-size: 13px;
    color: #475569;
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.pl-clickable:hover::after {
    color: var(--teal);
}

/* P&L Detail Popover */
.pl-detail-popover {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 8px 0 16px;
    animation: fadeSlideDown 0.25s ease-out;
}

.pl-detail-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pl-detail-body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pl-detail-item {
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.15);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-btn {
    background: transparent;
    border: 1px solid var(--teal);
    color: var(--teal);
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--teal);
    color: var(--bg-primary);
}

/* ================================================================
   AD PULSE SECTION
   ================================================================ */
.pulse-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.pulse-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pulse-stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s;
}

.pulse-stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.pulse-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.pulse-stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.pulse-top-panel,
.pulse-recent-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.top-adv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.top-adv-item:last-child {
    border-bottom: none;
}

.top-adv-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--teal-glow);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.top-adv-info {
    flex: 1;
}

.top-adv-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.top-adv-count {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.top-adv-revenue {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--teal);
}

.top-adv-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin-top: 6px;
}

.top-adv-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--teal), var(--blue));
    transition: width 1s ease;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-info {
    flex: 1;
}

.recent-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.recent-type {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.recent-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--teal);
}

.recent-time {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-left: 12px;
    white-space: nowrap;
}

/* ================================================================
   CORTEX NODES
   ================================================================ */
.nodes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.node-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
}

.node-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.node-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.node-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
}

.node-name {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.node-role {
    font-size: 13px;
    color: var(--text-muted);
}

.node-status {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
}

.node-status.online {
    background: var(--green-glow);
    color: var(--green);
}

.node-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.node-stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.stat-lbl {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sparkline-wrap {
    position: relative;
    width: 100%;
    height: 60px;
    margin-top: auto;
}

.sparkline {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    border-radius: 0 0 12px 12px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.dashboard-footer {
    margin-top: 48px;
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-dim);
}

.footer-tagline {
    color: var(--teal);
    font-style: italic;
    font-weight: 500;
}

/* ================================================================
   DATE RANGE PICKER
   ================================================================ */
.date-range-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.date-chip {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--text);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.date-chip:hover {
    border-color: rgba(20, 184, 166, 0.3);
    color: var(--teal);
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.1);
}

.date-chip.active {
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(20, 184, 166, 0.35);
    color: var(--teal);
    box-shadow: 0 0 14px rgba(20, 184, 166, 0.12);
}

.date-range-label {
    font-size: 14px;
    color: var(--text);
    margin-left: 8px;
    white-space: nowrap;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ================================================================
   COLLECTION ACTION BUTTONS
   ================================================================ */
.collection-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.coll-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coll-btn.coll-30 {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-glow);
}

.coll-btn.coll-30:hover {
    background: var(--blue);
    color: white;
}

.coll-btn.coll-60 {
    border-color: var(--amber);
    color: var(--amber);
    background: var(--amber-glow);
}

.coll-btn.coll-60:hover {
    background: var(--amber);
    color: white;
}

.coll-btn.coll-90 {
    border-color: #f97316;
    color: #f97316;
    background: rgba(249, 115, 22, 0.1);
}

.coll-btn.coll-90:hover {
    background: #f97316;
    color: white;
}

.coll-btn.coll-final {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-glow);
}

.coll-btn.coll-final:hover {
    background: var(--red);
    color: white;
}

.coll-btn.coll-contact {
    border-color: var(--teal);
    color: var(--teal);
    background: transparent;
    font-size: 14px;
    padding: 2px 8px;
}

.coll-btn.coll-contact:hover {
    background: var(--teal-glow);
}

/* ================================================================
   ACTION DROPDOWN MENUS
   ================================================================ */
.action-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 0;
    min-width: 150px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.dropdown-menu button:hover {
    background: var(--teal-glow);
    color: var(--teal);
}

/* ================================================================
   TABLE EXPORT BUTTON
   ================================================================ */
.btn-table-export {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-table-export:hover {
    border-color: rgba(20, 184, 166, 0.3);
    color: var(--teal);
    background: rgba(20, 184, 166, 0.06);
    box-shadow: 0 0 12px rgba(20, 184, 166, 0.1);
}

/* ================================================================
   TOGGLE GROUPS
   ================================================================ */
.toggle-group {
    display: inline-flex;
    gap: 2px;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 8px;
    padding: 2px;
    margin-left: 12px;
    vertical-align: middle;
}

.toggle-btn {
    padding: 3px 10px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--teal-glow);
    color: var(--teal);
}

.toggle-btn:hover:not(.active) {
    color: var(--text);
}

/* ================================================================
   PUBLICATION P&L SECTION
   ================================================================ */
.kpi-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.kpi-card.mini {
    padding: 16px;
    text-align: center;
}

.kpi-card.mini .kpi-value {
    font-size: 22px;
}

.kpi-card.mini .kpi-label {
    font-size: 13px;
}

.pl-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 16px;
    margin-top: 16px;
}

.pl-table-wrap {
    overflow-x: auto;
}

.delivery-chart-wrap {
    min-height: 260px;
}

/* ================================================================
   NEW: TIMELINE & DEADLINE UI (MOCKUP STYLE)
   ================================================================ */
.timeline-container {
    width: 100%;
    margin-bottom: 28px;
    padding: 0 32px;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.header-text {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--teal);
    text-shadow: 0 0 12px rgba(20, 184, 166, 0.5);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--teal);
    box-shadow: 0 0 10px var(--teal);
    animation: liveDotPulse 2s infinite;
}

.timeline-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
    padding: 0 20px;
}

.connecting-line {
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.05));
    z-index: 0;
    transform: translateY(-50%);
}

.timeline-node {
    position: relative;
    z-index: 1;
    background: rgba(13, 17, 26, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--node-color);
    border-radius: 12px;
    padding: 10px 24px;
    min-width: 160px;
    box-shadow: 0 0 16px -4px var(--node-color), inset 0 0 8px -4px var(--node-color);
}

.node-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.node-title {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #FFFFFF;
}

.node-detail {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.timeline-timer {
    z-index: 1;
    font-family: 'Inter', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
    background: var(--bg-primary);
    /* Masks the line behind the numbers */
    padding: 0 16px;
    font-variant-numeric: tabular-nums;
}