:root {
    --bg-page: #e5e7eb;
    --bg-topbar: #030712;
    --bg-sidebar: #f3f4f6;
    --bg-card: #ffffff;

    --border-soft: #d1d5db;
    --border-strong: #9ca3af;

    --text-main: #111827;
    --text-muted: #6b7280;

    --accent: #1d4ed8;
    --accent-soft: #e0ebff;
    --accent-dark: #1e40af;

    --danger: #b91c1c;
    --success: #15803d;
    --warning: #b45309;

    --shadow-soft: 0 14px 40px rgba(15,23,42,0.18);
    --shadow-subtle: 0 4px 14px rgba(15,23,42,0.10);

    --radius: 10px;
    --radius-soft: 6px;

    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ========== RESET / BASIS ========== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background: radial-gradient(circle at top, #f9fafb 0, #e5e7eb 45%, #d1d5db 100%);
    color: var(--text-main);
}

/* ========== TOPBAR ========== */

.jp-topbar {
    background: radial-gradient(circle at top left, #020617 0, var(--bg-topbar) 55%, #020617 100%);
    color: #f9fafb;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(15,23,42,0.85);
    box-shadow: 0 5px 22px rgba(15,23,42,0.65);
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 56px;
}

.jp-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jp-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
}

/* Topbar links / buttons */
.jp-topbar-right a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

.jp-topbar-right a:hover {
    border-color: #9ca3af;
    background: rgba(15,23,42,0.55);
}

.jp-topbar-right a:active {
    transform: translateY(1px);
}

/* Logo */

.jp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jp-logo-block {
    width: 30px;
    height: 44px;
    border-radius: 2px;
    background: linear-gradient(180deg, #facc15, #f97316);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.38);
    position: relative;
}

.jp-logo-block::after {
    content: '';
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 7px;
    height: 3px;
    background: rgba(15,23,42,0.75);
}

.jp-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.jp-logo-main {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.jp-logo-sub {
    font-size: 11px;
    color: #9ca3af;
}

.jp-env-badge {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 999px;
    padding: 4px 10px;
    border: 1px solid rgba(148,163,184,0.7);
    background: rgba(15,23,42,0.85);
}

.jp-user-info {
    text-align: right;
}

.jp-user-name {
    font-size: 14px;
    font-weight: 600;
}

.jp-user-meta {
    font-size: 11px;
    color: #9ca3af;
}

/* ========== LINKS / BADGES ========== */

.jp-link {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

.jp-link:hover {
    text-decoration: underline;
}

.jp-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    background: #e5e7eb;
    color: #374151;
}

/* ========== BUTTONS ========== */

.jp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-height: 32px;
    line-height: 1.2;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        transform 0.06s ease,
        box-shadow 0.12s ease;
}

.jp-button-primary {
    background: var(--accent);
    border-color: var(--accent-dark);
    color: #ffffff;
}

.jp-button-primary:hover {
    background: var(--accent-dark);
    box-shadow: 0 5px 16px rgba(37,99,235,0.35);
}

.jp-button-secondary {
    background: #e5e7eb;
    border-color: var(--border-soft);
    color: var(--text-main);
}

.jp-button-secondary:hover {
    background: #d1d5db;
}

.jp-button-subtle {
    background: #f9fafb;
    border-color: var(--border-soft);
    color: var(--text-main);
}

.jp-button-subtle:hover {
    background: #e5e7eb;
}

.jp-button-primary:active,
.jp-button-secondary:active,
.jp-button-subtle:active {
    transform: translateY(1px);
    box-shadow: none;
}

.jp-button-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Systeentile actions */
.jp-system-tile__actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.jp-system-tile__actions .jp-button {
    min-width: 120px;
    justify-content: center;
}

/* Highlight card button breed */
.jp-card--highlight .jp-button-primary {
    min-width: 200px;
    justify-content: center;
}

/* ========== SHELL / LAYOUT ========== */

.jp-body {
    min-height: 100vh;
}

.jp-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: calc(100vh - 56px);
}

/* ========== SIDEBAR ========== */

.jp-sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-soft);
    padding: 14px 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.jp-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jp-nav-section-label {
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.12em;
}

.jp-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-main);
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.jp-nav-item-icon {
    font-size: 15px;
}

.jp-nav-item:hover {
    background: #e5edff;
    border-color: #c7d2fe;
    transform: translateX(1px);
}

.jp-nav-item-active {
    background: #e0e7ff;
    border-color: #a5b4fc;
    font-weight: 600;
}

.jp-nav-item-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.jp-sidebar-footer {
    border-top: 1px solid var(--border-soft);
    padding-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jp-status-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--success);
}

.jp-status-label,
.jp-status-text {
    font-size: 11px;
}

/* ========== MAIN AREA ========== */

.jp-main {
    padding: 18px 20px 22px;
}

.jp-page-title {
    margin: 0;
    font-size: 23px;
    font-weight: 650;
}

.jp-page-subtitle {
    margin: 2px 0 10px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== ALERTS ========== */

.jp-alert {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    margin: 8px 0 0;
    border: 1px solid transparent;
}

.jp-alert-error {
    background: #fee2e2;
    border-color: #fecaca;
    color: #7f1d1d;
}

.jp-alert-success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #14532d;
}

.jp-alert-info {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #075985;
}

.jp-alert-warning {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

/* ========== GRID HELPERS ========== */

.jp-grid {
    display: grid;
    gap: 14px;
}

.jp-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jp-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ========== CARDS ========== */

.jp-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
    padding: 14px 16px;
    box-shadow: var(--shadow-subtle);
    font-size: 13px;
}

.jp-card--highlight {
    box-shadow: var(--shadow-soft);
    border-color: rgba(59,130,246,0.3);
}

.jp-card--info {
    background: #f9fafb;
}

.jp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.jp-card-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.jp-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.jp-card-subtitle {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== TOP KPI-STRIP ========== */

.jp-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.jp-stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-soft);
    border: 1px solid var(--border-soft);
    padding: 10px 12px;
    box-shadow: var(--shadow-subtle);
}

.jp-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.jp-stat-value {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 600;
}

.jp-stat-meta {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ========== SYSTEM TILES ========== */

.jp-system-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.jp-system-tile {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
    padding: 12px 14px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.12s ease, background 0.12s ease;
}

.jp-system-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: #bfdbfe;
    background: #f9fafb;
}

.jp-system-tile__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.jp-system-tile__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.jp-system-tile__title {
    font-size: 14px;
    font-weight: 600;
}

.jp-system-tile__scope {
    font-size: 11px;
    color: var(--text-muted);
}

.jp-system-tile__desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Status badges */

.jp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid transparent;
}

.jp-status-badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
}

.jp-status-badge--ok {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.jp-status-badge--ok .jp-status-badge__dot {
    background: #16a34a;
}

.jp-status-badge--no {
    background: #fee2e2;
    border-color: #fecaca;
    color: #7f1d1d;
}

.jp-status-badge--no .jp-status-badge__dot {
    background: #b91c1c;
}

/* ========== TABLES ========== */

.jp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.jp-table th,
.jp-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #e5e7eb;
}

.jp-table th {
    text-align: left;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.jp-table-compact th,
.jp-table-compact td {
    padding: 4px 3px;
}

.jp-table a {
    color: var(--accent);
    text-decoration: none;
}

.jp-table a:hover {
    text-decoration: underline;
}

/* ========== TEXT & MARGIN HELPERS ========== */

.jp-text-muted {
    font-size: 12px;
    color: var(--text-muted);
}

.jp-mt-1 { margin-top: 8px; }
.jp-mt-2 { margin-top: 14px; }
.jp-mt-3 { margin-top: 20px; }

.jp-list {
    margin: 0 0 0 16px;
    padding: 0;
}

/* ========== NOTIFICATIONS IN TOPBAR ========== */

.jp-notify-container {
    position: relative;
    cursor: pointer;
}

.jp-notify-icon {
    font-size: 20px;
    position: relative;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.jp-notify-icon:hover {
    border-color: #4b5563;
    background: rgba(15,23,42,0.65);
}

.jp-notify-count {
    position: absolute;
    top: -4px;
    right: -2px;
    background: #dc2626;
    color: #fff;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
}

.jp-notify-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 30px;
    width: 320px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(15,23,42,0.35);
    z-index: 9999;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.jp-notify-dropdown.open {
    display: block;
}

.jp-notify-empty {
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.jp-notify-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 12px;
}

.jp-notify-item:last-child {
    border-bottom: none;
}

/* Kleuren op type */
.jp-notify-info { border-left: 4px solid #1e90ff; }
.jp-notify-success { border-left: 4px solid #22c55e; }
.jp-notify-warning { border-left: 4px solid #eab308; }
.jp-notify-danger { border-left: 4px solid #ef4444; }

.jp-notify-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.jp-notify-message {
    color: #4b5563;
}

.jp-notify-actions {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

/* ========== ACTIVITY / LOG LIST ========== */

.jp-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
}

.jp-activity-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
}

.jp-activity-item:last-child {
    border-bottom: none;
}

.jp-activity-main {
    max-width: 70%;
}

.jp-activity-meta {
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
}

/* ========== FORMULIEREN (voor o.a. uitkering) ========== */

.jp-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jp-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.jp-form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.jp-form-group small,
.jp-form-group .jp-field-help {
    font-size: 11px;
    color: var(--text-muted);
}

/* inputs, selects, textarea */

.jp-form input[type="text"],
.jp-form input[type="number"],
.jp-form input[type="date"],
.jp-form input[type="datetime-local"],
.jp-form input[type="email"],
.jp-form select,
.jp-form textarea {
    font-family: var(--font);
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-soft);
    background: #f9fafb;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.jp-form input[readonly],
.jp-form input[disabled],
.jp-form select[disabled],
.jp-form textarea[readonly] {
    background: #e5e7eb;
    color: #6b7280;
}

/* focus */

.jp-form input[type="text"]:focus,
.jp-form input[type="number"]:focus,
.jp-form input[type="date"]:focus,
.jp-form input[type="datetime-local"]:focus,
.jp-form input[type="email"]:focus,
.jp-form select:focus,
.jp-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(37,99,235,0.25);
    background: #ffffff;
}

/* textarea */

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

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .jp-system-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .jp-stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .jp-shell {
        grid-template-columns: 1fr;
    }
    .jp-sidebar {
        display: none;
    }
}

@media (max-width: 640px) {
    .jp-system-grid,
    .jp-stat-row,
    .jp-grid-3,
    .jp-grid-2 {
        grid-template-columns: 1fr;
    }
}
