:root {
    --bs-primary-rgb: 13, 110, 253;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success-rgb: 25, 135, 84;
    --bs-info-rgb: 13, 202, 240;
    --bs-warning-rgb: 255, 193, 7;
    --bs-danger-rgb: 220, 53, 69;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #f8f9fa;
}

[data-bs-theme="light"] {
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #212529;
}

.month-container {
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    padding: 1rem;
}

.month-container h2 {
    margin-bottom: 1rem;
}

.table {
    border-collapse: separate;
    border-spacing: 0.25rem;
}

.table th, .table td {
    padding: 0.5rem;
    text-align: center;
    border-radius: 0.25rem;
}

.table thead {
    position: sticky;
    top: 0;
    z-index: 100;
}

.table th {
    background-color: rgba(var(--bs-secondary-rgb), 0.2);
}

td[data-date][data-shift] {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

td[data-date][data-shift]:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.preference-x {
    background-color: rgba(var(--bs-danger-rgb), 0.7);
}

.preference-o {
    background-color: rgba(var(--bs-warning-rgb), 0.7);
}

.preference-\! {
    background-color: rgba(var(--bs-success-rgb), 0.7);
}

td[data-date][data-shift]:empty {
    background-color: transparent;
}

td[data-shift^="BD"], td[data-shift="Rufdienst"] {
    border-right: 2px solid rgba(var(--bs-info-rgb), 0.5);
}

td[data-shift^="SD"], td[data-shift="FDlang"], td[data-shift="POPE"] {
    border-right: 2px solid rgba(var(--bs-warning-rgb), 0.5);
}

td[data-shift^="Intensiv"] {
    border-right: 2px solid rgba(var(--bs-danger-rgb), 0.5);
}

td[data-shift^="NEF"], td[data-shift^="ITW"] {
    border-right: 2px solid rgba(var(--bs-success-rgb), 0.5);
}

tr.weekend td {
    background-color: rgba(var(--bs-secondary-rgb), 0.2) !important;
}

.note-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.note-btn.has-note {
    background-color: var(--bs-info);
    color: var(--bs-light);
}

.navbar-nav .nav-item .nav-link.logged-in-user {
    color: var(--bs-info);
    font-weight: bold;
    background-color: rgba(var(--bs-info-rgb), 0.1);
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    margin-right: 0.5rem;
    display: inline-block;
    width: auto;
    margin-bottom: 0.5rem;
}

.navbar-nav .nav-item .nav-link.logged-in-user:hover {
    background-color: rgba(var(--bs-info-rgb), 0.2);
}

.navbar-nav .nav-item .nav-link.logged-in-user i {
    margin-right: 0.25rem;
}

@media (max-width: 768px) {
    .table {
        font-size: 0.8rem;
    }

    .table th, .table td {
    padding: 0.25rem;
}

@media (max-width: 991px) {
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar-nav .utility-buttons {
        display: flex;
        gap: 0.5rem;
    }
    
    #themeToggle, #helpButton {
        display: inline-block;
        margin: 0;
    }

    /* Month edit mobile optimizations */
    .month-container {
        margin: 0;
        padding: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.875rem;
        min-width: 800px; /* Ensure horizontal scroll on mobile */
    }

    .table th, .table td {
        padding: 0.35rem;
        min-width: 2.5rem;
    }

    .legend {
        flex-wrap: wrap;
        font-size: 0.875rem;
    }

    .legend .list-inline-item {
        margin-bottom: 0.5rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .btn {
        padding: 0.375rem 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .d-flex.mb-4 {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
}
}

.card-body {
  height: 100%;
}

.last-edited {
  min-height: 1.5em;
}

.month-tile {
    border: none;
    border-radius: 1rem;
}

.month-tile .card {
    border: none;
    background-color: rgba(var(--bs-secondary-rgb), 0.05);
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.month-tile .card-body {
    padding: 2rem;
}

.month-tile .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.month-tile .status-icon {
    font-size: 1.25rem;
    vertical-align: middle;
    margin-right: 0.75rem;
    opacity: 0.9;
}

.month-tile .card-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
}

.month-tile .last-edited {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    opacity: 0.8;
}

.month-tile .btn {
    margin-top: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border: none;
    box-shadow: 0 2px 4px rgba(53, 122, 189, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #357abd, #2d6da3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(53, 122, 189, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    border: none;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62, #4e555b);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #218838);
    border: none;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

[data-bs-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #5a9ee6, #4589d0);
    color: white;
}

[data-bs-theme="light"] .btn-secondary {
    background: linear-gradient(135deg, #7d8790, #646b71);
    color: white;
}

#themeToggle, #helpButton {
    background: transparent;
    border: 2px solid;
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    transition: all 0.2s ease-in-out;
}

#themeToggle:hover, #helpButton:hover {
    transform: translateY(-1px);
    opacity: 1;
}

.status-icon i.bi-unlock-fill {
    color: var(--bs-success);
}

.status-icon i.bi-lock-fill {
    color: var(--bs-danger);
}

.card-text i {
    margin-right: 0.5rem;
}

#notifications .alert {
    background-color: rgba(var(--bs-dark-rgb), 0.8);
    color: var(--bs-light);
    border: 1px solid rgba(var(--bs-light-rgb), 0.2);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(var(--bs-light-rgb), 0.1);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

#notifications .alert i {
    color: var(--bs-warning);
    margin-right: 0.5rem;
    font-size: 1.1em;
}

#notifications .alert-warning {
    border-left: 4px solid var(--bs-warning);
}

#notifications .alert-info {
    border-left: 4px solid var(--bs-info);
}

[data-bs-theme="light"] #notifications .alert {
    background-color: rgba(var(--bs-light-rgb), 0.8);
    color: var(--bs-dark);
    border: 1px solid rgba(var(--bs-dark-rgb), 0.2);
    box-shadow: 0 0.125rem 0.25rem rgba(var(--bs-dark-rgb), 0.1);
}

[data-bs-theme="light"] #notifications .alert i {
    color: var(--bs-primary);
}

#themeToggle {
    border-width: 2px;
    border-style: solid;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
}

#themeToggle:hover {
    opacity: 0.8;
}

[data-bs-theme="dark"] #themeToggle {
    color: var(--bs-light);
    border-color: var(--bs-light);
    background-color: var(--bs-dark);
}

[data-bs-theme="light"] #themeToggle {
    color: var(--bs-dark);
    border-color: var(--bs-dark);
    background-color: var(--bs-light);
}

[data-bs-theme="light"] {
    --text-muted: #666;
    --text-success: #156c43;
    --text-danger: #b52b37;
    --text-info: #087990;
    --text-warning: #997404;
}

[data-bs-theme="dark"] {
    --text-muted: #999;
    --text-success: #75b798;
    --text-danger: #ea868f;
    --text-info: #6edff6;
    --text-warning: #ffda6a;
}

.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--text-success) !important; }
.text-danger { color: var(--text-danger) !important; }
.text-info { color: var(--text-info) !important; }
.text-warning { color: var(--text-warning) !important; }

#helpButton {
    border-width: 2px;
    border-style: solid;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
}

#helpButton:hover {
    opacity: 0.8;
}

[data-bs-theme="dark"] #helpButton {
    color: var(--bs-light);
    border-color: var(--bs-light);
    background-color: var(--bs-dark);
}

[data-bs-theme="light"] #helpButton {
    color: var(--bs-dark);
    border-color: var(--bs-dark);
    background-color: var(--bs-light);
}

.modal-content {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.modal-header {
    border-bottom-color: var(--bs-secondary);
}

.modal-footer {
    border-top-color: var(--bs-secondary);
}


/* Add your custom styles here */
.cta-box {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

[data-bs-theme="dark"] .cta-box {
    background-color: var(--bs-dark);
    border-color: var(--bs-border-color);
}

[data-bs-theme="light"] .cta-box {
    background-color: var(--bs-white);
    border-color: var(--bs-border-color);
}

/* Footer Styling */
html {
    position: relative;
    min-height: 100vh;
}

body {
    margin: 0;
    padding-bottom: 75px; /* Größer als die Footer-Höhe */
    min-height: 100vh;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(135deg, #1a1d20, #343a40);
    color: #f8f9fa;
    padding: 15px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer .bi-heart-fill {
    color: #ff6b6b;
    animation: heartbeat 1.5s infinite;
    display: inline-block;
    margin: 0 5px;
    font-size: 14px;
}

[data-bs-theme="light"] .footer {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #212529;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .footer a {
    color: #212529;
    background-color: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .footer a:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}