/* styles.css - Complete styling met liquid glass effect */

/* CSS Variables - Kleurenschema */
:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --background: #F5F5F7;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-hover: rgba(255, 255, 255, 0.85);
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    
    /* Taak kleuren */
    --task-bar: #007AFF;
    --task-stage: #FF3B30;
    --task-catering: #34C759;
    --task-security: #FF9500;
    --task-parking: #AF52DE;
    
    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: 20px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* Liquid Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

.glass-hover:hover {
    background: var(--surface-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--primary-color);
    color: white;
    min-height: 44px;
    min-width: 44px;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-danger {
    background: #FF3B30;
    color: white;
}

.btn-success {
    background: #34C759;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-icon {
    padding: 8px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:disabled,
.btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-height: 44px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: auto;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
}

/* Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    margin-bottom: 0;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(0, 0, 0, 0.05);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid var(--border-color);
}

th:hover {
    background: rgba(0, 0, 0, 0.05);
}

th.sortable::after {
    content: ' ↕';
    opacity: 0.5;
    font-size: 0.875rem;
}

th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-hover);
}

.login-title {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.login-info p {
    margin-bottom: 0.25rem;
}

/* Error Message */
.error-message {
    background: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.success-message {
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left: 4px solid #34C759;
}

.toast-error {
    border-left: 4px solid #FF3B30;
}

.toast-info {
    border-left: 4px solid var(--primary-color);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border);
    padding: 2rem 0;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav-item {
    margin: 0.25rem 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.sidebar-nav-link.active {
    background: rgba(0, 122, 255, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.hamburger-icon {
    width: 24px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* List Layouts */
.list {
    list-style: none;
    padding: 0;
}

.list-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.list-item:hover {
    background: var(--surface-hover);
    transform: translateX(4px);
}

/* Task Colors */
.task-bar {
    background: var(--task-bar);
    color: white;
}

.task-stage {
    background: var(--task-stage);
    color: white;
}

.task-catering {
    background: var(--task-catering);
    color: white;
}

.task-security {
    background: var(--task-security);
    color: white;
}

.task-parking {
    background: var(--task-parking);
    color: white;
}

.task-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Calendar */
.calendar-view {
    display: grid;
    gap: 1rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 4px;
}

.calendar-view-toggle button {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-view-toggle button.active {
    background: var(--primary-color);
    color: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    padding: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background: var(--surface-hover);
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
}

.calendar-day.has-events {
    background: rgba(0, 122, 255, 0.1);
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.calendar-events {
    font-size: 0.75rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Image Upload */
.image-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.image-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.image-upload-preview {
    width: 100%;
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 12px;
    margin-top: 1rem;
}

.event-image-container {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 16 / 9;
    margin-bottom: 0.5rem;
    overflow: hidden;
    border-radius: 8px;
}

.event-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.event-banner {
    width: calc(100% + 3rem);
    max-height: 200px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    display: block;
}

.event-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.event-card-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.event-card-details {
    flex: 1;
}

.image-upload-label {
    display: block;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-label:hover {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.05);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }
    
    .hamburger {
        display: block;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.25rem;
    }
    
    .calendar-day {
        padding: 0.25rem;
        font-size: 0.75rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .toast {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .card {
        padding: 1rem;
    }
    
    .modal {
        padding: 1.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex {
    display: flex;
}

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

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

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden {
    display: none;
}
