/* ==========================================
   NNEK Maak een Plan - Styles
   ========================================== */

/* Variabelen: kleuren komen uit dashboard CSS, tool-specifieke variabelen hier */
.dash-tool-content {
    --font: 'Open Sans', sans-serif;
    --radius: 6px;
    --color-green-light: #8d9d8f;
    --color-light-gray: #bbbbbb;
}

/* Global reset en body styles overgeslagen - dashboard heeft eigen reset */

/* === HEADER === */
.mep-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mep-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
}

.mep-logo { height: 2.5rem; }

.mep-print-btn {
    background: none;
    border: 2px solid var(--color-green);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-green);
    transition: all 0.2s;
}

.mep-print-btn:hover {
    background: var(--color-green);
    color: var(--color-white);
}

.mep-save-btn {
    background: none;
    border: 2px solid var(--color-gold);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-gold);
    transition: all 0.2s;
}

.mep-save-btn:hover {
    background: var(--color-gold);
    color: var(--color-white);
}

/* === HERO === */
.mep-hero {
    background: linear-gradient(to bottom, var(--color-green) 0%, var(--color-green-light) 100%);
    color: var(--color-white);
    padding: 2rem 5% 3rem;
}

.mep-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.mep-breadcrumb {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.75rem;
}

.mep-breadcrumb a { color: var(--color-white); }

.mep-hero h1 {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: -0.01em;
}

/* === MAIN === */
.mep-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 5%;
}

/* === SECTIONS === */
.mep-section {
    margin-bottom: 1.5rem;
}

.mep-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.mep-section-header:hover { background: #eae8e5; }

.mep-section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.mep-info-icon {
    display: inline-flex;
    align-items: center;
    color: #a0a3a6;
    cursor: help;
    margin-left: 0.25rem;
    position: relative;
}

.mep-info-icon:hover {
    color: #54585a;
}

.mep-info-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 0.5rem;
    background: #3D4A5C;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    width: 320px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
}

.mep-toggle-icon {
    width: 16px;
    height: 16px;
    position: relative;
    flex-shrink: 0;
}

.mep-toggle-icon::before,
.mep-toggle-icon::after {
    content: '';
    position: absolute;
    background: var(--color-coated);
    transition: transform 0.2s;
}

.mep-toggle-icon::before {
    width: 16px;
    height: 2px;
    top: 7px;
    left: 0;
}

.mep-toggle-icon::after {
    width: 2px;
    height: 16px;
    top: 0;
    left: 7px;
}

.mep-collapsible[data-open="true"] .mep-toggle-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

.mep-collapsible[data-open="false"] .mep-section-body {
    display: none;
}

.mep-section-body {
    padding: 1.5rem 0;
}

/* === INVOER === */
.mep-invoer { background: none; }

.mep-invoer-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.mep-field { margin-bottom: 1rem; }

.mep-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--color-coated);
}

.mep-field input,
.mep-field select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.875rem;
    color: var(--color-coated);
    background: var(--color-white);
    transition: border-color 0.2s;
}

.mep-field input:focus,
.mep-field select:focus {
    outline: none;
    border-color: var(--color-green);
}

.mep-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mep-field-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.mep-label-small {
    font-size: 0.6875rem !important;
    font-weight: 400 !important;
    color: var(--color-gray) !important;
}

.mep-inleg-periode {
    grid-template-columns: 1.5fr 1fr 1fr;
    margin-bottom: 0.5rem;
}

.mep-input-prefix,
.mep-input-suffix {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.mep-input-prefix:focus-within,
.mep-input-suffix:focus-within {
    border-color: var(--color-green);
}

.mep-input-prefix span,
.mep-input-suffix span {
    padding: 0.5rem 0.625rem;
    background: var(--color-bg);
    font-size: 0.8125rem;
    color: var(--color-gray);
    border: none;
}

.mep-input-prefix input,
.mep-input-suffix input {
    border: none;
    border-radius: 0;
    flex: 1;
}

.mep-input-prefix input:focus,
.mep-input-suffix input:focus { outline: none; }

.mep-calc-btn {
    background: var(--color-green);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius);
    padding: 0.625rem 2rem;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.mep-calc-btn:hover { background: #5f7462; }

.mep-add-periode-btn {
    background: none;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    padding: 0.4rem 1rem;
    font-family: var(--font);
    font-size: 0.8rem;
    color: var(--color-green);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}
.mep-add-periode-btn:hover {
    border-color: var(--color-green);
    background: rgba(112, 133, 115, 0.05);
}

/* === STOPLICHT & RESULT === */
.mep-invoer-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-bg-warm);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    text-align: center;
}

.mep-stoplicht-svg { width: 80px; height: 180px; }

.mep-result-text { width: 100%; }

.mep-result-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.mep-result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-coated);
    margin-bottom: 0.5rem;
}

.mep-result-sub {
    font-size: 0.8125rem;
    color: var(--color-gray);
}

.mep-result-sub strong {
    display: block;
    font-size: 1.1rem;
    color: var(--color-coated);
    margin-top: 0.25rem;
}

/* === LAYOUTS === */
.mep-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.mep-three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.mep-chart-wrap { position: relative; }
.mep-chart-large { max-width: 700px; margin: 0 auto; }

/* === TABLES === */
.mep-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.mep-table th {
    text-align: left;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--color-coated);
    font-size: 0.75rem;
}

.mep-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.mep-table .text-right { text-align: right; }

.mep-table .mep-row-header td {
    font-weight: 700;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.mep-table .mep-row-total td {
    font-weight: 700;
    border-top: 2px solid var(--color-coated);
    border-bottom: none;
}

.mep-table .mep-row-active td {
    background: rgba(175, 39, 47, 0.06);
    font-weight: 600;
}

/* Stoplicht bolletjes in tabel */
.mep-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}

.mep-dot-groen { background: var(--color-green); }
.mep-dot-oranje { background: #f08c00; }
.mep-dot-rood { background: var(--color-red); }

/* === VERWACHTINGEN DETAIL === */
.mep-detail-table {
    font-size: 0.8125rem;
}

.mep-detail-table dt {
    display: inline;
    font-weight: 400;
    color: var(--color-gray);
}

.mep-detail-table dd {
    display: inline;
    float: right;
    font-weight: 700;
    margin: 0;
    color: var(--color-coated);
}

.mep-detail-table .mep-detail-row {
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.mep-detail-table h4 {
    margin: 1.25rem 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-coated);
    text-decoration: underline;
}

/* === AANDELEN/OBLIGATIE VERDELING === */
.mep-verdeling-section h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 0.75rem;
}

.mep-verdeling-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--color-border);
}

.mep-verdeling-row span:last-child {
    font-weight: 600;
    text-align: right;
}
.mep-verdeling-muted {
    color: var(--color-gray);
    font-size: 0.75rem;
}

.mep-big-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mep-big-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-green);
    flex-shrink: 0;
}

.mep-big-stat-label {
    font-size: 0.75rem;
    color: var(--color-gray);
}

.mep-big-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-coated);
}

/* === REGIO VERDELING === */
.mep-regio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.mep-regio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.mep-regio-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Regio Map */
.mep-regio-map-container {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 2rem;
    align-items: start;
}

.mep-regio-map-wrap {
    width: 100%;
    border: 1px solid #e2e5ea;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f6f8;
}

.mep-regio-map-svg {
    display: block;
    width: 100%;
    height: auto;
}

.mep-regio-map-svg .mep-map-region {
    cursor: default;
    transition: opacity 0.2s;
}

.mep-regio-map-svg .mep-map-region:hover {
    opacity: 0.8;
}

.mep-regio-legend {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-top: 0.25rem;
}

.mep-regio-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.3;
}

.mep-regio-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.mep-regio-legend-label {
    flex: 1;
    color: var(--color-coated);
}

.mep-regio-legend-pct {
    font-weight: 600;
    color: var(--color-coated);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .mep-regio-map-container {
        grid-template-columns: 1fr;
    }
    .mep-regio-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
}


/* === DISCLAIMER === */
.mep-disclaimer {
    font-size: 0.75rem;
    color: var(--color-gray);
    font-style: italic;
    margin-top: 1rem;
}

.mep-disclaimer-section {
    font-size: 0.8125rem;
    color: var(--color-gray);
    line-height: 1.7;
}

.mep-disclaimer-section h3 {
    font-size: 0.875rem;
    color: var(--color-coated);
    margin-bottom: 0.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .mep-invoer-grid { grid-template-columns: 1fr; }
    .mep-two-col { grid-template-columns: 1fr; }
    .mep-three-col { grid-template-columns: 1fr; }
    .mep-hero h1 { font-size: 1.6rem; }
}

@media (max-width: 600px) {
    .mep-field-row { grid-template-columns: 1fr; }
    .mep-hero { padding: 1.5rem 5% 2rem; }
    .mep-main { padding: 1rem 4%; }
}

