:root {
    --primary-color: #3b66f5;
    --primary-hover: #3256d4;
    --sidebar-width: 250px;
    --bg-color: #f8f9fa;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.nav-menu {
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    gap: 12px;
}

.nav-item:hover {
    background-color: var(--bg-color);
    color: var(--text-main);
}

.nav-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* Main Content Styling */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px 40px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.page-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

/* Form Styling */
.form-container {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.form-container input,
.form-container textarea {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 100%;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.form-container label {
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

/* Table Styling */
.table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 16px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--white);
}

td {
    padding: 16px 24px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

tbody tr:hover {
    background-color: var(--bg-color);
}

.event-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.event-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    border-radius: 8px;
}

.location-cell {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-cell svg {
    width: 16px;
    height: 16px;
}

.action-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.action-link:hover {
    text-decoration: underline;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.modal-header-top h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-header-info {
    display: flex;
    gap: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-section-title {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-main);
}

.shift-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shift-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shift-details h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.shift-meta {
    display: flex;
    gap: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.shift-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shift-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.warnung {
    background-color: #fff4e5;
    color: #f59e0b;
}

.badge.voll {
    background-color: #e6f4ea;
    color: #10b981;
}

.badge.kritisch {
    background-color: #fce8e8;
    color: #ef4444;
}

.action-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.action-icon:hover {
    color: var(--text-main);
}

.action-icon.delete:hover {
    color: #ef4444;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Wizard Styles for Registration */
.wizard-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.wizard-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s;
}

.wizard-step.active .wizard-step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.wizard-step.completed .wizard-step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.wizard-step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

.wizard-step.active .wizard-step-label {
    color: var(--text-main);
    font-weight: 600;
}

.form-section {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

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

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline {
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

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

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: start;
    gap: 8px;
    margin-bottom: 12px;
}

.checkbox-input {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--text-main);
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.info-box {
    background: var(--bg-color);
    padding: 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 20px;
}

.summary-section {
    background: var(--bg-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

/* Loading Screen Styles */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-color);
}

.loading-logo {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.loading-text {
    font-size: 18px;
    color: var(--text-muted);
    margin-top: 12px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 20px;
}

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

/* Dashboard specific styles */
.app-container {
    display: flex;
    min-height: 100vh;
}

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

.card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.card-change {
    font-size: 0.85rem;
    font-weight: 500;
}

.card-change.positive {
    color: #10b981;
}

.card-change.negative {
    color: #ef4444;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.event-item:last-child {
    border-bottom: none;
}

.event-name {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 4px;
}

.event-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.event-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background-color: #e6f4ea;
    color: #10b981;
}
