.form-group {
  margin-bottom: 10px;
  padding: 10px;
}

@font-face {
    font-family: 'Proxima Nova Soft';
    src: url('/fonts/proxima-nova-soft-regular-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Proxima Nova Soft', 'Segoe UI', Arial, sans-serif;
    color: #222;
    background: #fff;
    font-size: 17px;
    line-height: 1.75;
}

.bg-primary,
.btn-primary,
.alert-primary,
.navbar,
.header,
footer {
    background-color: #0077BA !important;
    border-color: #0077BA !important;
    color: #fff !important;
}

.bg-warning,
.btn-warning,
.alert-warning {
    background-color: #EF7D00 !important;
    border-color: #EF7D00 !important;
    color: #fff !important;
}

/* Headlines */
h1 {
    color: #0077BA;
    font-size: 2em;
    font-weight: 700;
    margin: 36px 0 16px 0;
}
h2 {
    color: #EF7D00;
    font-size: 1.2em;
    font-weight: 700;
    margin: 32px 0 12px 0;
    text-transform: uppercase;
}
h3, h4, h5, h6 {
    color: #0077BA;
    font-weight: 600;
}

a {
    color: #0077BA;
}
a:hover,
a:focus {
    color: #EF7D00;
    text-decoration: underline;
}

.btn-primary {
    background: #0077BA;
    border-color: #0077BA;
}
.btn-primary:hover,
.btn-primary:focus {
    background: #005b99;
    border-color: #005b99;
    color: #fff;
}
.btn-warning {
    background: #EF7D00;
    border-color: #EF7D00;
    color: #fff;
}
.btn-warning:hover,
.btn-warning:focus {
    background: #c75e00;
    border-color: #c75e00;
    color: #fff;
}

/* Orange abgerundete HR-Linie */
hr {
    border: none;
    height: 5px;
    background: #EF7D00;
    border-radius: 3px;
    margin: 32px 0;
    width: 100%;
    max-width: 100%;
}

/* Optional: Karten, Panels, etc. */
.card, .panel, .shadow-sm {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    border: 1px solid #eee;
}

.navbar {
    font-weight: 600;
    background: #0077BA !important;
}
.navbar-brand,
.navbar-nav .nav-link {
    color: #fff !important;
}
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: #EF7D00 !important;
}

/* User dropdown - no hover effects and no transitions */
#userDropdown,
#userDropdown *,
#userDropdown:hover,
#userDropdown:hover *,
#userDropdown:focus {
    color: inherit !important;
    text-decoration: none !important;
    transition: none !important;
}

/* Ensure dropdown menu appears on top of all content */
.dropdown-menu {
    z-index: 9999 !important;
}

/* Footer */
footer, .footer {
    background: #0077BA;
    color: #fff;
    border-top: 7px solid #EF7D00;
    padding: 22px 0 14px 0;
    margin-top: 48px;
}

::-webkit-input-placeholder { color: #888; }
::-moz-placeholder { color: #888; }
:-ms-input-placeholder { color: #888; }
::placeholder { color: #888; }

/* Orangener Balken unter allen Header- und Footer-Elementen */
.header-bar,
.footer-bar {
    width: 100%;
    height: 10px;
    background: #EF7D00;
    display: block;
    border-radius: 0;
    margin: 0;
    padding: 0;
}

/* Für Bootstrap-Navbar */
.navbar {
    position: relative;
    z-index: 2;
}
.navbar + .header-bar {
    position: relative;
    top: 0;
    left: 0;
}

/* Für Footer */
footer {
    position: relative;
}
footer .footer-bar {
    position: relative;
    bottom: 0;
    left: 0;
}
/* --- Select2 Multiselect Chips mit mittigem Text & Papierkorb rechts --- */

/* --- Select2 Multiselect Chips mit mittigem Text & Papierkorb rechts --- */

/* Macht aus den Choices Chips mit mittigem Text */
.select2-container .select2-selection--multiple .select2-selection__choice {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 0.75rem !important;
    margin: 0 6px 6px 0;
    padding: 0.25rem 0.9rem 0.25rem 0.75rem; /* Platz für Icon */
    font-size: 1rem;
    min-height: 32px;
    position: relative;
    font-family: inherit;
}

/* Papierkorb-Icon als Entfernen-Button rechts im Chip */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    order: 2;
    margin-left: 8px;
    margin-right: -8px;
    background: none;
    border: none;
    color: #dc3545 !important;
    font-size: 1.25em;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 2px;
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* Das Standard-x durch Papierkorb-Icon von FontAwesome ersetzen */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f1f8"; /* fa-trash */
    color: #dc3545;
    font-size: 1em;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover::before {
    color: #b02a37;
}

/* Das x ausblenden */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: transparent !important;
}

/* Verhindert Textverschiebung */
.select2-selection__choice__remove:after {
    content: "";
}

/* Text im Chip mittig lassen */
.select2-container .select2-selection--multiple .select2-selection__choice {
    justify-content: center;
}

/* ===== CALENDAR STYLES ===== */
.calendar-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calendar-grid {
    display: flex;
    flex-direction: column;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.calendar-weekday {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    color: #6c757d;
    border-right: 1px solid #dee2e6;
}

.calendar-weekday:last-child {
    border-right: none;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #dee2e6;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 8px;
    border: 1px solid transparent;
    position: relative;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background-color: #f8f9fa;
    border-color: #0077BA;
    cursor: pointer;
}

.calendar-day.other-month {
    color: #adb5bd;
    background-color: #f8f9fa;
}

.calendar-day.today {
    background-color: #fff3cd;
    border-color: #EF7D00;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.calendar-events {
    max-height: 80px;
    overflow: hidden;
}

.calendar-event {
    background: #0077BA;
    color: white;
    padding: 2px 6px;
    margin: 1px 0;
    border-radius: 3px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.calendar-event:hover {
    background: #005f99;
}

.calendar-event.meeting {
    background: #17a2b8;
}

.calendar-event.meeting:hover {
    background: #138496;
}

.calendar-event.past {
    background: #6c757d;
    opacity: 0.7;
}

.calendar-event.past:hover {
    background: #5a6268;
}

.calendar-more {
    color: #6c757d;
    font-size: 0.7rem;
    text-align: center;
    margin-top: 2px;
    cursor: pointer;
}

.calendar-more:hover {
    color: #0077BA;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }
    
    .calendar-weekday {
        padding: 10px 5px;
        font-size: 0.8rem;
    }
    
    .calendar-day-number {
        font-size: 0.8rem;
    }
    
    .calendar-event {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
}

@media (max-width: 576px) {
    .calendar-weekday {
        padding: 8px 2px;
        font-size: 0.75rem;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 2px;
    }
    
    .calendar-events {
        max-height: 40px;
    }
}

/* GitHub-Style Activity Grid für Zahlungen */
.activity-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e1e4e8;
}

.activity-grid-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
}

.activity-months {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #586069;
    margin-bottom: 8px;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(26, 1fr); /* ~6 Monate à 4-5 Wochen */
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
    max-width: 700px;
}

.activity-square {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.1s ease;
}

/* Activity Levels (GitHub Style) */
.activity-square.level-0 {
    background-color: #ebedf0;
}

.activity-square.level-1 {
    background-color: #9be9a8;
}

.activity-square.level-2 {
    background-color: #40c463;
}

.activity-square.level-3 {
    background-color: #30a14e;
}

.activity-square.level-4 {
    background-color: #216e39;
}

.activity-square:hover {
    stroke: rgba(0, 0, 0, 0.3);
    stroke-width: 1px;
}

.activity-weekdays {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #586069;
    height: 91px; /* 7 days * 11px + 6 gaps * 3px */
    justify-content: space-around;
    padding: 2px 0;
}

.activity-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    font-size: 12px;
    color: #586069;
}

.legend-scale {
    display: flex;
    gap: 3px;
    margin: 0 8px;
}

.legend-square {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    cursor: help;
}

/* Range Slider für Zeitauswahl */
.selection-section {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
}

.range-slider-container {
    position: relative;
    margin: 20px 0;
}

.range-timeline {
    height: 30px;
    background: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 100%);
    border-radius: 15px;
    position: relative;
    border: 2px solid #dee2e6;
    cursor: crosshair;
}

.range-selection {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(0, 119, 186, 0.3);
    border: 2px solid #0077BA;
    border-radius: 15px;
    cursor: grab;
    transition: all 0.2s ease;
}

.range-selection:active {
    cursor: grabbing;
}

.range-selection::before,
.range-selection::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: #0077BA;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: ew-resize;
    box-shadow: 0 2px 4px rgba(0, 119, 186, 0.3);
}

.range-selection::before {
    left: -7px;
}

.range-selection::after {
    right: -7px;
}

.range-months {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #586069;
    padding: 0 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .activity-grid {
        grid-template-columns: repeat(13, 1fr); /* Weniger Spalten auf Mobile */
        gap: 2px;
    }
    
    .activity-square, .legend-square {
        width: 9px;
        height: 9px;
    }
    
    .activity-weekdays {
        height: 73px; /* Angepasst für kleinere Squares */
    }
    
    .range-timeline {
        height: 25px;
    }
}

/* ========================================
   HOME PAGE WYSIWYG CONTENT STYLING
   ======================================== */

.home-content {
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Ensure WYSIWYG content inherits site styling */
.home-content h1,
.home-content h2,
.home-content h3,
.home-content h4,
.home-content h5,
.home-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.home-content h1:first-child,
.home-content h2:first-child,
.home-content h3:first-child {
    margin-top: 0;
}

.home-content p {
    margin-bottom: 1em;
    line-height: 1.75;
}

.home-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.home-content ul,
.home-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.home-content li {
    margin-bottom: 0.5em;
}

.home-content table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
}

.home-content table th,
.home-content table td {
    padding: 12px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.home-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.home-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.home-content blockquote {
    border-left: 4px solid #EF7D00;
    padding-left: 20px;
    margin: 1.5em 0;
    font-style: italic;
    color: #666;
}

.home-content a {
    color: #0077BA;
    text-decoration: none;
}

.home-content a:hover {
    text-decoration: underline;
    color: #005b99;
}

.home-content pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1em 0;
}

.home-content code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Dark mode support for home content */
[data-theme="dark"] .home-content {
    color: var(--text-primary);
}

[data-theme="dark"] .home-content h1,
[data-theme="dark"] .home-content h2,
[data-theme="dark"] .home-content h3 {
    color: inherit;
}

[data-theme="dark"] .home-content table th,
[data-theme="dark"] .home-content table td {
    border-color: var(--border-color);
}

[data-theme="dark"] .home-content table th {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .home-content table tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .home-content pre,
[data-theme="dark"] .home-content code {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .home-content blockquote {
    color: var(--text-secondary);
}

