/* ============================================================================
   FORTBILDUNGSPORTAL - MASTER STYLESHEET
   Konsolidierte CSS-Datei für alle Bereiche
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. GLOBAL RESET & BASE STYLES
   ---------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
	background: linear-gradient(135deg, #4B9CD3 0%, #2E7FB8 100%);
    font-family: Arial, sans-serif;
    background: #f0f2f5;
    padding: 20px;
    min-height: 100vh;
    line-height: 1.6;
}

/* ----------------------------------------------------------------------------
   2. CONTAINER & LAYOUT
   ---------------------------------------------------------------------------- */
.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.module-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ----------------------------------------------------------------------------
   3. HEADERS & TITLES
   ---------------------------------------------------------------------------- */
h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
}

h3 {
    color: #333;
    margin-bottom: 15px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.section-title {
    margin: 30px 0 20px 0;
    color: #333;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.module-header h1 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.module-actions {
    display: flex;
    gap: 10px;
}

/* ----------------------------------------------------------------------------
   4. NAVIGATION
   ---------------------------------------------------------------------------- */
.navbar {
    background: #2196F3;
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: -20px -20px 20px -20px;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 24px;
    color: white;
    margin: 0;
}

.navbar h1 a {
    color: white;
    text-decoration: none;
}

.navbar .user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.navbar a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navbar .logout {
    background: rgba(255, 255, 255, 0.2);
}

.navbar .logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ----------------------------------------------------------------------------
   5. FORMS
   ---------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.section-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2196F3;
}

input:disabled {
    background: #f5f5f5;
    color: #999;
}

textarea {
    font-family: inherit;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Checkboxes */
.checkbox-label {
    display: block;
    padding: 12px;
    margin: 8px 0;
    background: #f9f9f9;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    border: 2px solid transparent;
}

.checkbox-label:hover {
    background: #f0f0f0;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label strong {
    display: inline;
}

.checkbox-label small {
    display: block;
    margin-top: 8px;
    margin-left: 30px;
}

/* Role/Module Checkboxes */
.role-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    margin: 10px 0;
    background: #f9f9f9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.role-checkbox:hover {
    background: #f0f0f0;
    border-color: #667eea;
}

.role-checkbox input[type="checkbox"] {
    margin-right: 15px;
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.role-checkbox:hover:not(:has(input:disabled)) {
    background: #f0f0f0;
    border-color: #667eea;
}
.role-checkbox:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}
.role-checkbox input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.role-info {
    flex: 1;
}

.role-info strong {
    display: block;
    color: #333;
    font-size: 15px;
    margin-bottom: 4px;
}

.role-name {
    display: inline-block;
    margin-left: 10px;
    font-size: 12px;
}

.role-name code {
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 3px;
}

.role-info small {
    display: block;
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

/* Filter */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}
.filter-btn:hover {
    background: #e0e0e0;
}
.filter-btn.active {
    background: #2196F3;
    color: white;
}

/* ----------------------------------------------------------------------------
   6. BUTTONS
   ---------------------------------------------------------------------------- */
button,
.btn {
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

btn-lg {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

button:hover,
.btn:hover {
    background: #1976D2;
}

.btn-primary {
    background: #2196F3;
    color: white;
    border: 2px solid #2196F3;
}

.btn-primary:hover {
    background: #1976D2;
    border-color: #1976D2;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-danger,
button.danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover,
button.danger:hover {
    background: #d32f2f;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ----------------------------------------------------------------------------
   7. ALERTS & MESSAGES
   ---------------------------------------------------------------------------- */
.error {
    background: #f44336;
    color: white;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.success {
    background: #4CAF50;
    color: white;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.info-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.warning-box {
    background: #fff3e0;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #ff9800;
}

.warning-box h3 {
	margin-bottom: 10px;
	color: #e65100;
}

.security-hint {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 14px;
}

.status {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.status.active {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.status-complete, tr.status-complete .status-badge {
    background: #c8e6c9;
    color: #2e7d32;
}

.status-pending, tr.status-pending .status-badge {
    background: #fff3e0;
    color: #ef6c00;
}

.status-warning, tr.status-warning .status-badge {
    background: #ffecb3;
    color: #ff8f00;
}

.status-empty, tr.status-empty .status-badge {
    background: #f5f5f5;
    color: #9e9e9e;
}

.status-unknown, tr.status-unknown .status-badge {
    background: #eceff1;
    color: #607d8b;
}

tr.status-complete {
    background: #f1f8e9;
}

tr.status-pending {
    background: #fff8e1;
}

.status.inactive {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

.efn-display {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    background: #e8f5e9 !important;
    border-color: #4CAF50 !important;
    color: #2e7d32 !important;
}

.text-success {
    color: #4CAF50;
}

.text-warning {
    color: #ff9800;
}

.text-muted {
    color: #9e9e9e;
}

.mono {
    font-family: monospace;
    font-size: 11px;
}

code.password {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: 600;
}

/* ----------------------------------------------------------------------------
   8. BADGES
   ---------------------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
}

.badge-warning {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-info {
    background: #e3f2fd;
    color: #1976d2;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    background: #2196F3;
    color: white;
    margin-right: 5px;
}

.security-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
}

.security-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.security-status.active {
    color: #4CAF50;
    font-weight: 600;
}

.security-status.inactive {
    color: #ff9800;
    font-weight: 600;
}

/* ----------------------------------------------------------------------------
   9. TABLES
   ---------------------------------------------------------------------------- */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f5f5f5;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover {
    background: #f9f9f9;
}

.data-table code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.icon-cell {
    font-size: 24px;
    text-align: center;
}

/* ----------------------------------------------------------------------------
   10. CARDS & GRIDS
   ---------------------------------------------------------------------------- */
.welcome-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.welcome-card h2 {
    color: #333;
    margin-bottom: 10px;
}

.welcome-card .subtitle {
    color: #666;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card .number {
    font-size: 28px;
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 5px;
}

.stat-card .label {
    color: #666;
    font-size: 14px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.admin-card .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.admin-card h3 {
    color: white;
    margin-bottom: 10px;
}

.admin-card p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.module-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.module-card .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.module-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.module-card p {
    color: #666;
    font-size: 14px;
}

.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.action-card .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.action-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.action-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.action-card a {
    display: inline-block;
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.action-card a:hover {
    background: #1976D2;
}

/* ----------------------------------------------------------------------------
   11. USER INFO & PROFILE
   ---------------------------------------------------------------------------- */
.user-info {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.user-info table {
    width: 100%;
}

.user-info td {
    padding: 8px 0;
}

.user-info td:first-child {
    font-weight: bold;
    color: #1976D2;
    width: 150px;
}

.module-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.module-info h4 {
    margin-bottom: 15px;
    color: #333;
}

.module-info table {
    width: 100%;
}

.module-info td {
    padding: 8px 0;
}

.module-info td:first-child {
    width: 180px;
}

.module-info code {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* ----------------------------------------------------------------------------
   12. LOGIN & AUTH PAGES
   ---------------------------------------------------------------------------- */
.login-container {
    max-width: 450px;
    width: 100%;
    padding: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: white;
    font-size: 32px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.login-header p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #999;
}

.step.active {
    background: #2196F3;
    color: white;
}

.step.complete {
    background: #4CAF50;
    color: white;
}

.secure-badge {
    background: #e3f2fd;
    color: #1976D2;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.secure-badge strong {
    color: #0d47a1;
}

.code-input {
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    font-weight: bold;
}

/* ----------------------------------------------------------------------------
   13. SPECIAL ELEMENTS
   ---------------------------------------------------------------------------- */
.qr-container {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    margin: 20px 0;
}

.qr-container #qrcode {
    display: inline-block;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.qr-container img {
    max-width: 200px;
    height: auto;
}

.secret-box {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    word-break: break-all;
    letter-spacing: 2px;
}

.instructions {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.instructions p {
    margin-bottom: 10px;
}

.instructions ol {
    margin-left: 20px;
}

.instructions li {
    margin: 10px 0;
    line-height: 1.6;
}

.instructions strong {
    color: #1976D2;
}

.help {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.help-icon {
    background: #ff9800;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-block;
    text-align: center;
    line-height: 24px;
    margin-right: 5px;
}

.link {
    margin-top: 20px;
    text-align: center;
}

.link a {
    color: #2196F3;
    text-decoration: none;
    transition: text-decoration 0.3s;
}

.link a:hover {
    text-decoration: underline;
}

.link strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.text-muted {
    color: #999;
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 15px 0;
}

.legend {
    font-size: 13px;
}

.legend .status-badge {
    margin: 0 5px;
}

/* ----------------------------------------------------------------------------
   14. RESPONSIVE DESIGN
   ---------------------------------------------------------------------------- */
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    .navbar-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .navbar .user-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-grid,
    .actions {
        grid-template-columns: 1fr;
    }
    
    .module-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .module-actions {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
	.form-row {
		grid-template-columns: 1fr;
	}

    .admin-grid,
    .modules-grid {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------------------------------
   15. UTILITY CLASSES
   ---------------------------------------------------------------------------- */
.text-center {
    text-align: center;
}

.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;
}

.mb-30 {
    margin-bottom: 30px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}