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

:root {
    --primary-color: #ff671d;
    --secondary-color: #ff8c42;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --dark: #2d3748;
    --light: #f7fafc;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px 0 rgba(255, 103, 29, 0.37);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
}

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

.glass-light {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(180deg, #ff6b6b 0%, #feca57 100%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(180deg, #5f27cd 0%, #00d2d3 100%);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(180deg, #a29bfe 0%, #6c5ce7 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(30px) rotate(240deg); }
}

/* Login Styles */
.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-box {
    padding: 40px;
    color: white;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: white;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    opacity: 0.8;
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: white;
    font-size: 14px;
}

.form-group label i {
    margin-right: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
}

/* Specifieke stijlen voor modal inputs */
.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #2d3748;
    font-weight: 500;
}

.modal-body .form-group input::placeholder {
    color: rgba(45, 55, 72, 0.5);
}

.modal-body .form-group label {
    color: #2d3748;
    font-weight: 600;
}

.modal-body .form-group small {
    color: #718096;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Focus stijlen voor modal inputs */
.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    color: #2d3748;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(245, 101, 101, 0.2);
    border: 1px solid rgba(245, 101, 101, 0.4);
    color: white;
}

.alert-success {
    background: rgba(72, 187, 120, 0.2);
    border: 1px solid rgba(72, 187, 120, 0.4);
    color: white;
}

/* Dashboard */
.dashboard-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid var(--glass-border);
}

.dashboard-title {
    color: white;
}

.dashboard-title h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.dashboard-title p {
    opacity: 0.8;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 25px;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-content h3 {
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-content p {
    opacity: 0.8;
    font-size: 14px;
}

/* Content Section */
.content-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 24px;
    color: var(--dark);
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

thead th:first-child {
    border-radius: 10px 0 0 0;
}

thead th:last-child {
    border-radius: 0 10px 0 0;
}

tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

tbody td {
    padding: 15px;
    color: var(--dark);
}

.link-code {
    font-family: 'Courier New', monospace;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 5px;
    font-weight: 600;
}

.link-url {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.click-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--primary-color);
}

.table-actions {
    display: flex;
    gap: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    border-radius: 0 0 20px 20px;
}

/* QR Code Generator Styles */
.modal-wide {
    max-width: 1200px !important;
}

.qr-generator-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
}

.qr-options {
    padding-right: 20px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    max-height: 600px;
    overflow-y: auto;
}

.qr-styles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.qr-style-option {
    text-align: center;
    cursor: pointer;
    padding: 15px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

.qr-style-option:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.qr-style-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.dots-preview {
    display: grid;
    grid-template-columns: repeat(3, 8px);
    gap: 4px;
    justify-content: center;
    padding: 10px 0;
}

.dots-preview span {
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
}

/* Color Input Wrapper */
.color-input-wrapper {
    display: flex;
    gap: 10px;
}

.color-input-wrapper input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.color-input-wrapper input[type="text"] {
    flex: 1;
    font-family: monospace;
    text-transform: uppercase;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-col {
    flex: 1;
}

/* Preview Section */
.qr-preview-section {
    text-align: center;
}

.qr-preview-section h3 {
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qr-preview {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: inline-block;
    min-height: 300px;
    min-width: 300px;
    position: relative;
}

.qr-preview canvas {
    max-width: 100%;
    height: auto;
}

#qrLoading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* QR Info */
.qr-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    text-align: left;
}

.qr-info p {
    margin: 5px 0;
    color: var(--dark);
}

.qr-info span {
    color: var(--primary-color);
    font-weight: 600;
}

/* QR Actions */
.qr-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

/* Templates */
.qr-templates {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.qr-templates h4 {
    color: var(--dark);
    margin-bottom: 15px;
}

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

.template-item {
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.template-item:hover {
    transform: translateY(-3px);
}

.template-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.template-item span {
    font-size: 12px;
    color: var(--dark);
}

/* Checkbox styling */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

/* Range slider styling */
input[type="range"] {
    width: calc(100% - 40px);
    margin-right: 10px;
}

#marginValue {
    display: inline-block;
    width: 20px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
}

/* Logo preview */
#logoPreview {
    padding: 10px;
    background: white;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
}

#logoPreview img {
    max-width: 100px;
    max-height: 100px;
}

/* Responsive */
@media (max-width: 1024px) {
    .qr-generator-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .qr-options {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding-bottom: 20px;
        max-height: none;
    }
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
}

/* Copy Button */
.copy-btn {
    background: transparent;
    border: 1px solid #cbd5e0;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 20px;
    }
    
    .dashboard-title h1 {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .table-wrapper {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
}

/* 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 1s ease-in-out infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.toast {
    background: white;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

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