/* ─── Planner Tool v5 ────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

#planner-wrap {
    font-family: 'Nunito', sans-serif;
    color: #1a202c;
    max-width: 740px;
    margin: 0 auto;
}

/* ─── Auth ─────────────────────────────────────────────────────────────────── */

.pl-auth {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    max-width: 420px;
    margin: 40px auto;
}

.pl-auth-logo {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 24px;
}

.pl-tabs {
    display: flex;
    gap: 4px;
    background: #f0f4f8;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.pl-tab {
    flex: 1;
    border: none;
    background: none;
    padding: 8px 0;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    color: #718096;
    transition: all 0.2s;
}

.pl-tab.active {
    background: #fff;
    color: #1a202c;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ─── Formulier elementen ──────────────────────────────────────────────────── */

#planner-wrap label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
    margin-top: 14px;
}

#planner-wrap label span {
    font-weight: 400;
    text-transform: none;
    color: #a0aec0;
    letter-spacing: 0;
}

#planner-wrap input,
#planner-wrap textarea,
#planner-wrap select {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: #1a202c;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}

#planner-wrap input:focus,
#planner-wrap textarea:focus,
#planner-wrap select:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}

.pl-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pl-pw-wrap input { padding-right: 44px; }

.pl-pw-toggle {
    position: absolute;
    right: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.4;
    padding: 4px;
    transition: opacity 0.2s;
    line-height: 1;
}

.pl-pw-toggle:hover { opacity: 0.8; }

.pl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pl-fc { display: flex; flex-direction: column; }

.pl-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ─── Knoppen ──────────────────────────────────────────────────────────────── */

.pl-btn {
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.18s;
}

.pl-btn.primary { background: #667eea; color: #fff; }
.pl-btn.primary:hover { background: #5a67d8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,0.3); }
.pl-btn.ghost { background: #f0f4f8; color: #4a5568; }
.pl-btn.ghost:hover { background: #e2e8f0; }
.pl-btn.small { padding: 8px 16px; font-size: 0.875rem; }

/* ─── Flash / berichten ────────────────────────────────────────────────────── */

.pl-flash, .pl-msg {
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.pl-flash.error,  .pl-msg.error   { background: #fff5f5; color: #c53030; border: 1.5px solid #feb2b2; }
.pl-flash.success,.pl-msg.success { background: #f0fff4; color: #276749; border: 1.5px solid #9ae6b4; }

/* ─── Header ───────────────────────────────────────────────────────────────── */

.pl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.pl-header-left  { display: flex; align-items: center; gap: 14px; }
.pl-header-right { display: flex; align-items: center; gap: 8px; }
.pl-logo    { font-size: 1.2rem; font-weight: 800; }
.pl-welcome { font-size: 0.95rem; color: #4a5568; }
.pl-welcome strong { color: #1a202c; }

/* ─── Aanmaken kaart ───────────────────────────────────────────────────────── */

.pl-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.pl-card h3 {
    margin: 0 0 18px;
    font-size: 1.1rem;
    font-weight: 800;
}

/* ─── Maandgroepen ─────────────────────────────────────────────────────────── */

.pl-month-group { margin-bottom: 32px; }

.pl-month-label {
    font-size: 1rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 12px;
    padding-left: 4px;
    text-transform: capitalize;
}

/* ─── Evenement kaarten ────────────────────────────────────────────────────── */

.pl-event-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s, transform 0.15s;
    border-left: 4px solid #e2e8f0;
}

.pl-event-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* ─── Datumblok ────────────────────────────────────────────────────────────── */

.pl-date-block {
    min-width: 130px;
    padding-top: 3px;
}

.pl-date-str {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1a202c;
    display: block;
    line-height: 1.3;
}

/* ─── Evenement info ───────────────────────────────────────────────────────── */

.pl-event-info { flex: 1; min-width: 0; }

.pl-event-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.pl-badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: #ebf4ff;
    color: #2b6cb0;
    padding: 2px 8px;
    border-radius: 20px;
}

.pl-badge.bewerkt {
    background: #fefcbf;
    color: #744210;
}

.pl-event-meta {
    font-size: 0.83rem;
    color: #1a202c;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.pl-event-desc {
    font-size: 0.875rem;
    color: #1a202c;
    line-height: 1.4;
    margin-bottom: 6px;
}

/* ─── Aanwezigheidsoverzicht ───────────────────────────────────────────────── */

.pl-attend-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pl-ov-going {
    color: #276749;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    padding: 2px 10px;
    border-radius: 20px;
}

.pl-ov-not {
    color: #c53030;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    padding: 2px 10px;
    border-radius: 20px;
}

/* ─── Actie knoppen ────────────────────────────────────────────────────────── */

.pl-event-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 2px;
}

.pl-attend-btns {
    display: flex;
    gap: 6px;
}

.pl-go-btn,
.pl-nogo-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pl-go-btn   { color: #48bb78; }
.pl-nogo-btn { color: #fc8181; }

.pl-go-btn:hover   { border-color: #48bb78; background: #f0fff4; }
.pl-nogo-btn:hover { border-color: #fc8181; background: #fff5f5; }

.pl-go-btn.active   { background: #48bb78; border-color: #48bb78; color: #fff; }
.pl-nogo-btn.active { background: #fc8181; border-color: #fc8181; color: #fff; }

.pl-go-btn:disabled,
.pl-nogo-btn:disabled { opacity: 0.5; cursor: default; }

.pl-edit-btn {
    width: 28px; height: 28px;
    border-radius: 50%; border: none;
    background: #ebf4ff; color: #2b6cb0;
    font-size: 0.85rem; cursor: pointer;
    transition: background 0.18s;
    display: flex; align-items: center; justify-content: center;
}
.pl-edit-btn:hover { background: #bee3f8; }

.pl-delete-btn {
    width: 28px; height: 28px;
    border-radius: 50%; border: none;
    background: #fff0f0; color: #fc8181;
    font-size: 0.75rem; cursor: pointer;
    transition: all 0.18s;
    display: flex; align-items: center; justify-content: center;
}
.pl-delete-btn:hover { background: #fed7d7; color: #c53030; }

/* ─── Leeg ─────────────────────────────────────────────────────────────────── */

.pl-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    color: #718096;
}
.pl-empty span { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.pl-empty p    { font-size: 1rem; font-weight: 600; }

/* ─── Modals ───────────────────────────────────────────────────────────────── */

#pl-edit-modal,
#pl-del-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pl-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.pl-modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pl-modal-hdr h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }

.pl-modal-x {
    border: none; background: #f0f4f8; border-radius: 50%;
    width: 30px; height: 30px; font-size: 0.8rem;
    cursor: pointer; color: #718096; transition: background 0.18s;
    display: flex; align-items: center; justify-content: center;
}
.pl-modal-x:hover { background: #e2e8f0; }

.pl-modal-note {
    background: #fffbeb;
    border: 1.5px solid #f6e05e;
    color: #744210;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 14px;
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .pl-auth { padding: 28px 20px; }
    .pl-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .pl-form-row { grid-template-columns: 1fr; gap: 0; }
    .pl-event-card { padding: 14px; gap: 10px; flex-wrap: wrap; }
    .pl-date-block { min-width: unset; }
    .pl-event-actions { flex-direction: row; flex-wrap: wrap; padding-top: 0; }
    .pl-modal { padding: 22px 18px; }
}
