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

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f7f4fb;
    color: #1a1a1a;
}

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

.portal {
    display: flex;
}

.main {
    flex: 1;
    padding: 50px 60px;
}

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

.sidebar {
    width: 240px;
    height: 100vh;
    background: #fff;
    padding: 25px;
    border-right: 1px solid #eee;

    display: flex;
    flex-direction: column;
}

.logo {
    height: auto;
    margin-bottom: 30px;
    max-width: 150px;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    color: #555;
    transition: 0.2s;
}

.nav-link:hover {
    background: #f3efff;
}

.nav-link.active {
    background: #f0ebff;
    color: #7c6ee6;
    font-weight: 600;
}

/* =========================
   HEADER
========================= */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header p {
    margin: 6px 0 0;
    color: #888;
    font-size: 14px;
}

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

.btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #b8a3ff, #9f87f5);
    color: white;
}

.btn-secondary {
    border: 1px solid #e5e5e5;
    background: white;
}

.btn:hover {
    transform: translateY(-1px);
}

/* =========================
   CARD
========================= */

.card {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.card-hover:hover {
    transform: translateY(-2px);
}

/* =========================
   LAYOUT UTILITIES
========================= */

.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* =========================
   SPACING
========================= */

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* =========================
   TEXT
========================= */

.text-muted {
    color: #777;
    font-size: 13px;
}

.text-purple {
    color: #7c6ee6;
}

/* =========================
   INPUT
========================= */

.input {
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

/* =========================
   FILTER PILLS
========================= */

.pill {
    padding: 6px 12px;
    border-radius: 20px;
    border: none;
    background: #eee;
    cursor: pointer;
    font-size: 13px;
}

.pill.active {
    background: #b8a3ff;
    color: white;
}

/* =========================
   ROWS (BELANGRIJKSTE FIX)
========================= */

.row {
    display: grid;
    align-items: center;
    padding: 14px 0;
}

.cols-3 {
    grid-template-columns: 1fr 2fr 160px;
}

.cols-5 {
    grid-template-columns: 2fr 1fr 1fr 1fr 120px;
}

/* lijst stijl */
.row-line {
    border-bottom: 1px solid #eee;
}

.row-line:hover {
    background: #faf8ff;
}

/* =========================
   STATUS
========================= */

.status {
    font-size: 13px;
    color: #7c6ee6;
}

.status-success {
    color: #4caf50;
}
/* container */
.section {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
    overflow: hidden;
}

/* item = 1 blok */
.item {
    border-bottom: 1px solid #eee;
}

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

/* row */
.row-click {
    cursor: pointer;
    padding: 18px 20px;
    transition: 0.2s;
}

.row-click:hover {
    background: #faf8ff;
}

/* arrow */
.arrow {
    text-align: right;
    transition: 0.2s;
}

/* expand */
.expand {
    max-height: 0;
    overflow: hidden;
    transition: 0.3s ease;
    background: #faf8ff;
    padding: 0 20px;
}

/* open state */
.item.active .expand {
    max-height: 1000px;
    padding: 15px 20px 20px;
}

.item.active .arrow {
    transform: rotate(180deg);
}

/* box grid */
.box-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.box {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid #eee;
}

.arrow {
    text-align: right;
    justify-self: end; /* belangrijkste */
}

/* lijst */
.giftbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* item */
.giftbox-row {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 12px;
    border-radius: 12px;
    border: 1px solid #eee;

    background: #fff;
    cursor: pointer;
    transition: 0.2s;
}

.giftbox-row-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.giftbox-row-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* fallback */
.empty-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3efff;
    font-size: 20px;
    color: #999;
}

/* tekst */
.giftbox-content strong {
    display: block;
}

/* geselecteerd */
.giftbox.active {
    border-color: #b8a3ff;
    background: #f3efff;
}

/* empty */
.giftbox.empty {
    opacity: 0.7;
}

.giftbox-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.giftbox-image {
    border-radius: 10px;
    width: 100%;
}

.giftbox-image img{
    width: 100%;
}

/* =========================
   FORM STRUCTUUR
========================= */

.form-card {
    max-width: 720px;
}

/* secties */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

/* veld */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    color: #777;
    margin-bottom: 6px;
}

/* textarea fix */
.textarea {
    height: auto;
    padding: 10px 12px;
    min-height: 80px;
}

/* back link */
.back-link {
    font-size: 13px;
    color: #777;
    text-decoration: none;
}

.back-link:hover {
    color: #7c6ee6;
}


.input-error {
    border-color: #ff4d4f;
    background: #fff6f6;
}

.input-error-text {
    color: #d8000c;
    font-size: 12px;
    margin-top: 4px;
}

/* =======================
   TABS / FILTERS
======================= */

.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 16px;
    background: #f3efff;
    color: #7c6ee6;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* hover */
.tab:hover {
    background: #e6e0ff;
}

/* actieve tab */
.tab-active {
    background: linear-gradient(135deg, #b8a3ff, #9f87f5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(159, 135, 245, 0.3);
}

/* =========================
   LIST COMPONENT (HERBRUIKBAAR)
========================= */

.list {
    display: flex;
    flex-direction: column;
}

/* header rij */
.list-header {
    display: grid;
    padding: 0 20px 10px;
    font-size: 12px;
    color: #999;
}

/* item rij */
.list-row {
    display: grid;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid #eee;
    transition: 0.2s;
}

/* hover effect */
.list-row.is-hover:hover {
    background: #faf8ff;
}

/* kolom layouts (herbruikbaar) */
.list-cols-2 {
    grid-template-columns: 2fr 1fr;
}

.list-cols-3 {
    grid-template-columns: 2fr 1fr 1fr;
}

.list-cols-4 {
    grid-template-columns: 2fr 1.5fr 1fr 140px;
}

.list-cols-5 {
    grid-template-columns: 2fr 1fr 1fr 1fr 120px;
}

/* persoon blok */
.list-person {
    display: flex;
    flex-direction: column;
}

.list-person strong {
    font-size: 15px;
}

.list-person .text-muted {
    font-size: 13px;
}

/* cadeau */
.list-gift {
    font-size: 14px;
}

/* datum */
.list-date {
    font-size: 14px;
    color: #777;
}

/* actie */
.list-action {
    display: flex;
    justify-content: flex-end;
}

/* =========================
   GLOBAL ACTION BAR
========================= */

.action-bar {
    position: fixed;
    bottom: 0;
    left: 240px; /* sidebar */
    right: 0;

    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);

    padding: 15px 60px;
    z-index: 100;
}

/* inner container */
.action-bar-inner {
    max-width: 1200px;
    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* tekst blok */
.action-bar-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-bar-content strong {
    font-size: 14px;
}

.action-bar-content p {
    margin: 0;
    font-size: 12px;
    color: #777;
}

/* varianten */
.action-bar.is-warning {
    background: #fff8e6;
    border-top-color: #ffe0a3;
}

.action-bar.is-success {
    background: #f3fff5;
    border-top-color: #b6f5c1;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle span {
    position: absolute;
    cursor: pointer;
    background: #ddd;
    border-radius: 20px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: .2s;
}

.toggle span:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: .2s;
}

.toggle input:checked + span {
    background: #b8a3ff;
}

.toggle input:checked + span:before {
    transform: translateX(18px);
}

.giftbox-row {
    position: relative;
}

.giftbox-row.active {
    border-color: #b8a3ff;
    background: #f3efff;
    box-shadow: 0 4px 12px rgba(184,163,255,0.25);
}

.giftbox-row:hover {
    border-color: #d6ccff;
    background: #faf8ff;
}

.check {
    margin-left: auto;
    color: #7c6ee6;
    font-weight: bold;
}

.giftbox-more {
    padding: 8px 4px;
    font-size: 14px;
    color: #7c6ee6;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.giftbox-more:hover {
    opacity: 0.7;
}

.selected-box {
    padding: 16px;
    border: 2px solid #b8a3ff;
    background: #faf9ff;
    border-radius: 12px;
}

.selected-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    margin-right: 12px;
    object-fit: cover;
}

.selected-edit {
    font-size: 13px;
    color: #7c6ee6;
    background: #f3efff;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selected-edit:hover {
    background: #e8e2ff;
}

/* =========================
   TABLE WRAPPER
========================= */

.table {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eee;
    overflow: hidden;
}


/* =========================
   HEADER
========================= */

.table-head {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 1fr 1.5fr 140px;
    padding: 14px 18px;
    font-size: 13px;
    color: #888;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}


/* =========================
   ROWS
========================= */

.table-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 1fr 1.5fr 140px;
    padding: 16px 18px;
    align-items: center;
    border-bottom: 1px solid #f2f2f2;
    transition: all 0.15s ease;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: #faf9ff;
    cursor: pointer;
}


/* =========================
   CELLS
========================= */

.cell-main strong {
    font-size: 15px;
    font-weight: 600;
}

.text-muted {
    color: #777;
}

.small {
    font-size: 12px;
}


/* =========================
   STATUS (subtiel i.p.v. badges)
========================= */

.status {
    font-size: 13px;
    color: #666;
}

.status-warning {
    color: #d48806;
    font-weight: 600;
}

.status-success {
    color: #52c41a;
    font-weight: 500;
}


/* =========================
   ACTIONS
========================= */

.actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}


/* =========================
   BUTTONS (kleiner en rustiger)
========================= */

.btn-small {
    padding: 6px 10px;
    font-size: 12px;
}


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

.link {
    color: #7c6ee6;
    font-size: 13px;
    text-decoration: none;
}

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


/* =========================
   CLICKABLE ROW
========================= */

.clickable-row {
    cursor: pointer;
}


/* =========================
   REMOVE OLD BADGES (indien nog actief)
========================= */

.badge {
    display: none;
}

.confirm-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.confirm-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eee;
    padding: 24px;
    margin-top: 20px;
}

/* HEADER */
.confirm-header h2 {
    margin: 0;
}

.confirm-header span {
    font-size: 13px;
}

/* SECTION */
.confirm-section {
    margin-top: 20px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.confirm-row span {
    color: #777;
}

/* TOTAL */
.confirm-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 18px;
}

/* ACTIONS */
.confirm-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

