/* css/pta.css — PTA Module Styling */
/* Volgt HUISSTIJL.md: rounded-3xl, shadow-sm, indigo-600 primair */

/* === MODAL LAYOUT === */
#pta-modal .modal-content {
    max-width: 1100px;
    width: 96vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    border-radius: 2rem;
    overflow: hidden;
    padding: 0;
}

/* === PTA HEADER === */
.pta-modal-header {
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.pta-modal-header h2 {
    color: white;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.pta-modal-header .pta-header-sub {
    color: #c7d2fe;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 2px;
}

/* === TAB NAV === */
.pta-tab-nav {
    display: flex;
    gap: 0.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem 0;
    flex-shrink: 0;
}

.pta-tab-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.pta-tab-btn:hover { color: #4f46e5; }
.pta-tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

/* === MODAL BODY === */
.pta-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* === PTA DOCUMENT KAARTEN (Lijst-view) === */
.pta-doc-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.2s;
    cursor: pointer;
}

.pta-doc-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 4px 16px rgba(99,102,241,0.1);
    transform: translateY(-1px);
}

.pta-doc-card-icon {
    width: 3rem;
    height: 3rem;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pta-doc-card-info h4 {
    font-weight: 900;
    color: #1e293b;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.pta-doc-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.pta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pta-badge-indigo  { background: #eef2ff; color: #4f46e5; }
.pta-badge-violet  { background: #f5f3ff; color: #7c3aed; }
.pta-badge-emerald { background: #ecfdf5; color: #059669; }
.pta-badge-amber   { background: #fffbeb; color: #d97706; }
.pta-badge-slate   { background: #f1f5f9; color: #475569; }
.pta-badge-rose    { background: #fff1f2; color: #e11d48; }

/* Status badge kleur mapping */
.pta-status-concept    { background: #fffbeb; color: #d97706; }
.pta-status-definitief { background: #ecfdf5; color: #059669; }
.pta-status-bevroren   { background: #eef2ff; color: #4f46e5; }

.pta-doc-card-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.pta-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    background: #f8fafc;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.pta-icon-btn:hover { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.pta-icon-btn.danger:hover { background: #fff1f2; color: #e11d48; border-color: #fecdd3; }

/* === DASHBOARD VIEW === */

.pta-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.pta-dashboard-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1e293b;
    letter-spacing: -0.02em;
}

/* === ONDERDELEN TABEL === */
.pta-onderdelen-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.4rem;
}

.pta-onderdelen-table th {
    font-size: 0.6rem;
    font-weight: 900;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.5rem 1rem;
    text-align: left;
}

.pta-onderdeel-row {
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
}

.pta-onderdeel-row:hover { border-color: #a5b4fc; box-shadow: 0 2px 8px rgba(99,102,241,0.08); }

.pta-onderdeel-row td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    font-size: 0.85rem;
    color: #334155;
}

.pta-onderdeel-row td:first-child { border-radius: 1rem 0 0 1rem; padding-left: 1.25rem; }
.pta-onderdeel-row td:last-child  { border-radius: 0 1rem 1rem 0; padding-right: 1rem; }

.pta-volgnummer {
    font-size: 0.75rem;
    font-weight: 900;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
}

.pta-inhoud-cell { font-weight: 600; color: #1e293b; max-width: 280px; }
.pta-inhoud-cell small { display: block; font-weight: 500; color: #94a3b8; font-size: 0.7rem; margin-top: 2px; }

/* Stoplicht indicators */
.pta-status-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.35rem;
}
.pta-dot-green  { background: #10b981; }
.pta-dot-orange { background: #f59e0b; }
.pta-dot-red    { background: #ef4444; }
.pta-dot-grey   { background: #cbd5e1; }

/* === FORMULIER (Onderdeel editor) === */
.pta-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.pta-form-grid.full { grid-template-columns: 1fr; }

.pta-form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.pta-form-group.span-2 { grid-column: span 2; }

.pta-label {
    font-size: 0.65rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pta-input, .pta-select, .pta-textarea {
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #1e293b;
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.pta-input:focus, .pta-select:focus, .pta-textarea:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129,140,248,0.15);
}

.pta-textarea { min-height: 80px; resize: vertical; }

/* Weging-type toggle */
.pta-weging-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pta-weging-toggle input[type="number"] { max-width: 100px; }

.pta-weging-type-btn {
    padding: 0.4rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    background: white;
    color: #64748b;
    transition: all 0.15s;
}
.pta-weging-type-btn.active { background: #eef2ff; border-color: #a5b4fc; color: #4f46e5; }

/* === LEGE STATE === */
.pta-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.pta-empty-icon {
    width: 5rem;
    height: 5rem;
    background: #eef2ff;
    color: #818cf8;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.pta-empty-state h3 { font-size: 1.2rem; font-weight: 900; color: #1e293b; margin-bottom: 0.5rem; }
.pta-empty-state p  { color: #64748b; font-size: 0.875rem; max-width: 360px; line-height: 1.6; margin-bottom: 1.5rem; }

/* === PTA TYPE KEUZE (aanmaken) === */
.pta-type-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.pta-type-card {
    border: 2px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.pta-type-card:hover  { border-color: #a5b4fc; }
.pta-type-card.active { border-color: #4f46e5; background: #eef2ff; }

.pta-type-card .pta-type-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.pta-type-card h4 { font-weight: 900; color: #1e293b; font-size: 0.9rem; }
.pta-type-card p  { font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; }

/* === ACTIE TOOLBAR === */
.pta-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 1rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.pta-btn-primary  { background: #4f46e5; color: white; border-color: #4338ca; }
.pta-btn-primary:hover  { background: #4338ca; box-shadow: 0 4px 12px rgba(79,70,229,0.3); }

.pta-btn-secondary { background: white; color: #475569; border-color: #e2e8f0; }
.pta-btn-secondary:hover { border-color: #cbd5e1; background: #f8fafc; }

.pta-btn-ghost { background: transparent; color: #64748b; border-color: transparent; }
.pta-btn-ghost:hover { background: #f1f5f9; color: #334155; }

.pta-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .pta-form-grid { grid-template-columns: 1fr; }
    .pta-form-group.span-2 { grid-column: span 1; }
    .pta-type-cards { grid-template-columns: 1fr; }
    .pta-modal-body { padding: 1rem; }
}

/* === CANVAS SUB-TABS === */
.pta-canvas-tabs {
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 0.75rem;
    display: inline-flex;
    gap: 0.125rem;
    align-self: center;
}

.pta-canvas-tab-btn {
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
}

.pta-canvas-tab-btn:hover {
    color: #334155;
}

.pta-canvas-tab-btn.active {
    background: white;
    color: #4f46e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* === PTA ANALYTICS LAYOUT === */
.pta-analytics-grid {
    margin-top: 1.5rem;
}

.pta-warning-banner {
    animation: fadeIn 0.2s ease-out;
}

.pta-heatmap-table th {
    font-size: 0.65rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem;
}

.pta-heatmap-table td {
    padding: 0.75rem;
    vertical-align: middle;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === INLINE ACCORDION EXPANSION === */
.pta-onderdeel-row {
    cursor: pointer;
}

.pta-onderdeel-row.is-active-row {
    background: #f8fafc !important;
}

.pta-accordion-row {
    background: #fafafb;
    display: none;
}

.pta-accordion-row.is-expanded {
    display: table-row;
    animation: slideDownAccordion 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pta-accordion-content-wrapper {
    padding: 1.25rem 1.5rem;
    border-top: 1px dashed #e2e8f0;
    border-bottom: 1px dashed #e2e8f0;
    overflow: hidden;
    background: #f8fafc/30;
}

.pta-sub-goals-table {
    width: 100%;
    border-collapse: collapse;
}

.pta-sub-goals-table th {
    font-size: 0.65rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.pta-sub-goals-table td {
    padding: 0.6rem 0.75rem;
    font-size: 0.75rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

@keyframes slideDownAccordion {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === PREMIUM SIDE DRAWER === */
.pta-side-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pta-side-drawer-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.pta-side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(15, 23, 42, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.pta-side-drawer.is-open {
    transform: translateX(0);
}

.pta-drawer-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 1.25rem 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.pta-drawer-header h3 {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.pta-drawer-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pta-drawer-close-btn:hover {
    color: white;
}

.pta-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pta-drawer-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1rem 1.25rem;
}

.pta-drawer-section h4 {
    font-size: 0.75rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.pta-drawer-stat {
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0.25rem 0;
}

.pta-drawer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* === PTA ALIGNMENT & COUPLING UX === */
.pta-alignment-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pta-alignment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

.pta-alignment-title {
    font-weight: 800;
    color: #1e293b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pta-alignment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .pta-alignment-grid {
        grid-template-columns: 1fr;
    }
}

.pta-alignment-section {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pta-alignment-section-title {
    font-size: 0.6rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.pta-alignment-section-content {
    font-size: 0.8rem;
    color: #334155;
    font-weight: 700;
}

.pta-alignment-section-meta {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

/* Badges for coupled items in Editor form */
.pta-coupled-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    margin-top: 0.35rem;
    transition: all 0.2s;
}

.pta-coupled-badge:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.pta-coupled-badge .remove-coupled-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.pta-coupled-badge .remove-coupled-btn:hover {
    color: #ef4444;
}

/* Unified status dots */
.pta-dot-indigo { background: #6366f1; }
.pta-badge-indigo .pta-dot-indigo { background: #6366f1; }

/* Unified alignment status styles for dashboard */
.pta-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    gap: 0.35rem;
    transition: all 0.2s;
}

.pta-status-active {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.pta-status-design {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}
.pta-status-result {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.pta-status-none {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* === ONBOARDING CARD & PDCA STYLING === */
.pta-onboarding-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 1.5rem;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.05);
}

.pta-onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.pta-onboarding-header h4 {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #4f46e5;
    letter-spacing: 0.1em;
}

.pta-onboarding-header h3 {
    font-size: 1.1rem;
    font-weight: 900;
    color: #1e293b;
    margin-top: 0.1rem;
    letter-spacing: -0.01em;
}

.pta-onboarding-close-btn {
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pta-onboarding-close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.pta-onboarding-text {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.5;
    max-width: 800px;
    margin-bottom: 1.25rem;
}

/* PDCA Mini-Stepper */
.pta-pdca-mini-stepper {
    display: grid;
    grid-template-cols: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .pta-pdca-mini-stepper {
        grid-template-cols: repeat(4, 1fr);
    }
}

.pta-pdca-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: white;
    padding: 0.75rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.pta-pdca-num {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.75rem;
    flex-shrink: 0;
    border: 1px solid currentColor;
}

.pta-pdca-step h5 {
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #1e293b;
    letter-spacing: 0.05em;
    margin-bottom: 0.1rem;
}


.pta-pdca-step p {
    font-size: 0.65rem;
    color: #64748b;
    line-height: 1.3;
}

/* === PTA ONDERDEEL MODAL REDESIGN === */
.pta-modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 768px) {
    .pta-modal-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

.pta-modal-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.pta-modal-block-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}



