:root {
    --purple: #5637A6;
    --pink: #E15067;
    --white: #ffffff;
    --dark: #0d0d0d;

    --glass-light: rgba(255,255,255,0.12);
    --glass-mid: rgba(255,255,255,0.18);
    --glass-strong: rgba(255,255,255,0.25);
    --glass-border: rgba(255,255,255,0.35);
}

/* Reset */
* {
    box-sizing: border-box;
}

/* -------------------------------- */
/*        GLOBAL BODY LAYOUT        */
/* -------------------------------- */
body.gradient {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--purple), var(--pink));
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--white);
}

/* -------------------------------- */
/*           LOGIN BOX              */
/* -------------------------------- */
.center-box {
    width: 360px;
    margin: 80px auto;
    background: var(--glass-light);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(14px);
    text-align: center;
}

.logo {
    width: 120px;
    margin-bottom: 15px;
}

/* =========================
   SYSTEEM MELDING
========================= */

.system-alert {
    display: flex;
    align-items: center;
    gap: 14px;

    background: rgba(255, 180, 0, 0.18);
    border: 1px solid rgba(255, 200, 0, 0.35);

    padding: 16px 18px;
    border-radius: 18px;

    margin-bottom: 22px;

    backdrop-filter: blur(12px);
    color: #fff;
}

.system-alert-icon {
    font-size: 28px;
    line-height: 1;
}

.system-alert-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
}

/* -------------------------------- */
/*        INPUT & FORM ELEMENTS     */
/* -------------------------------- */
input, textarea, select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    margin: 8px 0;
    font-size: 14px;
    color: #111;
    background: #fff;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* FIX: Labels zichtbaar */
.form-grid label {
    color: #4A148C !important;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

/* Focus style */
.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
    border: 2px solid #7648EB !important;
    outline: none;
}

/* -------------------------------- */
/*             BUTTONS              */
/* -------------------------------- */
.btn {
    display: inline-block;
    padding: 10px 18px;
    background: var(--white);
    color: var(--purple);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

.btn.small {
    padding: 8px 12px;
    font-size: 13px;
}

.btn:hover {
    opacity: 0.9;
}

.btn.primary {
    background: #6B2FEF;
    color: white;
}
.btn.primary:hover {
    background: #5224d8;
}

.btn-link {
    color: #E4D7FF;
    font-weight: bold;
    cursor: pointer;
}
.btn-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* -------------------------------- */
/*            SIDEBAR               */
/* -------------------------------- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 230px;
    height: 100vh;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(12px);
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.logo-box {
    text-align: center;
    margin-bottom: 35px;
}

.side-logo {
    width: 70px;
    margin-bottom: 8px;
}

.nav-item {
    display: block;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.12);
    transition: background 0.2s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.2);
}

.nav-item.active {
    background: #fff;
    color: var(--purple);
    font-weight: 600;
}

.logout-btn {
    margin-top: auto;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    background: var(--pink);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* -------------------------------- */
/*           MAIN CONTENT           */
/* -------------------------------- */
.content {
    margin-left: 260px;
    padding: 35px;
}

.page-title {
    font-size: 30px;
    margin-bottom: 20px;
}

/* -------------------------------- */
/*              CARDS               */
/* -------------------------------- */
.card {
    background: rgba(255,255,255,0.18);
    padding: 20px;
    border-radius: 18px;
    backdrop-filter: blur(10px);
    margin-bottom: 18px;
}

.big-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    margin: 20px auto;
    color: #222;
}

/* -------------------------------- */
/*       OPDRACHTEN – NIEUWE UI     */
/* -------------------------------- */

.task-card {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--glass-light);
    backdrop-filter: blur(16px);
    padding: 30px;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: #fff;
}

/* Header structuur */
.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.assign-header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.assign-header-left h1 {
    margin: 0;
    font-size: 28px;
}

/* Kleine filter links */
.small-filter {
    width: 140px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--glass-mid);
    color: #fff;
    backdrop-filter: blur(10px);
    font-size: 13px;
}

.small-filter option {
    color: #111;
}

/* Rechts knoppen */
.task-right,
.assign-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Table wrapper in Glass UI */
.table-wrapper {
    background: var(--glass-light);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 20px;
    overflow-x: auto;
}

/* Tabel */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}

/* Header */
.styled-table thead tr {
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
}

.styled-table th {
    padding: 14px;
    text-align: left;
    font-weight: bold;
}

/* Body rows */
.styled-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.styled-table tbody tr:hover {
    background: rgba(255,255,255,0.12);
    transition: 0.2s;
}

/* Status badges */
.status-badge {
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: bold;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
}

.status-planning { background: rgba(200,200,200,0.25); }
.status-bezig    { background: rgba(255,200,120,0.25); }
.status-klaar    { background: rgba(40,255,40,0.25); }

/* -------------------------------- */
/*              TABS                */
/* -------------------------------- */
.tab-bar {
    display: flex;
    gap: 10px;
    margin: 15px 0 20px;
}

.tab {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    cursor: pointer;
    font-weight: 500;
}

.tab.active {
    background: #ffffff;
    color: #6B2FEF;
}

.tab-content.hidden {
    display: none;
}

/* -------------------------------- */
/*             SUBTASKS             */
/* -------------------------------- */
.subtask-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.subtask-form input {
    flex: 1;
}

.subtask-list .subtask-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.subtask-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subtask-title.completed {
    text-decoration: line-through;
    opacity: 0.7;
}


/* -------------------------------- */
/*             COMMENTS             */
/* -------------------------------- */
.comment-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.comment {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    color: #fff;
}

.comment small {
    display: block;
    opacity: 0.8;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: none;
    padding: 10px;
    font-size: 14px;
    color: #111;
}

/* -------------------------------------------------- */
/*          O P D R A C H   D E T A I L              */
/* -------------------------------------------------- */

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.detail-title {
    font-size: 32px;
    margin: 0;
    color: #fff;
}

.detail-status {
    font-size: 16px;
}

/* Info cards */
.detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.info-card {
    background: rgba(255,255,255,0.12);
    padding: 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    color: #fff;
}

.info-card h3 {
    margin-top: 0;
    font-size: 18px;
    opacity: 0.85;
}

/* Section card */
.section-card {
    background: rgba(255,255,255,0.18);
    padding: 25px;
    border-radius: 18px;
    margin-bottom: 25px;
    backdrop-filter: blur(12px);
    color: #fff;
}

.section-card h2 {
    margin-top: 0;
    font-size: 24px;
}

/* Subtaken */
.subtask-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.10);
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.subtask-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subtask-title.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Comments block */
.comment-list {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
}

.comment {
    background: rgba(255,255,255,0.10);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.comment strong {
    font-size: 15px;
}

.comment small {
    opacity: 0.7;
}

/* Comment form textarea */
.comment-form textarea {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    border: none;
}

/* Status dropdown */
.status-select {
    padding: 10px;
    border-radius: 12px;
    width: 220px;
    border: none;
    font-size: 15px;
}

/* Nieuw-project formulier consistency */

.section-card input,
.section-card textarea,
.section-card select {
    background: rgba(255,255,255,0.85);
    border-radius: 12px;
    padding: 12px;
    font-size: 15px;
    border: none;
    width: 100%;
    color: #111;
}

.section-card textarea {
    min-height: 120px;
    resize: vertical;
}

.section-card input:focus,
.section-card textarea:focus,
.section-card select:focus {
    border: 2px solid #6B2FEF;
    outline: none;
}

#projectUsers {
    background: rgba(255,255,255,0.85);
    border-radius: 12px;
    padding: 10px;
    font-size: 15px;
    border: none;
    width: 100%;
    color: #111;
}

#submitProject {
    padding: 12px 20px;
    font-size: 16px;
}

.task-card {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--glass-light);
    backdrop-filter: blur(16px);
    padding: 30px;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: #fff;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.slot {
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    backdrop-filter: blur(10px);
}

.slot.free {
    background: rgba(255,255,255,0.15);
}

.slot.busy {
    background: rgba(255,100,100,0.35);
    cursor: not-allowed;
}

.slot.mine {
    background: rgba(100,255,150,0.35);
}

.status-concept {
    background: rgba(200,200,200,0.25);
}

.status-open {
    background: rgba(255,200,120,0.25);
}

.status-rekening {
    background: rgba(120,180,255,0.25);
}

.status-betaald {
    background: rgba(40,255,40,0.25);
}

/* ----------------------------- */
/*      FACTUREN OVERZICHT       */
/* ----------------------------- */

.subtitle {
    opacity: 0.8;
    margin-top: 4px;
}

/* Hoofdkaart */
.task-card {
    background: rgba(255,255,255,0.16);
    backdrop-filter: blur(14px);
    border-radius: 24px;
    padding: 30px;
}

/* Table wrapper – minder blur, meer contrast */
.clean-table {
    background: rgba(255,255,255,0.22);
    backdrop-filter: none;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
}

/* Tabel */
.clean-table .styled-table {
    width: 100%;
    border-collapse: collapse;
}

/* Header */
.clean-table thead tr {
    background: rgba(255,255,255,0.35);
}

.clean-table th {
    padding: 14px 16px;
    font-weight: 600;
    color: #fff;
}

/* Rijen */
.clean-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.18);
}

/* Hover */
.clean-table tbody tr:hover {
    background: rgba(255,255,255,0.15);
}

/* Status badges – iets strakker */
.status-badge {
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
}

.status-open {
    background: rgba(255,200,120,0.35);
}

.status-betaald {
    background: rgba(80,255,120,0.35);
}

.status-concept {
    background: rgba(200,200,200,0.35);
}

.status-rekening {
    background: rgba(120,180,255,0.35);
}

.invoice-row {
    display: grid;
    grid-template-columns: 160px 1fr 120px 120px 120px;
    gap: 15px;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    align-items: center;
}

/* =========================
   DASHBOARD (clean layout)
========================= */

.dashboard-wrap { max-width: 1200px; }

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.dash-title { margin: 0 0 6px; font-size: 32px; }
.dash-sub { opacity: .9; }

.dash-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dash-stat {
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    padding: 16px 18px;
    backdrop-filter: blur(12px);
    transition: transform .12s ease, background .12s ease;
}

.dash-stat:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.16);
}

.dash-stat-label { opacity: .85; font-weight: 600; }
.dash-stat-value { font-size: 36px; font-weight: 800; margin-top: 6px; line-height: 1; }
.dash-stat-link { margin-top: 10px; opacity: .9; font-weight: 700; color: #E4D7FF; }

.dash-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dash-panel {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    padding: 16px;
    backdrop-filter: blur(12px);
}

.dash-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dash-panel h2 {
    margin: 0;
    font-size: 18px;
}

.dash-table {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 10px;
    overflow-x: auto;
}

.dashboard-wrap .styled-table thead tr {
    background: rgba(255,255,255,0.14);
}

.dashboard-wrap .styled-table th,
.dashboard-wrap .styled-table td {
    padding: 12px;
}

/* Responsive */
@media (max-width: 980px) {
    .dash-stats { grid-template-columns: 1fr; }
    .dash-panels { grid-template-columns: 1fr; }
}

/* =========================
   MODERNE SUBTASKS
========================= */

.subtask-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.subtask-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 18px;

    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.14);

    border-radius: 16px;
    backdrop-filter: blur(10px);

    transition: 0.18s ease;
}

.subtask-item:hover {
    background: rgba(255,255,255,0.14);
    transform: translateY(-1px);
}

.subtask-left {
    display: flex;
    align-items: center;
    gap: 14px;

    flex: 1;
}

.subtask-check {
    width: 20px;
    height: 20px;
    accent-color: #6B2FEF;
    cursor: pointer;
    flex-shrink: 0;
}

.subtask-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.subtask-title.completed {
    text-decoration: line-through;
    opacity: 0.55;
}

.subtask-delete {
    background: rgba(255, 74, 74, 0.16) !important;
    border: 1px solid rgba(255, 74, 74, 0.25);

    color: #fff !important;

    border-radius: 12px;
    padding: 8px 14px;

    font-size: 13px;
    font-weight: 700;

    transition: 0.18s ease;
}

.subtask-delete:hover {
    background: rgba(255, 74, 74, 0.32) !important;
}

/* =========================
   PRINTSCHEMA (dagdelen UI)
========================= */

.print-topbar{
    display:flex;
    gap:14px;
    align-items:flex-end;
    justify-content:space-between;
    flex-wrap:wrap;
    margin-top:8px;
}

.print-date label{
    display:block;
    font-weight:700;
    opacity:.9;
    margin-bottom:6px;
}

.print-date input[type="date"]{
    max-width:240px;
}

.print-tabs{
    display:flex;
    gap:10px;
}

.print-tab{
    border:none;
    cursor:pointer;
    padding:10px 14px;
    border-radius:14px;
    background: rgba(255,255,255,0.12);
    color:#fff;
    font-weight:700;
    border:1px solid rgba(255,255,255,0.18);
}

.print-tab.active{
    background:#fff;
    color: var(--purple);
}

.print-grid{
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:14px;
    margin-top:14px;
}

.print-slot-card{
    background: rgba(255,255,255,0.10);
    border:1px solid rgba(255,255,255,0.18);
    border-radius:18px;
    padding:16px;
    backdrop-filter: blur(12px);
}

.print-slot-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
    margin-bottom:12px;
}

.print-slot-title{
    font-size:18px;
    font-weight:800;
}

.print-slot-sub{
    font-size:13px;
    opacity:.85;
    margin-top:2px;
}

.print-pill{
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    border:1px solid rgba(255,255,255,0.22);
    white-space:nowrap;
}

.print-pill-free{ background: rgba(40,255,40,0.18); }
.print-pill-busy{ background: rgba(255,200,120,0.18); }

.print-slot-body{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.print-label{
    font-weight:700;
    opacity:.9;
    font-size:13px;
}

.print-input{
    width:100%;
    padding:10px 12px;
    border-radius:12px;
    border:none;
    outline:none;
}

.print-btn{
    width:100%;
    border-radius:12px;
}

.btn.danger{
    background:#ff4a4a !important;
    color:#fff !important;
}

.print-meta{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.print-note{
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 10px 12px;
}

@media (max-width: 980px){
    .print-grid{ grid-template-columns: 1fr; }
}

/* Factuur items table inputs mooier */
#itemsTable input {
    background: rgba(255,255,255,0.85);
    border-radius: 10px;
    padding: 10px 12px;
    border: none;
    width: 100%;
    color: #111;
}

#itemsTable input:focus {
    outline: none;
    border: 2px solid #6B2FEF;
    background: #fff;
}

#itemsTable .item-del {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}
#itemsTable .item-del:hover {
    background: rgba(255,255,255,0.35);
}

.hidden { display:none !important; }

.form-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
}

.category-filter {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: white;
    width: 180px;
}

/* =========================
   SUBTASKS - DEFINITIEVE FIX
========================= */

#subtaskList.subtask-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

#subtaskList .subtask-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;

    min-height: auto !important;
    padding: 14px 16px !important;
    margin-bottom: 0 !important;

    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 16px;
}

#subtaskList .subtask-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;

    flex: 1 !important;
    min-width: 0 !important;
}

#subtaskList .subtask-check {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 18px !important;
}

#subtaskList .subtask-title {
    display: block !important;
    flex: 1 !important;

    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;

    white-space: normal;
    overflow-wrap: anywhere;
}

#subtaskList .subtask-title.completed {
    text-decoration: line-through;
    opacity: 0.55;
}

#subtaskList .subtask-delete {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 105px;

    white-space: nowrap;
}

/* =========================
   USER ASSIGNMENTS
========================= */

.user-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.user-check-card {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;

    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 16px;

    cursor: pointer;
    transition: 0.18s ease;
}

.user-check-card:hover {
    background: rgba(255,255,255,0.16);
}

.user-check-card input {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}

.user-check-card span {
    font-weight: 700;
    color: #fff;
}