/* ================= BASE PAGE ================= */
body {
    background: #f5f7fb;
}

/* ================= HEADER ================= */
.portaldash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

    .portaldash-header h3 {
        margin: 0;
        font-weight: 600;
        color: #0b3d91; /* WRA blue */
    }

.portaldash-subtitle {
    font-size: 14px;
    color: #6c757d;
}

/* ================= LIVE INDICATOR ================= */
.portaldash-live {
    font-size: 14px;
    color: #28a745;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.portaldash-live-dot {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    margin-right: 6px;
    animation: portaldash-pulse 1.5s infinite;
}

@keyframes portaldash-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    70% {
        transform: scale(1.5);
        opacity: 0.3;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ================= CARDS ================= */
.portaldash-card {
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 5px solid #0b3d91;
    background: linear-gradient(135deg, #ffffff, #eef4ff);
    position: relative;
}

    .portaldash-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    }

    /* ACTIVE CARD */
    .portaldash-card.active {
        border: 2px solid #0b3d91;
        transform: scale(1.03);
        box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.15);
    }

    /* CARD TEXT */
    .portaldash-card h4 {
        margin: 0;
        font-size: 26px;
        font-weight: 700;
    }

    .portaldash-card span {
        font-size: 14px;
        color: #6c757d;
    }

.portaldash-link {
    margin-top: 10px;
    font-size: 12px;
    color: #0b3d91;
    font-weight: 500;
}

/* ================= CARD COLORS ================= */
.portaldash-card.primary {
    background: linear-gradient(135deg, #e7f0ff, #cfe2ff);
    border-left-color: #0b3d91;
}

.portaldash-card.success {
    background: linear-gradient(135deg, #e6f7ec, #c9f0d8);
    border-left-color: #28a745;
}

.portaldash-card.danger {
    background: linear-gradient(135deg, #fdeaea, #f8caca);
    border-left-color: #dc3545;
}
.portaldash-card.dangerdue {
    background: linear-gradient(135deg, #b55050, #9e4a4a);
    border-left-color: #dc3545;
}
.portaldash-card.warning {
    background: linear-gradient(135deg, #fff4d6, #ffe8a1);
    border-left-color: #ffc107;
}

.portaldash-card.info {
    background: linear-gradient(135deg, #e6f7fb, #ccecf5);
    border-left-color: #17a2b8;
}

/* DEFAULT CARD */
.portaldash-card:not(.primary):not(.success):not(.danger):not(.warning):not(.info) {
    background: linear-gradient(135deg, #f4f6f9, #e9edf3);
    border-left-color: #6c757d;
}

/* ================= PANELS ================= */
.portaldash-panel {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #e3eaf3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

    .portaldash-panel h5 {
        margin-bottom: 15px;
        font-weight: 600;
        color: #0b3d91;
    }

/* ================= ACTIVITY ================= */
.portaldash-timeline {
    margin-top: 10px;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #edf2f7;
    background: #f9fbfd;
    transition: 0.2s;
}

    .timeline-item:hover {
        background: #eef5ff;
        transform: translateX(4px);
    }

    .timeline-item .icon {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;
        color: white;
        font-size: 16px;
    }

    /* ACTIVITY COLORS */
    .timeline-item.success .icon {
        background: #28a745;
    }

    .timeline-item.warning .icon {
        background: #ffc107;
        color: #000;
    }

    .timeline-item.danger .icon {
        background: #dc3545;
    }

/* ================= INSIGHTS ================= */
.portaldash-insight {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid;
    font-size: 14px;
    transition: 0.2s;
}

    .portaldash-insight.success {
        background: #eaf7ef;
        border-color: #28a745;
    }

    .portaldash-insight.warning {
        background: #fff5e1;
        border-color: #ffc107;
    }
    .portaldash-insight.warningdue {
        background: #fff0e1;
        border-color: #0d6efd;
    }
    .portaldash-insight.info {
        background: #e7f3ff;
        border-color: #0d6efd;
    }


    .portaldash-insight.clickable:hover {
        transform: scale(1.02);
        cursor: pointer;
    }

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .portaldash-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .portaldash-live {
        margin-top: 10px;
    }
}

/* CARD ICON */
.portaldash-card-icon {
    font-size: 22px;
    margin-bottom: 8px;
}

/* ONLINE STATUS */
.portaldash-online {
    font-size: 12px;
    color: #28a745;
    margin-bottom: 6px;
}

/* QUICK ACTIONS */
.portaldash-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

    .portaldash-quick-actions div {
        background: #eef5ff;
        padding: 8px 12px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 13px;
        border: 1px solid #d6e4ff;
    }

        .portaldash-quick-actions div:hover {
            background: #dce9ff;
        }


/* PANEL HEADER */
.portaldash-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.portaldash-panel-sub {
    font-size: 12px;
    color: #6c757d;
}

/* GRID */
.portaldash-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

/* CARD */
.portaldash-action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f4f7fb, #e9f0fb);
    border: 1px solid #dde6f2;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .portaldash-action-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
        background: linear-gradient(135deg, #e7f0ff, #dce9ff);
    }

    /* ICON */
    .portaldash-action-card .icon {
        font-size: 22px;
        width: 45px;
        height: 45px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #0b3d91;
        color: white;
    }

    /* TEXT */
    .portaldash-action-card strong {
        font-size: 14px;
        display: block;
    }

    .portaldash-action-card p {
        margin: 0;
        font-size: 12px;
        color: #6c757d;
    }

.portaldash-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .portaldash-inline h4 {
        margin: 0;
        font-size: 26px;
        font-weight: 700;
    }

    .portaldash-inline span {
        font-size: 14px;
        color: #6c757d;
    }
/* ICON COLORS */
.portaldash-action-card .icon.primary {
    background: #0b3d91;
}

.portaldash-action-card .icon.warning {
    background: #ffc107;
    color: #000;
}

.portaldash-action-card .icon.danger {
    background: #dc3545;
}
/* BLINK ANIMATION */
@keyframes portaldash-blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* APPLY TO ACTIVE INSIGHTS */
.portaldash-insight.warning span,
.portaldash-insight.info.clickable span {
    animation: portaldash-blink 1.2s infinite;
}
.portaldash-action-card .icon.success {
    background: #28a745;
}

.portaldash-livered-dot {
    width: 10px;
    height: 10px;
    background-color: #dc3545;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    animation: portaldash-pulse 1.5s infinite;
}

    .portaldash-livered-dot::after {
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background-color: #dc3545;
        animation: pulse 1.5s infinite;
        opacity: 0.6;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    70% {
        transform: scale(2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* ===== WAVE LINE CONTAINER ===== */
.portaldash-wave-line {
    flex: 1;
    height: 40px;
    overflow: hidden;
    position: relative;
}

    /* SVG */
    .portaldash-wave-line svg {
        width: 200%;
        height: 100%;
    }

/* WAVE PATH */
.wave-path {
    fill: none;
    stroke: #00c853; /* WRA GREEN */
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 6;
    animation: waveMove 10s linear infinite;
}

/* ANIMATION */
@keyframes waveMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* LOADER CONTAINER */
.portaldash-loader-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 60vh;
    color: #1b4f72;
}

/* CIRCULAR SPINNER */
.portaldash-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e0eafc;
    border-top: 6px solid #2980b9;
    border-radius: 50%;
    animation: portaldash-spin 1s linear infinite;
    margin-bottom: 15px;
}

/* ANIMATION */
@keyframes portaldash-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}