* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE4CC 100%);
    min-height: 100vh;
    padding: 30px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-view header {
    justify-content: center;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    background: white;
    padding: 10px;
    border-radius: 10px;
}

h1 {
    color: #1E3A8A;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h2 {
    color: #5E35B1;
    font-size: 36px;
    margin-bottom: 25px;
    font-weight: 700;
}

.section {
    display: block;
}

.section.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

.card {
    background: white;
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px solid #FFF5E6;
}

/* Login */
.login-box {
    max-width: 500px;
    margin: 80px auto;
    background: white;
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
}

.login-box input {
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 20px;
    border: 2px solid #FFE4CC;
    border-radius: 15px;
    font-size: 17px;
    transition: all 0.3s;
}

.login-box input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-mode, .btn-process {
    padding: 16px 32px;
    border: none;
    border-radius: 15px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #F7931E 0%, #FF8C42 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: white;
    color: #FF6B35;
    border: 2px solid #FF6B35;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #FF6B35;
    color: white;
}

.btn-mode {
    background: white;
    color: #2c3e50;
    flex: 1;
    border: 2px solid #e9ecef;
}

.btn-mode.active {
    background: #4caf50;
    color: white;
}

.btn-process {
    background: #ff9800;
    color: white;
    margin-left: 10px;
}

.btn-process:hover {
    background: #f57c00;
}

/* Form */
.form-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-group input, .form-group select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    flex: 1;
    min-width: 150px;
}

/* Mode toggle */
.mode-toggle {
    display: flex;
    gap: 10px;
}

/* Cards lijst */
#cardsList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    transition: all 0.3s;
    cursor: pointer;
}

.card-item:hover {
    background: #f9f9f9;
    border-color: #667eea;
}

.card-item.selected {
    background: #e3f2fd;
    border-color: #2196f3;
}

.card-info {
    flex: 1;
}

.card-name {
    font-size: 18px;
    font-weight: 600;
    color: #5E35B1;
    margin-bottom: 5px;
}

.card-stats {
    font-size: 14px;
    color: #666;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit {
    background: #2196f3;
    color: white;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-link {
    background: #4caf50;
    color: white;
}

.btn-reset {
    background: #ff9800;
    color: white;
}

.select-checkbox {
    width: 30px;
    height: 30px;
    border: 3px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: transparent;
    transition: all 0.3s;
}

.card-item.selected .select-checkbox {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

/* Client View */
.client-view {
    max-width: 500px;
}

.client-card {
    text-align: center;
}

.client-header {
    margin-bottom: 30px;
}

.client-date {
    color: #999;
    font-size: 14px;
    margin-top: 5px;
}

.stamp-counter {
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
    margin-top: 10px;
}

.stamp-counter .remaining {
    color: #5E35B1;
}

.stamp-counter .divider {
    color: #ddd;
    margin: 0 10px;
}

.stamp-counter .total {
    color: #999;
}

/* Stamps Grid */
.stamps-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.stamp {
    width: 100%;
    padding: 20px;
    border: 3px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    transition: all 0.3s;
    position: relative;
    min-height: 70px;
}

.stamp.used {
    background: linear-gradient(135deg, #9575CD 0%, #7E57C2 100%);
    border-color: #7E57C2;
    border-style: dashed;
    border-width: 3px;
    color: white;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.1), 0 2px 5px rgba(0,0,0,0.1);
    transform: rotate(0deg);
    position: relative;
}

.stamp.used::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.03) 2px,
            rgba(255,255,255,0.03) 4px
        );
    pointer-events: none;
}

.stamp.used:nth-child(even) {
    transform: rotate(0deg);
}

.stamp.available {
    background: #EDE7F6;
    border-color: #5E35B1;
    border-style: dashed;
    color: #5E35B1;
}

.stamp-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.stamp-number {
    font-size: 36px;
    font-weight: bold;
    min-width: 60px;
}

.stamp-checkmark {
    font-size: 32px;
}

.stamp-date {
    font-family: 'Permanent Marker', cursive !important;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 0px;
    text-transform: none;
    color: #2c3e50;
    opacity: 1;
    padding: 0;
    background: none;
    border-radius: 0;
    border: none;
    margin-left: auto;
    margin-right: 20px;
    box-shadow: none;
    text-shadow: none;
    position: relative;
}

/* Random rotatie voor datums */
.stamp:nth-child(1) .stamp-date { transform: rotate(-2deg); }
.stamp:nth-child(2) .stamp-date { transform: rotate(1.5deg); }
.stamp:nth-child(3) .stamp-date { transform: rotate(-1deg); }
.stamp:nth-child(4) .stamp-date { transform: rotate(2deg); }
.stamp:nth-child(5) .stamp-date { transform: rotate(-1.5deg); }
.stamp:nth-child(6) .stamp-date { transform: rotate(1deg); }
.stamp:nth-child(7) .stamp-date { transform: rotate(-2.5deg); }
.stamp:nth-child(8) .stamp-date { transform: rotate(1.5deg); }
.stamp:nth-child(9) .stamp-date { transform: rotate(-1deg); }
.stamp:nth-child(10) .stamp-date { transform: rotate(2.5deg); }

.stamp.available .stamp-date {
    display: none;
}

.card-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-around;
}

.card-footer p {
    font-size: 16px;
    color: #666;
}

/* Error */
.error {
    color: #f44336;
    margin-top: 10px;
    font-size: 14px;
}

.error.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header-content {
        flex-direction: column;
    }

    .logo {
        height: 84px;
    }

    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 16px;
    }

    .form-group {
        flex-direction: column;
    }
    
    .btn-small {
        padding: 6px 10px;
        font-size: 12px;
    }

    .card-item {
        flex-direction: column;
        gap: 15px;
    }

    .desktop-only {
        display: none !important;
    }

    .stamps-grid {
        gap: 10px;
    }

    .stamp {
        font-size: 14px;
        min-height: 60px;
        padding: 15px;
    }

    .stamp-number {
        font-size: 24px;
    }

    .stamp-checkmark {
        font-size: 20px;
    }

    .stamp-date {
        font-size: 24px;
        padding: 0;
        letter-spacing: 0px;
    }

    .stamp-counter {
        font-size: 24px;
    }
    
    .card-name {
        font-size: 16px;
    }
    
    .card-stats {
        font-size: 12px;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Mobile Popup */
.mobile-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
}

.mobile-popup.show {
    opacity: 1;
}

.mobile-popup-content {
    background: white;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-popup.show .mobile-popup-content {
    transform: translateY(0);
}

.mobile-btn {
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.mobile-btn.btn-edit {
    background: #2196f3;
    color: white;
}

.mobile-btn.btn-link {
    background: #4caf50;
    color: white;
}

.mobile-btn.btn-reset {
    background: #ff9800;
    color: white;
}

.mobile-btn.btn-delete {
    background: #f44336;
    color: white;
}

.mobile-btn.btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    flex-direction: column;
    margin-bottom: 20px;
}

.modal-body label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.modal-body input {
    width: 100%;
}

.modal-body small {
    color: #999;
    margin-top: 5px;
    display: block;
}

.modal-footer {
    padding: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Strippen Selector */
.strippen-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.btn-strip {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #667eea;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-strip:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.btn-strip:active {
    transform: scale(0.95);
}

.strip-count {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
    min-width: 60px;
    text-align: center;
}

/* Lesson Dates List */
#lessonDatesList {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.lesson-date-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.lesson-number {
    font-weight: 600;
    color: #667eea;
    min-width: 50px;
}

.lesson-date-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.btn-remove {
    padding: 6px 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: #d32f2f;
}

