:root {
    --mpl-primary: #0d67b5;
    --mpl-primary-hover: #0b5a9c;
    --mpl-primary-light: #e6f0fa;
}

.mpl-portal-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.mpl-portal-header {
    margin-bottom: 24px;
}

.mpl-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.mpl-dashboard-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.mpl-dashboard-card h3 {
    margin-top: 0;
}

.mpl-button {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--mpl-primary);
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;

    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mpl-button.secondary {
    background: #f3f4f6;
    color: #111827 !important;
}

.mpl-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.mpl-table th,
.mpl-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.mpl-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.mpl-badge-grey { background: #f1f1f1; color: #444; }
.mpl-badge-yellow { background: #fff4ce; color: #6b4e00; }
.mpl-badge-blue { background: #dbeafe; color: #1e40af; }
.mpl-badge-red { background: #fee2e2; color: #991b1b; }
.mpl-badge-green { background: #dcfce7; color: #166534; }
.mpl-badge-purple { background: #ede9fe; color: #5b21b6; }
.mpl-badge-orange { background: #ffedd5; color: #9a3412; }

.mpl-section {
    margin-top: 32px;
}

.mpl-portal-nav {
    display:flex;
    gap:20px;
    margin-bottom:20px;
    padding-bottom:10px;
    border-bottom:1px solid #e5e7eb;
}

.mpl-portal-nav a {
    text-decoration: none;
    font-weight: 600;
    color: #374151;
    transition: color 0.15s ease;
}

.mpl-portal-wrap h2 {
    margin-bottom: 6px;
}

.mpl-portal-wrap p {
    color: #6b7280;
}

.mpl-section h3 {
    margin-bottom: 8px;
}

.mpl-table th {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
}

.mpl-table tr:hover {
    background: #f9fafb;
}

.mpl-button:hover {
    background: var(--mpl-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(13, 103, 181, 0.2);
}

.mpl-button.secondary:hover {
    background: #e5e7eb;
}

.mpl-dashboard-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mpl-dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Wider spacing around portal pages */
.mpl-portal-wrap {
    padding: 20px;
}

/* Better nav treatment */
.mpl-portal-nav {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
}

.mpl-portal-nav a {
    padding: 8px 10px;
    border-radius: 8px;
}

.mpl-portal-nav a:hover {
color: var(--mpl-primary);
}

/* Apply cleaner table styles to WordPress widefat tables too */
.mpl-portal-wrap .widefat {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.mpl-portal-wrap .widefat th,
.mpl-portal-wrap .widefat td {
    padding: 12px 14px;
}

.mpl-portal-wrap .widefat th {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
}

.mpl-portal-wrap .widefat tr:hover {
    background: #f9fafb;
}

/* Make smaller helper text cleaner */
.mpl-portal-wrap small {
    color: #6b7280;
}

.mpl-portal-wrap .widefat tr:hover {
    background: #fafafa;
}

.mpl-portal-wrap.wide {
    max-width: 1400px;
}

.mpl-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mpl-table-scroll table {
    min-width: 1050px;
}

@media (max-width: 768px) {
    .mpl-portal-wrap {
        padding: 16px;
    }

    .mpl-portal-nav {
        overflow-x: auto;
        white-space: nowrap;
        gap: 10px;
    }

    .mpl-portal-nav a {
        flex: 0 0 auto;
    }

    .mpl-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .mpl-table-scroll table {
        min-width: 950px;
    }
}

.mpl-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.mpl-summary-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.mpl-summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border-color: var(--mpl-primary);
    transition: transform 0.2s ease;
}

.mpl-summary-card::after {
    content: "→";
    display: inline-block;
    margin-left: 6px;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
    color: var(--mpl-primary);
}

.mpl-summary-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.mpl-summary-number {
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: var(--mpl-primary);
    line-height: 1;
    margin-bottom: 8px;
    text-decoration: none;
}

.mpl-summary-label {
    display: block;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

body {
    background: #f9fafb;
}

a.mpl-summary-card {
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
}

a.mpl-summary-card:hover {
    text-decoration: none;
    color: var(--mpl-primary-hover);
}

.mpl-summary-card:hover .mpl-summary-number {
    color: var(--mpl-primary-hover);
}

.mpl-button,
.mpl-button:link,
.mpl-button:visited,
.mpl-button:hover,
.mpl-button:active {
    text-decoration: none !important;
}

.mpl-stl-viewer {
    width: 100%;
    height: 560px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    overflow: hidden;
    position: relative;
}

.mpl-stl-loading {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.mpl-spinner {
    width: 34px;
    height: 34px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--mpl-primary);
    border-radius: 50%;
    animation: mpl-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes mpl-spin {
    to {
        transform: rotate(360deg);
    }
}