/* Een simpele start voor je CSS */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main-header {
    background-color: #333;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.main-header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

/* Main content area */
.content {
    flex: 1;
    padding: 0;
}
.main-header nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}
.content {
    padding: 2rem;
}

/* Alert messages */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error, .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Navigation improvements */
.main-header nav a {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.main-header nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* General improvements */
.main-header .logo:hover {
    opacity: 0.8;
}

/* Request Access Form */
.request-access-form {
    max-width: 600px;
    margin: 20px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.application-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    border-left: 4px solid #007bff;
}

.application-info h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.application-info .description {
    margin: 0;
    color: #6c757d;
}

.access-request-form .form-group {
    margin-bottom: 20px;
}

.access-request-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.access-request-form .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.access-request-form .form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-actions .btn .icon {
    font-size: 1.1em;
}

/* Message Notifications */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    min-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.message-success {
    background-color: #28a745;
}

.message-error {
    background-color: #dc3545;
}

.message-info {
    background-color: #17a2b8;
}

.message-warning {
    background-color: #ffc107;
    color: #212529;
}

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

/* Authentication Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

.auth-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.auth-form h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    text-align: center;
}

.auth-form > p {
    text-align: center;
    color: #6c757d;
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-errors {
    margin-top: 5px;
}

.form-errors .error {
    color: #dc3545;
    font-size: 0.9em;
    margin: 2px 0;
}

.help-text {
    color: #6c757d;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

.auth-form .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.auth-form .form-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Auth prompt on home page */
.auth-prompt {
    text-align: center;
    margin: 40px 0;
}

.auth-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-buttons .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
}

.auth-description {
    color: #6c757d;
    font-size: 0.9em;
}

/* Application Admin Styles */
.application-admin {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.admin-header h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
}

.admin-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-section h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.access-request-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

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

.request-header h3 {
    margin: 0;
    color: #2c3e50;
}

.request-date {
    color: #6c757d;
    font-size: 0.9em;
}

.request-message {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #17a2b8;
}

.permissions-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.permissions-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
}

.permission-group {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.permission-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    display: block;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: normal !important;
}

.checkbox-item:hover {
    background: #f8f9fa;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
}

/* Radio button styling for role selection */
.role-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-weight: normal !important;
    transition: all 0.2s ease;
}

.radio-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.radio-item input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.radio-item input[type="radio"]:checked + .role-label {
    font-weight: 600;
    color: #007bff;
}

.radio-item:has(input[type="radio"]:checked) {
    background: #e7f3ff;
    border-color: #007bff;
}

.role-label {
    flex: 1;
    cursor: pointer;
}

.wildcard {
    font-weight: bold;
    color: #e74c3c;
}

.custom-input {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.custom-input label {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.custom-input input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.admin-notes {
    margin: 20px 0;
}

.admin-notes label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.admin-notes textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c82333;
}

.users-table {
    overflow-x: auto;
}

.users-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.users-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.access-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.access-type.viewer {
    background: #d4edda;
    color: #155724;
}

.access-type.editor {
    background: #fff3cd;
    color: #856404;
}

.access-type.admin {
    background: #f8d7da;
    color: #721c24;
}

.manager-badge {
    color: #28a745;
    font-weight: 600;
}

.no-manage {
    color: #6c757d;
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.8em;
    text-decoration: none;
    border-radius: 3px;
    margin-right: 5px;
}

.options-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.option-group h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-tag {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #495057;
}

.no-requests,
.no-users {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid #555;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Dashboard specific styles */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-notice {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 499px));
    gap: 20px;
    margin-top: 20px;
}

.application-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.application-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.application-card.disabled {
    background: #f8f9fa;
    opacity: 0.7;
    border-color: #dee2e6;
}

.application-card.disabled:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
    cursor: pointer;
}

.clickable-card {
    cursor: pointer;
    user-select: none;
}

.clickable-card:active {
    transform: translateY(0);
}

.click-indicator {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
}

.application-card.disabled .click-indicator {
    color: #007bff;
}

.admin-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.btn-admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.application-card h4 {
    margin-top: 0;
    color: #333;
}

.access-info {
    margin: 10px 0;
}

.access-type {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.manager-badge {
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-left: 10px;
}

.app-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-disabled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-icon {
    font-size: 1.1em;
}

.permissions {
    margin: 15px 0;
    font-size: 0.9em;
}

.permissions h5 {
    margin-bottom: 5px;
}

.permissions ul {
    margin: 0;
    padding-left: 20px;
}

.actions {
    margin-top: 15px;
}

.btn {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
}

.btn:hover {
    background: #005a8b;
}

.no-applications {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Home page styles */
.home-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.login-prompt {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.login-prompt a {
    color: #1976d2;
    text-decoration: none;
    font-weight: bold;
}

.available-apps {
    margin-top: 40px;
    text-align: left;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.app-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-card h4 {
    margin-top: 0;
    color: #333;
}

.app-card em {
    color: #666;
    font-size: 0.9em;
}

/* Admin overview styles */
.admin-overview {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

.stat-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 2.5em;
    margin: 0;
    color: #007cba;
}

.stat-card p {
    margin: 10px 0 5px 0;
    font-weight: bold;
}

.stat-card small {
    color: #666;
}

.admin-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

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

table th,
table td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f5f5f5;
    font-weight: bold;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.status.active {
    background: #4caf50;
    color: white;
}

.status.inactive {
    background: #f44336;
    color: white;
}

.access-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.access-type.manager {
    background: #4caf50;
    color: white;
}

.access-type.user {
    background: #2196f3;
    color: white;
}

.admin-actions {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.action-btn {
    display: block;
    background: #007cba;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}

.action-btn:hover {
    background: #005a8b;
}

@media (max-width: 768px) {
    .admin-sections {
        grid-template-columns: 1fr;
    }
}

/* Permission badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75em;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
    margin: 1px;
}

.badge-primary {
    color: #fff;
    background-color: #007bff;
}

.badge-success {
    color: #fff;
    background-color: #28a745;
}

.badge-info {
    color: #fff;
    background-color: #17a2b8;
}

.badge-warning {
    color: #212529;
    background-color: #ffc107;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

.badge-secondary {
    color: #fff;
    background-color: #6c757d;
}

/* Permission details in table */
.permissions-detail {
    font-size: 0.9em;
    line-height: 1.4;
}

.permission-group {
    margin-bottom: 4px;
}

.permission-group strong {
    display: inline-block;
    min-width: 60px;
    font-size: 0.85em;
    color: #666;
}

/* User table improvements */
.users-table table th:nth-child(3) {
    min-width: 200px;
}

/* Button icons */
.btn i {
    margin-right: 4px;
}

/* Confirmation styling */
.btn-danger:hover {
    background-color: #c82333;
}

/* Dynamic section filtering */
.relevant-section {
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    padding-left: 8px;
    margin-left: -8px;
    border-radius: 4px;
}

.filtered-out {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.no-sections-message {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 8px 0;
    font-style: italic;
}

#section-loading {
    margin: 8px 0;
    padding: 4px 0;
}

/* Enhanced permission group styling */
.permission-group .checkbox-group {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    background-color: #fdfdfd;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    min-height: 120px;
}

.checkbox-item {
    transition: all 0.2s ease;
    margin: 0;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background-color: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}

.checkbox-item:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    margin-left: 0;
}

/* Universal wildcard styling */
.wildcard-item {
    grid-column: 1 / -1 !important;
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    padding: 15px !important;
    font-size: 15px !important;
}

.wildcard-item:hover {
    background-color: #fff3cd !important;
    border-color: #f39c12 !important;
}

.wildcard-item .wildcard {
    color: #856404;
    font-weight: 600;
}

/* Sections grid container */
.sections-grid-container {
    display: contents;
}

#dynamic-sections {
    display: contents;
}

.dynamic-section-item {
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    min-width: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.dynamic-section-item:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

.dynamic-section-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Grid layout for edit form sections */
.row .dynamic-section {
    margin-bottom: 8px;
}

.row .dynamic-section .form-check {
    padding: 6px 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.row .dynamic-section .form-check:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

/* Applications Selection */
.applications-selection {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
}

.applications-selection .checkbox-item {
    margin-bottom: 8px;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.applications-selection .checkbox-item:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

.applications-selection .checkbox-item:last-child {
    margin-bottom: 0;
}



