/**
 * Gemeinde Walddorfhäslach - Buchungssystem
 * Haupt-Stylesheet mit dunkelrotem Farbschema
 */

:root {
    /* Primärfarbe: Dunkelrot statt Blau */
    --primary-color: #990000;
    --primary-dark: #770000;
    --primary-light: #bb0000;
    --primary-hover: #cc0000;
    
    /* Sekundärfarben */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* Neutrale Farben */
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e8ed;
    
    /* Schatten */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Container & Layout */
.container {
    display: flex;
    min-height: 100vh;
    flex-direction: row;
}

.sidebar {
    width: 250px;
    background: var(--primary-color);
    color: white;
    padding: 0;
    box-shadow: var(--shadow-md);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
    top: 60px; /* Platz für Header */
}

.sidebar-header {
    padding: 20px;
    background: var(--primary-dark);
    border-bottom: 2px solid var(--primary-light);
}

.sidebar-header h2 {
    color: white;
    font-size: 18px;
    margin-bottom: 5px;
}

.sidebar-header .user-info {
    font-size: 14px;
    opacity: 0.9;
}

.sidebar nav {
    padding: 0;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar nav a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: var(--primary-dark);
    padding-left: 30px;
}

.sidebar nav a i {
    margin-right: 10px;
    width: 20px;
    display: inline-block;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 0;
    width: calc(100% - 250px);
    min-height: calc(100vh - 60px);
}

.content {
    padding: 30px;
    max-width: 1400px;
}

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

.content-header h1 {
    color: var(--text-dark);
    font-size: 28px;
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 20px;
    color: var(--text-dark);
}

.card-body {
    padding: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

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

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

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

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

.btn-warning {
    background: var(--warning-color);
    color: #000;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

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

/* Checkboxes & Options */
input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.options-group {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background: var(--bg-light);
}

.options-group h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 16px;
}

.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 2px solid transparent;
    transition: all 0.3s;
    cursor: pointer;
}

.option-item:hover {
    border-color: var(--primary-light);
    background: rgba(153, 0, 0, 0.02);
}

.option-item.selected {
    border-color: var(--primary-color);
    background: rgba(153, 0, 0, 0.05);
}

.option-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.option-info input[type="checkbox"] {
    margin-right: 12px;
}

.option-label {
    font-weight: 500;
    color: var(--text-dark);
}

.option-description {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 3px;
}

.option-price {
    font-weight: 600;
    color: var(--primary-color);
    margin-left: 15px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.table tr:hover {
    background: var(--bg-light);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

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

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

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

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

.badge-warning {
    background: var(--warning-color);
    color: #000;
}

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

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

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: white;
    font-size: 20px;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Price Preview */
.price-preview-box {
    background: rgba(153, 0, 0, 0.05);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.price-preview-box h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.price-preview {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.price-breakdown {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-light);
}

.price-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
}

.price-breakdown-item:last-child {
    border-bottom: none;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 5px;
    padding-top: 10px;
}

/* Utilities */
.text-center {
    text-align: center;
}

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

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.p-0 { padding: 0; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

/* Footer */
.footer {
    background: var(--bg-light);
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
    
    .content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .container {
        flex-direction: column;
    }
    
    .modal-content {
        max-width: 100%;
    }
}
