﻿/* ===============================
   ROOT DESIGN SYSTEM
================================ */
:root {
    --primary: #004574;
    --primary-dark: #163250;
    --primary-light: #00668D;
    --accent: #009C98;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --background: #F3F4F6;
    --pml-primary: #004574;
    --pml-secondary: #009C98;
    --pml-neutral: #343738;
    --pml-warning: #F2B705;
    --pml-danger: #DC2626;
    --pml-bg-light: #f8fafc;
    --pml-muted: #6b7280;
    --surface: #FFFFFF;
    --radius: 10px;
}

/* ===============================
   BASE
================================ */
body {
    background: var(--background);
    font-family: Arial, sans-serif;
    color: var(--text-primary);
}

/* ===============================
   TYPOGRAPHY
================================ */
.title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.value-large {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===============================
   CARD SYSTEM (VERY IMPORTANT)
================================ */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    transition: all 0.2s ease;
}

    .card:hover {
        box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    }

/* HEADER CARD */
.header-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 18px 22px;
}

/* ===============================
   SECTION
================================ */
.section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    border-left: 3px solid var(--accent);
    padding-left: 8px;
}

/* ===============================
   STAT / KPI CARDS
================================ */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
    transition: all 0.2s ease;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    }

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===============================
   GRID DIVIDERS
================================ */
.divider {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}

/* ===============================
   BUTTONS (MudBlazor override)
================================ */
.mud-button-root {
    border-radius: 8px;
    text-transform: none;
    font-weight: 600;
}

/* ===============================
   MUD OVERRIDES (SUBTLE FIXES)
================================ */
.mud-paper {
    border-radius: var(--radius);
}

.mud-card {
    border-radius: var(--radius);
}

/* ===============================
   LIST ITEMS (Investments)
================================ */
.list-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

    .list-item:last-child {
        border-bottom: none;
    }

/* ===============================
   ALIGNMENT HELPERS
================================ */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 960px) {
    .text-right {
        text-align: left;
    }
}
.chart-container {
    height: 100%;
    width: 100%;
}

.apexcharts-canvas {
    margin: 0 auto;
}
.insight-card {
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    background: white;
    transition: 0.2s ease;
}

    .insight-card:hover {
        box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    }

    /* STATE COLORS */
    .insight-card.success {
        border-left: 4px solid #16A34A;
    }

    .insight-card.warning {
        border-left: 4px solid #F59E0B;
    }

    .insight-card.danger {
        border-left: 4px solid #DC2626;
    }

    .insight-card.neutral {
        border-left: 4px solid #004574;
    }

/* TEXT */
.insight-title {
    font-size: 0.8rem;
    color: #6B7280;
}

.insight-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 4px;
}

.insight-sub {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 4px;
}
.card {
    padding: 16px;
    border-radius: 12px;
    background: white;
    border: 1px solid #E5E7EB;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    color: #9CA3AF;
    text-align: center;
}

.investment-item {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #EEF2F7;
    transition: 0.2s ease;
}

    .investment-item:hover {
        box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    }

.investment-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.investment-name {
    color: #1F2937;
}

.investment-value {
    color: #004574;
}

.investment-type {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 2px;
}

.investment-sub {
    font-size: 0.8rem;
    color: #6B7280;
    margin-top: 4px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.summary-label {
    display: block;
    font-size: 0.75rem;
    color: #9CA3AF;
}

.summary-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1F2937;
}
/* =============================
   PML DASHBOARD SHARED STYLES
============================= */

/* CARD */
.pml-chart-card {
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #E5ECF3;
    padding: 20px;
    transition: all 0.25s ease;
}

    .pml-chart-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
    }

/* HEADER */
.pml-chart-title {
    color: #004574;
    font-weight: 800;
}

.pml-chart-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
}

/* CHART */
.pml-chart-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
}

/* BREAKDOWN */
.pml-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pml-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

    .pml-breakdown-row:hover {
        background: #eef6fb;
        border-color: #d7e4f1;
    }

    /* Highlight */
    .pml-breakdown-row.highlight {
        background: linear-gradient(90deg, #e6f4f8 0%, #f0fdfa 100%);
        border: 1px solid #cde7ef;
    }

/* LEFT */
.pml-breakdown-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pml-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* LABEL */
.pml-breakdown-label {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 600;
}

/* VALUE */
.pml-breakdown-value {
    font-weight: 800;
    color: #004574;
}

.text-muted {
    color: #6b7280;
    margin-left: 6px;
}

/* APEX FIXES */
.apexcharts-canvas {
    margin: 0 auto !important;
}

.apexcharts-legend-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

.apexcharts-tooltip {
    border-radius: 10px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
}

/* RESPONSIVE */
@media (max-width: 960px) {
    .pml-breakdown-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .pml-breakdown-value {
        align-self: flex-end;
    }
}
.income-values {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.label {
    font-size: 0.8rem;
    color: var(--pml-muted);
}

.value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--pml-primary);
}

.progress-label {
    font-size: 0.85rem;
    color: var(--pml-muted);
}

.progress-message {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pml-primary);
}
/* =============================
   PROGRESS BAR THEME
============================= */

/* Base track */
/* Track */
/* Track */
.mud-progress-linear {
    background-color: #eef3f7 !important;
    border-radius: 8px;
}

/* Bar base */
.mud-progress-linear-bar {
    height: 100%;
}

/* SUCCESS */
.pml-progress-success .mud-progress-linear-bar {
    background-color: var(--pml-secondary) !important; /* teal */
}

/* WARNING (YELLOW - visible) */
.pml-progress-warning .mud-progress-linear-bar {
    background-color: #F2B705 !important; /* strong amber */
}

/* DANGER */
.pml-progress-danger .mud-progress-linear-bar {
    background-color: #DC2626 !important;
}
/* =============================
   STATUS BOX (THEMED)
============================= */

.pml-status-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* SUCCESS */
.status-success {
    background: rgba(0, 156, 152, 0.12); /* teal */
    color: var(--pml-secondary);
    border: 1px solid rgba(0, 156, 152, 0.25);
}

/* WARNING STATUS */
.status-warning {
    background: rgba(242, 183, 5, 0.12);
    color: var(--pml-warning);
    border: 1px solid rgba(242, 183, 5, 0.3);
}

/* DANGER */
.status-danger {
    background: rgba(220, 38, 38, 0.08);
    color: #DC2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}
/* =============================
   DESIGN TOKENS
============================= */
:root {
    --pml-primary: #004574;
    --pml-secondary: #009C98;
    --pml-warning: #F2B705;
    --pml-danger: #DC2626;
    --pml-muted: #6b7280;
    --pml-border: #E5ECF3;
    --pml-bg-light: #f8fafc;
}

/* =============================
   CARD
============================= */
.pml-chart-card {
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--pml-border);
    padding: 20px;
}

/* =============================
   HEADER
============================= */
.pml-chart-title {
    color: var(--pml-primary);
    font-weight: 800;
}

.pml-chart-subtitle {
    color: var(--pml-muted);
    font-size: 0.9rem;
}

/* =============================
   VALUES
============================= */
.income-values {
    display: flex;
    justify-content: space-between;
}

.label {
    font-size: 0.8rem;
    color: var(--pml-muted);
}

.value {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--pml-primary);
}

/* =============================
   PROGRESS BAR
============================= */
.mud-progress-linear {
    background-color: #eef3f7 !important;
    border-radius: 10px;
}

.pml-progress-success .mud-progress-linear-bar {
    background-color: var(--pml-secondary) !important;
}

.pml-progress-warning .mud-progress-linear-bar {
    background-color: var(--pml-warning) !important;
}

.pml-progress-danger .mud-progress-linear-bar {
    background-color: var(--pml-danger) !important;
}

/* =============================
   STATUS BOX
============================= */
.pml-status-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
    font-weight: 600;
}

    /* clickable */
    .pml-status-box.clickable {
        cursor: pointer;
    }

/* SUCCESS */
.status-success {
    background: rgba(0, 156, 152, 0.12);
    color: var(--pml-secondary);
}

/* WARNING */
.status-warning {
    background: rgba(242, 183, 5, 0.12);
    color: var(--pml-warning);
}

/* DANGER */
.status-danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--pml-danger);
}

/* =============================
   ACTIONS PANEL
============================= */
.pml-actions-box {
    margin-top: 12px;
    padding: 16px;
    border-radius: 14px;
    background: var(--pml-bg-light);
    border: 1px solid var(--pml-border);
}

.action-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.action-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pml-muted);
}

.action-item strong {
    color: var(--pml-primary);
    font-weight: 800;
}
/* =============================
   ACTION GROUPS
============================= */

.action-group {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pml-border);
}

    .action-group:last-child {
        border-bottom: none;
    }

.action-group-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--pml-primary);
    margin-bottom: 6px;
}
.pml-filter-card {
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.pml-title {
    font-weight: 600;
    color: #004A6D;
}

.pml-subtitle {
    color: #6B7280;
}

.pml-input-card {
    padding: 0.6rem;
    border-radius: 10px;
    background: #F8FAFC;
    transition: all 0.2s ease;
}

    .pml-input-card:hover {
        background: #F1F5F9;
    }

.pml-input-card {
    padding: 0.4rem 0.6rem;
    min-height: 70px; /* force consistency */
}

.pml-label {
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.pml-value {
    font-size: 0.7rem;
    margin-top: 2px;
}

.pml-btn {
    background-color: #004A6D;
    color: white;
    border-radius: 10px;
    padding: 0.6rem 2rem;
    font-weight: 500;
}

    .pml-btn:hover {
        background-color: #006a94;
    }

/* slider styling */
.mud-slider {
    color: #008F8C !important;
}

/* responsive spacing */
@media (max-width: 768px) {
    .pml-input-card {
        padding: 0.8rem;
    }
}
/* ===== SECTION HEADERS ===== */
.section-title {
    font-weight: 700;
    color: var(--pml-primary);
    font-size: 0.9rem;
    margin: 10px 0 4px;
    padding-left: 10px;
    border-left: 4px solid var(--pml-secondary);
}
    .section-title.compact {
        font-size: 0.8rem;
        margin: 6px 0 2px;
    }
/* ===== INPUT CARD ===== */
.pml-input-card {
    position: relative;
    padding: 1rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--pml-border);
    transition: all 0.2s ease;
}

    .pml-input-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    }

    /* ===== ACCENT BAR ===== */
    .pml-input-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        border-radius: 14px 0 0 14px;
    }
.compact-toggle .pml-input-card {
    padding: 0.5rem;
}

/* 🎨 semantic colour usage */
.pml-accent-teal::before {
    background: #009C98;
}
/* positive */
.pml-accent-blue::before {
    background: #00668D;
}
/* neutral */
.pml-accent-pink::before {
    background: #ED6C7E;
}
/* risk */

/* ===== SLIDER TRACK ===== */
.pml-scope .mud-slider-track-fill {
    background: linear-gradient(90deg, #009C98, #00668D);
}

/* ===== BUTTON ===== */
.pml-btn {
    background: linear-gradient(135deg, #004574, #009C98);
    color: white;
    border-radius: 12px;
    padding: 0.6rem 2rem;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

    .pml-btn:hover {
        transform: translateY(-1px);
    }

/* ===== TOGGLES ===== */
.pml-scope .mud-toggle-group {
    background: #F4F7F9;
    border-radius: 10px;
    padding: 4px;
}

.pml-scope .mud-toggle-item.mud-selected {
    background-color: #009C98 !important;
    color: white !important;
}
.pml-section {
    margin-bottom: 12px;
}

.section-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: #004574;
}

/* remove card heaviness */
.pml-input-card {
    padding: 0.6rem;
    background: transparent;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: none;
}

/* compact toggles */
.compact-toggle {
    padding: 0.4rem !important;
    background: transparent !important;
    border: none !important;
}
.mud-grid-item {
    display: flex;
}

    .mud-grid-item > * {
        width: 100%;
    }
.pml-section {
    margin-bottom: 8px;
}
.compact-toggle {
    padding: 0.3rem !important;
    background: transparent !important;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

    .compact-toggle .mud-toggle-group {
        height: 32px;
    }

    .compact-toggle .mud-toggle-item {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
.pml-filter-card {
    background: #FAFBFC;
    padding: 8px;
}
.pml-container {
    border-radius: 12px;
    background: #f9fafb;
}

/* Titles */
.section-title {
    font-weight: 600;
    margin-bottom: 8px;
}

/* Slider colors */
.pml-teal .mud-slider-track {
    background: #1aa6a6;
}

.pml-blue .mud-slider-track {
    background: #1f5c8c;
}

.pml-lightblue .mud-slider-track {
    background: #6bb7d6;
}

.pml-purple .mud-slider-track {
    background: #6b4fa3;
}

/* Toggle styling */
.pill-toggle .mud-toggle-group {
    border-radius: 10px;
    background: #eee;
}

/* Calculate button */
.calculate-card {
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.calculate-btn {
    height: 50px;
    font-weight: 600;
}
.pml-pink .mud-slider-track {
    background: #d16ba5;
}
.pml-input-card {
    border-radius: 14px;
    border: 1px solid #E5ECF3;
    background: #ffffff;
    padding: 12px 14px;
    transition: all 0.2s ease;
}

    .pml-input-card:hover {
        box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    }

.pml-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.pml-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.pml-subtext {
    font-size: 0.7rem;
    color: #9ca3af;
}
.pml-badge {
    background: var(--pml-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}
.pml-slider .mud-slider-track {
    height: 4px !important;
    background-color: #e5e7eb;
}

.pml-slider .mud-slider-track-active {
    background-color: var(--pml-primary) !important;
}

.pml-slider .mud-slider-thumb {
    width: 14px;
    height: 14px;
    background: var(--pml-primary);
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.pml-section {
    margin-bottom: 18px;
}

.section-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--pml-primary);
    margin-bottom: 8px;
    border-left: 3px solid var(--pml-secondary);
    padding-left: 8px;
}
.pml-section {
    margin-bottom: 18px;
}

.section-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--pml-primary);
    margin-bottom: 8px;
    border-left: 3px solid var(--pml-secondary);
    padding-left: 8px;
}
.compact-toggle .mud-toggle-group {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #E5ECF3;
}

.compact-toggle .mud-toggle-item {
    padding: 6px 12px;
    font-size: 0.8rem;
    color: #6b7280;
}

    .compact-toggle .mud-toggle-item.mud-selected {
        background: var(--pml-primary);
        color: white;
    }
.pml-btn {
    background: linear-gradient(135deg, var(--pml-primary), var(--pml-secondary));
    color: white;
    border-radius: 10px;
    padding: 8px 18px;
    font-weight: 600;
}